<div dir="ltr">Thank you, I will address the additional patch 3/4 and patch 4/4 comments in a future cleanup patch.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2026 at 7:59 AM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed,  4 Mar 2026 04:50:29 +0000<br>
"Jasper Tran O'Leary" <<a href="mailto:jtranoleary@google.com" target="_blank">jtranoleary@google.com</a>> wrote:<br>
<br>
> This patch series adds flow steering support to the Google Virtual<br>
> Ethernet (gve) driver. This functionality allows traffic to be directed<br>
> to specific receive queues based on user-specified flow patterns.<br>
> <br>
> The series includes foundational support for extended admin queue<br>
> commands needed to handle flow rules, the specific adminqueue commands<br>
> for flow rule management, and the integration with the DPDK rte_flow<br>
> API. The series adds support flow matching on the following protocols:<br>
> IPv4, IPv6, TCP, UDP, SCTP, ESP, and AH.<br>
> <br>
> Patch Overview:<br>
> <br>
> 1. "net/gve: add flow steering device option" checks for and enables<br>
>    the flow steering capability in the device options during<br>
>    initialization.<br>
> 2. "net/gve: introduce extended adminq command" adds infrastructure<br>
>    for sending extended admin queue commands. These commands use a<br>
>    flexible buffer descriptor format required for flow rule management.<br>
> 3. "net/gve: add adminq commands for flow steering" implements the<br>
>    specific admin queue commands to add and remove flow rules on the<br>
>    device, including handling of rule IDs and parameters.<br>
> 4. "net/gve: add rte flow API integration" exposes the flow steering<br>
>    functionality via the DPDK rte_flow API. This includes strict<br>
>    pattern validation, rule parsing, and lifecycle management (create,<br>
>    destroy, flush). It ensures thread-safe access to the flow subsystem<br>
>    and proper resource cleanup during device reset.<br>
> <br>
> Jasper Tran O'Leary (2):<br>
>   net/gve: add adminq commands for flow steering<br>
>   net/gve: add rte flow API integration<br>
> <br>
> Vee Agarwal (2):<br>
>   net/gve: add flow steering device option<br>
>   net/gve: introduce extended adminq command<br>
> <br>
>  doc/guides/nics/features/gve.ini       |  12 +<br>
>  doc/guides/nics/gve.rst                |  27 +<br>
>  doc/guides/rel_notes/release_26_03.rst |   1 +<br>
>  drivers/net/gve/base/gve.h             |   3 +-<br>
>  drivers/net/gve/base/gve_adminq.c      | 118 ++++-<br>
>  drivers/net/gve/base/gve_adminq.h      |  57 +++<br>
>  drivers/net/gve/gve_ethdev.c           |  83 +++-<br>
>  drivers/net/gve/gve_ethdev.h           |  46 ++<br>
>  drivers/net/gve/gve_flow_rule.c        | 658 +++++++++++++++++++++++++<br>
>  drivers/net/gve/gve_flow_rule.h        |  65 +++<br>
>  drivers/net/gve/meson.build            |   1 +<br>
>  11 files changed, 1066 insertions(+), 5 deletions(-)<br>
>  create mode 100644 dpdk/drivers/net/gve/gve_flow_rule.c<br>
>  create mode 100644 dpdk/drivers/net/gve/gve_flow_rule.h<br>
> <br>
<br>
<br>
Applied to next-net<br>
<br>
The detailed review report if you are interested.<br>
<br>
Reviewed the v4 series. Overall this is well-structured — locking<br>
discipline is sound, create/destroy/flush paths handle errors<br>
correctly with proper resource cleanup, and the bitmap slot is<br>
restored on adminq failure. Patches 1/4 and 2/4 are clean.<br>
<br>
A few items on 3/4 and 4/4:<br>
<br>
Patch 3/4:<br>
<br>
  [Warning] struct gve_flow_spec has a padding hole after the<br>
  tos/tclass u8 field (37 bytes of data, padded to 40 by the<br>
  compiler). Callers zero-initialize today so no live bug, but<br>
  consider adding GVE_CHECK_STRUCT_LEN for gve_flow_spec and<br>
  gve_flow_rule_params to guard against future changes, consistent<br>
  with other adminq structures.<br>
<br>
Patch 4/4:<br>
<br>
  [Warning] In gve_setup_flow_subsystem, the rte_zmalloc failure<br>
  path does goto free_flow_rule_bmp which calls<br>
  gve_flow_free_bmp(priv). This is safe (rte_free(NULL) is a<br>
  no-op) but misleading — the label says "free" when there's<br>
  nothing to free. Cleaner to just return -ENOMEM directly on the<br>
  first failure.<br>
<br>
  [Warning] gve_dev_reset tears down the flow subsystem and<br>
  re-initializes via gve_init_priv, but does not destroy/recreate<br>
  flow_rule_lock. This works today because<br>
  gve_teardown_flow_subsystem doesn't destroy the mutex (only<br>
  gve_dev_close does), but it's worth a comment to document this<br>
  invariant.<br>
</blockquote></div>