Skip to content

Introduce Intel IDPF driver

Pavan Kumar Linga intel-wired-lan 9 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest15 patches 0 repliesNew
  2. v6 posting 2/215 patches 0 repliesSuperseded
  3. v1015 patches 0 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v915 patches0 repliesSuperseded
v815 patches0 repliesSuperseded
v715 patches4 repliesSuperseded
v6 posting 1/215 patches15 repliesSuperseded
v215 patches26 repliesSuperseded
v115 patches37 repliesSuperseded

Changes in v11 from the cover letter

Patch 2:
* removed pci_[disable|enable]_pcie_error_reporting as they are dropped from the core
Patch 9, 14:
* fixed snprintf "-Wformat-truncation" warnings by providing the possible size of the character pointer

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15virtchnl: add virtchnl version 2 opsdrivers/net/ethernet/intel/idpf/virtchnl2.h drivers/net/ethernet/intel/idpf/virtchnl2_lan_desc.h+1724 -00 replies
2/15idpf: add module register and probe functionalitydrivers/net/ethernet/intel/idpf/Makefile drivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_controlq.h +2 more+193 -00 replies
3/15idpf: add controlq init and reset checksdrivers/net/ethernet/intel/idpf/Makefile drivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_controlq.c +11 more+1851 -30 replies
4/15idpf: add core init and interrupt requestdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_dev.c drivers/net/ethernet/intel/idpf/idpf_lan_pf_regs.h +6 more+1473 -30 replies
5/15idpf: add create vport and netdev configurationdrivers/net/ethernet/intel/idpf/Makefile drivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lib.c +4 more+1522 -200 replies
6/15idpf: add ptypes and MAC filter supportdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lib.c drivers/net/ethernet/intel/idpf/idpf_txrx.h +1 more+836 -10 replies
7/15idpf: configure resources for TX queuesdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h drivers/net/ethernet/intel/idpf/idpf_lib.c +3 more+1410 -00 replies
8/15idpf: configure resources for RX queuesdrivers/net/ethernet/intel/idpf/Makefile drivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h +5 more+1705 -120 replies
9/15idpf: initialize interrupts and enable vportdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_dev.c drivers/net/ethernet/intel/idpf/idpf_lan_pf_regs.h +7 more+1390 -30 replies
10/15idpf: add splitq start_xmitdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h drivers/net/ethernet/intel/idpf/idpf_lib.c +2 more+1107 -10 replies
11/15idpf: add TX splitq napi poll supportdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h drivers/net/ethernet/intel/idpf/idpf_lib.c +3 more+926 -50 replies
12/15idpf: add RX splitq napi poll supportdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_txrx.c drivers/net/ethernet/intel/idpf/idpf_txrx.h +1 more+892 -60 replies
13/15idpf: add singleq start_xmit and napi polldrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h drivers/net/ethernet/intel/idpf/idpf_lib.c +5 more+1290 -310 replies
14/15idpf: add ethtool callbacksdrivers/net/ethernet/intel/idpf/Makefile drivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_ethtool.c +4 more+1853 -30 replies
15/15idpf: add SRIOV support and other ndo_opsDocumentation/networking/device_drivers/ethernet/index.rst Documentation/networking/device_drivers/ethernet/intel/idpf.rst drivers/net/ethernet/intel/Kconfig +7 more+1114 -30 replies

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchSridhar SamudralaWillem de Bruijn
1/15R-b R-b
2/15R-b R-b
3/15R-b R-b
4/15R-b R-b
5/15R-b R-b
6/15R-b R-b
7/15R-b R-b
8/15R-b R-b
9/15R-b R-b
10/15R-b R-b
11/15R-b R-b
12/15R-b R-b
13/15R-b R-b
14/15R-b R-b
15/15R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v11 thread

Cover letter [Intel-wired-lan] [PATCH iwl-next v11 00/15] Introduce Intel IDPF driver

This patch series introduces the Intel(R) 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.
---
v11:
Patch 2:
* removed pci_[disable|enable]_pcie_error_reporting as they are dropped from the core
Patch 9, 14:
* fixed snprintf "-Wformat-truncation" warnings by providing the possible size of the character pointer

v9 -> v10:
* wrapped line limit to 80 chars to those which dont effect readability (patch 12):
* in skb_add_rx_frag, offset 'headlen' w.r.t page_offset when adding a frag to avoid adding the header again
(patch 14):
* added NULL check for 'rxq' when dereferencing it in page_pool_get_stats

v8 -> v9:
(patch 1):
* s/virtcnl/virtchnl
* removed the kernel doc for the error code definitions that dont 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

v7 -> v8:
(patch 5):
* instead of void, used 'struct virtchnl2_create_vport' type for vport_params_recvd and vport_params_reqd and removed the typecasting
* used u16/u32 as needed instead of int for variables which cannot be negative and updated in all the places whereever applicable
(patch 6):
* changed the commit message to "add ptypes and MAC filter support"
* used the sender Signed-off-by as the last tag on all the patches
* removed unnecessary variables 0-init
* instead of fixing the code in this commit, fixed it in the commit where the change was introduced first
* moved get_type_info struct on to the stack instead of memory alloc
* moved mutex_lock and ptype_info memory alloc outside while loop and adjusted the return flow
* used 'break' instead of 'continue' in ptype id switch case

v6 --> v7:
(patch 2):
* added "Intel(R)" to the DRV_SUMMARY and Makefile.
(patch 4, 5, 6, 15):
* replaced IDPF_VC_MSG_PENDING flag with mutex 'vc_buf_lock' for the adapter related virtchnl opcodes.
* get the mutex lock in the virtchnl send thread itself instead of in receive thread.
(patch 5, 6, 7, 8, 9, 11, 14, 15):
* replaced IDPF_VPORT_VC_MSG_PENDING flag with mutex 'vc_buf_lock' for the vport related virtchnl opcodes.
* get the mutex lock in the virtchnl send thread itself instead of in receive thread.
(patch 6):
* converted get_ptype_info logic from 1:N to 1:1 message exchange for better handling of mutex lock.
(patch 15):
* introduced 'stats_lock' spinlock to avoid concurrent stats update.

iwl-next:
v10 - https://lore.kernel.org/intel-wired-lan/[email protected]/
v9 - https://lore.kernel.org/intel-wired-lan/[email protected]/
v8 - https://lore.kernel.org/intel-wired-lan/[email protected]/
v7 - https://lore.kernel.org/intel-wired-lan/[email protected]/
v6 - https://lore.kernel.org/netdev/[email protected]/
v5 - https://lore.kernel.org/netdev/[email protected]/
v4 - https://lore.kernel.org/netdev/[email protected]/
v3 - https://lore.kernel.org/netdev/[email protected]/
v2 - https://lore.kernel.org/netdev/[email protected]/
v1 - https://lore.kernel.org/netdev/[email protected]/

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: add SRIOV support and 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        |  968 ++++
 .../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    |  165 +
 drivers/net/ethernet/intel/idpf/idpf_devids.h |   10 +
 .../net/ethernet/intel/idpf/idpf_ethtool.c    | 1371 ++++++
 .../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    | 2379 +++++++++
 drivers/net/ethernet/intel/idpf/idpf_main.c   |  279 ++
 drivers/net/ethernet/intel/idpf/idpf_mem.h    |   20 +
 .../ethernet/intel/idpf/idpf_singleq_txrx.c   | 1183 +++++
 drivers/net/ethernet/intel/idpf/idpf_txrx.c   | 4289 +++++++++++++++++
 drivers/net/ethernet/intel/idpf/idpf_txrx.h   | 1025 ++++
 drivers/net/ethernet/intel/idpf/idpf_vf_dev.c |  163 +
 .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 3791 +++++++++++++++
 drivers/net/ethernet/intel/idpf/virtchnl2.h   | 1273 +++++
 .../ethernet/intel/idpf/virtchnl2_lan_desc.h  |  451 ++
 26 files changed, 19195 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
Signature · 6 lines
2.38.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan