Closed tolunFdancer closed 5 years ago
Marking as invalid, as the answer to the error is due to misconfiguration. you can refer to Configuration
section for IDS
to make things happen.
Note: Please read the README and wiki
When I make the configuration as follow:
dpdkintel:
inputs:
interface: 0000:02:04.0 copy-interface: 0000:02:04.0
opmode: ids
It shows the following error info:
1/8/2019 -- 12:36:09 -
I do not know why the number of ports is 4.
wrong configuration, check the amount dpdk ports is it greater than 4 (use list-ports)
root@localhost suricata-3.0]# ./src/suricata --list-dpdkintel-ports EAL: Detected 8 lcore(s) EAL: No free hugepages reported in hugepages-1048576kB EAL: Multi-process socket /var/run/.rte_unix EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:02:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100f net_e1000_em EAL: PCI device 0000:02:01.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100f net_e1000_em EAL: PCI device 0000:02:04.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100f net_e1000_em
--- DPDK Intel Ports ---
Overall Ports: 2
-- Port: 0 --- MTU: 1500 --- MAX RX MTU: 16128 --- Driver: net_e1000_em --- Index: 0 --- Queues RX 1 & TX 1 --- SRIOV VF: 0 --- Offload RX: f TX: f --- CPU NUMA node: 0 --- Status: Up Led for 5 sec.......
-- Port: 1 --- MTU: 1500 --- MAX RX MTU: 16128 --- Driver: net_e1000_em --- Index: 0 --- Queues RX 1 & TX 1 --- SRIOV VF: 0 --- Offload RX: f TX: f --- CPU NUMA node: 0 --- Status: Up Led for 5 sec.......
very strange, since all devices are identifeid as net_e1000_em
. Run and capture debug log with /src/suricata -c suricata.yaml -s /usr/local/etc/suricata/rulestest-baidu.rules --dpdkintel -vv
EAL: Detected 8 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:02:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:100f net_e1000_em
EAL: PCI device 0000:02:01.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:100f net_e1000_em
EAL: PCI device 0000:02:04.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 8086:100f net_e1000_em
1/8/2019 -- 13:11:01 -
The test-baidu.rules is in the /usr/local/etc/suricata/rules
1/8/2019 -- 13:11:01 - - [ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] - No Mapping found for Port: 1
Yeah, I do not know the meaning of it. So what should I do if you could tell me something, Thanks!
It means ParseDpdkConfig
has not parsed properly for the content you have put in suricata.yaml
. Can you share the screenshot of yaml of dpdk.
These configurations looks perfect, But Suricata API LiveGetDeviceCount
is returning 4. One of the reason can be found from logs as
1/8/2019 -- 13:11:01 - - This is Suricata version 3.0 RELEASE 1/8/2019 -- 13:11:01 - - CPUs/cores online: 8 1/8/2019 -- 13:11:01 - - Adding interface 0000:02:01.0 from config file 1/8/2019 -- 13:11:01 - - Adding interface 0000:02:04.0 from config file
Along with yaml parsing
interface: 0000:02:01.0 copy-interface: 0000:02:01.0 interface: 0000:02:04.0 copy-interface: 0000:02:04.0
@tolunFdancer I am able to reproduce the error with DPDK 18.02.2
and changes to support vmx PMD. I am also removing the pcie address verification method as it is becoming difficult too.
I will upload the fix and update readme. Try and let me know.
Got rid of PCIe based mapping. please check the readme for the change in interface and copy-interface.
What is the dummy value, it is means 0000:02:01.0?
The suricata.yaml configuration is :
dpdkintel: inputs:
When I run "./src/suricata -c suricata.yaml -s /usr/local/etc/suricata/rules/test-baidu.rules --dpdkintel
", it shows the following info and hang there (did not continue to work):
2/8/2019 -- 06:54:50 -
2/8/2019 -- 06:54:52 -
Then I run Ctrl+c , it shows the following info:
2/8/2019 -- 06:54:50 -
2/8/2019 -- 06:54:52 -
^C2/8/2019 -- 06:56:16 -
And the /sur/local/var/log/suricata: [root@localhost suricata]# ll total 36 -rw-r--r--. 1 root root 0 Aug 1 09:59 fast.log -rw-r--r--. 1 root root 0 Aug 1 09:59 http.log -rw-r--r--. 1 root root 33234 Aug 2 06:56 stats.log
The stats.log : [root@localhost suricata]# ll total 36 -rw-r--r--. 1 root root 0 Aug 1 09:59 fast.log -rw-r--r--. 1 root root 0 Aug 1 09:59 http.log -rw-r--r--. 1 root root 33234 Aug 2 06:56 stats.log
I do not konw if this runs success, and I will make some thing to assure the test-baidu.rules work. As you can see ,the error still shows " [ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] - Unknown speed (1000) for 0".
What is the dummy value, it is means 0000:02:01.0?
Please read the readme
https://github.com/vipinpv85/DPDK-Suricata_3.0/issues/12#issuecomment-517530398
2/8/2019 -- 06:54:50 - - [ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] - Unknown speed (1000) for 0
2/8/2019 -- 06:54:50 - - [ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] - Unknown speed (1000) for 1
The request is to use DPDK 17.11
. The version you are using is DPDK 18.02.2
. I have fixed this also for you can pull the fix.
2/8/2019 -- 06:54:52 - - DPDK Started in IDS Mode!!!
This shows the suricata is started in IDS mode.
2/8/2019 -- 06:56:16 - - Intf : 0
2/8/2019 -- 06:56:16 - - + ring full 0, enq err 0, tx err 0, Packet alloc fail 0, Packet Process Fail 0
2/8/2019 -- 06:56:16 - - + Errors RX: 0 TX: 0 Mbuff: 0
2/8/2019 -- 06:56:16 - - + Queue Dropped pkts: 0
2/8/2019 -- 06:56:16 - - ----------------------------------------------------------
2/8/2019 -- 06:56:16 - - Intf : 1
2/8/2019 -- 06:56:16 - - + ring full 0, enq err 0, tx err 0, Packet alloc fail 0, Packet Process Fail 0
2/8/2019 -- 06:56:16 - - + Errors RX: 0 TX: 0 Mbuff: 0
2/8/2019 -- 06:56:16 - - + Queue Dropped pkts: 0
2/8/2019 -- 06:56:16 - - ----------------------------------------------------------
2/8/2019 -- 06:56:16 - - Stats for '0': pkts: 0, drop: 0 (-nan%), invalid chksum: 0
2/8/2019 -- 06:56:16 - - Stats for '1': pkts: 0, drop: 0 (-nan%), invalid chksum: 0
I do not see any traffic going on.
The suricata.yaml :
dpdkintel:
inputs:
And DPDK bind info: Network devices using DPDK-compatible driver 0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' drv=igb_uio unused=e1000 0000:02:04.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' drv=igb_uio unused=e1000
And I have test the DPDK ,it works success , I can assure that.
Then when I run " ./src/suricata -c suricata.yaml -s /usr/local/etc/suricata/rules/test-baidu.rules --dpdkintel" it still shows the following info as I mentioned before ( no traffic going on):
5/8/2019 -- 12:54:05 -
^C5/8/2019 -- 13:02:59 -
So what should I do to find out the problem?
The suricata.yaml :
dpdkintel support
dpdkintel:
inputs:
- interface: 0 copy-interface: 0000:02:01.0
- interface: 1 copy-interface: 0000:02:04.0
And DPDK bind info: Network devices using DPDK-compatible driver 0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' drv=igb_uio unused=e1000 0000:02:04.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' drv=igb_uio unused=e1000
And I have test the DPDK ,it works success , I can assure that. Then when I run " ./src/suricata -c suricata.yaml -s /usr/local/etc/suricata/rules/test-baidu.rules --dpdkintel" it still shows the following info as I mentioned before ( no traffic going on): 5/8/2019 -- 12:54:05 - - DPDK Started in IDS Mode!!!
^C5/8/2019 -- 13:02:59 - - Signal Received. Stopping engine. 5/8/2019 -- 13:02:59 - - Intf : 0 5/8/2019 -- 13:02:59 - - + ring full 0, enq err 0, tx err 0, Packet alloc fail 0, Packet Process Fail 0 5/8/2019 -- 13:02:59 - - + Errors RX: 0 TX: 0 Mbuff: 0 5/8/2019 -- 13:02:59 - - + Queue Dropped pkts: 0 5/8/2019 -- 13:02:59 - - ---------------------------------------------------------- 5/8/2019 -- 13:02:59 - - Intf : 1 5/8/2019 -- 13:02:59 - - + ring full 0, enq err 0, tx err 0, Packet alloc fail 0, Packet Process Fail 0 5/8/2019 -- 13:02:59 - - + Errors RX: 0 TX: 0 Mbuff: 0 5/8/2019 -- 13:02:59 - - + Queue Dropped pkts: 0 5/8/2019 -- 13:02:59 - - ---------------------------------------------------------- 5/8/2019 -- 13:02:59 - - Stats for '0': pkts: 0, drop: 0 (-nan%), invalid chksum: 0 5/8/2019 -- 13:02:59 - - Stats for '1': pkts: 0, drop: 0 (-nan%), invalid chksum: 0
So what should I do to find out the problem?
open a ticket as this is not related to ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] - Unknown speed (1000) for 0
Hi,I have to get your help one more time. My DPDK is build success, and the dpdk bind info is :
Network devices using DPDK-compatible driver 0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' drv=igb_uio unused=e1000,vfio-pci,uio_pci_generic 0000:02:04.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' drv=igb_uio unused=e1000,vfio-pci,uio_pci_generic
And the suricata.yaml info is : dpdkintel support dpdkintel:
inputs:
interface: 0000:02:01.0 copy-interface: 0000:02:04.0
opmode: ids
Then when I run " ./src/suricata -c suricata.yaml -s /usr/local/etc/suricata/rulestest-baidu.rules --dpdkintel" it turns out the following info just like the issue 9 : 1/8/2019 -- 10:42:40 - - [ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] - No Mapping found for Port: 1
1/8/2019 -- 10:42:40 - - DPDK Version: DPDK 18.02.2
1/8/2019 -- 10:42:40 - - ----- Global DPDK-INTEL Config -----
1/8/2019 -- 10:42:40 - - Number Of Ports : 2
1/8/2019 -- 10:42:40 - - Operation Mode : IDS
1/8/2019 -- 10:42:40 - - Port:0, Map:0
1/8/2019 -- 10:42:40 - - Port:1, Map:0
1/8/2019 -- 10:42:40 - - ------------------------------------
1/8/2019 -- 10:42:40 - - ----- Match Pattern ----
1/8/2019 -- 10:42:40 - - http: 1
1/8/2019 -- 10:42:40 - - ftp: 0
1/8/2019 -- 10:42:40 - - tls: 0
1/8/2019 -- 10:42:40 - - dns: 0
1/8/2019 -- 10:42:40 - - smtp: 0
1/8/2019 -- 10:42:40 - - ssh: 0
1/8/2019 -- 10:42:40 - - smb: 0
1/8/2019 -- 10:42:40 - - smb2: 0
1/8/2019 -- 10:42:40 - - dcerpc:0
1/8/2019 -- 10:42:40 - - tcp: 1
1/8/2019 -- 10:42:40 - - udp: 0
1/8/2019 -- 10:42:40 - - sctp: 0
1/8/2019 -- 10:42:40 - - icmpv6:0
1/8/2019 -- 10:42:40 - - gre: 0
1/8/2019 -- 10:42:40 - - raw: 0
1/8/2019 -- 10:42:40 - - ipv4: 0
1/8/2019 -- 10:42:40 - - * ipv6: 0
1/8/2019 -- 10:42:40 - - -----------------------
1/8/2019 -- 10:42:40 - - all 1 packet processing threads, 4 management threads initialized, engine started.
1/8/2019 -- 10:42:40 - - [ERRCODE: SC_ERR_DPDKINTEL_CONFIG_FAILED(275)] - Unknown speed (1000) for 0