Thread (26 messages) 26 messages, 5 authors, 2021-06-22

Re: [PATCH net-next v4 2/3] virtio_net: add optional flow dissection in virtio_net_hdr_to_skb

flat view

From: Jason Wang <hidden>
Date: 2021-06-10 05:24:04

在 2021/6/10 下午12:19, Alexei Starovoitov 写道:
On Wed, Jun 9, 2021 at 9:13 PM Jason Wang [off-list ref] wrote:
quoted
So I wonder why not simply use helpers to access the vnet header like
how tcp-bpf access the tcp header?
Short answer - speed.
tcp-bpf accesses all uapi and non-uapi structs directly.
Ok, this makes sense. But instead of coupling device specific stuffs like vnet header and neediness into general flow_keys as a context.

It would be better to introduce a vnet header context which contains

1) vnet header
2) flow keys
3) other contexts like endian and virtio-net features

So we preserve the performance and decouple the virtio-net stuffs from general structures like flow_keys or __sk_buff.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help