netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Does skb_metadata_differs really need to stop GRO aggregation?
@ 2023-11-28 12:37 Jesper Dangaard Brouer
  2023-11-28 13:06 ` Jesper Dangaard Brouer
  0 siblings, 1 reply; 13+ messages in thread
From: Jesper Dangaard Brouer @ 2023-11-28 12:37 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Yan Zhai, Stanislav Fomichev, Netdev, bpf, Alexei Starovoitov,
	kernel-team, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
	David S. Miller, Jakub Sitnicki

Hi Daniel,

I'm trying to understand why skb_metadata_differs() needed to block GRO ?

I was looking at XDP storing information in metadata area that also
survives into SKBs layer.  E.g. the RX timestamp.

Then I noticed that GRO code (gro_list_prepare) will not allow
aggregating if metadata isn't the same in all packets via
skb_metadata_differs().  Is this really needed?
Can we lift/remove this limitation?

E.g. if I want to store a timestamp, then it will differ per packet.

--Jesper

Git history says it dates back to the original commit that added meta
pointer de8f3a83b0a0 ("bpf: add meta pointer for direct access") (author
Daniel).


diff --git a/net/core/gro.c b/net/core/gro.c
index 0759277dc14e..7fb6a6a24288 100644
--- a/net/core/gro.c
+++ b/net/core/gro.c
@@ -341,7 +341,7 @@ static void gro_list_prepare(const struct list_head 
*head,

                 diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev;
                 diffs |= p->vlan_all ^ skb->vlan_all;
-               diffs |= skb_metadata_differs(p, skb);
+               diffs |= skb_metadata_differs(p, skb); // Why?
                 if (maclen == ETH_HLEN)
                         diffs |= compare_ether_header(skb_mac_header(p),

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-12-01 17:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28 12:37 Does skb_metadata_differs really need to stop GRO aggregation? Jesper Dangaard Brouer
2023-11-28 13:06 ` Jesper Dangaard Brouer
2023-11-28 13:30   ` Daniel Borkmann
2023-11-28 14:39     ` Toke Høiland-Jørgensen
2023-11-29 18:04       ` Edward Cree
2023-11-29 21:52         ` Toke Høiland-Jørgensen
2023-11-29 23:10           ` Daniel Borkmann
2023-11-30 13:55             ` Toke Høiland-Jørgensen
2023-11-30 16:32               ` Daniel Borkmann
2023-11-30 20:35                 ` Jesper Dangaard Brouer
2023-11-30 22:00                   ` Martin KaFai Lau
2023-12-01  6:20                   ` Yan Zhai
2023-12-01 17:09                 ` Yan Zhai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).