mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
1.98k stars 436 forks source link

Unable to run epserver #232

Open mhabhishek opened 5 years ago

mhabhishek commented 5 years ago

Hi, I am trying to run epserver on Ubuntu 18.04 LTS on VM. When i use this command to run the server $ sudo ./epserver -p /home/abhishek/mtcp/mtcp -f epserver.conf -N 2, the following is the log I get-

Configuration updated by mtcp_setconf(). Failed to allocate memory for file lib malloc: Cannot allocate memory Failed to allocate memory for file src malloc: Cannot allocate memory Failed to allocate memory for file include malloc: Cannot allocate memory

Loading mtcp configuration from : epserver.conf Loading interface setting EAL: Detected 6 lcore(s) EAL: Detected 1 NUMA nodes EAL: Auto-detected process type: PRIMARY EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:03:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 15ad:7b0 net_vmxnet3 Total number of attached devices: 1 Interface name: dpdk0 EAL: Auto-detected process type: PRIMARY Configurations: Number of CPU cores available: 2 Number of CPU cores to use: 2 Maximum number of concurrency per core: 10000 Maximum number of preallocated buffers per core: 10000 Receive buffer size: 8192 Send buffer size: 8192 TCP timeout seconds: 30 TCP timewait seconds: 0 NICs to print statistics: dpdk0


. . . .

Initializing port 0... Invalid value for nb_tx_desc(=128), should be: <= 4096, = 512, and a product of 1 EAL: Error - exiting with code: 1 Cause: rte_eth_tx_queue_setup:err=-22, port=0, queueid: 0

Can you please tell me what the problem is and what needs to be done to fix it?

Thanks, Abhishek.

ajamshed commented 5 years ago

@mhabhishek0604 .

It looks like the device initialization is failing. Can you first please check if example dpdk applications are running?

mhabhishek commented 5 years ago

@ajamshed I checked DPDK helloworld example, it seems to be running fine.

abhishek@dpdk:~/mtcp/dpdk/examples/helloworld/build$ sudo ./helloworld EAL: Detected 6 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:03:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 15ad:7b0 net_vmxnet3 EAL: PCI device 0000:0b:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 15ad:7b0 net_vmxnet3 EAL: PCI device 0000:13:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 15ad:7b0 net_vmxnet3 hello from core 1 hello from core 2 hello from core 3 hello from core 4 hello from core 5 hello from core 0

I changed RTE_TEST_TX_DEFAULT to 512 from 128 in dpdk_module.c and recompiled mtcp. Following is the output i get now for sudo ./epserver -p /home/abhishek/mtcp/mtcp -f epserver.conf -N 2 :

Configuration updated by mtcp_setconf(). Failed to allocate memory for file lib malloc: Cannot allocate memory Failed to allocate memory for file src malloc: Cannot allocate memory Failed to allocate memory for file include malloc: Cannot allocate memory

Loading mtcp configuration from : epserver.conf Loading interface setting EAL: Detected 6 lcore(s) EAL: Detected 1 NUMA nodes EAL: Auto-detected process type: PRIMARY EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:03:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 15ad:7b0 net_vmxnet3 Total number of attached devices: 1 Interface name: dpdk0 EAL: Auto-detected process type: PRIMARY Configurations: Number of CPU cores available: 2 Number of CPU cores to use: 2 Maximum number of concurrency per core: 10000 Maximum number of preallocated buffers per core: 10000 Receive buffer size: 8192 Send buffer size: 8192 TCP timeout seconds: 30 TCP timewait seconds: 0 NICs to print statistics: dpdk0

Initializing port 0... done: [dpdk_load_module: 750] Failed to get flow control info! [dpdk_load_module: 757] Failed to set flow control info!: errno: -95

Checking link statusdone Port 0 Link Up - speed 10000 Mbps - full-duplex CPU 1: initialization finished. [mtcp_create_context:1268] CPU 1 is now the master thread. [CPU 1] dpdk0 flows: 0, RX: 62(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) [ ALL ] dpdk0 flows: 0, RX: 62(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) [CPU 1] dpdk0 flows: 0, RX: 12(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) [ ALL ] dpdk0 flows: 0, RX: 12(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) CPU 0: initialization finished. [CPU 0] dpdk0 flows: 0, RX: 86(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) [CPU 1] dpdk0 flows: 0, RX: 9(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) [ ALL ] dpdk0 flows: 0, RX: 95(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) [CPU 0] dpdk0 flows: 0, RX: 15(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps) [CPU 1] dpdk0 flows: 0, RX: 9(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps)

I am wondering if this is the correct output?

Thanks.

ajamshed commented 5 years ago

@mhabhishek0604 ,

The output looks correct. Are you using a VM (net_vmxnet3)? We don't provide documentation for running mTCP apps on VMs (since we haven't tested it ourselves yet). Can you please switch to bare-metal setup (if possible)?

mhabhishek commented 5 years ago

@ajamshed ,

Yes, i am using VM. I will update you further if i if switch to bare metal setup. Anyways thank you for the support.

Thanks.

mhabhishek commented 5 years ago

@ajamshed

In regards to the above query if I switch to bare metal setup what optimal configuration is required interms of- Linux OS with kernel version GCC version Processor And any other dependencies?

Thanks.

ajamshed commented 5 years ago

Apologies for the delayed response. mTCP, by default, works with dpdk-18.02. Please see this page for the list of OS, kernel version, gcc version, and processor requirements. Please also note that mTCP-dpdk works with this list of network adapters.

mhabhishek commented 5 years ago

@ajamshed Thank you. Will update if I switch to bare metal.