* [PATCH net-next v2] gve: add XDP metadata support for DQ RDA
@ 2026-03-18 19:24 Joshua Washington
2026-03-21 1:55 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Washington @ 2026-03-18 19:24 UTC (permalink / raw)
To: netdev
Cc: Joshua Washington, Harshitha Ramamurthy, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Willem de Bruijn,
Tim Hostetler, linux-kernel, bpf, Jordan Rhee
Commit 1b42e07af1ee ("gve: Add Rx HWTS metadata to AF_XDP ZC mode")
exposes support for the XDP RX timestamping metadata operation in the DQ
RDA mode. While the operation works on its own, the intent was to enable
XDP metadata support for the queue format as a whole along with it.
Currently bfp_xdp_adjust_meta fails because meta_valid is set to false.
This change updates xdp_buff preparation to set meta_valid to true, so
metadata can be fully used by XDP programs.
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Reviewed-by: Jordan Rhee <jordanrhee@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
---
drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
index 7924dce719e2..48945b4b6766 100644
--- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
@@ -877,7 +877,7 @@ static int gve_rx_dqo(struct napi_struct *napi, struct gve_rx_ring *rx,
buf_state->page_info.page_address +
buf_state->page_info.page_offset,
buf_state->page_info.pad,
- buf_len, false);
+ buf_len, true);
gve_xdp.gve = priv;
gve_xdp.compl_desc = compl_desc;
--
2.53.0.851.ga537e3e6e9-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] gve: add XDP metadata support for DQ RDA
2026-03-18 19:24 [PATCH net-next v2] gve: add XDP metadata support for DQ RDA Joshua Washington
@ 2026-03-21 1:55 ` Jakub Kicinski
2026-03-23 20:01 ` Joshua Washington
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2026-03-21 1:55 UTC (permalink / raw)
To: Joshua Washington
Cc: netdev, Harshitha Ramamurthy, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, Stanislav Fomichev,
Willem de Bruijn, Tim Hostetler, linux-kernel, bpf, Jordan Rhee
On Wed, 18 Mar 2026 12:24:50 -0700 Joshua Washington wrote:
> Commit 1b42e07af1ee ("gve: Add Rx HWTS metadata to AF_XDP ZC mode")
> exposes support for the XDP RX timestamping metadata operation in the DQ
> RDA mode. While the operation works on its own, the intent was to enable
> XDP metadata support for the queue format as a whole along with it.
> Currently bfp_xdp_adjust_meta fails because meta_valid is set to false.
bfp -> bpf
> This change updates xdp_buff preparation to set meta_valid to true, so
> metadata can be fully used by XDP programs.
>
> Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
> Reviewed-by: Jordan Rhee <jordanrhee@google.com>
> Signed-off-by: Joshua Washington <joshwash@google.com>
> ---
> drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> index 7924dce719e2..48945b4b6766 100644
> --- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> +++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> @@ -877,7 +877,7 @@ static int gve_rx_dqo(struct napi_struct *napi, struct gve_rx_ring *rx,
> buf_state->page_info.page_address +
> buf_state->page_info.page_offset,
> buf_state->page_info.pad,
> - buf_len, false);
> + buf_len, true);
> gve_xdp.gve = priv;
> gve_xdp.compl_desc = compl_desc;
>
AI says:
While this allows XDP programs to write custom metadata via
bpf_xdp_adjust_meta(), does the driver correctly propagate this metadata
to the SKB after XDP_PASS?
https://sashiko.dev/#/patchset/20260318192450.3400774-1-joshwash%40google.com
--
pw-bot: cr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] gve: add XDP metadata support for DQ RDA
2026-03-21 1:55 ` Jakub Kicinski
@ 2026-03-23 20:01 ` Joshua Washington
0 siblings, 0 replies; 3+ messages in thread
From: Joshua Washington @ 2026-03-23 20:01 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, Harshitha Ramamurthy, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, Stanislav Fomichev,
Willem de Bruijn, Tim Hostetler, linux-kernel, bpf, Jordan Rhee
On Fri, Mar 20, 2026 at 6:55 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 18 Mar 2026 12:24:50 -0700 Joshua Washington wrote:
> > Commit 1b42e07af1ee ("gve: Add Rx HWTS metadata to AF_XDP ZC mode")
> > exposes support for the XDP RX timestamping metadata operation in the DQ
> > RDA mode. While the operation works on its own, the intent was to enable
> > XDP metadata support for the queue format as a whole along with it.
> > Currently bfp_xdp_adjust_meta fails because meta_valid is set to false.
>
> bfp -> bpf
Will make this change in V3.
>
> > This change updates xdp_buff preparation to set meta_valid to true, so
> > metadata can be fully used by XDP programs.
> >
> > Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
> > Reviewed-by: Jordan Rhee <jordanrhee@google.com>
> > Signed-off-by: Joshua Washington <joshwash@google.com>
> > ---
> > drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> > index 7924dce719e2..48945b4b6766 100644
> > --- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> > +++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
> > @@ -877,7 +877,7 @@ static int gve_rx_dqo(struct napi_struct *napi, struct gve_rx_ring *rx,
> > buf_state->page_info.page_address +
> > buf_state->page_info.page_offset,
> > buf_state->page_info.pad,
> > - buf_len, false);
> > + buf_len, true);
> > gve_xdp.gve = priv;
> > gve_xdp.compl_desc = compl_desc;
> >
>
> AI says:
>
> While this allows XDP programs to write custom metadata via
> bpf_xdp_adjust_meta(), does the driver correctly propagate this metadata
> to the SKB after XDP_PASS?
>
> https://sashiko.dev/#/patchset/20260318192450.3400774-1-joshwash%40google.com
> --
> pw-bot: cr
Thanks for bringing this to my attention. I'll introduce a new patch
updating the XDP_PASS paths to make use of `xdp_build_skb` kernel
methods, which should handle metadata implicitly. Besides
commonization, this also removes an extra copy in the XDP_PASS case
for copy mode XDP.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-23 20:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 19:24 [PATCH net-next v2] gve: add XDP metadata support for DQ RDA Joshua Washington
2026-03-21 1:55 ` Jakub Kicinski
2026-03-23 20:01 ` Joshua Washington
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox