Re: [PATCH net-next v3 2/8] net: netkit: declare NETMEM_TX_NO_DMA mode
From: Stanislav Fomichev
Date: Fri May 08 2026 - 11:01:44 EST
On 05/07, Bobby Eshleman wrote:
> From: Bobby Eshleman <bobbyeshleman@xxxxxxxx>
>
> Some virtual devices like netkit (or ifb) never DMA and never touch frag
> contents, they just forward the skb to another device. They are unable
> to forward unreadable skbs, however, because they fail to pass TX
> validation checks on dev->netmem_tx. The existing two-state
> NETMEM_TX_NONE / NETMEM_TX_DMA doesn't give the TX validator enough
> information to differentiate devices that will attempt DMA on the
> unreadable skb from those that will simply route it untouched.
>
> Add a third mode to the enum so drivers can indicate 1) if they have
> netmem TX support, and 2) if they do, whether they are DMA-capable:
>
> NETMEM_TX_NO_DMA - pass-through, device never DMAs
>
> Widen dev->netmem_tx from a 1-bit field to 2 bits to fit the new value,
> and declare netkit as NETMEM_TX_NO_DMA. Devmem TX support over these
> devices comes in a follow-up patch.
>
> Signed-off-by: Bobby Eshleman <bobbyeshleman@xxxxxxxx>
Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>