XDP hardware hints discussion mail archive
 help / color / mirror / Atom feed
* [xdp-hints] [PATCH bpf-next v3 00/21] XDP metadata via kfuncs for ice
@ 2023-07-19 18:37 Larysa Zaremba
  2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 01/21] ice: make RX hash reading code more reusable Larysa Zaremba
                   ` (20 more replies)
  0 siblings, 21 replies; 50+ messages in thread
From: Larysa Zaremba @ 2023-07-19 18:37 UTC (permalink / raw)
  To: bpf
  Cc: Larysa Zaremba, ast, daniel, andrii, martin.lau, song, yhs,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, David Ahern,
	Jakub Kicinski, Willem de Bruijn, Jesper Dangaard Brouer,
	Anatoly Burakov, Alexander Lobakin, Magnus Karlsson,
	Maryam Tahhan, xdp-hints, netdev

This series introduces XDP hints via kfuncs [0] to the ice driver.

Series brings the following existing hints to the ice driver:
 - HW timestamp
 - RX hash with type

Series also introduces new hints and adds their implementation
to ice and veth:
 - VLAN tag with protocol
 - Checksum status

The data above can now be accessed by XDP and userspace (AF_XDP) programs.
They can also be checked with xdp_metadata test and xdp_hw_metadata program.

[0] https://patchwork.kernel.org/project/netdevbpf/cover/20230119221536.3349901-1-sdf@google.com/

v2:
https://lore.kernel.org/bpf/20230703181226.19380-1-larysa.zaremba@intel.com/
v1:
https://lore.kernel.org/all/20230512152607.992209-1-larysa.zaremba@intel.com/

Changes since v2:
- redesign checksum hint, so now it gives full status
- rename vlan_tag -> vlan_tci, where applicable
- use open_netns() and close_netns() in xdp_metadata
- improve VLAN hint documentation
- replace CFI with DEI
- use VLAN_VID_MASK in xdp_metadata
- make vlan_get_tag() return -ENODATA
- remove unused rx_ptype in ice_xsk.c
- fix ice timestamp code division between patches

Changes since v1:
- directly return RX hash, RX timestamp and RX checksum status
  in skb-common functions
- use intermediate enum value for checksum status in ice
- get rid of ring structure dependency in ice kfunc implementation
- make variables const, when possible, in ice implementation
- use -ENODATA instead of -EOPNOTSUPP for driver implementation
- instead of having 2 separate functions for c-tag and s-tag,
  use 1 function that outputs both VLAN tag and protocol ID
- improve documentation for introduced hints
- update xdp_metadata selftest to test new hints
- implement new hints in veth, so they can be tested in xdp_metadata
- parse VLAN tag in xdp_hw_metadata

Aleksander Lobakin (1):
  net, xdp: allow metadata > 32

Larysa Zaremba (20):
  ice: make RX hash reading code more reusable
  ice: make RX HW timestamp reading code more reusable
  ice: make RX checksum checking code more reusable
  ice: Make ptype internal to descriptor info processing
  ice: Introduce ice_xdp_buff
  ice: Support HW timestamp hint
  ice: Support RX hash XDP hint
  ice: Support XDP hints in AF_XDP ZC mode
  xdp: Add VLAN tag hint
  ice: Implement VLAN tag hint
  ice: use VLAN proto from ring packet context in skb path
  xdp: Add checksum hint
  ice: Implement checksum hint
  selftests/bpf: Allow VLAN packets in xdp_hw_metadata
  selftests/bpf: Add flags and new hints to xdp_hw_metadata
  veth: Implement VLAN tag and checksum XDP hint
  net: make vlan_get_tag() return -ENODATA instead of -EINVAL
  selftests/bpf: Use AF_INET for TX in xdp_metadata
  selftests/bpf: Check VLAN tag and proto in xdp_metadata
  selftests/bpf: check checksum state in xdp_metadata

 Documentation/networking/xdp-rx-metadata.rst  |  11 +-
 drivers/net/ethernet/intel/ice/ice.h          |   2 +
 drivers/net/ethernet/intel/ice/ice_ethtool.c  |   2 +-
 .../net/ethernet/intel/ice/ice_lan_tx_rx.h    | 412 +++++++++---------
 drivers/net/ethernet/intel/ice/ice_lib.c      |   2 +-
 drivers/net/ethernet/intel/ice/ice_main.c     |  23 +
 drivers/net/ethernet/intel/ice/ice_ptp.c      |  27 +-
 drivers/net/ethernet/intel/ice/ice_ptp.h      |  15 +-
 drivers/net/ethernet/intel/ice/ice_txrx.c     |  19 +-
 drivers/net/ethernet/intel/ice/ice_txrx.h     |  29 +-
 drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 346 ++++++++++++---
 drivers/net/ethernet/intel/ice/ice_txrx_lib.h |  18 +-
 drivers/net/ethernet/intel/ice/ice_xsk.c      |  26 +-
 drivers/net/veth.c                            |  46 ++
 include/linux/if_vlan.h                       |   4 +-
 include/linux/netdevice.h                     |   5 +
 include/linux/skbuff.h                        |  13 +-
 include/net/xdp.h                             |  58 ++-
 kernel/bpf/offload.c                          |   4 +
 net/core/xdp.c                                |  57 +++
 .../selftests/bpf/prog_tests/xdp_metadata.c   | 213 +++++----
 .../selftests/bpf/progs/xdp_hw_metadata.c     |  47 +-
 .../selftests/bpf/progs/xdp_metadata.c        |  10 +
 tools/testing/selftests/bpf/xdp_hw_metadata.c |  79 +++-
 tools/testing/selftests/bpf/xdp_metadata.h    |  39 +-
 25 files changed, 1063 insertions(+), 444 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2023-07-25  7:16 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 18:37 [xdp-hints] [PATCH bpf-next v3 00/21] XDP metadata via kfuncs for ice Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 01/21] ice: make RX hash reading code more reusable Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 02/21] ice: make RX HW timestamp " Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 03/21] ice: make RX checksum checking " Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 04/21] ice: Make ptype internal to descriptor info processing Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 05/21] ice: Introduce ice_xdp_buff Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 06/21] ice: Support HW timestamp hint Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 07/21] ice: Support RX hash XDP hint Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 08/21] ice: Support XDP hints in AF_XDP ZC mode Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 09/21] xdp: Add VLAN tag hint Larysa Zaremba
2023-07-20 21:49   ` [xdp-hints] " Stanislav Fomichev
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 10/21] ice: Implement " Larysa Zaremba
2023-07-20 18:50   ` [xdp-hints] " Simon Horman
2023-07-21  7:38     ` Zaremba, Larysa
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 11/21] ice: use VLAN proto from ring packet context in skb path Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 12/21] xdp: Add checksum hint Larysa Zaremba
2023-07-19 21:42   ` [xdp-hints] " Willem de Bruijn
2023-07-20  9:57     ` Zaremba, Larysa
2023-07-20 10:10       ` Zaremba, Larysa
2023-07-20 13:55         ` Willem de Bruijn
2023-07-20 16:03           ` Zaremba, Larysa
2023-07-20 22:27             ` Willem de Bruijn
2023-07-21  8:01               ` Zaremba, Larysa
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 13/21] ice: Implement " Larysa Zaremba
2023-07-19 18:59   ` [xdp-hints] " Alexei Starovoitov
2023-07-19 21:51     ` Willem de Bruijn
2023-07-20  9:47       ` Zaremba, Larysa
2023-07-20 15:14         ` Alexei Starovoitov
2023-07-20 15:41           ` Zaremba, Larysa
2023-07-20 21:58             ` Stanislav Fomichev
2023-07-20 22:24               ` Willem de Bruijn
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 14/21] selftests/bpf: Allow VLAN packets in xdp_hw_metadata Larysa Zaremba
2023-07-20 21:58   ` [xdp-hints] " Stanislav Fomichev
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 15/21] net, xdp: allow metadata > 32 Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 16/21] selftests/bpf: Add flags and new hints to xdp_hw_metadata Larysa Zaremba
2023-07-20 22:00   ` [xdp-hints] " Stanislav Fomichev
2023-07-21  7:41     ` Zaremba, Larysa
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 17/21] veth: Implement VLAN tag and checksum XDP hint Larysa Zaremba
2023-07-20 22:02   ` [xdp-hints] " Stanislav Fomichev
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 18/21] net: make vlan_get_tag() return -ENODATA instead of -EINVAL Larysa Zaremba
2023-07-20 22:02   ` [xdp-hints] " Stanislav Fomichev
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 19/21] selftests/bpf: Use AF_INET for TX in xdp_metadata Larysa Zaremba
2023-07-20 22:05   ` [xdp-hints] " Stanislav Fomichev
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 20/21] selftests/bpf: Check VLAN tag and proto " Larysa Zaremba
2023-07-20 22:14   ` [xdp-hints] " Stanislav Fomichev
2023-07-21  7:46     ` Zaremba, Larysa
2023-07-21 16:44       ` Stanislav Fomichev
2023-07-25  7:11         ` Larysa Zaremba
2023-07-19 18:37 ` [xdp-hints] [PATCH bpf-next v3 21/21] selftests/bpf: check checksum state " Larysa Zaremba
2023-07-20 22:14   ` [xdp-hints] " Stanislav Fomichev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox