From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 1484A2E89 for ; Thu, 6 Nov 2014 04:33:16 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 05 Nov 2014 19:42:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,323,1413270000"; d="scan'208";a="603204379" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by orsmga001.jf.intel.com with ESMTP; 05 Nov 2014 19:42:32 -0800 Received: from kmsmsx153.gar.corp.intel.com (172.21.73.88) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 6 Nov 2014 11:41:39 +0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 6 Nov 2014 11:41:39 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.174]) by shsmsx102.ccr.corp.intel.com ([169.254.2.156]) with mapi id 14.03.0195.001; Thu, 6 Nov 2014 11:41:38 +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+UqdYuQikZttDJxS9cQA Date: Thu, 6 Nov 2014 03:41:37 +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: Thu, 06 Nov 2014 03:33:18 -0000 Thanks for your good comments! > -----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? So you suggested to remove words of PCTYPE, pctype, or packet classificatio= n type? I am not trying to rename ETH_RSS_IPV4_SHIFT, ..., ETH_RSS_NONF_IPV4_UDP_SH= IFT, ..., etc. They are actually pctype in i40e, and not only for RSS. I would like to ren= ame them into generic names. Any good naming ideas from you or other guys? My idea is to = rename them like RTE_ETH_FLOW_TYPE_XX. >=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. OK. Good to know that! >=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. We need a generic name for that, how about flow_type? Good comments are wel= come! >=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. It has already been defined before this structure definition. I don't think I have understood your idea. Could you help to explain more? = Thanks! >=20 > -- > Thomas Regards, Helin