From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9C3C75901 for ; Tue, 11 Nov 2014 04:19:38 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 10 Nov 2014 19:22:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,357,1413270000"; d="scan'208";a="620330386" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by fmsmga001.fm.intel.com with ESMTP; 10 Nov 2014 19:29:21 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 11 Nov 2014 11:27:57 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.62]) by shsmsx102.ccr.corp.intel.com ([169.254.2.136]) with mapi id 14.03.0195.001; Tue, 11 Nov 2014 11:27:56 +0800 From: "Zhang, Helin" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v5 2/5] ethdev: add enum type and relevant structures for hash filter control Thread-Index: AQHP9zv1q1ow4Cmu+UqdYuQikZttDJxaz6pQ Date: Tue, 11 Nov 2014 03:27:56 +0000 Message-ID: References: <1413180766-12211-1-git-send-email-helin.zhang@intel.com> <1413861289-26662-1-git-send-email-helin.zhang@intel.com> <1413861289-26662-3-git-send-email-helin.zhang@intel.com> <1845096.HFlylc4sxo@xps13> In-Reply-To: <1845096.HFlylc4sxo@xps13> 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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v5 2/5] ethdev: add enum type and relevant structures for hash filter control 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: Tue, 11 Nov 2014 03:19:40 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, November 3, 2014 3:57 PM > To: Zhang, Helin > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v5 2/5] ethdev: add enum type and relevant > structures for hash filter control >=20 > 2014-10-21 11:14, Helin Zhang: > > +enum rte_eth_hash_filter_info_type { > > + RTE_ETH_HASH_FILTER_INFO_TYPE_UNKNOWN =3D 0, > > + RTE_ETH_HASH_FILTER_INFO_TYPE_SYM_HASH_ENA_PER_PCTYPE, >=20 > PCTYPE is an unknown word in the API layer. > Could you replace it by something more generic? In ethdev layer, the idea of 'flow type' will be used for generic purpose. >=20 > > + RTE_ETH_HASH_FILTER_INFO_TYPE_SYM_HASH_ENA_PER_PORT, > > + RTE_ETH_HASH_FILTER_INFO_TYPE_FILTER_SWAP, > > + RTE_ETH_HASH_FILTER_INFO_TYPE_HASH_FUNCTION, > > + RTE_ETH_HASH_FILTER_INFO_TYPE_MAX, > > +}; >=20 > You should comment each constant. Yes, agree. >=20 > > +struct rte_eth_sym_hash_ena_info { > > + /**< packet classification type, defined in rte_ethdev.h */ > > + uint8_t pctype; >=20 > No, PCTYPE is not anymore defined in ethdev. No pctype will be there on ethdev layer. >=20 > > +/** > > + * A structure used to set or get filter swap information, to support > > + * 'RTE_ETH_FILTER_HASH', 'RTE_ETH_FILTER_GET/RTE_ETH_FILTER_SET', > > + * with information type 'RTE_ETH_HASH_FILTER_INFO_TYPE_FILTER_SWAP'. > > + */ > > +struct rte_eth_filter_swap_info { > > + /**< Packet classification type, defined in rte_ethdev.h */ > > + uint8_t pctype; > > + /**< Offset of the 1st field of the 1st couple to be swapped. */ > > + uint8_t off0_src0; > > + /**< Offset of the 2nd field of the 1st couple to be swapped. */ > > + uint8_t off0_src1; > > + /**< Field length of the first couple. */ > > + uint8_t len0; > > + /**< Offset of the 1st field of the 2nd couple to be swapped. */ > > + uint8_t off1_src0; > > + /**< Offset of the 2nd field of the 2nd couple to be swapped. */ > > + uint8_t off1_src1; > > + /**< Field length of the second couple. */ > > + uint8_t len1; > > +}; >=20 > I guess it would be easier to understand if > RTE_ETH_HASH_FILTER_INFO_TYPE_FILTER_SWAP was defined previously. >=20 > -- > Thomas Regards, Helin