DPDK patches and discussions
 help / color / mirror / Atom feed
From: Alex Markuze <alex@weka.io>
To: Padam Jeet Singh <padam.singh@inventum.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] VLAN header insertion and removal
Date: Sun, 21 Dec 2014 11:12:22 +0200	[thread overview]
Message-ID: <CAKfHP0WrXJT-UAoq21LoHqAdTMd0wOU=-tT0K8cRm1r88R7rcQ@mail.gmail.com> (raw)
In-Reply-To: <ac4ec7d3-617c-46ae-a891-eb95dd6690f6@email.bluemailapp.com>

On ingress when configuring the device
                                        1.modify
the rte_eth_conf.rxmode.hw_vlan_strip  = 1,

On egress you need to  modify the rte_van_macip struct in the sent mbuf*.
(rte_mbuf.h)
                                       1. add the PKT_TX_VLAN_PKT to the
ol_flags fields.
                                       2. fill the plan_tci in
pkt.vlan_macip.f.vlan_tci

*This is true for dpdk 1.7, structs may have moved in 1.8

On Sat, Dec 20, 2014 at 8:39 PM, Padam Jeet Singh <padam.singh@inventum.net>
wrote:

> Hello,
>
> I have done a simple mbuf adjust and prepend to achieve the removal and
> insertion of the vlan header and it works fine. The use case is something
> similar to the l3fwd example where one port has traffic coming in on
> multiple vlans and the other port has no vlans. The packet processing path
> in the middle inserts or removes the vlan.
>
> Is there an offload flag or mode where this can be done in hardware? Or is
> there a more optimized way to do this in dpdk? For sake of performance I
> want to avoid the copy ethernet header, modify mbuf, copy back the header
> steps.
>
> Thanks,
> Padam
> ---------------------------
> Sent from my mobile. Please excuse the brevity, spelling and punctuation.
>
>

  reply	other threads:[~2014-12-21  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-20 18:39 Padam Jeet Singh
2014-12-21  9:12 ` Alex Markuze [this message]
2014-12-23  5:35   ` Padam J. Singh

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='CAKfHP0WrXJT-UAoq21LoHqAdTMd0wOU=-tT0K8cRm1r88R7rcQ@mail.gmail.com' \
    --to=alex@weka.io \
    --cc=dev@dpdk.org \
    --cc=padam.singh@inventum.net \
    /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).