Thread (22 messages) 22 messages, 4 authors, 2023-08-14

Re: [PATCH net-next v4 00/15][pull request] Introduce Intel IDPF driver

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2023-08-08 00:52:03

On 8/7/2023 5:34 PM, Tony Nguyen wrote:
Pavan Kumar Linga says:

This patch series introduces the Intel Infrastructure Data Path Function
(IDPF) driver. It is used for both physical and virtual functions. Except
for some of the device operations the rest of the functionality is the
same for both PF and VF. IDPF uses virtchnl version2 opcodes and
structures defined in the virtchnl2 header file which helps the driver
to learn the capabilities and register offsets from the device
Control Plane (CP) instead of assuming the default values.

The format of the series follows the driver init flow to interface open.
To start with, probe gets called and kicks off the driver initialization
by spawning the 'vc_event_task' work queue which in turn calls the
'hard reset' function. As part of that, the mailbox is initialized which
is used to send/receive the virtchnl messages to/from the CP. Once that is
done, 'core init' kicks in which requests all the required global resources
from the CP and spawns the 'init_task' work queue to create the vports.

Based on the capability information received, the driver creates the said
number of vports (one or many) where each vport is associated to a netdev.
Also, each vport has its own resources such as queues, vectors etc.
 From there, rest of the netdev_ops and data path are added.

IDPF implements both single queue which is traditional queueing model
as well as split queue model. In split queue model, it uses separate queue
for both completion descriptors and buffers which helps to implement
out-of-order completions. It also helps to implement asymmetric queues,
for example multiple RX completion queues can be processed by a single
RX buffer queue and multiple TX buffer queues can be processed by a
single TX completion queue. In single queue model, same queue is used
for both descriptor completions as well as buffer completions. It also
supports features such as generic checksum offload, generic receive
offload (hardware GRO) etc.
---
Looks like I accidentally truncated the revision history :(

It can be found here as the v8-v9 changes:
https://lore.kernel.org/intel-wired-lan/20230804231929.168064-1-pavan.kumar.linga@intel.com/ (local)

If you would like it resent with the info here, let me know.

Thanks,
Tony
v4:
Patch 1:
  * s/virtcnl/virtchnl
  * removed the kernel doc for the error code definitions that don't exist
  * reworded the summary part in the virtchnl2 header
Patch 3:
  * don't set local variable to NULL on error
  * renamed sq_send_command_out label with err_unlock
  * don't use __GFP_ZERO in dma_alloc_coherent
Patch 4:
  * introduced mailbox workqueue to process mailbox interrupts
Patch 3, 4, 5, 6, 7, 8, 9, 11, 15:
  * removed unnecessary variable 0-init
Patch 3, 5, 7, 8, 9, 15:
  * removed defensive programming checks wherever applicable
  * removed IDPF_CAP_FIELD_LAST as it can be treated as defensive
    programming
Patch 3, 4, 5, 6, 7:
  * replaced IDPF_DFLT_MBX_BUF_SIZE with IDPF_CTLQ_MAX_BUF_LEN
Patch 2 to 15:
  * add kernel-doc for idpf.h and idpf_txrx.h enums and structures
Patch 4, 5, 15:
  * adjusted the destroy sequence of the workqueues as per the alloc
    sequence
Patch 4, 5, 9, 15:
  * scrub unnecessary flags in 'idpf_flags'
    - IDPF_REMOVE_IN_PROG flag can take care of the cases where
      IDPF_REL_RES_IN_PROG is used, removed the later one
    - IDPF_REQ_[TX|RX]_SPLITQ are replaced with struct variables
    - IDPF_CANCEL_[SERVICE|STATS]_TASK are redundant as the work queue
      doesn't get rescheduled again after 'cancel_delayed_work_sync'
    - IDPF_HR_CORE_RESET is removed as there is no set_bit for this flag
    - IDPF_MB_INTR_TRIGGER is removed as it is not needed anymore with the
      mailbox workqueue implementation
Patch 7 to 15:
  * replaced the custom buffer recycling code with page pool API
  * switched the header split buffer allocations from using a bunch of
    pages to using one large chunk of DMA memory
  * reordered some of the flows in vport_open to support page pool
Patch 8, 12:
  * don't suppress the alloc errors by using __GFP_NOWARN
Patch 9:
  * removed dyn_ctl_clrpba_m as it is not being used
Patch 14:
  * introduced enum idpf_vport_reset_cause instead of using vport flags
  * introduced page pool stats

The following are changes since commit 66244337512fbe51a32e7ebc8a5b5c5dc7a5421e:
   Merge branch 'page_pool-a-couple-of-assorted-optimizations'
and are available in the git repository at:
   git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 200GbE

Alan Brady (4):
   idpf: configure resources for TX queues
   idpf: configure resources for RX queues
   idpf: add RX splitq napi poll support
   idpf: add ethtool callbacks

Joshua Hay (5):
   idpf: add controlq init and reset checks
   idpf: add splitq start_xmit
   idpf: add TX splitq napi poll support
   idpf: add singleq start_xmit and napi poll
   idpf: configure SRIOV and add other ndo_ops

Pavan Kumar Linga (5):
   virtchnl: add virtchnl version 2 ops
   idpf: add core init and interrupt request
   idpf: add create vport and netdev configuration
   idpf: add ptypes and MAC filter support
   idpf: initialize interrupts and enable vport

Phani Burra (1):
   idpf: add module register and probe functionality

  .../device_drivers/ethernet/index.rst         |    1 +
  .../device_drivers/ethernet/intel/idpf.rst    |  160 +
  drivers/net/ethernet/intel/Kconfig            |   12 +
  drivers/net/ethernet/intel/Makefile           |    1 +
  drivers/net/ethernet/intel/idpf/Makefile      |   18 +
  drivers/net/ethernet/intel/idpf/idpf.h        |  932 ++++
  .../net/ethernet/intel/idpf/idpf_controlq.c   |  621 +++
  .../net/ethernet/intel/idpf/idpf_controlq.h   |  130 +
  .../ethernet/intel/idpf/idpf_controlq_api.h   |  169 +
  .../ethernet/intel/idpf/idpf_controlq_setup.c |  171 +
  drivers/net/ethernet/intel/idpf/idpf_dev.c    |  164 +
  drivers/net/ethernet/intel/idpf/idpf_devids.h |   10 +
  .../net/ethernet/intel/idpf/idpf_ethtool.c    | 1363 ++++++
  .../ethernet/intel/idpf/idpf_lan_pf_regs.h    |  124 +
  .../net/ethernet/intel/idpf/idpf_lan_txrx.h   |  293 ++
  .../ethernet/intel/idpf/idpf_lan_vf_regs.h    |  128 +
  drivers/net/ethernet/intel/idpf/idpf_lib.c    | 2357 +++++++++
  drivers/net/ethernet/intel/idpf/idpf_main.c   |  285 ++
  drivers/net/ethernet/intel/idpf/idpf_mem.h    |   20 +
  .../ethernet/intel/idpf/idpf_singleq_txrx.c   | 1185 +++++
  drivers/net/ethernet/intel/idpf/idpf_txrx.c   | 4309 +++++++++++++++++
  drivers/net/ethernet/intel/idpf/idpf_txrx.h   | 1021 ++++
  drivers/net/ethernet/intel/idpf/idpf_vf_dev.c |  163 +
  .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 3769 ++++++++++++++
  drivers/net/ethernet/intel/idpf/virtchnl2.h   | 1266 +++++
  .../ethernet/intel/idpf/virtchnl2_lan_desc.h  |  448 ++
  26 files changed, 19120 insertions(+)
  create mode 100644 Documentation/networking/device_drivers/ethernet/intel/idpf.rst
  create mode 100644 drivers/net/ethernet/intel/idpf/Makefile
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq_api.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_dev.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_devids.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_ethtool.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lan_pf_regs.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lan_vf_regs.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_lib.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_main.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_mem.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_txrx.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_txrx.h
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_vf_dev.c
  create mode 100644 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
  create mode 100644 drivers/net/ethernet/intel/idpf/virtchnl2.h
  create mode 100644 drivers/net/ethernet/intel/idpf/virtchnl2_lan_desc.h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help