On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš <juraj.lin...@pantheon.tech> wrote: <snip> > diff --git a/dts/framework/remote_session/testpmd_shell.py > b/dts/framework/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 = field(metadata=TextParser.find_int(r"Tx-bps:\s+(\d+)")) > > > +class RxOffloadCapability(Flag): > + """Rx offload capabilities of a device.""" > + > + #: > + RX_OFFLOAD_VLAN_STRIP = 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 = auto() > + #: Device supports L4 checksum offload. > + RX_OFFLOAD_UDP_CKSUM = auto() > + #: Device supports L4 checksum offload. > + RX_OFFLOAD_TCP_CKSUM = auto() > + #: Device supports Large Receive Offload. > + RX_OFFLOAD_TCP_LRO = auto() > + #: Device supports QinQ (queue in queue) offload. > + RX_OFFLOAD_QINQ_STRIP = auto() > + #: Device supports inner packet L3 checksum. > + RX_OFFLOAD_OUTER_IPV4_CKSUM = auto() > + #: Device supports MACsec. > + RX_OFFLOAD_MACSEC_STRIP = auto() > + #: Device supports filtering of a VLAN Tag identifier. > + RX_OFFLOAD_VLAN_FILTER = 1 << 9 > + #: Device supports VLAN offload. > + RX_OFFLOAD_VLAN_EXTEND = auto() > + #: Device supports receiving segmented mbufs. > + RX_OFFLOAD_SCATTER = 1 << 13 > + #: Device supports Timestamp. > + RX_OFFLOAD_TIMESTAMP = auto() > + #: Device supports crypto processing while packet is received in NIC. > + RX_OFFLOAD_SECURITY = auto() > + #: Device supports CRC stripping. > + RX_OFFLOAD_KEEP_CRC = auto() > + #: Device supports L4 checksum offload. > + RX_OFFLOAD_SCTP_CKSUM = auto() > + #: Device supports inner packet L4 checksum. > + RX_OFFLOAD_OUTER_UDP_CKSUM = auto() > + #: Device supports RSS hashing. > + RX_OFFLOAD_RSS_HASH = auto() > + #: Device supports > + RX_OFFLOAD_BUFFER_SPLIT = auto() > + #: Device supports all checksum capabilities. > + RX_OFFLOAD_CHECKSUM = RX_OFFLOAD_IPV4_CKSUM | RX_OFFLOAD_UDP_CKSUM | > RX_OFFLOAD_TCP_CKSUM > + #: Device supports all VLAN capabilities. > + RX_OFFLOAD_VLAN = ( > + RX_OFFLOAD_VLAN_STRIP > + | RX_OFFLOAD_VLAN_FILTER > + | RX_OFFLOAD_VLAN_EXTEND > + | RX_OFFLOAD_QINQ_STRIP > + ) <snip> >