DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Virtual NIC interface fails to receive packets
@ 2015-03-18 16:39 Shankari Vaidyalingam
  2015-03-19  4:16 ` Yerden Zhumabekov
  0 siblings, 1 reply; 2+ messages in thread
From: Shankari Vaidyalingam @ 2015-03-18 16:39 UTC (permalink / raw)
  To: dev

Hi,

I'm trying to test the l2fwd sample application by passing packets from
traffic generator.
I'm doing this testing in a VM with a configuration hav‌ing virtual NIC
port.
When I bind the virtual NIC port with the igb driver, the interface doesnt
get listed in the "ifconfig" output.
Also the virtual NIC port fails to receive packets from the traffic
generator after the interface is bound to igb driver.
Please let me know whether this is the expected behavior and also let me
know how I can make the traffic pass through the port
bound to the igb driver.

While starting the VM the interfaces currently active:

controller@controller-VirtualBox:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:21:a9:02
          inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe21:a902/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1180 (1.1 KB)  TX bytes:14504 (14.5 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:ef:8b:a1
          inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:feef:8ba1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1180 (1.1 KB)  TX bytes:15132 (15.1 KB)

eth2      Link encap:Ethernet  HWaddr 08:00:27:bc:04:b6
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:febc:4b6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:150 errors:0 dropped:0 overruns:0 frame:0
          TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12304 (12.3 KB)  TX bytes:25233 (25.2 KB)

eth4      Link encap:Ethernet  HWaddr 08:00:27:b7:3a:25
          inet6 addr: fe80::a00:27ff:feb7:3a25/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:196 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:44609 (44.6 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:300 errors:0 dropped:0 overruns:0 frame:0
          TX packets:300 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:18580 (18.5 KB)  TX bytes:18580 (18.5 KB)


After executing this command >>>>


controller@controller-VirtualBox:~/dpdk-1.7.1$ sudo insmod
$RTE_SDK/$RTE_TARGET/kmod/igb_uio.ko
controller@controller-VirtualBox:~/dpdk-1.7.1$ sudo
$RTE_SDK/tools/dpdk_nic_bind.py --bind=igb_uio 00:08.0 00:09.0 00:0a.0
Routing table indicates that interface 0000:00:08.0 is active. Not modifying
Routing table indicates that interface 0000:00:09.0 is active. Not modifying
controller@controller-VirtualBox:~/dpdk-1.7.1$ sudo
$RTE_SDK/tools/dpdk_nic_bind.py --status

Network devices using DPDK-compatible driver
============================================
0000:00:0a.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio
unused=e1000

Network devices using kernel driver
===================================
0000:00:08.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth0
drv=e1000 unused=igb_uio *Active*
0000:00:09.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth1
drv=e1000 unused=igb_uio *Active*
0000:00:11.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth2
drv=e1000 unused=igb_uio *Active*

Other network devices
=====================
<none>

got the below output:







controller@controller-VirtualBox:~$ ifconfig eth4 >>> Corresponds to the
interface bound to igb driver

eth4: error fetching interface information: Device not found
controller@controller-VirtualBox:~$ ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 08:00:27:bc:04:b6
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:febc:4b6/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:197 errors:0 dropped:0 overruns:0 frame:0
          TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15864 (15.8 KB)  TX bytes:30592 (30.5 KB)

controller@controller-VirtualBox:~$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 08:00:27:ef:8b:a1
          inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:feef:8ba1/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1180 (1.1 KB)  TX bytes:17162 (17.1 KB)aff


          After this when I send traffic with this MAC >>> 080027b73a25
traffic does not flow to this interface

         Regards
         Shankari.V

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] Virtual NIC interface fails to receive packets
  2015-03-18 16:39 [dpdk-dev] Virtual NIC interface fails to receive packets Shankari Vaidyalingam
@ 2015-03-19  4:16 ` Yerden Zhumabekov
  0 siblings, 0 replies; 2+ messages in thread
From: Yerden Zhumabekov @ 2015-03-19  4:16 UTC (permalink / raw)
  To: Shankari Vaidyalingam, dev

Hi Shankari,

First, in order to use network interfaces in dpdk, you need to stop
them. That's why you see 'Routing table indicates that interface
0000:00:08.0 is active. Not modifying' message when you bind them to
igb. You can stop them with 'ifconfig ... down' command.

Second, after you successfully bind at least a pair of ports to igb
driver, they will disappear from ifconfig output as these network
interfaces are no longer controlled by the kernel. That means that the
traffic coming though the interfaces controlled by igb driver should be
handled with custom programmed dataplane that the dpdk application (like
l2fwd) implements.

You can refer to the documentation on dpdk, which is available here:
http://dpdk.org/doc/guides/

18.03.2015 22:39, Shankari Vaidyalingam пишет:
> Hi,
>
> I'm trying to test the l2fwd sample application by passing packets from
> traffic generator.
> I'm doing this testing in a VM with a configuration hav‌ing virtual NIC
> port.
> When I bind the virtual NIC port with the igb driver, the interface doesnt
> get listed in the "ifconfig" output.
> Also the virtual NIC port fails to receive packets from the traffic
> generator after the interface is bound to igb driver.
> Please let me know whether this is the expected behavior and also let me
> know how I can make the traffic pass through the port
> bound to the igb driver.
>
> While starting the VM the interfaces currently active:
>
> controller@controller-VirtualBox:~$ ifconfig -a
> eth0      Link encap:Ethernet  HWaddr 08:00:27:21:a9:02
>           inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:fe21:a902/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:1180 (1.1 KB)  TX bytes:14504 (14.5 KB)
>
> eth1      Link encap:Ethernet  HWaddr 08:00:27:ef:8b:a1
>           inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:feef:8ba1/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:1180 (1.1 KB)  TX bytes:15132 (15.1 KB)
>
> eth2      Link encap:Ethernet  HWaddr 08:00:27:bc:04:b6
>           inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:febc:4b6/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:150 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:12304 (12.3 KB)  TX bytes:25233 (25.2 KB)
>
> eth4      Link encap:Ethernet  HWaddr 08:00:27:b7:3a:25
>           inet6 addr: fe80::a00:27ff:feb7:3a25/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:196 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:44609 (44.6 KB)
>
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:65536  Metric:1
>           RX packets:300 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:300 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:18580 (18.5 KB)  TX bytes:18580 (18.5 KB)
>
>
> After executing this command >>>>
>
>
> controller@controller-VirtualBox:~/dpdk-1.7.1$ sudo insmod
> $RTE_SDK/$RTE_TARGET/kmod/igb_uio.ko
> controller@controller-VirtualBox:~/dpdk-1.7.1$ sudo
> $RTE_SDK/tools/dpdk_nic_bind.py --bind=igb_uio 00:08.0 00:09.0 00:0a.0
> Routing table indicates that interface 0000:00:08.0 is active. Not modifying
> Routing table indicates that interface 0000:00:09.0 is active. Not modifying
> controller@controller-VirtualBox:~/dpdk-1.7.1$ sudo
> $RTE_SDK/tools/dpdk_nic_bind.py --status
>
> Network devices using DPDK-compatible driver
> ============================================
> 0000:00:0a.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio
> unused=e1000
>
> Network devices using kernel driver
> ===================================
> 0000:00:08.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth0
> drv=e1000 unused=igb_uio *Active*
> 0000:00:09.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth1
> drv=e1000 unused=igb_uio *Active*
> 0000:00:11.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth2
> drv=e1000 unused=igb_uio *Active*
>
> Other network devices
> =====================
> <none>
>
> got the below output:
>
>
>
>
>
>
>
> controller@controller-VirtualBox:~$ ifconfig eth4 >>> Corresponds to the
> interface bound to igb driver
>
> eth4: error fetching interface information: Device not found
> controller@controller-VirtualBox:~$ ifconfig eth2
> eth2      Link encap:Ethernet  HWaddr 08:00:27:bc:04:b6
>           inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:febc:4b6/64 Scope:Link
>           UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
>           RX packets:197 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:15864 (15.8 KB)  TX bytes:30592 (30.5 KB)
>
> controller@controller-VirtualBox:~$ ifconfig eth1
> eth1      Link encap:Ethernet  HWaddr 08:00:27:ef:8b:a1
>           inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:feef:8ba1/64 Scope:Link
>           UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
>           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:1180 (1.1 KB)  TX bytes:17162 (17.1 KB)aff
>
>
>           After this when I send traffic with this MAC >>> 080027b73a25
> traffic does not flow to this interface
>
>          Regards
>          Shankari.V

-- 
Sincerely,

Yerden Zhumabekov
State Technical Service
Astana, KZ

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-19  4:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 16:39 [dpdk-dev] Virtual NIC interface fails to receive packets Shankari Vaidyalingam
2015-03-19  4:16 ` Yerden Zhumabekov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).