From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id E40D47F68 for ; Tue, 11 Nov 2014 21:58:58 +0100 (CET) Received: by mail-wi0-f169.google.com with SMTP id n3so3045203wiv.4 for ; Tue, 11 Nov 2014 13:08:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=SAkquiHe/81yjkfZ+SPmeccwQM4YREvq2EjlB/oBl2s=; b=fjru0nUUxn9kuRLSVXYrOehnLn+2L8j7LP0Ss5h7UJnaqM88+R4PpdKOnTAaRkpY3X WP6gHwDNdOneJjNFhos8S/2fu/mFjlpQ2WmLEycfzXh76ad+hsV2xZ1aoycRzcrS0TWb iA9dgbOREpSNwnI14PHZCaeJj3IvO6bpIl/VfhWAtuX5d9E9C1mHQXRvzF2YerijkhDi uZVJht1emjqBVlosg7HCfDcL1QaIK68UU8GXY3TKx7X4MrydSIlZeEFsPpYAlpglw3xG JG0P1wwE2lL7p+Vnm1a5nnnA3TeUgTHVkaZ9qjgIYHsIOffx5fnxEIomkEGf10TTJ124 8L0Q== X-Gm-Message-State: ALoCoQm2n71r4kGnXPu5N9/v1Jn0zQIhN+BJhwFmhOXDVvE5px7z3RPhGSXr2+TYyRLQrMET2XNH X-Received: by 10.194.79.201 with SMTP id l9mr9280532wjx.59.1415740130112; Tue, 11 Nov 2014 13:08:50 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id v10sm18994867wiy.21.2014.11.11.13.08.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Nov 2014 13:08:49 -0800 (PST) From: Thomas Monjalon To: "Zhang, Helin" Date: Tue, 11 Nov 2014 22:08:32 +0100 Message-ID: <1639194.lo0Mfvn8hI@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.2-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: References: <1413180766-12211-1-git-send-email-helin.zhang@intel.com> <1845096.HFlylc4sxo@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 20:58:59 -0000 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! About the renaming RSS -> FLOW_TYPE, I have no objection. It seems a bit better. Some comments are needed to explain what means the value. I think the comments "1G & 10G" or "40G only" are possibly wrong. 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 definitions. Something really generic could be a set of flags like this: IPV4 IPV6 NONFRAG UDP TCP SCTP -- Thomas