Re: [PATCH net-next 07/13] virtio_net: refactor the xmit type
From: Jason Wang <hidden>
Date: 2024-09-13 03:22:48
Also in:
bpf, virtualization
From: Jason Wang <hidden>
Date: 2024-09-13 03:22:48
Also in:
bpf, virtualization
On Thu, Sep 12, 2024 at 3:54 PM Xuan Zhuo [off-list ref] wrote:
On Wed, 11 Sep 2024 12:04:16 +0800, Jason Wang [off-list ref] wrote:quoted
On Tue, Aug 20, 2024 at 3:33 PM Xuan Zhuo [off-list ref] wrote:quoted
Because the af-xdp will introduce a new xmit type, so I refactor the xmit type mechanism first. We use the last two bits of the pointer to distinguish the xmit type, so we can distinguish four xmit types. Now we have three types: skb, orphan and xdp.And if I was not wrong, we do not anymore use bitmasks. If yes, let's explain the reason here.In general, pointers are aligned to 4 or 8 bytes. If it is aligned to 4 bytes, then only two bits are free for a pointer. So we can only use two bits. But there are 4 types here, so we can't use bits to distinguish them. b00 for skb b01 for SKB_ORPHAN b10 for XDP b11 for af-xdp tx
Let's add these in the changelog. Thanks