From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 3CDAA7E75 for ; Wed, 12 Nov 2014 06:43:01 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 11 Nov 2014 21:52:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,367,1413270000"; d="scan'208";a="620981899" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga001.fm.intel.com with ESMTP; 11 Nov 2014 21:52:25 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 12 Nov 2014 13:52:06 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.62]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.3]) with mapi id 14.03.0195.001; Wed, 12 Nov 2014 13:52:04 +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+UqdYuQikZttDJxbBYHAgABtNgCAANZFIA== Date: Wed, 12 Nov 2014 05:52:04 +0000 Message-ID: References: <1413180766-12211-1-git-send-email-helin.zhang@intel.com> <1845096.HFlylc4sxo@xps13> <1639194.lo0Mfvn8hI@xps13> In-Reply-To: <1639194.lo0Mfvn8hI@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: Wed, 12 Nov 2014 05:43:02 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, November 12, 2014 5:09 AM > 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-11-11 06:46, Zhang, Helin: > > In order to get things more generic, and remove any mappings on > > specific NIC hardwares, I planned to change the macros in rte_ethdev.h > > from > > > > /* Supported RSS offloads */ > > /* for 1G & 10G */ > > #define ETH_RSS_IPV4_SHIFT 0 > > #define ETH_RSS_IPV4_TCP_SHIFT 1 > > #define ETH_RSS_IPV6_SHIFT 2 > > #define ETH_RSS_IPV6_EX_SHIFT 3 > > #define ETH_RSS_IPV6_TCP_SHIFT 4 > > #define ETH_RSS_IPV6_TCP_EX_SHIFT 5 > > #define ETH_RSS_IPV4_UDP_SHIFT 6 > > #define ETH_RSS_IPV6_UDP_SHIFT 7 > > #define ETH_RSS_IPV6_UDP_EX_SHIFT 8 > > /* for 40G only */ > > #define ETH_RSS_NONF_IPV4_UDP_SHIFT 31 > > #define ETH_RSS_NONF_IPV4_TCP_SHIFT 33 > > #define ETH_RSS_NONF_IPV4_SCTP_SHIFT 34 > > #define ETH_RSS_NONF_IPV4_OTHER_SHIFT 35 > > #define ETH_RSS_FRAG_IPV4_SHIFT 36 > > #define ETH_RSS_NONF_IPV6_UDP_SHIFT 41 > > #define ETH_RSS_NONF_IPV6_TCP_SHIFT 43 > > #define ETH_RSS_NONF_IPV6_SCTP_SHIFT 44 > > #define ETH_RSS_NONF_IPV6_OTHER_SHIFT 45 > > #define ETH_RSS_FRAG_IPV6_SHIFT 46 > > #define ETH_RSS_FCOE_OX_SHIFT 48 > > #define ETH_RSS_FCOE_RX_SHIFT 49 > > #define ETH_RSS_FCOE_OTHER_SHIFT 50 > > #define ETH_RSS_L2_PAYLOAD_SHIFT 63 > > > > to > > > > /* Supported RSS offloads */ > > /* for 1G & 10G */ > > #define ETH_FLOW_TYPE_IPV4 0 > > #define ETH_FLOW_TYPE_IPV4_TCP 1 > > #define ETH_FLOW_TYPE_IPV6 2 > > #define ETH_FLOW_TYPE_IPV6_EX 3 > > #define ETH_FLOW_TYPE_IPV6_TCP 4 > > #define ETH_FLOW_TYPE_IPV6_TCP_EX 5 > > #define ETH_FLOW_TYPE_IPV4_UDP 6 > > #define ETH_FLOW_TYPE_IPV6_UDP 7 > > #define ETH_FLOW_TYPE_IPV6_UDP_EX 8 > > /* for 40G only */ > > #define ETH_FLOW_TYPE_NONFRAG_IPV4_UDP 9 > > #define ETH_FLOW_TYPE_NONFRAG_IPV4_TCP 10 > > #define ETH_FLOW_TYPE_NONFRAG_IPV4_SCTP 11 > > #define ETH_FLOW_TYPE_NONFRAG_IPV4_OTHER 12 > > #define ETH_FLOW_TYPE_FRAG_IPV4 13 > > #define ETH_FLOW_TYPE_NONFRAG_IPV6_UDP 14 > > #define ETH_FLOW_TYPE_NONFRAG_IPV6_TCP 15 > > #define ETH_FLOW_TYPE_NONFRAG_IPV6_SCTP 16 > > #define ETH_FLOW_TYPE_NONFRAG_IPV6_OTHER 17 > > #define ETH_FLOW_TYPE_FRAG_IPV6 18 > > #define ETH_FLOW_TYPE_L2_PAYLOAD 19 > > > > Any comments or better ideas on that? Thanks! >=20 > About the renaming RSS -> FLOW_TYPE, I have no objection. > It seems a bit better. Nice to hear that! > Some comments are needed to explain what means the value. > I think the comments "1G & 10G" or "40G only" are possibly wrong. Yes, I agree with you. > Actually you use ETH_FLOW_TYPE_IPV4 for ixgbe and > ETH_FLOW_TYPE_FRAG_IPV4 or ETH_FLOW_TYPE_NONFRAG_IPV4_* for i40e. > It's not consistent and clearly shows that you stick to the hardware defi= nitions. >=20 > Something really generic could be a set of flags like this: > IPV4 > IPV6 > NONFRAG > UDP > TCP > SCTP Good conclusion! We could think of it in a new patch set. I don't want to p= ut everything into this patch. :) >=20 > -- > Thomas Regards, Helin