From 3d0fc0ebad6a076ebad484cecedbead4586525cd Mon Sep 17 00:00:00 2001 From: Tamas Levai Date: Mon, 13 Nov 2023 17:55:13 +0100 Subject: [PATCH] XDP offload: Do not add extra UDP padding [skip ci] --- internal/offload/xdp/bpf_bpfeb.o | Bin 30904 -> 31808 bytes internal/offload/xdp/bpf_bpfel.o | Bin 30976 -> 31880 bytes internal/offload/xdp/xdp.c | 19 ++++++++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/internal/offload/xdp/bpf_bpfeb.o b/internal/offload/xdp/bpf_bpfeb.o index bc1b66cb43666c62aa4b406a43fc52fbc277b213..02f0f3ac9a84a46d4686e47bbf83ceb6f9007a1d 100644 GIT binary patch delta 10484 zcma)C4RBr6ao&6H`_rHOtly_+{apQ878aHqTb5}svI&XHFpZ!w7QdGKgJm#8;z?M- zG*1Kq3Sp??ON)jwMJBXpC=)al89NQFUQ${_$J4rLW~!ugDgx8Gz$8jSXEame*Kg0+ zqjxOYnVuQlbHCj^yL)!`{M=`s`<0VfaVD=W9V6Acsf6g=hB<{i=^ZC$~iJDc_#*62VF_u1^(Nrm10J?@i4F%s;|H*2}5 zulmxq7WXlJ8~S39bn804#_#i;{3KexUH5HW?kRp7YNkByS9SaDXmG-9f>)>A{_B*> zhIh2vJxUZ_ICUngJUL!MAs&0`%;jnB`^%}2`@?6lQyK@`ycbK#DK69(xGy88A^5<% zq2yLZmSu8x2cHkM?dewJ*8VcBy?=+ou#z3+x7reeFOT!vsqbVbxR18;lR~Gy6FeWP zy}48&I;L!se^UCfhqL3%SwE!t^N1w3=r~6>d&$goEUC4&CENz)&zA=I;Z5lZeuuPZ zTa|9rzO@y*mCPR!Iruyv*x??yPp~VvSFk6zN3cXTyH9YK`!p1E3n9WiaF^hy;C8_= z!7YMSnj!BC&KG_{aDiYoHB3OI67ot9a1r=vHpp^3!*$#v_bYyU$eN$Hy9&~ti!9y*2%pAAMy}{&D#=49_4-5^t0W_N zijFc?NktW_WTT384s%tk^r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%b#&m6bDvYN z<7MrS(*WQbp>x5`(_FNk-sVj|>hzwz%NuQS#_&isIUk(9t9+)3YhJmIm4Nu+GvOq(P(l4hGnvE~xPajV7d*uHCn}m|o diff --git a/internal/offload/xdp/xdp.c b/internal/offload/xdp/xdp.c index 747f60f1..34fac0d2 100644 --- a/internal/offload/xdp/xdp.c +++ b/internal/offload/xdp/xdp.c @@ -181,6 +181,7 @@ int xdp_prog_func(struct xdp_md *ctx) data_end = (void *)(long)ctx->data_end; data = (void *)(long)ctx->data; // note: data_end - data is the NIC-padded length of the packet + __u16 pkt_buf_len = data_end - data; udp_payload = data + sizeof(struct ethhdr) + sizeof(struct iphdr) + sizeof(struct udphdr); @@ -237,16 +238,32 @@ int xdp_prog_func(struct xdp_md *ctx) chan_hdr_action = HDR_ADD; // add padding + + // check if new padding is necessary + // e.g., in case of NIC-padded packets we can reuse existing padding + int useful_len = hdrs_len + udp_payload_len; + int existing_padding = pkt_buf_len - useful_len; + __u16 padded_len = 4 * ((__u16)udp_payload_len / 4); if (padded_len < udp_payload_len) { padded_len += 4; } padding = padded_len - (__u16)udp_payload_len; + udp_payload_len += padding; + + if ((existing_padding > 0) && (padding != 0)) { + padding -= existing_padding - ((__u32)existing_padding / padding * padding); + if (existing_padding > padding) { + padding = 0; + } + } + + // add padding r = bpf_xdp_adjust_tail(ctx, padding); if (r != 0) goto out; - udp_payload_len += padding; + // set out_tuple for further processing out_tuple = &out_tuplec_ds->four_tuple; } else { // read channel id