From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id C920C1B00B for ; Sat, 6 Jan 2018 11:22:13 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 5BAE29C0053; Sat, 6 Jan 2018 10:22:12 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Sat, 6 Jan 2018 10:22:06 +0000 To: Qiming Yang , , References: <20180104181506.153697-1-qiming.yang@intel.com> From: Andrew Rybchenko Message-ID: <3cf12026-efe5-6090-0bb1-4f9cba721ed9@solarflare.com> Date: Sat, 6 Jan 2018 13:21:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180104181506.153697-1-qiming.yang@intel.com> Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23576.003 X-TM-AS-Result: No--5.396400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1515234133-krxdxqmBkJJp Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [DPDK] lib/librte_ether: add comments RSS flags 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: Sat, 06 Jan 2018 10:22:14 -0000 On 01/04/2018 09:15 PM, Qiming Yang wrote: > Detail the comment for RSS offload types and added comments for each type. > > Signed-off-by: Qiming Yang > --- > lib/librte_ether/rte_ethdev.h | 29 +++++++++++++++++++++++++---- > 1 file changed, 25 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > index 341c2d6..2091560 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -427,31 +427,52 @@ struct rte_eth_rss_conf { > uint64_t rss_hf; /**< Hash functions to apply - see below. */ > }; > > -/* > - * The RSS offload types are defined based on flow types which are defined > - * in rte_eth_ctrl.h. Different NIC hardwares may support different RSS offload > - * types. The supported flow types or RSS offload types can be queried by > +/** > + * The RSS offload types are related to *rss_hf* field of *rss_conf* structure. > + * They are defined based on flow types which are defined in rte_eth_ctrl.h. > + * Different NIC hardwares may support different RSS offload types. The > + * supported flow types or RSS offload types can be queried by > * rte_eth_dev_info_get(). > */ > +/** Enable RSS offload on IPV4 packets */ > #define ETH_RSS_IPV4 (1ULL << RTE_ETH_FLOW_IPV4) > +/** Enable RSS offload on fragmented IPV4 packets */ > #define ETH_RSS_FRAG_IPV4 (1ULL << RTE_ETH_FLOW_FRAG_IPV4) > +/** Enable RSS offload on none fragmented IPV4 TCP packets */ > #define ETH_RSS_NONFRAG_IPV4_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_TCP) > +/** Enable RSS offload on none fragmented IPV4 UDP packets */ > #define ETH_RSS_NONFRAG_IPV4_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_UDP) > +/** Enable RSS offload on none fragmented IPV4 SCTP packets */ > #define ETH_RSS_NONFRAG_IPV4_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_SCTP) > +/** Enable RSS offload on other none fragmented IPV4 packets */ > #define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) > +/** Enable RSS offload on IPV6 packets */ > #define ETH_RSS_IPV6 (1ULL << RTE_ETH_FLOW_IPV6) > +/** Enable RSS offload on fragmented IPV6 packets */ > #define ETH_RSS_FRAG_IPV6 (1ULL << RTE_ETH_FLOW_FRAG_IPV6) > +/** Enable RSS offload on none fragmented IPV6 TCP packets */ > #define ETH_RSS_NONFRAG_IPV6_TCP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_TCP) > +/** Enable RSS offload on none fragmented IPV6 UDP packets */ > #define ETH_RSS_NONFRAG_IPV6_UDP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_UDP) > +/** Enable RSS offload on none fragmented IPV6 SCTP packets */ > #define ETH_RSS_NONFRAG_IPV6_SCTP (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_SCTP) > +/** Enable RSS offload on other none fragmented IPV6 packets */ > #define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << RTE_ETH_FLOW_NONFRAG_IPV6_OTHER) > +/** Enable RSS offload on L2 Ethernet packets */ > #define ETH_RSS_L2_PAYLOAD (1ULL << RTE_ETH_FLOW_L2_PAYLOAD) > +/** Enable RSS offload on extended IPV6 packets */ > #define ETH_RSS_IPV6_EX (1ULL << RTE_ETH_FLOW_IPV6_EX) > +/** Enable RSS offload on extended IPV6 TCP packets */ > #define ETH_RSS_IPV6_TCP_EX (1ULL << RTE_ETH_FLOW_IPV6_TCP_EX) > +/** Enable RSS offload on extended IPV6 UDP packets */ > #define ETH_RSS_IPV6_UDP_EX (1ULL << RTE_ETH_FLOW_IPV6_UDP_EX) > +/** Enable RSS offload on all packets from that port */ > #define ETH_RSS_PORT (1ULL << RTE_ETH_FLOW_PORT) > +/** Enable RSS offload on VXLAN packets */ > #define ETH_RSS_VXLAN (1ULL << RTE_ETH_FLOW_VXLAN) > +/** Enable RSS offload on GENEVE packets */ > #define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE) > +/** Enable RSS offload on NVGRE packets */ > #define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE) > > #define ETH_RSS_IP ( \ These comments just decode the define name and not that useful. What would be really useful here is specification of which fields of the packet headers are used to calculate hash especially in the case of tunnels.