DPDK patches and discussions
 help / color / mirror / Atom feed
From: Daniel Kaminsky <daniel.kaminsky@infinitelocality.com>
To: James Yu <ypyu2011@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Passing VLAN traffic via l2fwd
Date: Thu, 23 Jan 2014 10:45:30 +0200	[thread overview]
Message-ID: <CA+8v-Jys===18X-Zy3QxQUfTd5iiFaTZZCQxD-HbAD8NQuOgPQ@mail.gmail.com> (raw)
In-Reply-To: <CAFMB=kDQo80Zxknh3_nGbWKsSzMwCP4HBb9_OkGFaJ2uDNwqEA@mail.gmail.com>

Hi James,

Did you try a non-tagged traffic? I suspect this is the limitation of the
l2fwd or the requirements of Spirent. From my experience with Ixia, the L2
forward device must implement the ARP protocol (at least a subset of it).

Also, notice that the l2fwd example sets the destination MAC address to
"02:00:00:00:00:xx" which the Spirent might doesn't like.

Daniel


On Thu, Jan 23, 2014 at 7:08 AM, James Yu <ypyu2011@gmail.com> wrote:

> I could not pass tagged traffic through the l2fwd program running inside a
> CentOS VM. The l2fwd program reported sending out all the packets received
> from one port to the other port. But the outside Spirent tester could not
> receive a packet at all. I am wondering maybe the tagged packets are
> dropped somewhere in the rte_em_pmd or in the DPDK library. Anyone knows
> how to pass/send VLAN traffic through the DPDK ?
>
> With tagged SR-IOV ports, Spirent and guest VM CentOS could ping each other
> without using DPDK. Once I used DPDK 1.3.1r2, I encountered issues with
> sending out tagged packets out of DPDK to the host.
>
> I have done the following:
>
> On RHEL6.1 host
> 1. setup the VLAN using "ip link set eth2 vf 0 vlan 3" for port 1 and "ip
> link set eth3 vf 0 vlan 3" for port 2
> [root@cent64x64-137189 ~]# ip link show eth2
> 96: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
> 1000
>     link/ether 90:e2:ba:2e:af:f0 brd ff:ff:ff:ff:ff:ff
>     vf 0 MAC 52:54:00:f9:9a:90, vlan 3
> [root@cent64x64-137189 ~]# ip link show eth3
> 98: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
> 1000
>     link/ether 90:e2:ba:2e:af:f1 brd ff:ff:ff:ff:ff:ff
>     vf 0 MAC 52:54:00:30:37:98, vlan 3
>
> 2. virsh configure SR-IOV hostdev
>     <interface type='hostdev' managed='yes'>
>       <mac address='52:54:00:f9:9a:90'/>
>       <source>
>         <address type='pci' domain='0x0000' bus='0x1a' slot='0x10'
> function='0x0'/>
>       </source>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x08'
> function='0x0'/>
>     </interface>
>     <interface type='hostdev' managed='yes'>
>       <mac address='52:54:00:30:37:98'/>
>       <source>
>         <address type='pci' domain='0x0000' bus='0x1a' slot='0x10'
> function='0x1'/>
>       </source>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x09'
> function='0x0'/>
>     </interface>
>
> [root@cent64x64-137189 ~]# lspci |grep Eth
> 1a:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+
> Network Connection (rev 01)
> 1a:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+
> Network Connection (rev 01)
> 1a:10.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
> 1a:10.1 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
>
>
> On guest VM
> 1. check all the ports are started up and check their corresponding port
> type. Use the two SR-IOV ports with device type as ixgbevf  for l2fwd
> [root@VirtualADX ~]# lspci |grep Eth
> 00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet
> Controller (rev 03)
> 00:07.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet
> Controller (rev 03)
> 00:08.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
> 00:09.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller
> Virtual Function (rev 01)
> 00:0a.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet
> Controller (rev 03)
>
> 2. run this command:
>            /root/l2fwd -c 3 -n 1 -b 000:00:03.0  -b 000:00:07.0 -b
> 000:00:0a.0 -- -q 1 -p 3
>
>     Although the l2fwd forwards all received tagged packets, the Spirent
> tester did not receive any packet at all.
>

  reply	other threads:[~2014-01-23  8:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23  5:08 James Yu
2014-01-23  8:45 ` Daniel Kaminsky [this message]
2014-01-23 19:27   ` James Yu
2014-01-23 21:43     ` Stephen Hemminger
2014-01-24  6:07       ` James Yu
2014-01-28  3:13         ` James Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+8v-Jys===18X-Zy3QxQUfTd5iiFaTZZCQxD-HbAD8NQuOgPQ@mail.gmail.com' \
    --to=daniel.kaminsky@infinitelocality.com \
    --cc=dev@dpdk.org \
    --cc=ypyu2011@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).