[v2,3/3] usertools/rss: add CNXK well-known key
Checks
Commit Message
Add default RSS key for CNXK platforms. CNXK platform uses 48 bytes long
key for hash calculations and a default RETA size of 64.
Example:
~$ usertools/dpdk-rss-flows.py 8 28.0.0.0/24 40.0.0.0/24 -k cnxk
SRC_IP DST_IP QUEUE
28.0.0.1 40.0.0.1 7
28.0.0.1 40.0.0.2 2
28.0.0.1 40.0.0.3 4
28.0.0.1 40.0.0.7 1
28.0.0.1 40.0.0.8 3
28.0.0.1 40.0.0.9 5
28.0.0.1 40.0.0.10 0
28.0.0.1 40.0.0.11 6
Co-authored-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Robin Jarry <rjarry@redhat.com>
---
usertools/dpdk-rss-flows.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
Comments
On Mon, 20 Nov 2023 17:22:59 +0100
Robin Jarry <rjarry@redhat.com> wrote:
> diff --git a/usertools/dpdk-rss-flows.py b/usertools/dpdk-rss-flows.py
> index fd225a697f08..be9b3d760c03 100755
> --- a/usertools/dpdk-rss-flows.py
> +++ b/usertools/dpdk-rss-flows.py
> @@ -226,6 +226,23 @@ def reta_size(self, num_queues: int) -> int:
> ),
> reta_size=512,
> ),
> + "cnxk": DriverInfo(
> + key=bytes(
> + (
> + # fmt: off
> + # roc_nix_rss_key_default_fill, see drivers/common/cnxk/roc_nix_rss.c
> + # Marvell's cnxk NICs take 48 bytes keys
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + # fmt: on
> + )
> + ),
> + reta_size=64,
> + ),
> }
Maybe an enhancement in future to expose the default key better.
Having it live in two places means adding new drivers has another
thing to worry about (and not documented).
Thanks Robin for adding key for CNXK platform.
Regards
Sunil Kumar Kori
> -----Original Message-----
> From: Robin Jarry <rjarry@redhat.com>
> Sent: Monday, November 20, 2023 9:53 PM
> To: dev@dpdk.org
> Cc: Sunil Kumar Kori <skori@marvell.com>
> Subject: [EXT] [PATCH v2 3/3] usertools/rss: add CNXK well-known key
>
> External Email
>
> ----------------------------------------------------------------------
> Add default RSS key for CNXK platforms. CNXK platform uses 48 bytes long
> key for hash calculations and a default RETA size of 64.
>
> Example:
>
> ~$ usertools/dpdk-rss-flows.py 8 28.0.0.0/24 40.0.0.0/24 -k cnxk
> SRC_IP DST_IP QUEUE
> 28.0.0.1 40.0.0.1 7
> 28.0.0.1 40.0.0.2 2
> 28.0.0.1 40.0.0.3 4
> 28.0.0.1 40.0.0.7 1
> 28.0.0.1 40.0.0.8 3
> 28.0.0.1 40.0.0.9 5
> 28.0.0.1 40.0.0.10 0
> 28.0.0.1 40.0.0.11 6
>
> Co-authored-by: Sunil Kumar Kori <skori@marvell.com>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---
> usertools/dpdk-rss-flows.py | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/usertools/dpdk-rss-flows.py b/usertools/dpdk-rss-flows.py
> index fd225a697f08..be9b3d760c03 100755
> --- a/usertools/dpdk-rss-flows.py
> +++ b/usertools/dpdk-rss-flows.py
> @@ -226,6 +226,23 @@ def reta_size(self, num_queues: int) -> int:
> ),
> reta_size=512,
> ),
> + "cnxk": DriverInfo(
> + key=bytes(
> + (
> + # fmt: off
> + # roc_nix_rss_key_default_fill, see
> drivers/common/cnxk/roc_nix_rss.c
> + # Marvell's cnxk NICs take 48 bytes keys
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
> + # fmt: on
> + )
> + ),
> + reta_size=64,
> + ),
> }
>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
>
> --
> 2.42.0
@@ -226,6 +226,23 @@ def reta_size(self, num_queues: int) -> int:
),
reta_size=512,
),
+ "cnxk": DriverInfo(
+ key=bytes(
+ (
+ # fmt: off
+ # roc_nix_rss_key_default_fill, see drivers/common/cnxk/roc_nix_rss.c
+ # Marvell's cnxk NICs take 48 bytes keys
+ 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
+ 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
+ 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
+ 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
+ 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
+ 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad,
+ # fmt: on
+ )
+ ),
+ reta_size=64,
+ ),
}