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 DAA3F2E8D for ; Fri, 20 Nov 2015 03:54:53 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 19 Nov 2015 18:54:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,320,1444719600"; d="scan'208";a="842963588" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 19 Nov 2015 18:54:52 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 19 Nov 2015 18:54:52 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 19 Nov 2015 18:54:52 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.42]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.88]) with mapi id 14.03.0248.002; Fri, 20 Nov 2015 10:54:50 +0800 From: "He, Shaopeng" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH] fm10k: fix wrong VLAN value in RX mbuf Thread-Index: AQHRId4x8PqGeCNCJE604iYU60znK56jFM+AgAEgA/A= Date: Fri, 20 Nov 2015 02:54:49 +0000 Message-ID: References: <1447836609-23944-1-git-send-email-shaopeng.he@intel.com> <20151119092547.2ffb056c@xeon-e3> In-Reply-To: <20151119092547.2ffb056c@xeon-e3> Accept-Language: zh-CN, 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 Cc: "dev@dpdk.org" 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: Fri, 20 Nov 2015 02:54:54 -0000 Hi, Stephen > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, November 20, 2015 1:26 AM > To: He, Shaopeng > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] fm10k: fix wrong VLAN value in RX mbuf >=20 > On Wed, 18 Nov 2015 16:50:09 +0800 > Shaopeng He wrote: >=20 > > VLAN value should be copied from RX descriptor to mbuf, this patch > > fixes this issue. > > > > Signed-off-by: Shaopeng He > > --- > > drivers/net/fm10k/fm10k_rxtx.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > 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 > > > > mbuf->hash.rss =3D desc.d.rss; > > + mbuf->vlan_tci =3D desc.w.vlan & > FM10K_RXD_VLAN_ID_MASK; > > > > 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; > > > > /* Prefetch data of first segment, if configured to do so. */ > > rte_packet_prefetch((char *)first_seg->buf_addr + >=20 > Good catch, this bug means VLAN's would not work right now. > But I think it isn't quite right. Actually, VLAN filter works well, only the vlan_tci in mbuf has wrong value= . And because not much places use the vlan_tci, this bug was not found before. >=20 > By masking the VLAN you are losing the received priority bits. > Other drivers like ixgbe preserve the priority bits. Yes, you are right, in next version, I will preserve the priority bits like= others. Thanks, --Shaopeng