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 AD0024588A; Wed, 28 Aug 2024 19:44:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79F8442686; Wed, 28 Aug 2024 19:44:18 +0200 (CEST) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id DEDB7402CA for ; Wed, 28 Aug 2024 19:44:16 +0200 (CEST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-7cd9e634ea9so4437129a12.0 for ; Wed, 28 Aug 2024 10:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1724867056; x=1725471856; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2CPCmtn/gP1MqfeuOhN3XP7Dvo1wzjmcVRMZQYVj0pk=; b=IEJb6nLWgahxJjED4SHKCOIb9sNsIxtb0JKKghLyhyM4vc59hwyzG5ZTlgu4S/Z7FY 5Z3vlNGDalT+vEPsWKEbRCrnqpmTrn1v5J5/aV5jn2RVTU4CgIqjjhG0teGDY4Lg1VXB c3TRVJjmQ4xctaJdM8ZonnjVenAcwOqeS5Cwc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724867056; x=1725471856; h=content-transfer-encoding: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=2CPCmtn/gP1MqfeuOhN3XP7Dvo1wzjmcVRMZQYVj0pk=; b=GHeURws9Aizp4aGvPHSU6ZRIzY7i6KXwXQExDO4zxP03JDFYyFcIIDBZjsjF2+mOds B2+gQJukT5AskFnMqmmOJHvy+5PTnCeJxWmS1K7mMdc1sOgumU8jYj16ZpDifqsbSMVZ 1CfXJKta5JFIgM1ZpBrs6RcWB4//UFPnLii8NZ2jW9AmO9Lqi1vKuO/UPGgGkngQj3mr nzFSccHc2IRUfyYj6Xz5eaKv8HYPEd2tgeRZX3iDITDQn63ARNtLwXoNJpO/ST1dit+2 KK0XUEm21J8qY4L3B6Tjmm2j23UBIxrHZ2LY0Q0KSnrT+0T7l4uCVW/iNCYfCZKEC8QH th7A== X-Forwarded-Encrypted: i=1; AJvYcCVDEt0AhUzGGuvDOur/bM4Ou8lr4WGtNUBnMrUvQmXC7COEeC6Jba/pwbTzLJjyt6v0th8=@dpdk.org X-Gm-Message-State: AOJu0YwcWV7FMiadJ+FviFRp9+s5hUdLlq/io4n0NtmXCIq5bVEgNEl5 nxNBRkFShA/Iv8d7hm2/6u0ClEzzZhJ9/4J++SKFQsgcsi5pDzwUUJ4PCv2kql12QOs0DNdv8+H yPmosDYGVnpcQeozAyGe9iKJlxSMASQIN5s51kw== X-Google-Smtp-Source: AGHT+IHxQ1f6kYvb2MXgYV3pfl68Lzjsi9GOKev6GTY5qDvVzSlFpN4JVuozmiWJ/YGLCZo/TuPcVOYJb+PTxAOWWKc= X-Received: by 2002:a17:90b:4acb:b0:2cb:4e14:fd5d with SMTP id 98e67ed59e1d1-2d8561a3cb0mr51973a91.17.1724867055781; Wed, 28 Aug 2024 10:44:15 -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: Jeremy Spewock Date: Wed, 28 Aug 2024 13:44:04 -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, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu, dmarx@iol.unh.edu, alex.chapman@arm.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Aug 21, 2024 at 10:53=E2=80=AFAM Juraj Linke=C5=A1 wrote: > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framewor= k/remote_session/testpmd_shell.py > index 48c31124d1..f83569669e 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -659,6 +659,103 @@ class TestPmdPortStats(TextParser): > tx_bps: int =3D field(metadata=3DTextParser.find_int(r"Tx-bps:\s+(\d= +)")) > > > +class RxOffloadCapability(Flag): > + """Rx offload capabilities of a device.""" > + > + #: > + RX_OFFLOAD_VLAN_STRIP =3D auto() One other thought that I had about this; was there a specific reason that you decided to prefix all of these with `RX_OFFLOAD_`? I am working on a test suite right now that uses both RX and TX offloads and thought that it would be a great use of capabilities, so I am working on adding a TxOffloadCapability flag as well and, since the output is essentially the same, it made a lot of sense to make it a sibling class of this one with similar parsing functionality. In what I was writing, I found it much easier to remove this prefix so that the parsing method can be the same for both RX and TX, and I didn't have to restate some options that are shared between both (like IPv4_CKSUM, UDP_CKSUM, etc.). Is there a reason you can think of why removing this prefix is a bad idea? Hopefully I will have a patch out soon that shows this extension that I've made so that you can see in-code what I was thinking. > + #: Device supports L3 checksum offload. > + RX_OFFLOAD_IPV4_CKSUM =3D auto() > + #: Device supports L4 checksum offload. > + RX_OFFLOAD_UDP_CKSUM =3D auto() > + #: Device supports L4 checksum offload. > + RX_OFFLOAD_TCP_CKSUM =3D auto() > + #: Device supports Large Receive Offload. > + RX_OFFLOAD_TCP_LRO =3D auto() > + #: Device supports QinQ (queue in queue) offload. > + RX_OFFLOAD_QINQ_STRIP =3D auto() > + #: Device supports inner packet L3 checksum. > + RX_OFFLOAD_OUTER_IPV4_CKSUM =3D auto() > + #: Device supports MACsec. > + RX_OFFLOAD_MACSEC_STRIP =3D auto() > + #: Device supports filtering of a VLAN Tag identifier. > + 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 > + #: Device supports Timestamp. > + RX_OFFLOAD_TIMESTAMP =3D auto() > + #: Device supports crypto processing while packet is received in NIC= . > + RX_OFFLOAD_SECURITY =3D auto() > + #: Device supports CRC stripping. > + RX_OFFLOAD_KEEP_CRC =3D auto() > + #: Device supports L4 checksum offload. > + RX_OFFLOAD_SCTP_CKSUM =3D auto() > + #: Device supports inner packet L4 checksum. > + RX_OFFLOAD_OUTER_UDP_CKSUM =3D auto() > + #: Device supports RSS hashing. > + RX_OFFLOAD_RSS_HASH =3D auto() > + #: Device supports > + RX_OFFLOAD_BUFFER_SPLIT =3D auto() > + #: Device supports all checksum capabilities. > + RX_OFFLOAD_CHECKSUM =3D RX_OFFLOAD_IPV4_CKSUM | RX_OFFLOAD_UDP_CKSUM= | RX_OFFLOAD_TCP_CKSUM > + #: Device supports all VLAN capabilities. > + RX_OFFLOAD_VLAN =3D ( > + RX_OFFLOAD_VLAN_STRIP > + | RX_OFFLOAD_VLAN_FILTER > + | RX_OFFLOAD_VLAN_EXTEND > + | RX_OFFLOAD_QINQ_STRIP > + ) >