From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8F4C343260; Wed, 1 Nov 2023 13:55:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D4B740ED9; Wed, 1 Nov 2023 13:55:27 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2066.outbound.protection.outlook.com [40.107.95.66]) by mails.dpdk.org (Postfix) with ESMTP id B5FE740E78 for ; Wed, 1 Nov 2023 13:55:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SrY2Fih31ymbTZlNGW3JIidvDDXfyGh1dGj8y55wTQPqldNunuoSbl+79V2hX3eTWGiqvTmLKjB9MkGDOh60BkD1MS5Wk8wNWWmlMeygkqymprK42d79UDh1UtO3soktMWzjlQ4WPR1JJ8tkNvprmzyWeciZaSfckaa8P90+Y/shW0RLL+tm41ehDbnSrHQqD7dDwnHWtdfSBcMPVqK6pMDIPOZJSXwF4bv8p9ZF+rW7oAYpOCCPnXfvZZrcciXlotM4RaAvKuZw0vWTNONowdsuK/1gGjmrr2o7EuWI0YdXyDO30DtmxAYmMaA2Mo1JbsxBUeLOstIWkWYpDquarg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G5Ctr6QZpUk2yY+gVKfEeM8IRH9V7snX0th5gO4/JQU=; b=d/0th4sVem+b6KSAB0UWLdMmIOoKRExhOKsiwS/Rd3esEad+dQ80PJXeF7K0e8XEcUT+EoDidSFtM9l820b+STUQVXMib8cKjSB1c8IyUw+pMIJKywowE3HIB9zh6Z7BapEl993u03RYmMCWQ4P8I+d/lPn2I2RI/OBa4oFDWN4Io8AuFORT01z5VvJgRSMB+HusfP8MT9wRPropuYbfbLcmk4ZTFdEdyKAL/8V9hFogna8BiJH80aM/kJlWttCjuYW/W/MsYAw051Zbm0EUKF8vAYVKSl3sMjnx8ohaDGsuZKXikSxwVWDPRXKm3XU3vMVjYlJ3mxzDpBtLfITYqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G5Ctr6QZpUk2yY+gVKfEeM8IRH9V7snX0th5gO4/JQU=; b=KiWxEoRKd3Pr4H0yHgcxqJGY7GTvZzr1CFE+Kmq8PsYcyvmSqOemu6gyo/RHgkD/L/fwbOhYnYGbQKWCkfzo41f8VjwoWW2LtkuLUfBkBfdlTKPWEkDgt+S5Kv/0MjdllW2fW+Q2QcYg8YVb6IRIWj0Pc7a946qItj15iJenSoA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by IA0PR12MB8085.namprd12.prod.outlook.com (2603:10b6:208:400::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Wed, 1 Nov 2023 12:55:24 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.6954.019; Wed, 1 Nov 2023 12:55:24 +0000 Message-ID: <65af625d-25d3-4c8c-a7ae-3434f94e50e2@amd.com> Date: Wed, 1 Nov 2023 12:55:20 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 2/9] ethdev: support setting and querying RSS algorithm Content-Language: en-US To: "lihuisong (C)" , Jie Hai , dev@dpdk.org, Thomas Monjalon , Andrew Rybchenko , Ori Kam Cc: fengchengwen@huawei.com, liudongdong3@huawei.com References: <20231027092836.445224-1-haijie1@huawei.com> <20231028014611.4086500-1-haijie1@huawei.com> <20231028014611.4086500-3-haijie1@huawei.com> <1d51688a-9524-a594-adc2-415b8b7793b4@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQ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ofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <1d51688a-9524-a594-adc2-415b8b7793b4@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR3P281CA0145.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:95::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA0PR12MB8085:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c0edb93-a28d-4666-1144-08dbdad9d023 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1xY34y0kp2PlVrcpCd+4EJKYVGsEeo9gYS0yw0AEtfW5QoHVolAW5a4AIQkv3TnF04rQtTVZM0jUBZN7dd3q0KDfGgBzpcw68Y9MXYsc8lgxsa5/VPjIsP7sBAiOPraG+ApK5RcgzZSJsSQ8G1xYgpKpFtZlC7YqRQj/MslVxndHuxsZLjf/0WkSMb3Ah8zi/+j1fhcWorMn3IgQdmn56jw9v7A3+/1EgHjUBUHst0OAZr0L5GuuP07ecUBjrMKSbu3tVNczObsolS6YXoQbUGvjT9x/y4Bqcvk4TySxvt416U4lgtUl3w22UBuCVq/1eyIkmtwd1MyQXgxjfTNxPWmR/uWd0nppZNuDK/m8cCGynfnCztEfjEPQv4TsqQGu7MXO/lafWNAmfBXT5riwieJFu4VX1p10dOa75YTMRmQh6hSm8OPrY9CRxVbp2h8kVI3f9s2op7pfAKvfGBFdPrFdfQiPHtjCgbx/wHpG/i32f6luuWglNa1APoUThx77qAVliO4vkvMtO4K9KC7KuAtHVCr+S92WetwATrFInZEL9DnXDd0nwKQghhRAVQtOKZ/n42HjwyMUV3Qe2loMlNGaQKbAuLtfzFo7ZRy1TZh9xWtss7T8yKKpmyxFPDYhkLfvR7QZwg7ByaKCXWkbTg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(376002)(366004)(39860400002)(346002)(396003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(31686004)(26005)(6512007)(2616005)(38100700002)(31696002)(86362001)(36756003)(83380400001)(8676002)(5660300002)(2906002)(478600001)(53546011)(6666004)(4326008)(8936002)(66946007)(316002)(66476007)(44832011)(6486002)(66556008)(41300700001)(110136005)(6506007)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UlNsaitNZ2diZUJkdUFtVFZUQjVIUXJkdkhLSUZINnhBUXVxTU42MFpSZk91?= =?utf-8?B?SVF6Q2tZck5TTERjd3NpQVhxNW54UzMxSG45Q2pVSlJkU3FicStHcytMVUpu?= =?utf-8?B?TTRlSnVvWGdzWHRmdW4rSjEvT29xRlVqSGxOeG5iMlhSUWZ3a1E2N1VVVWFQ?= =?utf-8?B?emg4VWw1cTR5TmJRemVwK01rb3BCTXlqV0R2LzVTanhjenptR1dKMTFOaUFY?= =?utf-8?B?TGhISi9yUk1qK3FDUC9janV3eUV5bmJkTDZqTk01RDlQeENKaDNRUU1XM1Zy?= =?utf-8?B?eDJwK3dsdGp6WVphUjc0K245enRQajZnMEc1aHoyQUJWc1ZQbDdlRXJVWWkz?= =?utf-8?B?VEZtbGxzWG0xVFBaaHl1Uks3Zi9PbVFUMlYxQ1R4alAybDd5UjRXT3F4aTVE?= =?utf-8?B?c25QbG9rSk85ZkJzSUIrUDAyUytRK1ZYSzJEQj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nhZUVVUb2M2NTY3QTRsang0K3dsN0NZMGZLbUJh?= =?utf-8?B?K2dvR0pxRTRQS2VEMGQrckRSdUswVW4ySG9KTkJYMmxzY1VSaktrWjVmeXFi?= =?utf-8?B?R2pFVlVlUFVoQmxjM2FsZ3NqNHB4dkk4SmdiY0Rsalo0amRTNUVidXB6Sm5V?= =?utf-8?B?VHJ4OUJ3aTRMTk5ZalBvZmRseHZENFAydkF3WEQ1c2Z0V1VPZ0VWZzNmdllM?= =?utf-8?B?OVhGU2loUXU4cU5JREtKcDhRbTBNcHpIb2pKZTRUek5vT3FwMTk3ZXFTR0x5?= =?utf-8?B?cEN4OHNiQUVFSDNKaUNCMEw2cVNpalNHQTd4Z3pNc3cwNENHa0M5MlBSMmpJ?= =?utf-8?B?RjFHdXpqWDJKSHNINFZPWnhWTloyYlpGbUMzTHlaSURiaEZzbXN1Ui9ZVS9x?= =?utf-8?B?c1hqK21aZnlsWis3NWRaaVZNTzdaNWt4ckVvWEF2Mmx3dlI1bnY5ZjFKM2Vr?= =?utf-8?B?S0t2aTNvK2RwYUYyb1JGdGptVXJpZUg3STZwM0d6NzJUR0diSE5jZmxzYVB1?= =?utf-8?B?L3A1Ykdnb04rampTMWF4Y0RHd01qLy9kWklMY3p1UVhCRW1TS3NqZ3h5d01O?= =?utf-8?B?Z2tzZms0Ymx2cmlyT2pHLzE0WURkVjFMRFhyK05SWW9RVGlXbCtPLy9IN204?= =?utf-8?B?VU5NL1NxOGxqQVRtd2ZTTEhIcXRUeC9pSHhYL0RkVTA2bnhpWTY3SUR6LzVh?= =?utf-8?B?MENQcFNoR1NOMENPUUdkTmM0bzVycWNVcHh5Z2s5TklFciszVzhneU5RVkZK?= =?utf-8?Q?8yN7Y6nWuRvecLjuD2R8XAg1y?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c0edb93-a28d-4666-1144-08dbdad9d023 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2023 12:55:23.9725 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o5kVgxPWmK6SY9JBIHgoW6ffSnWC4HXlvJCG6njO4DtuOUGfFwgNOA04G2DVaRZi X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8085 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 10/28/2023 4:01 AM, lihuisong (C) wrote: > With belows to changes, > Acked-by: Huisong Li > > > 在 2023/10/28 9:46, Jie Hai 写道: >> Currently, rte_eth_rss_conf supports configuring and querying >> RSS hash functions, rss key and it's length, but not RSS hash >> algorithm. >> >> The structure ``rte_eth_dev_info`` is extended by adding a new >> field "rss_algo_capa". Drivers are responsible for reporting this >> capa and configurations of RSS hash algorithm can be verified based >> on the capability. The default value of "rss_algo_capa" is >> RTE_ETH_HASH_ALGO_CAPA_MASK(DEFAULT) if drivers do not report it. >> >> The structure ``rte_eth_rss_conf`` is extended by adding a new >> field "algorithm". This represents the RSS algorithms to apply. >> If the value of "algorithm" used for configuration is a gibberish >> value, drivers should report the error. >> >> To check whether the drivers report valid "algorithm", it is set >> to default value before querying in rte_eth_dev_rss_hash_conf_get(). >> >> Signed-off-by: Jie Hai >> Signed-off-by: Dongdong Liu >> --- >>   doc/guides/rel_notes/release_23_11.rst |  5 ++++ >>   lib/ethdev/rte_ethdev.c                | 26 ++++++++++++++++++++ >>   lib/ethdev/rte_ethdev.h                | 33 +++++++++++++++++++++++++- >>   lib/ethdev/rte_flow.c                  |  1 - >>   lib/ethdev/rte_flow.h                  | 26 ++------------------ >>   5 files changed, 65 insertions(+), 26 deletions(-) >> >> diff --git a/doc/guides/rel_notes/release_23_11.rst >> b/doc/guides/rel_notes/release_23_11.rst >> index 0a6fc76a9d02..a35d729d2cc7 100644 >> --- a/doc/guides/rel_notes/release_23_11.rst >> +++ b/doc/guides/rel_notes/release_23_11.rst >> @@ -360,6 +360,11 @@ ABI Changes >>   * security: struct ``rte_security_ipsec_sa_options`` was updated >>     due to inline out-of-place feature addition. >>   +* ethdev: Added "rss_algo_capa" field to ``rte_eth_dev_info`` >> structure for >> +* reporting RSS hash algorithm capability. >> + >> +* ethdev: Added "algorithm" field to ``rte_eth_rss_conf`` structure >> for RSS >> +  hash algorithm. >>     Known Issues >>   ------------ >> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c >> index 9dabcb5ae28e..90bfbf14d1f7 100644 >> --- a/lib/ethdev/rte_ethdev.c >> +++ b/lib/ethdev/rte_ethdev.c >> @@ -1269,6 +1269,7 @@ int >>   rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t >> nb_tx_q, >>                 const struct rte_eth_conf *dev_conf) >>   { >> +    enum rte_eth_hash_function algorithm; >>       struct rte_eth_dev *dev; >>       struct rte_eth_dev_info dev_info; >>       struct rte_eth_conf orig_conf; >> @@ -1500,6 +1501,18 @@ rte_eth_dev_configure(uint16_t port_id, >> uint16_t nb_rx_q, uint16_t nb_tx_q, >>           goto rollback; >>       } >>   +    algorithm = dev_conf->rx_adv_conf.rss_conf.algorithm; >> +    if ((dev_info.rss_algo_capa & >> +         RTE_ETH_HASH_ALGO_TO_CAPA(algorithm)) == 0) { > need to check the algorithm. > its value should be in range of 0 to 31. >> +        RTE_ETHDEV_LOG(ERR, >> +            "Ethdev port_id=%u config unsupported RSS hash algorithm: >> %u " >> +            "with rss_algo_capa: %x\n", > It seems that this log is not friendly to user. > Configured RSS hash algorithm (%u) is not in the algorithm capability (). > Anything ok like that. > > %x --> 0x%" PRIx32 " >> +            port_id, algorithm, >> +            dev_info.rss_algo_capa); >> +        ret = -EINVAL; >> +        goto rollback; >> +    } >> + >>       /* >>        * Setup new number of Rx/Tx queues and reconfigure device. >>        */ >> @@ -3757,6 +3770,7 @@ rte_eth_dev_info_get(uint16_t port_id, struct >> rte_eth_dev_info *dev_info) >>       dev_info->min_mtu = RTE_ETHER_MIN_LEN - RTE_ETHER_HDR_LEN - >>           RTE_ETHER_CRC_LEN; >>       dev_info->max_mtu = UINT16_MAX; >> +    dev_info->rss_algo_capa = RTE_ETH_HASH_ALGO_CAPA_MASK(DEFAULT); >>         if (*dev->dev_ops->dev_infos_get == NULL) >>           return -ENOTSUP; >> @@ -4698,6 +4712,16 @@ rte_eth_dev_rss_hash_update(uint16_t port_id, >>           return -ENOTSUP; >>       } >>   +    if ((dev_info.rss_algo_capa & >> +         RTE_ETH_HASH_ALGO_TO_CAPA(rss_conf->algorithm)) == 0) { >> +        RTE_ETHDEV_LOG(ERR, >> +            "Ethdev port_id=%u config unsupported RSS hash algorithm: >> %u " >> +            "with rss_algo_capa: %x\n", >> +            port_id, rss_conf->algorithm, >> +            dev_info.rss_algo_capa); >> +        return -EINVAL; >> +    } >> + >>       if (*dev->dev_ops->rss_hash_update == NULL) >>           return -ENOTSUP; >>       ret = eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev, >> @@ -4725,6 +4749,8 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id, >>           return -EINVAL; >>       } >>   +    rss_conf->algorithm = RTE_ETH_HASH_FUNCTION_DEFAULT; >> + >>       if (*dev->dev_ops->rss_hash_conf_get == NULL) >>           return -ENOTSUP; >>       ret = eth_err(port_id, (*dev->dev_ops->rss_hash_conf_get)(dev, >> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >> index 37fd5afef48a..2f639edd8218 100644 >> --- a/lib/ethdev/rte_ethdev.h >> +++ b/lib/ethdev/rte_ethdev.h >> @@ -445,6 +445,33 @@ struct rte_vlan_filter_conf { >>       uint64_t ids[64]; >>   }; >>   +/** >> + * Hash function types. >> + */ >> +enum rte_eth_hash_function { >> +    /** DEFAULT means driver decides which hash algorithm to pick. */ >> +    RTE_ETH_HASH_FUNCTION_DEFAULT = 0, >> +    RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */ >> +    RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */ >> +    /** >> +     * Symmetric Toeplitz: src, dst will be replaced by >> +     * xor(src, dst). For the case with src/dst only, >> +     * src or dst address will xor with zero pair. >> +     */ >> +    RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, >> +    /** >> +     * Symmetric Toeplitz: L3 and L4 fields are sorted prior to >> +     * the hash function. >> +     *  If src_ip > dst_ip, swap src_ip and dst_ip. >> +     *  If src_port > dst_port, swap src_port and dst_port. >> +     */ >> +    RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT, >> +    RTE_ETH_HASH_FUNCTION_MAX, >> +}; >> + >> +#define RTE_ETH_HASH_ALGO_TO_CAPA(x) RTE_BIT32(x) >> +#define RTE_ETH_HASH_ALGO_CAPA_MASK(x) >> RTE_BIT32(RTE_ETH_HASH_FUNCTION_ ## x) >> + >>   /** >>    * A structure used to configure the Receive Side Scaling (RSS) feature >>    * of an Ethernet port. >> @@ -469,6 +496,7 @@ struct rte_eth_rss_conf { >>        * which RSS hashing is to be applied. >>        */ >>       uint64_t rss_hf; >> +    enum rte_eth_hash_function algorithm;    /**< Hash algorithm. */ >>   }; >>     /* >> @@ -1783,7 +1811,10 @@ struct rte_eth_dev_info { >>       /** Supported error handling mode. */ >>       enum rte_eth_err_handle_mode err_handle_mode; >>   -    uint64_t reserved_64s[2]; /**< Reserved for future fields */ >> +    /** RSS hash algorithms capabilities */ >> +    uint32_t rss_algo_capa; >> > Please move this new field to "hash_key_size" and > "flow_type_rss_offloads" in this struct. > Because this version allows ABI break. > Technically, even LTS release is an ABI break release, an ABI break should be discussed, approved and documented in the deprecation.rst in advance. For this patch, design evolved to update "struct rte_eth_dev_info" as discussions go on, so I think we can make an exception, But I would like to clarify that we shouldn't just break the ABI since it is an LTS release. A way to prevent exception happening in the patch is conclude design and document ABI breakage *before* LTS release cycle start. >> + >> +    uint32_t reserved_32s[3]; /**< Reserved for future fields */ >>       void *reserved_ptrs[2];   /**< Reserved for future fields */ >>   }; >>   diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c >> index 3a67f1aaba9d..c13a2a391c37 100644 >> --- a/lib/ethdev/rte_flow.c >> +++ b/lib/ethdev/rte_flow.c >> @@ -13,7 +13,6 @@ >>   #include >>   #include >>   #include >> -#include "rte_ethdev.h" >>   #include "rte_flow_driver.h" >>   #include "rte_flow.h" >>   diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h >> index 25f1dffd1f30..c94f553ae06f 100644 >> --- a/lib/ethdev/rte_flow.h >> +++ b/lib/ethdev/rte_flow.h >> @@ -40,6 +40,8 @@ >>   #include >>   #include >>   +#include "rte_ethdev.h" >> + >>   #ifdef __cplusplus >>   extern "C" { >>   #endif >> @@ -3222,30 +3224,6 @@ struct rte_flow_query_count { >>       uint64_t bytes; /**< Number of bytes through this rule [out]. */ >>   }; >>   -/** >> - * Hash function types. >> - */ >> -enum rte_eth_hash_function { >> -    /** DEFAULT means driver decides which hash algorithm to pick. */ >> -    RTE_ETH_HASH_FUNCTION_DEFAULT = 0, >> -    RTE_ETH_HASH_FUNCTION_TOEPLITZ, /**< Toeplitz */ >> -    RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, /**< Simple XOR */ >> -    /** >> -     * Symmetric Toeplitz: src, dst will be replaced by >> -     * xor(src, dst). For the case with src/dst only, >> -     * src or dst address will xor with zero pair. >> -     */ >> -    RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, >> -    /** >> -     * Symmetric Toeplitz: L3 and L4 fields are sorted prior to >> -     * the hash function. >> -     *  If src_ip > dst_ip, swap src_ip and dst_ip. >> -     *  If src_port > dst_port, swap src_port and dst_port. >> -     */ >> -    RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT, >> -    RTE_ETH_HASH_FUNCTION_MAX, >> -}; >> - >>   /** >>    * RTE_FLOW_ACTION_TYPE_RSS >>    *