Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does dpdk-suricata support vhost-user? #29

Open
Leonardo-DiCaprio opened this issue Aug 7, 2020 · 2 comments
Open

Does dpdk-suricata support vhost-user? #29

Leonardo-DiCaprio opened this issue Aug 7, 2020 · 2 comments
Assignees
Labels
notbug tag to represent tickets which are really not a bug

Comments

@Leonardo-DiCaprio
Copy link

I test this project with pktegn in the same machine, pktgen in docker and dpdk-suricata in host.
I build a clear docker envrioment mounting hugepages folder and /tmp/virtio/, where I plan to save my virtio socks on host.
Then I run this command in docker
`./pktgen -l 1-5 -n 3 --socket-mem 1024 --vdev 'eth_vhost0,iface=/tmp/virtio/sock0' --file-prefix=test --no-pci -- -P -m "5.0"
It seems pktgen works well in container, and there it is a sock0 file in /tmp/virtio/

And I test this for sure in host:
sudo ./testpmd -l 0-1 -n 1 --socket-mem 1024 --vdev 'virtio_user0,path=/tmp/virtio/sock0' -- -i --forward-mode=io --auto-start
Testpmd can receive packte from pktgen(all packets can be received in order).

Then I run dpdk-suricata in host with config like this:

[EAL]
-l=6-10
-n=2
--base-virtaddr=0x300000000000
--master-lcore=6
--socket-mem=128
--socket-limit=2048
--vdev=virtio_user0,path=/tmp/virtio/sock0

Command: ./src/suricata -c suricata.yaml --dpdkintel
But I got this error:

7/8/2020 -- 16:25:37 - <Debug> -  ................ Validating configurations!!
7/8/2020 -- 16:25:37 - <Debug> -  - CPU: 5
7/8/2020 -- 16:25:37 - <Debug> -  - Port: 1
7/8/2020 -- 16:25:37 - <Debug> -  - execute threads: 5
7/8/2020 -- 16:25:37 - <Debug> -  - DPDK ports 1 config-file ports 1
7/8/2020 -- 16:25:37 - <Debug> -  - pkt MBUFF setup 0x30007fc87280
7/8/2020 -- 16:25:37 - <Debug> -  - port (0) Name (virtio_user0)
Ethdev port_id=0 nb_tx_queues=2 > 1
7/8/2020 -- 16:25:37 - <Error> - [ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] -  configure device: err=-22, port=0

7/8/2020 -- 16:25:37 - <Error> - [ERRCODE: SC_ERR_MISSING_CONFIG_PARAM(118)] - DPDK dev setup!!

Then I locate this error in

ret = rte_eth_dev_configure(inport, 1, 2, &portConf);

And I notice there is a TODO saying that:

       ToDo: support for non INTEL PCI interfaces also - phase 2
        /* ToDo - change default configuration to systune configuration */ 

And the default configuration is:

.rxmode = {
    .split_hdr_size = 0,
},
.txmode = {
    .mq_mode = ETH_MQ_TX_NONE,
},

I try to change default config in your code by imitating l2fwd's config, but failed. Now I am not sure if there is still a todo or not.

@vipinpv85
Copy link
Owner

not an error, you can easily fix this

@Leonardo-DiCaprio
Copy link
Author

Are there any hints? I try to run with --vdev=virtio_user0,queues=1,path=/tmp/virtio/sock0, but this didn't help.

@vipinpv85 vipinpv85 added the notbug tag to represent tickets which are really not a bug label Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notbug tag to represent tickets which are really not a bug
Projects
None yet
Development

No branches or pull requests

2 participants