> > > > > +static struct sk_buff *udp_gro_receive_segment(struct list_head *head, > > > + struct sk_buff *skb) > > > +{ > > > + struct udphdr *uh = udp_hdr(skb); > > > + struct sk_buff *pp = NULL; > > > + struct udphdr *uh2; > > > + struct sk_buff *p; > > > + > > > + /* requires non zero csum, for simmetry with GSO */ > > > + if (!uh->check) { > > > + NAPI_GRO_CB(skb)->flush = 1; > > > + return NULL; > > > + } > > > > Why is the requirement of checksums different than in > > udp_gro_receive? It's not that I care much about UDP > > packets without a checksum, but you would not need > > to implement your own loop if the requirement could > > be the same as in udp_gro_receive.
It would be nice if we could deduplicate the loops, but even without the checksum difference they look to me a bit too different for it to be practical, also with the constraints on segment length and max aggregation. > uhm.... > AFAIU, we need to generated aggregated packets that UDP GSO is able to > process/segment. I was unable to get a nocsum packet segment (possibly > PEBKAC) so I enforced that condition on the rx path. > > @Willem: did I see ghost here? is UDP_SEGMENT fine with no checksum > segment? udp_send_skb fails with EIO if ip_summed is anything but CHECKSUM_PARTIAL. but that's not in the forwarding path. Still, __udp_gso_segment as is depends on that invariant and will not handle packets with zero checksum correctly. It unconditionally adjusts uh->check. That could be changed, of course.