[PATCH bpf-next v2 0/3] XDP metadata: Rx checksum/GSO hint; Tx GSO offload

Muyang Tian posted 3 patches 1 month, 1 week ago
Documentation/netlink/specs/netdev.yaml      | 12 +++++
Documentation/networking/xdp-rx-metadata.rst |  6 +++
include/net/xdp.h                            | 50 ++++++++++++++++++++
include/net/xdp_sock.h                       |  8 ++++
include/net/xdp_sock_drv.h                   |  1 +
include/uapi/linux/if_xdp.h                  | 11 +++++
include/uapi/linux/netdev.h                  |  8 ++++
net/core/xdp.c                               | 41 ++++++++++++++++
net/xdp/xsk.c                                |  5 ++
tools/include/uapi/linux/if_xdp.h            | 11 +++++
tools/include/uapi/linux/netdev.h            |  8 ++++
11 files changed, 161 insertions(+)
[PATCH bpf-next v2 0/3] XDP metadata: Rx checksum/GSO hint; Tx GSO offload
Posted by Muyang Tian 1 month, 1 week ago
This series introduce XDP metadata functionality, including Rx checksum/GSO hint
and Tx GSO offload. This is aimed to transfer control fields when processing jumbo
frames between VMs.

v1:
https://lore.kernel.org/all/20241017135430.51655-1-tianmuyang@huawei.com/

Changes since v1:
- add reference to previous work[1] in patch 1/3

[1] https://lore.kernel.org/bpf/20230811161509.19722-13-larysa.zaremba@intel.com/

Muyang Tian (3):
  xdp: Add Rx checksum hint
  xdp: Add Rx GSO hint
  xsk: Add Tx GSO type and size offload support

 Documentation/netlink/specs/netdev.yaml      | 12 +++++
 Documentation/networking/xdp-rx-metadata.rst |  6 +++
 include/net/xdp.h                            | 50 ++++++++++++++++++++
 include/net/xdp_sock.h                       |  8 ++++
 include/net/xdp_sock_drv.h                   |  1 +
 include/uapi/linux/if_xdp.h                  | 11 +++++
 include/uapi/linux/netdev.h                  |  8 ++++
 net/core/xdp.c                               | 41 ++++++++++++++++
 net/xdp/xsk.c                                |  5 ++
 tools/include/uapi/linux/if_xdp.h            | 11 +++++
 tools/include/uapi/linux/netdev.h            |  8 ++++
 11 files changed, 161 insertions(+)

-- 
2.41.0
Re: [PATCH bpf-next v2 0/3] XDP metadata: Rx checksum/GSO hint; Tx GSO offload
Posted by Stanislav Fomichev 1 month, 1 week ago
On 10/18, Muyang Tian wrote:
> This series introduce XDP metadata functionality, including Rx checksum/GSO hint
> and Tx GSO offload. This is aimed to transfer control fields when processing jumbo
> frames between VMs.

Ideally, the series should also have the implementation of these hints
for a couple of devices and appropriate selftest updates to exercise
them.

For GSO, CC Willem going forward (I don't think I understand why
we want to have gso_type in the TX hint; something like header_len
seems like a better fit).

Please also don't post v3 yet and allow at least a week for the initial
reviewers to catch up..
Re: [PATCH bpf-next v2 0/3] XDP metadata: Rx checksum/GSO hint; Tx GSO offload
Posted by Willem de Bruijn 1 month ago
Stanislav Fomichev wrote:
> On 10/18, Muyang Tian wrote:
> > This series introduce XDP metadata functionality, including Rx checksum/GSO hint
> > and Tx GSO offload. This is aimed to transfer control fields when processing jumbo
> > frames between VMs.
> 
> Ideally, the series should also have the implementation of these hints
> for a couple of devices and appropriate selftest updates to exercise
> them.

+1

> For GSO, CC Willem going forward (I don't think I understand why
> we want to have gso_type in the TX hint; something like header_len
> seems like a better fit).

GSO on Tx makes sense. To be able to program hardware USO, say.

GSO on Rx is less obvious. Is this for HW-GRO? In general, some usage
context will be helpful.

Two implementation questions:

- why define an XDP specific type for checksum types, but reuse the
  netdev type for gso_type?
- why u32 gso_type, when it is a u8 in skb_shared_info?

> Please also don't post v3 yet and allow at least a week for the initial
> reviewers to catch up..
Re: [PATCH bpf-next v2 0/3] XDP metadata: Rx checksum/GSO hint; Tx GSO offload
Posted by Magnus Karlsson 1 month ago
On Sun, 20 Oct 2024 at 22:51, Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
>
> Stanislav Fomichev wrote:
> > On 10/18, Muyang Tian wrote:
> > > This series introduce XDP metadata functionality, including Rx checksum/GSO hint
> > > and Tx GSO offload. This is aimed to transfer control fields when processing jumbo
> > > frames between VMs.
> >
> > Ideally, the series should also have the implementation of these hints
> > for a couple of devices and appropriate selftest updates to exercise
> > them.
>
> +1

Larysa had one implementation for ice [0]. Ask her if she can update
and contribute that one. Then add one yourself and there are two
implementations which would hopefully make the case.

[0] https://lore.kernel.org/bpf/20230811161509.19722-1-larysa.zaremba@intel.com/

> > For GSO, CC Willem going forward (I don't think I understand why
> > we want to have gso_type in the TX hint; something like header_len
> > seems like a better fit).
>
> GSO on Tx makes sense. To be able to program hardware USO, say.
>
> GSO on Rx is less obvious. Is this for HW-GRO? In general, some usage
> context will be helpful.
>
> Two implementation questions:
>
> - why define an XDP specific type for checksum types, but reuse the
>   netdev type for gso_type?
> - why u32 gso_type, when it is a u8 in skb_shared_info?
>
> > Please also don't post v3 yet and allow at least a week for the initial
> > reviewers to catch up..
>
>
>