[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZK8SqGZOYK5THiQL@google.com>
Date: Wed, 12 Jul 2023 13:53:09 -0700
From: Stanislav Fomichev <sdf@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>, bpf <bpf@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yhs@...com>, John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
"Toke Høiland-Jørgensen" <toke@...nel.org>, Willem de Bruijn <willemb@...gle.com>, David Ahern <dsahern@...nel.org>,
magnus.karlsson@...el.com,
"Björn Töpel" <bjorn@...nel.org>, maciej.fijalkowski@...el.com,
Jesper Dangaard Brouer <hawk@...nel.org>, Network Development <netdev@...r.kernel.org>, xdp-hints@...-project.net
Subject: Re: [RFC bpf-next v3 09/14] net/mlx5e: Implement devtx kfuncs
On 07/12, Jakub Kicinski wrote:
> On Wed, 12 Jul 2023 12:42:35 -0700 Alexei Starovoitov wrote:
> > > Basically, add to AF_XDP what we already have for its predecessor
> > > AF_PACKET: setsockopt PACKET_VNET_HDR?
> > >
> > > Possibly with a separate new struct, rather than virtio_net_hdr. As
> > > that has dependencies on other drivers, notably virtio and its
> > > specification process.
> >
> > yeah. Forgot about this one.
> > That's a perfect fit. I would reuse virtio_net_hdr as-is.
> > Why reinvent the wheel?
> > It would force uapi, but some might argue it's a good thing.
>
> I was gonna reply on the other leg of the thread but it sounds like
> we're in agreement now? 👏️ virtio_net_hdr is the kind of generic
> descriptor I had in mind.
>
> I'd suggest breaking hdr_len into L2len, L3len and L4len, tho. How does
> virtio do IP length updates during TSO if it doesn't know where L3
> starts? HW will want to know, and it's easy to add them together in
> cases where it doesn't. Which is why I kept saying "packet geometry"
> rather than pointing at virtio_net_hdr.
Perfect, I'll drop the kfuncs and will switch to a more static way
of passing this info. We can discuss the particular layout once I have
something concrete to show :-)
Thanks, again, everyone for the comments!
Powered by blists - more mailing lists