On Mon, 19 Oct 2026 22:22:50 +0100 Konstantin Ananyev <[email protected]> wrote:
> > The BPF ethdev packet callback synchronization mechanism expects only > > one dataplane thread per port/queue pair at a time. When > > RTE_ETH_TX_OFFLOAD_MT_LOCKFREE is enabled, multiple threads can invoke > > rte_eth_tx_burst() concurrently on the same queue without locks. This > > breaks the callback parity counter and can lead to use-after-free or > > deadlocks during BPF program unload. > > > > Reject BPF Tx callback installation with -ENOTSUP when > > RTE_ETH_TX_OFFLOAD_MT_LOCKFREE is enabled on the port or queue. > > Add a unit test in test_bpf verifying this rejection. > > Should we be more generic here and reject any TX callbacks for > RTE_ETH_TX_OFFLOAD_MT_LOCKFREE devices? The problem is the flag is poorly defined. Devices today advertise the capability "sure go ahead and share a queue the PMD won't care" but do not really treat it as a negotiation flag.

