github.com/cilium/cilium@v1.16.2/bpf/lib/qm.h (about) 1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ 2 /* Copyright Authors of Cilium */ 3 4 #pragma once 5 6 #include <bpf/ctx/ctx.h> 7 8 static inline void reset_queue_mapping(struct __ctx_buff *ctx __maybe_unused) 9 { 10 #ifdef RESET_QUEUES 11 if (!ctx_is_skb()) 12 return; 13 14 /* Workaround for GH-18311 where veth driver might have recorded 15 * veth's RX queue mapping instead of leaving it at 0. This can 16 * cause issues on the phys device where all traffic would only 17 * hit a single TX queue (given veth device had a single one and 18 * mapping was left at 1). Reset so that stack picks a fresh queue. 19 * Kernel fix is at 710ad98c363a ("veth: Do not record rx queue 20 * hint in veth_xmit"). 21 */ 22 ctx->queue_mapping = 0; 23 #endif 24 }