[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17315e5a-ee1c-489c-a6bf-0fa26371d710@redhat.com>
Date: Thu, 10 Jun 2021 11:09:02 +0800
From: Jason Wang <jasowang@...hat.com>
To: Tanner Love <tannerlove.kernel@...il.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
Petar Penkov <ppenkov@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
"Michael S . Tsirkin" <mst@...hat.com>,
Tanner Love <tannerlove@...gle.com>
Subject: Re: [PATCH net-next v4 2/3] virtio_net: add optional flow dissection
in virtio_net_hdr_to_skb
在 2021/6/9 上午1:02, Tanner Love 写道:
> retry:
> - if (!skb_flow_dissect_flow_keys_basic(NULL, skb, &keys,
> + /* only if flow dissection not already done */
> + if (!static_branch_unlikely(&sysctl_flow_dissect_vnet_hdr_key) &&
> + !skb_flow_dissect_flow_keys_basic(NULL, skb, &keys,
> NULL, 0, 0, 0,
> 0)) {
So I still wonder the benefit we could gain from reusing the bpf flow
dissector here. Consider the only context we need is the flow keys, we
had two choices
a1) embed the vnet header checking inside bpf flow dissector
a2) introduce a dedicated eBPF type for doing that
And we have two ways to access the vnet header
b1) via pesudo __sk_buff
b2) introduce bpf helpers
I second for a2 and b2. The main motivation is to hide the vnet header
details from the bpf subsystem.
Thanks
Powered by blists - more mailing lists