From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3EF7EA2F for ; Thu, 19 Nov 2015 08:05:24 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 18 Nov 2015 23:05:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,317,1444719600"; d="scan'208";a="689166302" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 18 Nov 2015 23:05:17 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Nov 2015 23:05:16 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Nov 2015 23:05:16 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.42]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.193]) with mapi id 14.03.0248.002; Thu, 19 Nov 2015 15:05:14 +0800 From: "Chen, Jing D" To: "He, Shaopeng" , "dev@dpdk.org" Thread-Topic: [PATCH] fm10k: fix wrong VLAN value in RX mbuf Thread-Index: AQHRId4xGBbFq0vlq0yCZXtqMfpi9p6i7JWQ Date: Thu, 19 Nov 2015 07:05:13 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D02B0AAD2@shsmsx102.ccr.corp.intel.com> References: <1447836609-23944-1-git-send-email-shaopeng.he@intel.com> In-Reply-To: <1447836609-23944-1-git-send-email-shaopeng.he@intel.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] fm10k: fix wrong VLAN value in RX mbuf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 07:05:24 -0000 Hi,=20 Worth to adding comments that vlan_tci is only valid in case RTE_LIBRTE_FM1= 0K_RX_OLFLAGS_ENABLE is turned on and=20 Flag PKT_RX_VLAN_PKT is set. =20 Best Regards, Mark > -----Original Message----- > From: He, Shaopeng > Sent: Wednesday, November 18, 2015 4:50 PM > To: dev@dpdk.org > Cc: Chen, Jing D; Qiu, Michael; He, Shaopeng > Subject: [PATCH] fm10k: fix wrong VLAN value in RX mbuf >=20 > VLAN value should be copied from RX descriptor to mbuf, > this patch fixes this issue. >=20 > Signed-off-by: Shaopeng He > --- > drivers/net/fm10k/fm10k_rxtx.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/fm10k/fm10k_rxtx.c > b/drivers/net/fm10k/fm10k_rxtx.c > index 1bac28d..eeb635e 100644 > --- a/drivers/net/fm10k/fm10k_rxtx.c > +++ b/drivers/net/fm10k/fm10k_rxtx.c > @@ -146,6 +146,7 @@ fm10k_recv_pkts(void *rx_queue, struct rte_mbuf > **rx_pkts, > #endif >=20 > mbuf->hash.rss =3D desc.d.rss; > + mbuf->vlan_tci =3D desc.w.vlan & > FM10K_RXD_VLAN_ID_MASK; >=20 > rx_pkts[count] =3D mbuf; > if (++next_dd =3D=3D q->nb_desc) { > @@ -292,6 +293,7 @@ fm10k_recv_scattered_pkts(void *rx_queue, struct > rte_mbuf **rx_pkts, > rx_desc_to_ol_flags(first_seg, &desc); > #endif > first_seg->hash.rss =3D desc.d.rss; > + first_seg->vlan_tci =3D desc.w.vlan & > FM10K_RXD_VLAN_ID_MASK; >=20 > /* Prefetch data of first segment, if configured to do so. */ > rte_packet_prefetch((char *)first_seg->buf_addr + > -- > 1.9.3