[v2,3/3] usertools/rss: add CNXK well-known key

Message ID 20231120162256.74399-6-rjarry@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2,1/3] usertools/rss: add driver abstractions |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing fail Testing issues
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Robin Jarry Nov. 20, 2023, 4:22 p.m. UTC
  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

Stephen Hemminger Nov. 20, 2023, 4:41 p.m. UTC | #1
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).
  
Sunil Kumar Kori Nov. 21, 2023, 6:08 a.m. UTC | #2
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
  

Patch

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,
+    ),
 }