Re: [PATCH net v3 2/2] selftests/bpf: cover AF_XDP multi-buffer TX software checksum
From: Rongzheng Wang
Date: Wed Oct 28 2026 - 11:59:56 EST
Hi Maciej,
Thanks for the review and for the Reviewed-by on 1/2.
> nit: breaking RCT - I know it's test but Stan payed attention to keeping
> the order...
Fixed in v4. The declaration block now follows the width order used in this
file:
struct xsk_tx_metadata *meta;
struct xdp_desc *tx_desc;
struct udphdr *udph;
struct ethhdr *eth;
struct iphdr *iph;
u16 first_len;
u16 pkt_len;
u8 pkt[256];
u32 offset;
void *data;
__u32 idx;
u32 addr;
int ret;
u32 i;
> would it be worth exercising this up to MAX_SKB_FRAGS ?
> then instead of having this flat layout you would loop over the desc
> count.
Good point. I changed it to loop over the descriptor count and exercise 1,
2, and MAX_SKB_FRAGS + 1 (18) frames. The extra frame is the linear head;
the remaining MAX_SKB_FRAGS frames are skb frags, matching the copy-mode
limit documented in af_xdp.rst. The last descriptor takes the remaining
length so the fragments cannot overrun pkt_len. The updated selftest passes.
I'll send v4 as a new thread.
Thanks,
Rongzheng