From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BEBBFA0565; Mon, 23 Mar 2020 17:02:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F3E5E1C07D; Mon, 23 Mar 2020 17:02:44 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BC5501C06A for ; Mon, 23 Mar 2020 17:02:42 +0100 (CET) IronPort-SDR: x1QMpW3ImvJn79M8GugNdrtqOzkBnEg1hwRogi+FegS1YEOrAP5KIh/A0UN6zmUajF/+L3zptW cCzmXXwhGhBQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2020 09:02:41 -0700 IronPort-SDR: R6HCDJ4Pd5gw8ifXb6am26UaI4VvVp8T1IIaN5tUU7VHWLZGKfVitx/uPXpOl2tio30mKS3vXT rXnffcq8UVJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,297,1580803200"; d="scan'208";a="447437549" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 23 Mar 2020 09:02:41 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Mar 2020 09:02:41 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 24 Mar 2020 00:02:38 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Tue, 24 Mar 2020 00:02:38 +0800 From: "Wu, Jingjing" To: "Wang, ShougangX" , "dev@dpdk.org" CC: "Rong, Leyi" Thread-Topic: [PATCH] net/iavf: unify Rx ptype table Thread-Index: AQHV82DdmqYXEDwKGE2206RHKEfhO6hVhrww///i/ICAAQgF4A== Date: Mon, 23 Mar 2020 16:02:38 +0000 Message-ID: References: <20200306022419.82814-1-shougangx.wang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: unify Rx ptype table 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Wang, ShougangX > Sent: Monday, March 23, 2020 4:16 PM > To: Wu, Jingjing ; dev@dpdk.org > Cc: Rong, Leyi > Subject: RE: [PATCH] net/iavf: unify Rx ptype table >=20 > > -----Original Message----- > > From: Wu, Jingjing > > Sent: Monday, March 23, 2020 10:09 AM > > To: Wang, ShougangX ; dev@dpdk.org > > Cc: Rong, Leyi > > Subject: RE: [PATCH] net/iavf: unify Rx ptype table > > > > > > > > -----Original Message----- > > From: Wang, ShougangX > > Sent: Friday, March 6, 2020 10:24 AM > > To: dev@dpdk.org > > Cc: Rong, Leyi ; Wu, Jingjing ; > > Wang, ShougangX > > Subject: [PATCH] net/iavf: unify Rx ptype table > > > > From: Wang Shougang > > > > This patch unified the Rx ptype table. > > > > Signed-off-by: Wang Shougang > > --- > > drivers/net/iavf/iavf.h | 3 +- > > drivers/net/iavf/iavf_ethdev.c | 3 + > > drivers/net/iavf/iavf_rxtx.c | 604 +++++++++++++++++++++++--- > > drivers/net/iavf/iavf_rxtx.h | 3 + > > drivers/net/iavf/iavf_rxtx_vec_avx2.c | 21 +- > > drivers/net/iavf/iavf_rxtx_vec_sse.c | 25 +- > > 6 files changed, 561 insertions(+), 98 deletions(-) > > > > diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index > > fe25d807c..526040c6e 100644 > > --- a/drivers/net/iavf/iavf.h > > +++ b/drivers/net/iavf/iavf.h > > @@ -119,7 +119,7 @@ struct iavf_info { > > uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS]; }; > > > > -#define IAVF_MAX_PKT_TYPE 256 > > +#define IAVF_MAX_PKT_TYPE 1024 > > > > /* Structure to store private data for each VF instance. */ struct ia= vf_adapter > > { @@ -131,6 +131,7 @@ struct iavf_adapter { > > /* For vector PMD */ > > bool rx_vec_allowed; > > bool tx_vec_allowed; > > + const uint32_t *ptype_tbl; > > bool stopped; > > }; > > > > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_eth= dev.c index > > 34913f9c4..ee9f82249 100644 > > --- a/drivers/net/iavf/iavf_ethdev.c > > +++ b/drivers/net/iavf/iavf_ethdev.c > > @@ -1334,6 +1334,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) > > return -1; > > } > > > > + /* set default ptype table */ > > + adapter->ptype_tbl =3D iavf_get_default_ptype_table(); > > + > > As the ptype table is static, is that necessary to define a function to= get it? Is > > there any consideration for future extension? >=20 > Yes, I'm used to encapsulating it as a function for future extension. > Do I need to set it as a global table instead of encapsulating in functio= n? Is there any chance the default ptype table change? If so, I think you can = keep it as a function. >=20 > Thanks. > Shougang