From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 388ACF95C for ; Mon, 27 Mar 2017 03:55:50 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 26 Mar 2017 18:55:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,229,1486454400"; d="scan'208";a="81244538" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 26 Mar 2017 18:55:49 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 26 Mar 2017 18:55:48 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 26 Mar 2017 18:55:48 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.253]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.42]) with mapi id 14.03.0248.002; Mon, 27 Mar 2017 09:55:46 +0800 From: "Zhang, Qi Z" To: "Wu, Jingjing" , "Zhang, Helin" CC: "dev@dpdk.org" Thread-Topic: [PATCH v3 2/3] net/i40e: configurable PTYPE mapping Thread-Index: AQHSnwR+OZhc2Oc5nkC+XDe+iM3Cu6GjRV+AgASrUnA= Date: Mon, 27 Mar 2017 01:55:46 +0000 Message-ID: <039ED4275CED7440929022BC67E70611530758E4@SHSMSX103.ccr.corp.intel.com> References: <20170317104512.25969-1-qi.z.zhang@intel.com> <20170317104512.25969-3-qi.z.zhang@intel.com> <9BB6961774997848B5B42BEC655768F810D13446@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810D13446@SHSMSX103.ccr.corp.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 v3 2/3] net/i40e: configurable PTYPE mapping 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: Mon, 27 Mar 2017 01:55:50 -0000 Hi Jingjing > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, March 24, 2017 5:55 PM > To: Zhang, Qi Z ; Zhang, Helin > > Cc: dev@dpdk.org > Subject: RE: [PATCH v3 2/3] net/i40e: configurable PTYPE mapping >=20 > > diff --git a/drivers/net/i40e/rte_pmd_i40e.h > > b/drivers/net/i40e/rte_pmd_i40e.h index a0ad88c..1e25270 100644 > > --- a/drivers/net/i40e/rte_pmd_i40e.h > > +++ b/drivers/net/i40e/rte_pmd_i40e.h > > @@ -65,6 +65,13 @@ struct rte_pmd_i40e_mb_event_param { > > uint16_t msglen; /**< length of the message */ > > }; > > > > +#define RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK 0x80000000 > > + >=20 > Could you add more comments to describe the MASK's meaning? > And what is user defined packet type, and what is the user defined packet > type? The purpose of this mask is to let application define their own software PT= YPE while not break existing ones. I will add more comments to explain this. >=20 >=20 > And what is the difference between update and replace map? Both APIs is used to update the ptype mapping table The difference is=20 rte_pmd_i40e_ptype_mapping_replace will searched the specific software ptyp= e (or group) in ptype mapping table and replace it with the new one. One of the situation to use this API is, application try to simplify the pt= ype table by representing a group of more specific sw ptype with a generic = one like below rte_pmd_i40e_ptype_mapping_replace(port_id, RTE_PTYPE_L2_MASK, 1, RTE_PTYPE= _L2_ETHER); rte_pmd_i40e_ptype_mapping_update is a little bit low level, because the ap= plication need to know about the hardware ptype encode,=20 Application can define its own ptype mapping table according to datasheet f= rom scratch or just by modifying the return content from rte_pmd_i40e_ptype= _mapping_get=20 then use this API to override the whole old table (exclusive set), or part = of the old one (exclusive not set) Thanks Qi