From 9de53853e773e30023005b9094a3927659f623d4 Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Thu, 29 Feb 2024 08:28:33 -0600 Subject: [PATCH] Improve comments on metadata --- src/rust/lqos_sys/src/bpf/lqos_kern.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rust/lqos_sys/src/bpf/lqos_kern.c b/src/rust/lqos_sys/src/bpf/lqos_kern.c index c98fe0e9..3e6e1ca0 100644 --- a/src/rust/lqos_sys/src/bpf/lqos_kern.c +++ b/src/rust/lqos_sys/src/bpf/lqos_kern.c @@ -171,7 +171,10 @@ int xdp_prog(struct xdp_md *ctx) } __u32 cpu_dest = *cpu_lookup; - // Experimental: can we adjust the metadata? + // Can we adjust the metadata? We'll try to do so, and if we can store the + // needed info there. Not all drivers support this, so it has to remain + // optional. This call invalidates the ctx->data pointer, so it has to be + // done last. int ret = bpf_xdp_adjust_meta(ctx, -round_up(ETH_ALEN, sizeof(struct metadata_pass_t))); if (ret < 0) { #ifdef VERBOSE