DPDK patches and discussions
 help / color / mirror / Atom feed
From: Caianning <caianning@huawei.com>
To: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-dev] HOW to forward vlan pkt using DPDK loadbalancer and L2FWD, with intel 82599ES
Date: Fri, 4 Nov 2016 10:23:13 +0000	[thread overview]
Message-ID: <F994AE62EFA2864BAC5A2B81D86C27C13E2D8791@nkgeml514-mbx.china.huawei.com> (raw)

In the LB, I do not use any rule. 
What I do with LB:
1, use a field of the header to select an application,
2, cut the l2 Head, both with the vlan tag
3, add another L2 head with the L2 Dst MAC set to the VF used by the application, Both rx and tx pkt has the same vlan tag.
4, put it to tx queue, the same as original Loadbalancer.
io thread will send it out.

What I do with L2FWD:
1, set dst mac to pkt's src mac,
2, set src mac to L2fwd port mac
Vlan is not changed.

The VF used by LoadBalancer is configured with ip link set mac xx:xx:xx:xx:xx, and spoofchk off.  Port_conf with Vlan filter enabled and vlan strip disabled. Called RTE api add Vlan filter table.
The VF used by L2FWD is configured with ip link set mac xx:xx:xx:xx:xx vlan yyy, and spoofchk off. Port_conf with Vlan filter enabled and vlan strip disabled.

But it seems all pkts are dropped by hardware. 
When I use the testpmd mac forward(forward pkt to VF 2), it works fine.
Does anyone have used the LB to process vlan tagged packet(both rx and tx) with intel 82599 VF?
I am not sure what's wrong with LB, and it would be grateful to get some advice from DPDK dev and users groups. 

thanks.

-----邮件原件-----
发件人: Lu, Wenzhuo [mailto:wenzhuo.lu@intel.com] 
发送时间: 2016年11月4日 13:20
收件人: Caianning; users@dpdk.org; dev@dpdk.org
主题: RE: HOW to forward vlan pkt using DPDK loadbalancer and L2FD, with intel 82599ES

Hi Anning,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Caianning
> Sent: Friday, November 4, 2016 10:51 AM
> To: users@dpdk.org; dev@dpdk.org
> Subject: [dpdk-dev] HOW to forward vlan pkt using DPDK loadbalancer 
> and L2FD, with intel 82599ES
> 
> HI,
> 
>          I am using DPDK 16.07 example loadbalancer to as LB to 
> forward vlan pkt to applications. LB and applications are using VFs 
> bound with DPDK igb_uio driver.
> But I found the packet can not be send from LB to application. Pkt 
> input to LB with vlan, after LB processing it is sent out to application using another VF.
> 
> As 82599 need vlan filters if we use VF to process vlan pkts, in the 
> LB we called rte api to add a vlan filter and enable vlan flilter. And 
> set port_conf with vlan strip off.
> And for the application(L2FWD) we use the cmd: ip link set PFxxx VF yy 
> vlan VLANID.
> 
> In the LB ,we can receive pkts with vlan, after processing(cut the 
> head and add another L2 head with same vlan tag, set destination MAC 
> to application VF), it is send out to the application VF.
> the result is: LB can still processing ,but all the pkt post.
> 
> We also did an experiment using testPMD to forward vlan pkt to 
> application on the same VF used by LB, and it is OK.
> We tried kinds of different set of vlan filter, vlan strip, ip link 
> set, but found no solution.
> 
> Does anyone meet the similar problem? And what factor casued the difference?
> 
> Thx.
I saw you mentioned testpmd is fine. Testpmd is a very simple example, normally it forwards packets blindly. It means there's no route rule. It just forwards packets from one port to another.
I guess the difference is the APP you use has some rules for routing/swithing.

                 reply	other threads:[~2016-11-04 10:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=F994AE62EFA2864BAC5A2B81D86C27C13E2D8791@nkgeml514-mbx.china.huawei.com \
    --to=caianning@huawei.com \
    --cc=dev@dpdk.org \
    --cc=users@dpdk.org \
    --cc=wenzhuo.lu@intel.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).