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 D75AA4318A; Tue, 17 Oct 2023 14:17:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7C7840EE7; Tue, 17 Oct 2023 14:17:16 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1B68D40273 for ; Tue, 17 Oct 2023 14:17:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697545034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WAXpWohokoVCjREjHHyMMy76b/tEKXK0z5P9vlE4LBE=; b=IwD/4/Fo60vln8ZFE/I5GZ3Vsgc+vA5MIxFTWs6i/24DIr6MP+N3N73luzpq9Z+NHDt/lP I/Kf1cH7xuZsk7+I7HD4EAGKeSdpxAh+UD1u3vrXwgDmkDjOa/T11qhCSOqkiuejlmL53W Ds3CkZlLpNtM2vgCQ9QeJnkQweg3CgI= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-dCRkZUETPoqeyktZiAmoBg-1; Tue, 17 Oct 2023 08:17:13 -0400 X-MC-Unique: dCRkZUETPoqeyktZiAmoBg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4083717431eso1515375e9.1 for ; Tue, 17 Oct 2023 05:17:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697545032; x=1698149832; h=in-reply-to:references:cc:subject:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=WAXpWohokoVCjREjHHyMMy76b/tEKXK0z5P9vlE4LBE=; b=GJlTO2QkzSFneQAMPN2dYl3hA+nrflgJzFGelPQ5QWEBTnBM9pckBuIuQKBdgRg4yp /an0F9TeMgocNZtWuHVe2lnh2GyYIlWx7jSKqkIax9HN3Lb5dqMPwCXkSmD83ofLJA8M BylCJqHzzAIwBwZYZFHosmch93NcbIGT3nxk23splgb6w/rfHwrps6aHtk9ebSrUXLFh PAsILJpSbw40Rsf5Q6Lmwfq6yLRbh7YZ3INpZStMb14Rmv3zSKxD6juxVU61aoeWDINE Y+AmL9kzSJJZfM35NAEp2NvRgTIupQHinZLodszFTR1XfEsSowv19r4x1st9fwVtyR9/ GGRQ== X-Gm-Message-State: AOJu0Yw9UqzmI36DVUp9nKFezAulrEAZtT/H3otF0cYPaYJKHw7Vej/q +g+wQ+cTpvO9sUJFR2chXcl5pZW0hHOz5y0zc2zJ5/7v11knWr0LJ2v6jrGg5JJbg8p0gcgDUir CCBU= X-Received: by 2002:a05:600c:19cb:b0:407:5b54:bb0c with SMTP id u11-20020a05600c19cb00b004075b54bb0cmr1665763wmq.19.1697545031990; Tue, 17 Oct 2023 05:17:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbajNP4Ute1FNSKm2WkbjO2g75J8YeD1rrKXXncAHrgFB+oAe4KSCGjCITJ1HeFGiIAhHK8Q== X-Received: by 2002:a05:600c:19cb:b0:407:5b54:bb0c with SMTP id u11-20020a05600c19cb00b004075b54bb0cmr1665746wmq.19.1697545031608; Tue, 17 Oct 2023 05:17:11 -0700 (PDT) Received: from localhost (2a01cb000f8b9700598da2e1679e8383.ipv6.abo.wanadoo.fr. [2a01:cb00:f8b:9700:598d:a2e1:679e:8383]) by smtp.gmail.com with ESMTPSA id d15-20020a05600c34cf00b004063d8b43e7sm9717736wmq.48.2023.10.17.05.17.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 05:17:11 -0700 (PDT) Mime-Version: 1.0 Date: Tue, 17 Oct 2023 14:17:10 +0200 Message-Id: From: "Robin Jarry" To: Subject: Re: [PATCH v2 1/1] usertools/rss: add CNXK RSS key Cc: , "Thomas Monjalon" , "Jerin Jacob" X-Mailer: aerc/0.16.0-32-g22f9b64908db References: <20231009163033.1095213-1-skori@marvell.com> <20231009163610.1096092-1-skori@marvell.com> In-Reply-To: <20231009163610.1096092-1-skori@marvell.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 , Oct 09, 2023 at 18:36: > From: Sunil Kumar Kori > > This patch adds RSS key for CNXK platforms. CNXK platform uses > 48 bytes long key for hash calculations. > > For the same patch also updates help mesaages to provide range > information for supporting NICs/platforms. > > Also CNXK uses reta size as 64 so to get correct offset to retrieve > queue index, user must pass reta_size option as 64 i.e. -t 64. I think we should add some driver abstraction that contains the required=20 key length and default reta size. Instead of requiring the user to guess=20 the correct values. Is that something you could do? > > Examples: > $ ./dpdk-rss-flows.py -k cnxk 8 28.0.0.0/24 40.0.0.0/24 -t 64 > 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 > > Signed-off-by: Sunil Kumar Kori > --- > v1..v2: > - Fix checkpatch errors. Hi Sunil, > usertools/dpdk-rss-flows.py | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/usertools/dpdk-rss-flows.py b/usertools/dpdk-rss-flows.py > index 73821eb471..b6edd7a2e0 100755 > --- a/usertools/dpdk-rss-flows.py > +++ b/usertools/dpdk-rss-flows.py > @@ -188,11 +188,24 @@ def balanced_traffic( > 0x81, 0x15, 0x03, 0x66, > ) > ) > +# rss_key_default, see drivers/net/cnxk/cnxk_flow.c Are you referring to roc_nix_rss_key_default_fill in=20 drivers/common/cnxk/roc_nix_rss.c? > +# Marvell's cnxk NICs take 48 bytes keys > +RSS_KEY_CNXK =3D bytes( > + ( > + 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 > DEFAULT_DRIVER_KEYS =3D { > "intel": RSS_KEY_INTEL, > "mlx": RSS_KEY_MLX, > "i40e": RSS_KEY_I40E, > + "cnxk": RSS_KEY_CNXK, > } > =20 > =20 > @@ -202,7 +215,7 @@ def rss_key(value): > try: > key =3D binascii.unhexlify(value) > if len(key) not in (40, 52): > - raise argparse.ArgumentTypeError("The key must be 40 or 52 b= ytes long") > + raise argparse.ArgumentTypeError("The key must be 40 to 52 b= ytes long") You are not changing the length test, so passing a 48 bytes key will=20 trigger an error. > return key > except (TypeError, ValueError) as e: > raise argparse.ArgumentTypeError(str(e)) from e > @@ -299,7 +312,7 @@ def parse_args(): > default=3DRSS_KEY_INTEL, > type=3Drss_key, > help=3D""" > - The random 40-bytes key used to compute the RSS hash. This optio= n > + The random 40 to 52 bytes key used to compute the RSS hash. This= option > supports either a well-known name or the hex value of the key > (well-known names: "intel", "mlx", default: "intel"). > """, > --=20 > 2.25.1 --=20 Robin Jarry Principal Software Engineer Red Hat, Telco/NFV