[Intel-wired-lan] [PATCH RFC net-next 00/34] Christmas 3-serie XDP for idpf (+generic stuff)

Alexander Lobakin aleksander.lobakin at intel.com
Sat Dec 23 02:55:20 UTC 2023


I was highly asked to send this WIP before the holidays to trigger
some discussions at least for the generic parts.

This all depends on libie[0] and WB-on-ITR fix[1]. The RFC does not
guarantee to work perfectly, but at least regular XDP seems to work
for me...

In fact, here are 3 separate series:
* 01-08: convert idpf to libie and make it more sane;
* 09-25: add XDP to idpf;
* 26-34: add XSk to idpf.

Most people may want to be interested only in the following generic
changes:
* 11: allow attaching already registered memory models to XDP RxQ info;
* 12-13: generic helpers for adding a frag to &xdp_buff and converting
  it to an skb;
* 14: get rid of xdp_frame::mem.id, allow mixing pages from different
  page_pools within one &xdp_buff/&xdp_frame;
* 15: some Page Pool helper;
* 18: it's for libie, but I wanted to talk about XDP_TX bulking;
* 26: same as 13, but for converting XSK &xdp_buff to skb.

The rest is up to you, driver-specific stuff is pretty boring sometimes.

I'll be polishing and finishing this all starting January 3rd and then
preparing and sending sane series, some early feedback never hurts tho.

Merry Yule!

[0] https://lore.kernel.org/netdev/20231213112835.2262651-1-aleksander.lobakin@intel.com
[1] https://lore.kernel.org/netdev/20231215193721.425087-1-michal.kubiak@intel.com

Alexander Lobakin (23):
  idpf: reuse libie's definitions of parsed ptype structures
  idpf: pack &idpf_queue way more efficiently
  idpf: remove legacy Page Pool Ethtool stats
  libie: support different types of buffers for Rx
  idpf: convert header split mode to libie + napi_build_skb()
  idpf: use libie Rx buffer management for payload buffer
  libie: add Tx buffer completion helpers
  idpf: convert to libie Tx buffer completion
  bpf, xdp: constify some bpf_prog * function arguments
  xdp: constify read-only arguments of some static inline helpers
  xdp: allow attaching already registered memory model to xdp_rxq_info
  xdp: add generic xdp_buff_add_frag()
  xdp: add generic xdp_build_skb_from_buff()
  xdp: get rid of xdp_frame::mem.id
  page_pool: add inline helper to sync VA for device (for XDP_TX)
  jump_label: export static_key_slow_{inc,dec}_cpuslocked()
  libie: support native XDP and register memory model
  libie: add a couple of XDP helpers
  idpf: stop using macros for accessing queue descriptors
  idpf: use generic functions to build xdp_buff and skb
  idpf: add support for XDP on Rx
  idpf: add support for .ndo_xdp_xmit()
  xdp: add generic XSk xdp_buff -> skb conversion

Michal Kubiak (11):
  idpf: make complq cleaning dependent on scheduling mode
  idpf: prepare structures to support xdp
  idpf: implement XDP_SETUP_PROG in ndo_bpf for splitq
  idpf: add support for sw interrupt
  idpf: add relative queue id member to idpf_queue
  idpf: add vc functions to manage selected queues
  idpf: move search rx and tx queues to header
  idpf: add XSk pool initialization
  idpf: implement Tx path for AF_XDP
  idpf: implement Rx path for AF_XDP
  idpf: enable XSk features and ndo_xsk_wakeup

 .../net/ethernet/freescale/dpaa/dpaa_eth.c    |    2 +-
 drivers/net/ethernet/intel/Kconfig            |    3 +-
 drivers/net/ethernet/intel/idpf/Makefile      |    3 +
 drivers/net/ethernet/intel/idpf/idpf.h        |   91 +-
 drivers/net/ethernet/intel/idpf/idpf_dev.c    |    3 +
 .../net/ethernet/intel/idpf/idpf_ethtool.c    |   74 +-
 .../net/ethernet/intel/idpf/idpf_lan_txrx.h   |    6 +-
 drivers/net/ethernet/intel/idpf/idpf_lib.c    |   40 +-
 drivers/net/ethernet/intel/idpf/idpf_main.c   |    1 +
 .../ethernet/intel/idpf/idpf_singleq_txrx.c   |  221 ++-
 drivers/net/ethernet/intel/idpf/idpf_txrx.c   | 1142 ++++++++--------
 drivers/net/ethernet/intel/idpf/idpf_txrx.h   |  451 +++----
 drivers/net/ethernet/intel/idpf/idpf_vf_dev.c |    3 +
 .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 1132 ++++++++++------
 drivers/net/ethernet/intel/idpf/idpf_xdp.c    |  522 ++++++++
 drivers/net/ethernet/intel/idpf/idpf_xdp.h    |   38 +
 drivers/net/ethernet/intel/idpf/idpf_xsk.c    | 1181 +++++++++++++++++
 drivers/net/ethernet/intel/idpf/idpf_xsk.h    |   30 +
 drivers/net/ethernet/intel/libie/Makefile     |    3 +
 drivers/net/ethernet/intel/libie/rx.c         |  135 +-
 drivers/net/ethernet/intel/libie/tx.c         |   16 +
 drivers/net/ethernet/intel/libie/xdp.c        |   50 +
 drivers/net/ethernet/intel/libie/xsk.c        |   49 +
 drivers/net/veth.c                            |    4 +-
 include/linux/bpf.h                           |   12 +-
 include/linux/filter.h                        |    9 +-
 include/linux/net/intel/libie/rx.h            |   25 +-
 include/linux/net/intel/libie/tx.h            |   94 ++
 include/linux/net/intel/libie/xdp.h           |  586 ++++++++
 include/linux/net/intel/libie/xsk.h           |  172 +++
 include/linux/netdevice.h                     |    6 +-
 include/linux/skbuff.h                        |   14 +-
 include/net/page_pool/helpers.h               |   32 +
 include/net/page_pool/types.h                 |    6 +-
 include/net/xdp.h                             |  109 +-
 kernel/bpf/cpumap.c                           |    2 +-
 kernel/bpf/devmap.c                           |    8 +-
 kernel/jump_label.c                           |    2 +
 net/bpf/test_run.c                            |    6 +-
 net/core/dev.c                                |    8 +-
 net/core/filter.c                             |   27 +-
 net/core/page_pool.c                          |   31 +-
 net/core/xdp.c                                |  189 ++-
 43 files changed, 4971 insertions(+), 1567 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/idpf/idpf_xdp.c
 create mode 100644 drivers/net/ethernet/intel/idpf/idpf_xdp.h
 create mode 100644 drivers/net/ethernet/intel/idpf/idpf_xsk.c
 create mode 100644 drivers/net/ethernet/intel/idpf/idpf_xsk.h
 create mode 100644 drivers/net/ethernet/intel/libie/tx.c
 create mode 100644 drivers/net/ethernet/intel/libie/xdp.c
 create mode 100644 drivers/net/ethernet/intel/libie/xsk.c
 create mode 100644 include/linux/net/intel/libie/tx.h
 create mode 100644 include/linux/net/intel/libie/xdp.h
 create mode 100644 include/linux/net/intel/libie/xsk.h

-- 
2.43.0



More information about the Intel-wired-lan mailing list