From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D36EE425CD;
	Wed, 20 Sep 2023 18:39:24 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id C545C40EDF;
	Wed, 20 Sep 2023 18:39:24 +0200 (CEST)
Received: from NAM12-MW2-obe.outbound.protection.outlook.com
 (mail-mw2nam12on2088.outbound.protection.outlook.com [40.107.244.88])
 by mails.dpdk.org (Postfix) with ESMTP id 4BC14402E4
 for <dev@dpdk.org>; Wed, 20 Sep 2023 18:39:23 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=EoVy6rtVThkyTuqXGs2/HnVmVXaFfgxhnjtlKdOlMgNBEo1ANkGi7G+YiijlUTorqrGyOeJDannS0eChzlQqAa9S2+1ylzpWBOQSIatabs9nXLyTOm0ZFtI2axCewK6EsXweZB4UUohZdbz89qCY8ijcpoA3hBdtv15UgwDdtKUA8e77uS1JYGCCSKQoxWpxTAECMIjwzpbluoQ0iTuAMRse8GVUGM5FaNSwiiNcWq37UxIpDIc0gIVEuR9iERjCuzE8Eztv0qN+MdveslyxOwT9NudafqKahUyyqCdIvhH3Btznmf98hirAjWxZVG9wtiegnV8zpaxp+4myorT0cA==
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=N8F6Dh3pZf3Gw+LO14gAle91yGGKUi4DAb6sVzPVM7s=;
 b=NBAIwRKma7Aq4jpGsqnOoAjqa0qg14vYLSKZDK72GzfZYa5DJbIiZZDDiUd2UvZkyRtdDryAYX6+PHaBAz2qV7eTADdbw9Nl96Z1n27m8WE6Cn5cSLx6fu/Y78du1h8zSvVktDdx6An8owiFIKXzIlz6Uy/eSguZH/Q9Xoc4dZXK59QsCK+FJCWvd3GKWGJMm4TXYH58rcZt49AVgSt4uiTw6UBq14AmGf/tBBDuIULWD6vvHqClNP4eIAOi2Q9zmUBLSTN8ceG+9txHkXUul9OxxbIN3D/YgbX5fbiaMBO0xpU0p9Ma159Ud2zz8prft++REMGOu29OgFfm+p0U2A==
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=N8F6Dh3pZf3Gw+LO14gAle91yGGKUi4DAb6sVzPVM7s=;
 b=qV772CQu6BKAKgkPKKwNkUKQyFDrUNwhZE32dUslHSp7GFzkqhvhL9xCHqQb43VB8LbEGZqQnGuStUdu/0Gi4tQ6z28RDIE6l4RH9SR819Ng5cpg8C6YoFmnex5whOQ2TwUqPfITW86ruQaeePRkHa/mIeXQZmr+fnsL4QKHRlQ=
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 PH8PR12MB7026.namprd12.prod.outlook.com (2603:10b6:510:1bd::19)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Wed, 20 Sep
 2023 16:39:18 +0000
Received: from CH2PR12MB4294.namprd12.prod.outlook.com
 ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com
 ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6792.026; Wed, 20 Sep 2023
 16:39:17 +0000
Message-ID: <785537ac-1b25-472a-b114-53620373da69@amd.com>
Date: Wed, 20 Sep 2023 17:39:11 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 2/7] ethdev: support setting and querying RSS algorithm
Content-Language: en-US
To: Jie Hai <haijie1@huawei.com>, dev@dpdk.org,
 Thomas Monjalon <thomas@monjalon.net>,
 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, Ori Kam <orika@nvidia.com>
Cc: lihuisong@huawei.com
References: <20230904072851.7384-1-haijie1@huawei.com>
 <20230908080030.3837515-1-haijie1@huawei.com>
 <20230908080030.3837515-3-haijie1@huawei.com>
From: Ferruh Yigit <ferruh.yigit@amd.com>
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+3kK3FDGktZBOxZI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LrT9Wd4cTJTjFV49Z9G96rgnOtWDcZ1J
 xHBAnXYQ7V2k9abY+ZqY1PtAPr/smqzQfPHXyTAhRVZp2f3yQmj7UqB07FJuLQjJ4CGk97Qx
 ///qeSg7D8x/sGEA8Yp2jgIj6u7tspuz+RgBYrWpfI0VIHhWED0jNXzqztrVX18CzA6r0ReY
 SG+CSyycKkco6UI9ZeUrXFwnoUJqIJY9wTJo5gD9EgGIbItv3qWTq29dihLYpzd6dqB708k7
 4RBz9051oLaFVGkguFw/tXmA17nx+c2uR5jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ=
In-Reply-To: <20230908080030.3837515-3-haijie1@huawei.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: LO4P123CA0628.GBRP123.PROD.OUTLOOK.COM
 (2603:10a6:600:294::6) To CH2PR12MB4294.namprd12.prod.outlook.com
 (2603:10b6:610:a9::11)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH8PR12MB7026:EE_
X-MS-Office365-Filtering-Correlation-Id: 9f12b305-a2f1-48cc-1ba0-08dbb9f82207
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: /6LU1H5PWqkXIqfW5Po20KhVjwhu3qmXd73nlBUSizeDVmTKY/s3ZeoiL6XyzN+xDuQSi7xmBVx+etUPTsNkoT/IzIHxP7xACgf5JNEjwseqeUVtWst8ewrJYsbTCSNWOQe3TZBthe61PylPOfCEiIpX6FkYy4tV7qCbaqoJm3/1nK9XI0v804Gpc8zt8ahZsjc6jJ+L/k+DlrJ7WoV/46e0UReUOVtvjUUYWVKpUH35jT7LhTTy9ki+5wBHGIlK41ERfdk7ZMXnZHAtk7idedU1VSKN7LVN70V05cSxYc86oFwwfxqAE5Z/dY4cW9cmyfmMPark5kXkzQDIJ7q1xNI5QziSZf4yWgp07aAIIhzBC0mpbfmVqkILbFyDFf2dbGsKDIBF99ZWJRLxFuSaUdc4cnb9A+GCBm5ox0M8lgkp4Hkoc1I4SSZvU3Y3VQPGI+nF/EPWdiBd4hOhvq42PZ3d8qop4rFezqrdy5q2BE4dNMApMorBpzNHQm4W37Q3vuPQcDrlLbQhx1bbvlxmttHfj1Dqw6sxbtwltf/nz3IV1riWEmLZ5SAj4QS9rh5PvwrmXbhib21+bSDOLUkULlc91wq54+Ok9o0rEIqHJnJpf1vUNG+JHZFVt/TeyD5fpP7McH9/UrOtsGItvV0z1Q==
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)(346002)(39860400002)(136003)(366004)(376002)(396003)(451199024)(186009)(1800799009)(44832011)(5660300002)(41300700001)(8676002)(8936002)(4326008)(66946007)(66476007)(66556008)(110136005)(316002)(31686004)(38100700002)(83380400001)(2906002)(31696002)(478600001)(26005)(2616005)(6666004)(6486002)(6506007)(86362001)(53546011)(6512007)(36756003)(45980500001)(43740500002);
 DIR:OUT; SFP:1101; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aDhhcnk4eTV4TytEalNHNHhEWmFhUDlSNEtFYmVsOGI4d2JFc1BrN016ZHpJ?=
 =?utf-8?B?MC9VR1ViTXJJejBOajhib3RNSWhqL3VUODVNNDR3VnJzbkZ6L25MTU84M0pG?=
 =?utf-8?B?T2hTZTc5dFlidDBoZFUxbzdpaUlLdUloV0dCdkZubzgxZThoRUluVGs4UnlN?=
 =?utf-8?B?WlUyUmJqQ0NGREpZWUZ1dEJ2blJaWEpKWWlMMk1VSTI0Zi8vNEhTUm1MUjlr?=
 =?utf-8?B?VzBGSGdHVlBHMDRZQlJmTnl1RHZlNEdpV0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zZJcStoMGNYa0RSUXdsOXdBYUNQcmRETkJKbXcxTUo2?=
 =?utf-8?B?Vi8xSjFnWUpwU2lHbUVGRFozaDk1NGQ0YWpZdHdKWkN1bG9lR3dQNkkwYWw3?=
 =?utf-8?Q?DB0V0BZ51EVYCkwQXpuM9BRV4?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9f12b305-a2f1-48cc-1ba0-08dbb9f82207
X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2023 16:39:17.9020 (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: C1y2p57wXlCUOu95shsZtwVIDStESIwSTaOxjez6ejcnm2GgNhT2pGT+99jmIda7
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7026
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On 9/8/2023 9:00 AM, Jie Hai wrote:
> 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_rss_conf`` is extended by adding a new
> field "func". This represents the RSS algorithms to apply. The
> following API will be affected:
> 	- rte_eth_dev_configure
> 	- rte_eth_dev_rss_hash_update
> 	- rte_eth_dev_rss_hash_conf_get
> 

The problem with adding new configuration fields is, none of the drivers
are using it.

I can see you are updating hns3 driver in next patch, but what about
others, application will set this field and almost all drivers will
ignore it for now.
And in near future, some will be supporting it and some won't, still
frustrating for the application perspective.

In the past I was gathering list of these items and follow
implementation of them with drivers, but as the number of drivers
increased this became very hard to manage.

Another way to manage this is go and update all drivers, and if the
configuration requests anything other than
'RTE_ETH_HASH_FUNCTION_DEFAULT', return error. So that application can
know this is not supported by this driver.
Do you have better solution for this?


> If the value of "func" used for configuration is a gibberish
> value, report the error and return. Do the same for
> rte_eth_dev_rss_hash_update and rte_eth_dev_configure.
> 
> To check whether the drivers report the "func" field, it is set
> to default value before querying.
> 
> Signed-off-by: Jie Hai <haijie1@huawei.com>
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
> ---
>  doc/guides/rel_notes/release_23_11.rst |  2 ++
>  lib/ethdev/rte_ethdev.c                | 17 +++++++++++++++++
>  lib/ethdev/rte_ethdev.h                | 21 +++++++++++++++++++++
>  lib/ethdev/rte_flow.c                  |  1 -
>  lib/ethdev/rte_flow.h                  | 22 ++--------------------
>  5 files changed, 42 insertions(+), 21 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst
> index 333e1d95a283..deb019fbe4c1 100644
> --- a/doc/guides/rel_notes/release_23_11.rst
> +++ b/doc/guides/rel_notes/release_23_11.rst
> @@ -129,6 +129,8 @@ ABI Changes
>     Also, make sure to start the actual text at the margin.
>     =======================================================
>  
> +* ethdev: Added "func" 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 0840d2b5942a..4cbcdb344cac 100644
> --- a/lib/ethdev/rte_ethdev.c
> +++ b/lib/ethdev/rte_ethdev.c
> @@ -1445,6 +1445,14 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
>  		goto rollback;
>  	}
>  
> +	if (dev_conf->rx_adv_conf.rss_conf.func >= RTE_ETH_HASH_FUNCTION_MAX) {
> +		RTE_ETHDEV_LOG(ERR,
> +			"Ethdev port_id=%u invalid rss hash function (%u)\n",
> +			port_id, dev_conf->rx_adv_conf.rss_conf.func);
> +		ret = -EINVAL;
> +		goto rollback;
> +	}
> +
>  	/* Check if Rx RSS distribution is disabled but RSS hash is enabled. */
>  	if (((dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) == 0) &&
>  	    (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH)) {
> @@ -4630,6 +4638,13 @@ rte_eth_dev_rss_hash_update(uint16_t port_id,
>  		return -ENOTSUP;
>  	}
>  
> +	if (rss_conf->func >= RTE_ETH_HASH_FUNCTION_MAX) {
> +		RTE_ETHDEV_LOG(ERR,
> +			"Ethdev port_id=%u invalid rss hash function (%u)\n",
> +			port_id, rss_conf->func);
> +		return -EINVAL;
> +	}
> +
>  	if (*dev->dev_ops->rss_hash_update == NULL)
>  		return -ENOTSUP;
>  	ret = eth_err(port_id, (*dev->dev_ops->rss_hash_update)(dev,
> @@ -4657,6 +4672,8 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
>  		return -EINVAL;
>  	}
>  
> +	rss_conf->func = RTE_ETH_HASH_FUNCTION_DEFAULT;
> +
>

I think setting this in ethdev level is not required if you update all
drivers to not accept anything other than 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 40cfbb7efddd..33cec3570f85 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -445,6 +445,26 @@ struct rte_vlan_filter_conf {
>  	uint64_t ids[64];
>  };
>  
> +/**
> + * Hash function types.
> + */
> +enum rte_eth_hash_function {
> +	/**
> +	 * DEFAULT means that conformance to a specific hash algorithm is
> +	 * uncared to the caller. The driver can pick the one it deems optimal.
> +	 */
> +	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,
> +	RTE_ETH_HASH_FUNCTION_MAX,

As we are moving this to ethdev.h, when we want to add a new algorithm,
it will cause ABI break because of the 'RTE_ETH_HASH_FUNCTION_MAX', and
it will need to wait. Is there a way to eliminate this MAX enum?

> +};
> +
>  /**
>   * A structure used to configure the Receive Side Scaling (RSS) feature
>   * of an Ethernet port.
> @@ -464,6 +484,7 @@ struct rte_eth_rss_conf {
>  	 * Supplying an *rss_hf* equal to zero disables the RSS feature.
>  	 */
>  	uint64_t rss_hf;
> +	enum rte_eth_hash_function func;	/**< Hash algorithm. */

Can we use 'algorithm' as the field name?

I know it won't exactly match type name (rte_eth_hash_function) but I
think this will be more accurate also less confusing for "rss_hf (rss
hash function)" and "func (function)"?

>  };
>  
>  /*
> diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
> index 271d854f7807..d3f2d466d841 100644
> --- a/lib/ethdev/rte_flow.c
> +++ b/lib/ethdev/rte_flow.c
> @@ -12,7 +12,6 @@
>  #include <rte_branch_prediction.h>
>  #include <rte_string_fns.h>
>  #include <rte_mbuf_dyn.h>
> -#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 3bd0dc64fbe2..a7578b1d2eff 100644
> --- a/lib/ethdev/rte_flow.h
> +++ b/lib/ethdev/rte_flow.h
> @@ -40,6 +40,8 @@
>  #include <rte_macsec.h>
>  #include <rte_ib.h>
>  
> +#include "rte_ethdev.h"
> +
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -3183,26 +3185,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 that conformance to a specific hash algorithm is
> -	 * uncared to the caller. The driver can pick the one it deems optimal.
> -	 */
> -	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,
> -	RTE_ETH_HASH_FUNCTION_MAX,
> -};
> -
>  /**
>   * RTE_FLOW_ACTION_TYPE_RSS
>   *