<div dir="ltr"><div dir="ltr">On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The scatter Rx offload capability is needed for the pmd_buffer_scatter<br>
test suite. The command that retrieves the capability is:<br>
show port <port_id> rx_offload capabilities<br>
<br>
The command also retrieves a lot of other capabilities (RX_OFFLOAD_*)<br>
which are all added into a Flag. The Flag members correspond to NIC<br>
capability names so a convenience function that looks for the supported<br>
Flags in a testpmd output is also added.<br>
<br>
The NIC capability names (mentioned above) are copy-pasted from the<br>
Flag. Dynamic addition of Enum members runs into problems with typing<br>
(mypy doesn't know about the members) and documentation generation<br>
(Sphinx doesn't know about the members).<br>
<br>
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech><br></blockquote><div><br></div><div><snip> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+ RX_OFFLOAD_VLAN_FILTER = 1 << 9<br>
+ #: Device supports VLAN offload.<br>
+ RX_OFFLOAD_VLAN_EXTEND = auto()<br>
+ #: Device supports receiving segmented mbufs.<br>
+ RX_OFFLOAD_SCATTER = 1 << 13<br></blockquote><div><br></div><div>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. <br><br>Reviewed-by: Dean Marx <<a href="mailto:dmarx@iol.unh.edu">dmarx@iol.unh.edu</a>></div></div></div>