[v5,00/40] support setting and querying RSS algorithms

Message ID 20231011092805.693171-1-haijie1@huawei.com (mailing list archive)
Headers
Series support setting and querying RSS algorithms |

Message

Jie Hai Oct. 11, 2023, 9:27 a.m. UTC
  This patchset is to support setting and querying RSS algorithms.

--
v5:
1. rewrite some comments.
2. check RSS algorithm for drivers supporting RSS.
3. change field "func" of rss_conf to "algorithm".
4. fix commit log for [PATCH v4 4/7].
5. add Acked-by Reshma Pattan.
6. add symmetric_toeplitz_sort for showing.
7. change "hf" to "hash function" for showing.

v4:
1. recomment some definitions related to RSS.
2. allocate static memory for rss_key instead of dynamic.
3. use array of strings to get the name of rss algorithm.
4. add display of rss algorithm with testpmd.

v3:
1. fix commit log for PATCH [1/5].
2. make RSS ABI changes description to start the actual text at the margin.
3. move defnition of enum rte_eth_hash_function to rte_ethdev.h.
4. fix some comment codes.

v2:
1. return error if "func" is invalid.
2. modify the comments of the "func" field.
3. modify commit log of patch [3/5].
4. use malloc instead of rte_malloc.
5. adjust display format of RSS info.
6. remove the string display of rss_hf.

Huisong Li (1):
  net/hns3: support setting and querying RSS hash function

Jie Hai (39):
  ethdev: overwrite some comment related to RSS
  ethdev: support setting and querying RSS algorithm
  net/atlantic: check RSS hash algorithms
  net/axgbe: check RSS hash algorithms
  net/bnx2x: check RSS hash algorithms
  net/bnxt: check RSS hash algorithms
  net/bonding: check RSS hash algorithms
  net/cnxk: check RSS hash algorithms
  net/cpfl: check RSS hash algorithms
  net/cxgbe: check RSS hash algorithms
  net/dpaa: check RSS hash algorithms
  net/dpaa2: check RSS hash algorithms
  net/ena: check RSS hash algorithms
  net/enic: check RSS hash algorithms
  net/fm10k: check RSS hash algorithms
  net/hinic: check RSS hash algorithms
  net/i40e: check RSS hash algorithms
  net/iavf: check RSS hash algorithms
  net/ice: check RSS hash algorithms
  net/idpf: check RSS hash algorithms
  net/igc: check RSS hash algorithms
  net/ionic: check RSS hash algorithms
  net/ixgbe: check RSS hash algorithms
  net/mana: check RSS hash algorithms
  net/mlx5: check RSS hash algorithms
  net/mvpp2: check RSS hash algorithms
  net/netvsc: check RSS hash algorithms
  net/ngbe: : check RSS hash algorithms
  net/nfp: check RSS hash algorithms
  net/null: check RSS hash algorithms
  net/qede: check RSS hash algorithms
  net/sfc: check RSS hash algorithms
  net/tap: check RSS hash algorithms
  net/thunderx: check RSS hash algorithms
  net/txgbe: check RSS hash algorithms
  app/proc-info: fix never show RSS info
  app/proc-info: adjust the display format of RSS info
  app/proc-info: support querying RSS hash algorithm
  app/testpmd: add RSS hash algorithms display

 app/proc-info/main.c                   | 32 ++++++++++-----
 app/test-pmd/cmdline.c                 | 29 ++++++++++---
 app/test-pmd/config.c                  | 38 ++++++++---------
 app/test-pmd/testpmd.h                 |  2 +-
 doc/guides/rel_notes/release_23_11.rst |  2 +
 drivers/net/atlantic/atl_ethdev.c      |  2 +
 drivers/net/axgbe/axgbe_ethdev.c       |  9 +++++
 drivers/net/bnx2x/bnx2x_ethdev.c       |  4 ++
 drivers/net/bnxt/bnxt_ethdev.c         |  6 +++
 drivers/net/bonding/rte_eth_bond_pmd.c |  6 +++
 drivers/net/cnxk/cnxk_ethdev.c         |  5 +++
 drivers/net/cnxk/cnxk_ethdev_ops.c     |  3 ++
 drivers/net/cpfl/cpfl_ethdev.c         |  6 +++
 drivers/net/cxgbe/cxgbe_ethdev.c       |  9 ++++-
 drivers/net/dpaa/dpaa_ethdev.c         |  7 ++++
 drivers/net/dpaa2/dpaa2_ethdev.c       |  7 ++++
 drivers/net/ena/ena_rss.c              |  3 ++
 drivers/net/enic/enic_ethdev.c         |  1 +
 drivers/net/enic/enic_main.c           |  3 ++
 drivers/net/fm10k/fm10k_ethdev.c       |  9 ++++-
 drivers/net/hinic/hinic_pmd_ethdev.c   |  3 ++
 drivers/net/hinic/hinic_pmd_rx.c       |  3 ++
 drivers/net/hns3/hns3_rss.c            | 47 ++++++++++++---------
 drivers/net/i40e/i40e_ethdev.c         |  7 ++++
 drivers/net/iavf/iavf_ethdev.c         |  6 +++
 drivers/net/ice/ice_dcf.c              |  3 ++
 drivers/net/ice/ice_dcf_ethdev.c       |  3 ++
 drivers/net/ice/ice_ethdev.c           |  7 ++++
 drivers/net/idpf/idpf_ethdev.c         |  6 +++
 drivers/net/igc/igc_ethdev.c           |  4 ++
 drivers/net/igc/igc_txrx.c             |  5 +++
 drivers/net/ionic/ionic_ethdev.c       |  6 +++
 drivers/net/ixgbe/ixgbe_ethdev.c       | 12 +++++-
 drivers/net/ixgbe/ixgbe_rxtx.c         |  4 ++
 drivers/net/mana/mana.c                | 11 ++++-
 drivers/net/mlx5/mlx5_ethdev.c         |  4 ++
 drivers/net/mlx5/mlx5_rss.c            |  3 +-
 drivers/net/mvpp2/mrvl_ethdev.c        |  3 ++
 drivers/net/netvsc/hn_ethdev.c         |  6 +++
 drivers/net/nfp/nfp_common.c           |  9 ++++-
 drivers/net/ngbe/ngbe_ethdev.c         |  6 ++-
 drivers/net/ngbe/ngbe_rxtx.c           |  3 ++
 drivers/net/null/rte_eth_null.c        |  8 ++++
 drivers/net/qede/qede_ethdev.c         |  9 ++++-
 drivers/net/sfc/sfc_ethdev.c           |  3 ++
 drivers/net/sfc/sfc_rx.c               |  3 ++
 drivers/net/tap/rte_eth_tap.c          |  8 ++++
 drivers/net/thunderx/nicvf_ethdev.c    | 10 ++++-
 drivers/net/txgbe/txgbe_ethdev.c       |  7 +++-
 drivers/net/txgbe/txgbe_ethdev_vf.c    |  7 +++-
 drivers/net/txgbe/txgbe_rxtx.c         |  3 ++
 lib/ethdev/rte_ethdev.c                | 17 ++++++++
 lib/ethdev/rte_ethdev.h                | 56 +++++++++++++++++++-------
 lib/ethdev/rte_flow.c                  |  1 -
 lib/ethdev/rte_flow.h                  | 25 +-----------
 55 files changed, 395 insertions(+), 106 deletions(-)
  

Comments

Ferruh Yigit Oct. 11, 2023, 6:19 p.m. UTC | #1
On 10/11/2023 10:27 AM, Jie Hai wrote:
> This patchset is to support setting and querying RSS algorithms.
> 
> --
> v5:
> 1. rewrite some comments.
> 2. check RSS algorithm for drivers supporting RSS.
> 3. change field "func" of rss_conf to "algorithm".
> 4. fix commit log for [PATCH v4 4/7].
> 5. add Acked-by Reshma Pattan.
> 6. add symmetric_toeplitz_sort for showing.
> 7. change "hf" to "hash function" for showing.
> 
> v4:
> 1. recomment some definitions related to RSS.
> 2. allocate static memory for rss_key instead of dynamic.
> 3. use array of strings to get the name of rss algorithm.
> 4. add display of rss algorithm with testpmd.
> 
> v3:
> 1. fix commit log for PATCH [1/5].
> 2. make RSS ABI changes description to start the actual text at the margin.
> 3. move defnition of enum rte_eth_hash_function to rte_ethdev.h.
> 4. fix some comment codes.
> 
> v2:
> 1. return error if "func" is invalid.
> 2. modify the comments of the "func" field.
> 3. modify commit log of patch [3/5].
> 4. use malloc instead of rte_malloc.
> 5. adjust display format of RSS info.
> 6. remove the string display of rss_hf.
> 
> Huisong Li (1):
>   net/hns3: support setting and querying RSS hash function
> 
> Jie Hai (39):
>   ethdev: overwrite some comment related to RSS
>   ethdev: support setting and querying RSS algorithm
>   net/atlantic: check RSS hash algorithms
>   net/axgbe: check RSS hash algorithms
>   net/bnx2x: check RSS hash algorithms
>   net/bnxt: check RSS hash algorithms
>   net/bonding: check RSS hash algorithms
>   net/cnxk: check RSS hash algorithms
>   net/cpfl: check RSS hash algorithms
>   net/cxgbe: check RSS hash algorithms
>   net/dpaa: check RSS hash algorithms
>   net/dpaa2: check RSS hash algorithms
>   net/ena: check RSS hash algorithms
>   net/enic: check RSS hash algorithms
>   net/fm10k: check RSS hash algorithms
>   net/hinic: check RSS hash algorithms
>   net/i40e: check RSS hash algorithms
>   net/iavf: check RSS hash algorithms
>   net/ice: check RSS hash algorithms
>   net/idpf: check RSS hash algorithms
>   net/igc: check RSS hash algorithms
>   net/ionic: check RSS hash algorithms
>   net/ixgbe: check RSS hash algorithms
>   net/mana: check RSS hash algorithms
>   net/mlx5: check RSS hash algorithms
>   net/mvpp2: check RSS hash algorithms
>   net/netvsc: check RSS hash algorithms
>   net/ngbe: : check RSS hash algorithms
>   net/nfp: check RSS hash algorithms
>   net/null: check RSS hash algorithms
>   net/qede: check RSS hash algorithms
>   net/sfc: check RSS hash algorithms
>   net/tap: check RSS hash algorithms
>   net/thunderx: check RSS hash algorithms
>   net/txgbe: check RSS hash algorithms
>   app/proc-info: fix never show RSS info
>   app/proc-info: adjust the display format of RSS info
>   app/proc-info: support querying RSS hash algorithm
>   app/testpmd: add RSS hash algorithms display
> 
>  app/proc-info/main.c                   | 32 ++++++++++-----
>  app/test-pmd/cmdline.c                 | 29 ++++++++++---
>  app/test-pmd/config.c                  | 38 ++++++++---------
>  app/test-pmd/testpmd.h                 |  2 +-
>  doc/guides/rel_notes/release_23_11.rst |  2 +
>  drivers/net/atlantic/atl_ethdev.c      |  2 +
>  drivers/net/axgbe/axgbe_ethdev.c       |  9 +++++
>  drivers/net/bnx2x/bnx2x_ethdev.c       |  4 ++
>  drivers/net/bnxt/bnxt_ethdev.c         |  6 +++
>  drivers/net/bonding/rte_eth_bond_pmd.c |  6 +++
>  drivers/net/cnxk/cnxk_ethdev.c         |  5 +++
>  drivers/net/cnxk/cnxk_ethdev_ops.c     |  3 ++
>  drivers/net/cpfl/cpfl_ethdev.c         |  6 +++
>  drivers/net/cxgbe/cxgbe_ethdev.c       |  9 ++++-
>  drivers/net/dpaa/dpaa_ethdev.c         |  7 ++++
>  drivers/net/dpaa2/dpaa2_ethdev.c       |  7 ++++
>  drivers/net/ena/ena_rss.c              |  3 ++
>  drivers/net/enic/enic_ethdev.c         |  1 +
>  drivers/net/enic/enic_main.c           |  3 ++
>  drivers/net/fm10k/fm10k_ethdev.c       |  9 ++++-
>  drivers/net/hinic/hinic_pmd_ethdev.c   |  3 ++
>  drivers/net/hinic/hinic_pmd_rx.c       |  3 ++
>  drivers/net/hns3/hns3_rss.c            | 47 ++++++++++++---------
>  drivers/net/i40e/i40e_ethdev.c         |  7 ++++
>  drivers/net/iavf/iavf_ethdev.c         |  6 +++
>  drivers/net/ice/ice_dcf.c              |  3 ++
>  drivers/net/ice/ice_dcf_ethdev.c       |  3 ++
>  drivers/net/ice/ice_ethdev.c           |  7 ++++
>  drivers/net/idpf/idpf_ethdev.c         |  6 +++
>  drivers/net/igc/igc_ethdev.c           |  4 ++
>  drivers/net/igc/igc_txrx.c             |  5 +++
>  drivers/net/ionic/ionic_ethdev.c       |  6 +++
>  drivers/net/ixgbe/ixgbe_ethdev.c       | 12 +++++-
>  drivers/net/ixgbe/ixgbe_rxtx.c         |  4 ++
>  drivers/net/mana/mana.c                | 11 ++++-
>  drivers/net/mlx5/mlx5_ethdev.c         |  4 ++
>  drivers/net/mlx5/mlx5_rss.c            |  3 +-
>  drivers/net/mvpp2/mrvl_ethdev.c        |  3 ++
>  drivers/net/netvsc/hn_ethdev.c         |  6 +++
>  drivers/net/nfp/nfp_common.c           |  9 ++++-
>  drivers/net/ngbe/ngbe_ethdev.c         |  6 ++-
>  drivers/net/ngbe/ngbe_rxtx.c           |  3 ++
>  drivers/net/null/rte_eth_null.c        |  8 ++++
>  drivers/net/qede/qede_ethdev.c         |  9 ++++-
>  drivers/net/sfc/sfc_ethdev.c           |  3 ++
>  drivers/net/sfc/sfc_rx.c               |  3 ++
>  drivers/net/tap/rte_eth_tap.c          |  8 ++++
>  drivers/net/thunderx/nicvf_ethdev.c    | 10 ++++-
>  drivers/net/txgbe/txgbe_ethdev.c       |  7 +++-
>  drivers/net/txgbe/txgbe_ethdev_vf.c    |  7 +++-
>  drivers/net/txgbe/txgbe_rxtx.c         |  3 ++
>  lib/ethdev/rte_ethdev.c                | 17 ++++++++
>  lib/ethdev/rte_ethdev.h                | 56 +++++++++++++++++++-------
>  lib/ethdev/rte_flow.c                  |  1 -
>  lib/ethdev/rte_flow.h                  | 25 +-----------
>  55 files changed, 395 insertions(+), 106 deletions(-)
> 

Can update following drivers too:
- igb (drivers/net/e1000/igb_ethdev.c)
- octeontx, configure(), as it checks RSS mode there
- virtio
- vmxnet3, as it configures RSS

Thanks,
ferruh
  
Stephen Hemminger Oct. 12, 2023, 4:49 p.m. UTC | #2
On Wed, 11 Oct 2023 17:27:25 +0800
Jie Hai <haijie1@huawei.com> wrote:

> This patchset is to support setting and querying RSS algorithms.
> 
> --
> v5:
> 1. rewrite some comments.
> 2. check RSS algorithm for drivers supporting RSS.
> 3. change field "func" of rss_conf to "algorithm".
> 4. fix commit log for [PATCH v4 4/7].
> 5. add Acked-by Reshma Pattan.
> 6. add symmetric_toeplitz_sort for showing.
> 7. change "hf" to "hash function" for showing.
> 
> v4:
> 1. recomment some definitions related to RSS.
> 2. allocate static memory for rss_key instead of dynamic.
> 3. use array of strings to get the name of rss algorithm.
> 4. add display of rss algorithm with testpmd.
> 
> v3:
> 1. fix commit log for PATCH [1/5].
> 2. make RSS ABI changes description to start the actual text at the margin.
> 3. move defnition of enum rte_eth_hash_function to rte_ethdev.h.
> 4. fix some comment codes.
> 
> v2:
> 1. return error if "func" is invalid.
> 2. modify the comments of the "func" field.
> 3. modify commit log of patch [3/5].
> 4. use malloc instead of rte_malloc.
> 5. adjust display format of RSS info.
> 6. remove the string display of rss_hf.
> 
> Huisong Li (1):
>   net/hns3: support setting and querying RSS hash function
> 
> Jie Hai (39):
>   ethdev: overwrite some comment related to RSS
>   ethdev: support setting and querying RSS algorithm
>   net/atlantic: check RSS hash algorithms
>   net/axgbe: check RSS hash algorithms
>   net/bnx2x: check RSS hash algorithms
>   net/bnxt: check RSS hash algorithms
>   net/bonding: check RSS hash algorithms
>   net/cnxk: check RSS hash algorithms
>   net/cpfl: check RSS hash algorithms
>   net/cxgbe: check RSS hash algorithms
>   net/dpaa: check RSS hash algorithms
>   net/dpaa2: check RSS hash algorithms
>   net/ena: check RSS hash algorithms
>   net/enic: check RSS hash algorithms
>   net/fm10k: check RSS hash algorithms
>   net/hinic: check RSS hash algorithms
>   net/i40e: check RSS hash algorithms
>   net/iavf: check RSS hash algorithms
>   net/ice: check RSS hash algorithms
>   net/idpf: check RSS hash algorithms
>   net/igc: check RSS hash algorithms
>   net/ionic: check RSS hash algorithms
>   net/ixgbe: check RSS hash algorithms
>   net/mana: check RSS hash algorithms
>   net/mlx5: check RSS hash algorithms
>   net/mvpp2: check RSS hash algorithms
>   net/netvsc: check RSS hash algorithms
>   net/ngbe: : check RSS hash algorithms
>   net/nfp: check RSS hash algorithms
>   net/null: check RSS hash algorithms
>   net/qede: check RSS hash algorithms
>   net/sfc: check RSS hash algorithms
>   net/tap: check RSS hash algorithms
>   net/thunderx: check RSS hash algorithms
>   net/txgbe: check RSS hash algorithms
>   app/proc-info: fix never show RSS info
>   app/proc-info: adjust the display format of RSS info
>   app/proc-info: support querying RSS hash algorithm
>   app/testpmd: add RSS hash algorithms display
> 
>  app/proc-info/main.c                   | 32 ++++++++++-----
>  app/test-pmd/cmdline.c                 | 29 ++++++++++---
>  app/test-pmd/config.c                  | 38 ++++++++---------
>  app/test-pmd/testpmd.h                 |  2 +-
>  doc/guides/rel_notes/release_23_11.rst |  2 +
>  drivers/net/atlantic/atl_ethdev.c      |  2 +
>  drivers/net/axgbe/axgbe_ethdev.c       |  9 +++++
>  drivers/net/bnx2x/bnx2x_ethdev.c       |  4 ++
>  drivers/net/bnxt/bnxt_ethdev.c         |  6 +++
>  drivers/net/bonding/rte_eth_bond_pmd.c |  6 +++
>  drivers/net/cnxk/cnxk_ethdev.c         |  5 +++
>  drivers/net/cnxk/cnxk_ethdev_ops.c     |  3 ++
>  drivers/net/cpfl/cpfl_ethdev.c         |  6 +++
>  drivers/net/cxgbe/cxgbe_ethdev.c       |  9 ++++-
>  drivers/net/dpaa/dpaa_ethdev.c         |  7 ++++
>  drivers/net/dpaa2/dpaa2_ethdev.c       |  7 ++++
>  drivers/net/ena/ena_rss.c              |  3 ++
>  drivers/net/enic/enic_ethdev.c         |  1 +
>  drivers/net/enic/enic_main.c           |  3 ++
>  drivers/net/fm10k/fm10k_ethdev.c       |  9 ++++-
>  drivers/net/hinic/hinic_pmd_ethdev.c   |  3 ++
>  drivers/net/hinic/hinic_pmd_rx.c       |  3 ++
>  drivers/net/hns3/hns3_rss.c            | 47 ++++++++++++---------
>  drivers/net/i40e/i40e_ethdev.c         |  7 ++++
>  drivers/net/iavf/iavf_ethdev.c         |  6 +++
>  drivers/net/ice/ice_dcf.c              |  3 ++
>  drivers/net/ice/ice_dcf_ethdev.c       |  3 ++
>  drivers/net/ice/ice_ethdev.c           |  7 ++++
>  drivers/net/idpf/idpf_ethdev.c         |  6 +++
>  drivers/net/igc/igc_ethdev.c           |  4 ++
>  drivers/net/igc/igc_txrx.c             |  5 +++
>  drivers/net/ionic/ionic_ethdev.c       |  6 +++
>  drivers/net/ixgbe/ixgbe_ethdev.c       | 12 +++++-
>  drivers/net/ixgbe/ixgbe_rxtx.c         |  4 ++
>  drivers/net/mana/mana.c                | 11 ++++-
>  drivers/net/mlx5/mlx5_ethdev.c         |  4 ++
>  drivers/net/mlx5/mlx5_rss.c            |  3 +-
>  drivers/net/mvpp2/mrvl_ethdev.c        |  3 ++
>  drivers/net/netvsc/hn_ethdev.c         |  6 +++
>  drivers/net/nfp/nfp_common.c           |  9 ++++-
>  drivers/net/ngbe/ngbe_ethdev.c         |  6 ++-
>  drivers/net/ngbe/ngbe_rxtx.c           |  3 ++
>  drivers/net/null/rte_eth_null.c        |  8 ++++
>  drivers/net/qede/qede_ethdev.c         |  9 ++++-
>  drivers/net/sfc/sfc_ethdev.c           |  3 ++
>  drivers/net/sfc/sfc_rx.c               |  3 ++
>  drivers/net/tap/rte_eth_tap.c          |  8 ++++
>  drivers/net/thunderx/nicvf_ethdev.c    | 10 ++++-
>  drivers/net/txgbe/txgbe_ethdev.c       |  7 +++-
>  drivers/net/txgbe/txgbe_ethdev_vf.c    |  7 +++-
>  drivers/net/txgbe/txgbe_rxtx.c         |  3 ++
>  lib/ethdev/rte_ethdev.c                | 17 ++++++++
>  lib/ethdev/rte_ethdev.h                | 56 +++++++++++++++++++-------
>  lib/ethdev/rte_flow.c                  |  1 -
>  lib/ethdev/rte_flow.h                  | 25 +-----------
>  55 files changed, 395 insertions(+), 106 deletions(-)
> 

In future, it would be good to report the hash algorithm in the PCAPNG
output from dumpcap.  The current code always reports it as Toeplitz.

One issue is that the PCAPNG standard:
  https://www.ietf.org/staging/draft-tuexen-opsawg-pcapng-02.html#name-enhanced-packet-block
Only has values for a few types:

epb_hash:

	The epb_hash option contains a hash of the packet. The first octet
	specifies the hashing algorithm, while the following octets contain the
	actual hash, whose size depends on the hashing algorithm, and hence
	from the value in the first octet. The hashing algorithm can be: 2s
	complement (algorithm octet = 0, size = XXX), XOR (algorithm octet = 1,
	size=XXX), CRC32 (algorithm octet = 2, size = 4), MD-5 (algorithm octet
	= 3, size = 16), SHA-1 (algorithm octet = 4, size = 20), Toeplitz
	(algorithm octet = 5, size = 4). The hash covers only the packet, not
	the header added by the capture driver: this gives the possibility to
	calculate it inside the network card. The hash allows easier
	comparison/merging of different capture files, and reliable data
	transfer between the data acquisition system and the capture library.

I added the Toeplitz one when pcapng was being managed via github.
Now that it is more in IETF/RFC standard process adding new values probably
would take more effort.
  
Thomas Monjalon Oct. 17, 2023, 2:06 p.m. UTC | #3
Hello,

11/10/2023 11:27, Jie Hai:
>  app/proc-info/main.c                   | 32 ++++++++++-----
>  app/test-pmd/cmdline.c                 | 29 ++++++++++---
>  app/test-pmd/config.c                  | 38 ++++++++---------
>  app/test-pmd/testpmd.h                 |  2 +-
>  doc/guides/rel_notes/release_23_11.rst |  2 +
>  drivers/net/atlantic/atl_ethdev.c      |  2 +
>  drivers/net/axgbe/axgbe_ethdev.c       |  9 +++++
>  drivers/net/bnx2x/bnx2x_ethdev.c       |  4 ++
>  drivers/net/bnxt/bnxt_ethdev.c         |  6 +++
>  drivers/net/bonding/rte_eth_bond_pmd.c |  6 +++
>  drivers/net/cnxk/cnxk_ethdev.c         |  5 +++
>  drivers/net/cnxk/cnxk_ethdev_ops.c     |  3 ++
>  drivers/net/cpfl/cpfl_ethdev.c         |  6 +++
>  drivers/net/cxgbe/cxgbe_ethdev.c       |  9 ++++-
>  drivers/net/dpaa/dpaa_ethdev.c         |  7 ++++
>  drivers/net/dpaa2/dpaa2_ethdev.c       |  7 ++++
>  drivers/net/ena/ena_rss.c              |  3 ++
>  drivers/net/enic/enic_ethdev.c         |  1 +
>  drivers/net/enic/enic_main.c           |  3 ++
>  drivers/net/fm10k/fm10k_ethdev.c       |  9 ++++-
>  drivers/net/hinic/hinic_pmd_ethdev.c   |  3 ++
>  drivers/net/hinic/hinic_pmd_rx.c       |  3 ++
>  drivers/net/hns3/hns3_rss.c            | 47 ++++++++++++---------
>  drivers/net/i40e/i40e_ethdev.c         |  7 ++++
>  drivers/net/iavf/iavf_ethdev.c         |  6 +++
>  drivers/net/ice/ice_dcf.c              |  3 ++
>  drivers/net/ice/ice_dcf_ethdev.c       |  3 ++
>  drivers/net/ice/ice_ethdev.c           |  7 ++++
>  drivers/net/idpf/idpf_ethdev.c         |  6 +++
>  drivers/net/igc/igc_ethdev.c           |  4 ++
>  drivers/net/igc/igc_txrx.c             |  5 +++
>  drivers/net/ionic/ionic_ethdev.c       |  6 +++
>  drivers/net/ixgbe/ixgbe_ethdev.c       | 12 +++++-
>  drivers/net/ixgbe/ixgbe_rxtx.c         |  4 ++
>  drivers/net/mana/mana.c                | 11 ++++-
>  drivers/net/mlx5/mlx5_ethdev.c         |  4 ++
>  drivers/net/mlx5/mlx5_rss.c            |  3 +-
>  drivers/net/mvpp2/mrvl_ethdev.c        |  3 ++
>  drivers/net/netvsc/hn_ethdev.c         |  6 +++
>  drivers/net/nfp/nfp_common.c           |  9 ++++-
>  drivers/net/ngbe/ngbe_ethdev.c         |  6 ++-
>  drivers/net/ngbe/ngbe_rxtx.c           |  3 ++
>  drivers/net/null/rte_eth_null.c        |  8 ++++
>  drivers/net/qede/qede_ethdev.c         |  9 ++++-
>  drivers/net/sfc/sfc_ethdev.c           |  3 ++
>  drivers/net/sfc/sfc_rx.c               |  3 ++
>  drivers/net/tap/rte_eth_tap.c          |  8 ++++
>  drivers/net/thunderx/nicvf_ethdev.c    | 10 ++++-
>  drivers/net/txgbe/txgbe_ethdev.c       |  7 +++-
>  drivers/net/txgbe/txgbe_ethdev_vf.c    |  7 +++-
>  drivers/net/txgbe/txgbe_rxtx.c         |  3 ++
>  lib/ethdev/rte_ethdev.c                | 17 ++++++++
>  lib/ethdev/rte_ethdev.h                | 56 +++++++++++++++++++-------
>  lib/ethdev/rte_flow.c                  |  1 -
>  lib/ethdev/rte_flow.h                  | 25 +-----------
>  55 files changed, 395 insertions(+), 106 deletions(-)

Changing all drivers is suspicious.
It shows that something is missing in ethdev.
Please can you add the checks in ethdev only?
  
Ferruh Yigit Oct. 17, 2023, 2:26 p.m. UTC | #4
On 10/17/2023 3:06 PM, Thomas Monjalon wrote:
> Hello,
> 
> 11/10/2023 11:27, Jie Hai:
>>  app/proc-info/main.c                   | 32 ++++++++++-----
>>  app/test-pmd/cmdline.c                 | 29 ++++++++++---
>>  app/test-pmd/config.c                  | 38 ++++++++---------
>>  app/test-pmd/testpmd.h                 |  2 +-
>>  doc/guides/rel_notes/release_23_11.rst |  2 +
>>  drivers/net/atlantic/atl_ethdev.c      |  2 +
>>  drivers/net/axgbe/axgbe_ethdev.c       |  9 +++++
>>  drivers/net/bnx2x/bnx2x_ethdev.c       |  4 ++
>>  drivers/net/bnxt/bnxt_ethdev.c         |  6 +++
>>  drivers/net/bonding/rte_eth_bond_pmd.c |  6 +++
>>  drivers/net/cnxk/cnxk_ethdev.c         |  5 +++
>>  drivers/net/cnxk/cnxk_ethdev_ops.c     |  3 ++
>>  drivers/net/cpfl/cpfl_ethdev.c         |  6 +++
>>  drivers/net/cxgbe/cxgbe_ethdev.c       |  9 ++++-
>>  drivers/net/dpaa/dpaa_ethdev.c         |  7 ++++
>>  drivers/net/dpaa2/dpaa2_ethdev.c       |  7 ++++
>>  drivers/net/ena/ena_rss.c              |  3 ++
>>  drivers/net/enic/enic_ethdev.c         |  1 +
>>  drivers/net/enic/enic_main.c           |  3 ++
>>  drivers/net/fm10k/fm10k_ethdev.c       |  9 ++++-
>>  drivers/net/hinic/hinic_pmd_ethdev.c   |  3 ++
>>  drivers/net/hinic/hinic_pmd_rx.c       |  3 ++
>>  drivers/net/hns3/hns3_rss.c            | 47 ++++++++++++---------
>>  drivers/net/i40e/i40e_ethdev.c         |  7 ++++
>>  drivers/net/iavf/iavf_ethdev.c         |  6 +++
>>  drivers/net/ice/ice_dcf.c              |  3 ++
>>  drivers/net/ice/ice_dcf_ethdev.c       |  3 ++
>>  drivers/net/ice/ice_ethdev.c           |  7 ++++
>>  drivers/net/idpf/idpf_ethdev.c         |  6 +++
>>  drivers/net/igc/igc_ethdev.c           |  4 ++
>>  drivers/net/igc/igc_txrx.c             |  5 +++
>>  drivers/net/ionic/ionic_ethdev.c       |  6 +++
>>  drivers/net/ixgbe/ixgbe_ethdev.c       | 12 +++++-
>>  drivers/net/ixgbe/ixgbe_rxtx.c         |  4 ++
>>  drivers/net/mana/mana.c                | 11 ++++-
>>  drivers/net/mlx5/mlx5_ethdev.c         |  4 ++
>>  drivers/net/mlx5/mlx5_rss.c            |  3 +-
>>  drivers/net/mvpp2/mrvl_ethdev.c        |  3 ++
>>  drivers/net/netvsc/hn_ethdev.c         |  6 +++
>>  drivers/net/nfp/nfp_common.c           |  9 ++++-
>>  drivers/net/ngbe/ngbe_ethdev.c         |  6 ++-
>>  drivers/net/ngbe/ngbe_rxtx.c           |  3 ++
>>  drivers/net/null/rte_eth_null.c        |  8 ++++
>>  drivers/net/qede/qede_ethdev.c         |  9 ++++-
>>  drivers/net/sfc/sfc_ethdev.c           |  3 ++
>>  drivers/net/sfc/sfc_rx.c               |  3 ++
>>  drivers/net/tap/rte_eth_tap.c          |  8 ++++
>>  drivers/net/thunderx/nicvf_ethdev.c    | 10 ++++-
>>  drivers/net/txgbe/txgbe_ethdev.c       |  7 +++-
>>  drivers/net/txgbe/txgbe_ethdev_vf.c    |  7 +++-
>>  drivers/net/txgbe/txgbe_rxtx.c         |  3 ++
>>  lib/ethdev/rte_ethdev.c                | 17 ++++++++
>>  lib/ethdev/rte_ethdev.h                | 56 +++++++++++++++++++-------
>>  lib/ethdev/rte_flow.c                  |  1 -
>>  lib/ethdev/rte_flow.h                  | 25 +-----------
>>  55 files changed, 395 insertions(+), 106 deletions(-)
> 
> Changing all drivers is suspicious.
> It shows that something is missing in ethdev.
> Please can you add the checks in ethdev only?
> 

That is kind of request from me, let me try to summarize what is going on,

there is a new config item added to "struct rte_eth_rss_conf" introduced
in this set, which is RSS hashing algorithm to use.

Problem is none of the existing drivers are taking account this new
config item, so application will request it but drivers silently ignore it.

This is a generic problem when adding a new config item to existing
config struct.

So my request was if drivers not supporting it, and it is requested by
the application, driver should return an error to let application know
that it is not supported, that is why bunch of drivers updated.


One option can be adding a new, specific API and dev_ops for this, for
this case new config item is related to the existing RSS API, so I think
it can be part of the existing API.

Other can be to have some kind of capability reporting by drivers, and
application will detect it and won't request this new config item, I
think Stephen already suggested something like this. This capability
flag is again a generic requirement, and `rte_eth_dev_info_get()`
partially used for this purpose. I think it will be odd from application
perspective to have a capability for just one config item of a feature set.


Anyway, I think updating drivers to report they are not supporting new
config item is best option to me, but also I think we should discuss
this capability reporting in ethdev in a wider context.
  
lihuisong (C) Oct. 24, 2023, 12:57 p.m. UTC | #5
在 2023/10/17 22:26, Ferruh Yigit 写道:
> On 10/17/2023 3:06 PM, Thomas Monjalon wrote:
>> Hello,
>>
>> 11/10/2023 11:27, Jie Hai:
>>>   app/proc-info/main.c                   | 32 ++++++++++-----
>>>   app/test-pmd/cmdline.c                 | 29 ++++++++++---
>>>   app/test-pmd/config.c                  | 38 ++++++++---------
>>>   app/test-pmd/testpmd.h                 |  2 +-
>>>   doc/guides/rel_notes/release_23_11.rst |  2 +
>>>   drivers/net/atlantic/atl_ethdev.c      |  2 +
>>>   drivers/net/axgbe/axgbe_ethdev.c       |  9 +++++
>>>   drivers/net/bnx2x/bnx2x_ethdev.c       |  4 ++
>>>   drivers/net/bnxt/bnxt_ethdev.c         |  6 +++
>>>   drivers/net/bonding/rte_eth_bond_pmd.c |  6 +++
>>>   drivers/net/cnxk/cnxk_ethdev.c         |  5 +++
>>>   drivers/net/cnxk/cnxk_ethdev_ops.c     |  3 ++
>>>   drivers/net/cpfl/cpfl_ethdev.c         |  6 +++
>>>   drivers/net/cxgbe/cxgbe_ethdev.c       |  9 ++++-
>>>   drivers/net/dpaa/dpaa_ethdev.c         |  7 ++++
>>>   drivers/net/dpaa2/dpaa2_ethdev.c       |  7 ++++
>>>   drivers/net/ena/ena_rss.c              |  3 ++
>>>   drivers/net/enic/enic_ethdev.c         |  1 +
>>>   drivers/net/enic/enic_main.c           |  3 ++
>>>   drivers/net/fm10k/fm10k_ethdev.c       |  9 ++++-
>>>   drivers/net/hinic/hinic_pmd_ethdev.c   |  3 ++
>>>   drivers/net/hinic/hinic_pmd_rx.c       |  3 ++
>>>   drivers/net/hns3/hns3_rss.c            | 47 ++++++++++++---------
>>>   drivers/net/i40e/i40e_ethdev.c         |  7 ++++
>>>   drivers/net/iavf/iavf_ethdev.c         |  6 +++
>>>   drivers/net/ice/ice_dcf.c              |  3 ++
>>>   drivers/net/ice/ice_dcf_ethdev.c       |  3 ++
>>>   drivers/net/ice/ice_ethdev.c           |  7 ++++
>>>   drivers/net/idpf/idpf_ethdev.c         |  6 +++
>>>   drivers/net/igc/igc_ethdev.c           |  4 ++
>>>   drivers/net/igc/igc_txrx.c             |  5 +++
>>>   drivers/net/ionic/ionic_ethdev.c       |  6 +++
>>>   drivers/net/ixgbe/ixgbe_ethdev.c       | 12 +++++-
>>>   drivers/net/ixgbe/ixgbe_rxtx.c         |  4 ++
>>>   drivers/net/mana/mana.c                | 11 ++++-
>>>   drivers/net/mlx5/mlx5_ethdev.c         |  4 ++
>>>   drivers/net/mlx5/mlx5_rss.c            |  3 +-
>>>   drivers/net/mvpp2/mrvl_ethdev.c        |  3 ++
>>>   drivers/net/netvsc/hn_ethdev.c         |  6 +++
>>>   drivers/net/nfp/nfp_common.c           |  9 ++++-
>>>   drivers/net/ngbe/ngbe_ethdev.c         |  6 ++-
>>>   drivers/net/ngbe/ngbe_rxtx.c           |  3 ++
>>>   drivers/net/null/rte_eth_null.c        |  8 ++++
>>>   drivers/net/qede/qede_ethdev.c         |  9 ++++-
>>>   drivers/net/sfc/sfc_ethdev.c           |  3 ++
>>>   drivers/net/sfc/sfc_rx.c               |  3 ++
>>>   drivers/net/tap/rte_eth_tap.c          |  8 ++++
>>>   drivers/net/thunderx/nicvf_ethdev.c    | 10 ++++-
>>>   drivers/net/txgbe/txgbe_ethdev.c       |  7 +++-
>>>   drivers/net/txgbe/txgbe_ethdev_vf.c    |  7 +++-
>>>   drivers/net/txgbe/txgbe_rxtx.c         |  3 ++
>>>   lib/ethdev/rte_ethdev.c                | 17 ++++++++
>>>   lib/ethdev/rte_ethdev.h                | 56 +++++++++++++++++++-------
>>>   lib/ethdev/rte_flow.c                  |  1 -
>>>   lib/ethdev/rte_flow.h                  | 25 +-----------
>>>   55 files changed, 395 insertions(+), 106 deletions(-)
>> Changing all drivers is suspicious.
>> It shows that something is missing in ethdev.
>> Please can you add the checks in ethdev only?
>>
> That is kind of request from me, let me try to summarize what is going on,
>
> there is a new config item added to "struct rte_eth_rss_conf" introduced
> in this set, which is RSS hashing algorithm to use.
>
> Problem is none of the existing drivers are taking account this new
> config item, so application will request it but drivers silently ignore it.
>
> This is a generic problem when adding a new config item to existing
> config struct.
>
> So my request was if drivers not supporting it, and it is requested by
> the application, driver should return an error to let application know
> that it is not supported, that is why bunch of drivers updated.
>
>
> One option can be adding a new, specific API and dev_ops for this, for
> this case new config item is related to the existing RSS API, so I think
> it can be part of the existing API.
>
> Other can be to have some kind of capability reporting by drivers, and
> application will detect it and won't request this new config item, I
> think Stephen already suggested something like this. This capability
> flag is again a generic requirement, and `rte_eth_dev_info_get()`
> partially used for this purpose. I think it will be odd from application
> perspective to have a capability for just one config item of a feature set.
>
>
> Anyway, I think updating drivers to report they are not supporting new
> config item is best option to me, but also I think we should discuss
> this capability reporting in ethdev in a wider context.
IMO, it is more better to report RSS algorithm capability.
It can avoid the later ABI break successfully as Stephen said.
>
>
>
> .
  
Thomas Monjalon Oct. 26, 2023, 8:53 a.m. UTC | #6
24/10/2023 14:57, lihuisong (C):
> 在 2023/10/17 22:26, Ferruh Yigit 写道:
> > On 10/17/2023 3:06 PM, Thomas Monjalon wrote:
> >> 11/10/2023 11:27, Jie Hai:
> >>>   55 files changed, 395 insertions(+), 106 deletions(-)
> >> 
> >> Changing all drivers is suspicious.
> >> It shows that something is missing in ethdev.
> >> Please can you add the checks in ethdev only?
> >>
> > That is kind of request from me, let me try to summarize what is going on,
> >
> > there is a new config item added to "struct rte_eth_rss_conf" introduced
> > in this set, which is RSS hashing algorithm to use.
> >
> > Problem is none of the existing drivers are taking account this new
> > config item, so application will request it but drivers silently ignore it.
> >
> > This is a generic problem when adding a new config item to existing
> > config struct.
> >
> > So my request was if drivers not supporting it, and it is requested by
> > the application, driver should return an error to let application know
> > that it is not supported, that is why bunch of drivers updated.
> >
> >
> > One option can be adding a new, specific API and dev_ops for this, for
> > this case new config item is related to the existing RSS API, so I think
> > it can be part of the existing API.
> >
> > Other can be to have some kind of capability reporting by drivers, and
> > application will detect it and won't request this new config item, I
> > think Stephen already suggested something like this. This capability
> > flag is again a generic requirement, and `rte_eth_dev_info_get()`
> > partially used for this purpose. I think it will be odd from application
> > perspective to have a capability for just one config item of a feature set.
> >
> >
> > Anyway, I think updating drivers to report they are not supporting new
> > config item is best option to me, but also I think we should discuss
> > this capability reporting in ethdev in a wider context.
> IMO, it is more better to report RSS algorithm capability.
> It can avoid the later ABI break successfully as Stephen said.

Yes we should add a capability for RSS algorithm.