From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4BFD129CA for ; Thu, 29 Jun 2017 07:36:28 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2017 22:36:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,279,1496127600"; d="scan'208";a="279965420" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 28 Jun 2017 22:36:27 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 28 Jun 2017 22:36:27 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 28 Jun 2017 22:36:27 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by shsmsx102.ccr.corp.intel.com ([169.254.2.146]) with mapi id 14.03.0319.002; Thu, 29 Jun 2017 13:36:24 +0800 From: "Wu, Jingjing" To: Ajit Khaparde , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix io fwd mode to forward VLAN packets Thread-Index: AQHS8IS/GD/nTcwQ90Kb2xl1T9gHGaI7UUwA Date: Thu, 29 Jun 2017 05:36:24 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810DB5CCE@SHSMSX103.ccr.corp.intel.com> References: <20170629030615.20098-1-ajit.khaparde@broadcom.com> In-Reply-To: <20170629030615.20098-1-ajit.khaparde@broadcom.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix io fwd mode to forward VLAN packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 05:36:29 -0000 > -----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 >=20 > In io fwd mode, while the received VLAN packets are forwarded for transmi= t, > the ol_flags are not updated appropriately to indicate presence of VLAN t= ags in > the Tx path. This patch fixes that. >=20 > Signed-off-by: Ajit Khaparde > --- > app/test-pmd/iofwd.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > 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 =3D rte_rdtsc(); > #endif > + int i; >=20 > /* > * 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 =3D 0; i < nb_rx; i++) { > + uint64_t tx_ol_flags =3D 0, rx_ol_flags =3D pkts_burst[i]->ol_flags; > + > + if (rx_ol_flags & PKT_RX_VLAN_PKT) > + tx_ol_flags |=3D PKT_TX_VLAN_PKT; > + else if (rx_ol_flags & PKT_RX_QINQ_PKT) > + tx_ol_flags |=3D PKT_TX_QINQ_PKT; > + > + pkts_burst[i]->ol_flags =3D 0; > + pkts_burst[i]->ol_flags =3D 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.=20 If you'd like to demonstrate the vlan offload feature, you can other fwd en= gine Such as txonly, macfwd...... Thanks Jingjing