From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix io fwd mode to forward VLAN packets
Date: Thu, 29 Jun 2017 05:36:24 +0000 [thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F810DB5CCE@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20170629030615.20098-1-ajit.khaparde@broadcom.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ajit Khaparde
> Sent: Thursday, June 29, 2017 11:06 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix io fwd mode to forward VLAN
> packets
>
> In io fwd mode, while the received VLAN packets are forwarded for transmit,
> the ol_flags are not updated appropriately to indicate presence of VLAN tags in
> the Tx path. This patch fixes that.
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
> app/test-pmd/iofwd.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/app/test-pmd/iofwd.c b/app/test-pmd/iofwd.c index
> 15cb4a2..997d3c3 100644
> --- a/app/test-pmd/iofwd.c
> +++ b/app/test-pmd/iofwd.c
> @@ -91,6 +91,7 @@ pkt_burst_io_forward(struct fwd_stream *fs) #ifdef
> RTE_TEST_PMD_RECORD_CORE_CYCLES
> start_tsc = rte_rdtsc();
> #endif
> + int i;
>
> /*
> * Receive a burst of packets and forward them.
> @@ -104,6 +105,20 @@ pkt_burst_io_forward(struct fwd_stream *fs) #ifdef
> RTE_TEST_PMD_RECORD_BURST_STATS
> fs->rx_burst_stats.pkt_burst_spread[nb_rx]++;
> #endif
> +
> + for (i = 0; i < nb_rx; i++) {
> + uint64_t tx_ol_flags = 0, rx_ol_flags = pkts_burst[i]->ol_flags;
> +
> + if (rx_ol_flags & PKT_RX_VLAN_PKT)
> + tx_ol_flags |= PKT_TX_VLAN_PKT;
> + else if (rx_ol_flags & PKT_RX_QINQ_PKT)
> + tx_ol_flags |= PKT_TX_QINQ_PKT;
> +
> + pkts_burst[i]->ol_flags = 0;
> + pkts_burst[i]->ol_flags = tx_ol_flags;
> +
> + }
> +
The iofwd engine is an fwd engine what just calls tx_burst and rx_burst,
it is purely fwd without carrying any offload features.
If you'd like to demonstrate the vlan offload feature, you can other fwd engine
Such as txonly, macfwd......
Thanks
Jingjing
prev parent reply other threads:[~2017-06-29 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 3:06 Ajit Khaparde
2017-06-29 5:36 ` Wu, Jingjing [this message]
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=9BB6961774997848B5B42BEC655768F810DB5CCE@SHSMSX103.ccr.corp.intel.com \
--to=jingjing.wu@intel.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
/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).