[PATCH v3 11/12] dts: add Rx offload capabilities
Juraj Linkeš
juraj.linkes at pantheon.tech
Wed Sep 18 15:59:36 CEST 2024
On 3. 9. 2024 21:49, Dean Marx wrote:
> On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš
> <juraj.linkes at 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š <juraj.linkes at pantheon.tech>
>
>
> <snip>
>
> + 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
>
>
> 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.
>
It's there just to mirror the flags in DPDK code.
> Reviewed-by: Dean Marx <dmarx at iol.unh.edu <mailto:dmarx at iol.unh.edu>>
More information about the dev
mailing list