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 CE5C6458F4; Tue, 3 Sep 2024 21:49:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBEDB402C5; Tue, 3 Sep 2024 21:49:48 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id DCD43402BE for ; Tue, 3 Sep 2024 21:49:47 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-201d5af11a4so50108135ad.3 for ; Tue, 03 Sep 2024 12:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1725392987; x=1725997787; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=C6JK2JmjhGT6/wxzB1RjBmfF8cFRPH406PeEwWdsIEY=; b=VT4U2QcBfpr2e7k8+Y/LD6hUPpXznEcGz7CzapgY+gxxTJ2XjXo08jpjJ2wiSu/xSv bso+poc7Mea3mTnWomIQfwp2LITEw13JmSfGSDDJVJjxO07iXDp8zv2sytgyaRHIjJXZ 2Tvvh3ZJpYVMitcFNVebNX1GvE/Y8K2uW0hNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725392987; x=1725997787; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C6JK2JmjhGT6/wxzB1RjBmfF8cFRPH406PeEwWdsIEY=; b=B6h2L9EUb5T4/2Z5+Stpcf9juMWPUzNXc7pSDf52jqm6QJM6IX7ZPsfBLkXfuL1zCc 3wx1/JN4JfPgDvsKpEhX4QXJHiny9HihIqNj+5m8jAzln90wAlMgRBT4QOilgEK/1LxE po0d4y1OrAfeYX/mxirIvqMyehOrogwTcjWz0No/k1xn32htnNKPHS7YxTasA8AzDFiS gLBIaAxLAfsKC1Fvai5FOhbXXv9f2gjpu+BJ+b95bbtF/oJpwguBebayn3fsWQ+fepW1 BvdeemtjVc1cuopQRlKt/qJiS3WlVr/yVDkAEH7tveK+v5h/TWv6Fe0GceiHl/EEKOZy SyDA== X-Forwarded-Encrypted: i=1; AJvYcCVYo8HPQPe8Ux0A9di0GnN2d3BivWDnbU8hdNZSoRJ4hqlnJ+uHgCAfAsI1nWzq5Vqc+j4=@dpdk.org X-Gm-Message-State: AOJu0YxgMWIuEhVAJIpdvAbTqoOmTTJhhSvF1GXK6STEfyOsnU0dAfPm cKah1gGqykl040+AoAaoeq+0qIWNEEkTRKhqmMBH4fwqW08xwk9J4AN/y3luM7PT14Dsu/JALDC EQrYJt1CdTHvgPU1Pss1Rp7Hr9P5KgS/ItSK71Q== X-Google-Smtp-Source: AGHT+IG4n9x7W5KKmqpCMdhpOGcF2HFVzYEYS0T82IHpV5KbkYAF53LQmkrh1I4a83mHLNCaSaJ2KvrRBS31qpqBUeA= X-Received: by 2002:a17:902:dac8:b0:206:a79c:ba2e with SMTP id d9443c01a7336-206a79cbd43mr24282025ad.43.1725392986937; Tue, 03 Sep 2024 12:49:46 -0700 (PDT) MIME-Version: 1.0 References: <20240301155416.96960-1-juraj.linkes@pantheon.tech> <20240821145315.97974-1-juraj.linkes@pantheon.tech> <20240821145315.97974-12-juraj.linkes@pantheon.tech> In-Reply-To: <20240821145315.97974-12-juraj.linkes@pantheon.tech> From: Dean Marx Date: Tue, 3 Sep 2024 15:49:58 -0400 Message-ID: Subject: Re: [PATCH v3 11/12] dts: add Rx offload capabilities To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu, alex.chapman@arm.com, dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000015bfe806213c5cf2" 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 --00000000000015bfe806213c5cf2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 21, 2024 at 10:53=E2=80=AFAM Juraj Linke=C5=A1 wrote: > The scatter Rx offload capability is needed for the pmd_buffer_scatter > test suite. The command that retrieves the capability is: > show port rx_offload capabilities > > The command also retrieves a lot of other capabilities (RX_OFFLOAD_*) > which are all added into a Flag. The Flag members correspond to NIC > capability names so a convenience function that looks for the supported > Flags in a testpmd output is also added. > > The NIC capability names (mentioned above) are copy-pasted from the > Flag. Dynamic addition of Enum members runs into problems with typing > (mypy doesn't know about the members) and documentation generation > (Sphinx doesn't know about the members). > > Signed-off-by: Juraj Linke=C5=A1 > > + RX_OFFLOAD_VLAN_FILTER =3D 1 << 9 > + #: Device supports VLAN offload. > + RX_OFFLOAD_VLAN_EXTEND =3D auto() > + #: Device supports receiving segmented mbufs. > + RX_OFFLOAD_SCATTER =3D 1 << 13 > This was an interesting section, I'm not super familiar with bitwise shifting in python flags so I figured I'd ask while it's in mind if there's any specific reason for shifting these two flags? Not a critique of the code, just genuinely curious. Reviewed-by: Dean Marx --00000000000015bfe806213c5cf2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Aug 21, 2024 at 10:53=E2=80=AFAM = Juraj Linke=C5=A1 <juraj.linkes@pantheon.tech> wrote:
The = scatter Rx offload capability is needed for the pmd_buffer_scatter
test suite. The command that retrieves the capability is:
show port <port_id> rx_offload capabilities

The command also retrieves a lot of other capabilities (RX_OFFLOAD_*)
which are all added into a Flag. The Flag members correspond to NIC
capability names so a convenience function that looks for the supported
Flags in a testpmd output is also added.

The NIC capability names (mentioned above) are copy-pasted from the
Flag. Dynamic addition of Enum members runs into problems with typing
(mypy doesn't know about the members) and documentation generation
(Sphinx doesn't know about the members).

Signed-off-by: Juraj Linke=C5=A1 <juraj.linkes@pantheon.tech>

<snip>=C2=A0
+=C2=A0 =C2=A0 RX_OFFLOAD_VLAN_FILTER =3D 1 << 9
+=C2=A0 =C2=A0 #: Device supports VLAN offload.
+=C2=A0 =C2=A0 RX_OFFLOAD_VLAN_EXTEND =3D auto()
+=C2=A0 =C2=A0 #: Device supports receiving segmented mbufs.
+=C2=A0 =C2=A0 RX_OFFLOAD_SCATTER =3D 1 << 13
This was an interesting section, I'm not super familiar wi= th bitwise shifting in python flags so I figured I'd ask while it's= in mind if there's any specific reason for shifting these two flags? N= ot a critique of the code, just genuinely curious.=C2=A0

Reviewed-by= : Dean Marx <dmarx@iol.unh.edu&= gt;
--00000000000015bfe806213c5cf2--