Skip to content

net/mlx4: trim and refactor entire PMD

Adrien Mazarguil dpdk-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest51 patches 4 repliesIn review
  2. v148 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Rebased series on top of the latest upstream fixes.

- Cleaned up remaining typos and coding style issues.

- "net/mlx4: check max number of ports dynamically":
Removed extra loop and added error message on maximum number of ports according to Allain's suggestion.

- "net/mlx4: drop scatter/gather support":
Additionally removed unnecessary mbuf pool from rxq_alloc_elts().

- "net/mlx4: simplify Rx buffer handling":
New patch removing unnecessary code from the simplified Rx path.

- "net/mlx4: remove isolated mode constraint":
New patch removing needless constraint for isolated mode, which can now be toggled anytime.

- "net/mlx4: rely on ethdev for Tx/Rx queue arrays":
New patch refactoring duplicated information from ethdev.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/51net/mlx4: add consistency to copyright noticesdoc/guides/nics/mlx4.rst drivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c +3 more+9 -90 replies
2/51net/mlx4: remove limitation on number of instancesdrivers/net/mlx4/mlx4.c+3 -540 replies
3/51net/mlx4: check max number of ports dynamicallydrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+31 -211 reply
4/51net/mlx4: remove useless compilation checksdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h +1 more+0 -520 replies
5/51net/mlx4: remove secondary process supportdoc/guides/nics/features/mlx4.ini doc/guides/nics/mlx4.rst drivers/net/mlx4/mlx4.c+8 -3440 replies
6/51net/mlx4: remove useless codedrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+1 -280 replies
7/51net/mlx4: remove soft counters compilation optionconfig/common_base doc/guides/nics/mlx4.rst drivers/net/mlx4/Makefile +2 more+0 -600 replies
8/51net/mlx4: remove scatter mode compilation optionconfig/common_base doc/guides/nics/mlx4.rst drivers/net/mlx4/Makefile +2 more+0 -240 replies
9/51net/mlx4: remove Tx inline compilation optionconfig/common_base drivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c +1 more+0 -150 replies
10/51net/mlx4: remove allmulti and promisc supportdoc/guides/nics/features/mlx4.ini doc/guides/nics/mlx4.rst drivers/net/mlx4/mlx4.c +1 more+0 -3190 replies
11/51net/mlx4: remove VLAN filter supportdoc/guides/nics/features/mlx4.ini doc/guides/nics/mlx4.rst drivers/net/mlx4/mlx4.c +1 more+17 -2040 replies
12/51net/mlx4: remove MAC address configuration supportdoc/guides/nics/features/mlx4.ini doc/guides/nics/mlx4.rst drivers/net/mlx4/mlx4.c +1 more+39 -3270 replies
13/51net/mlx4: drop MAC flows affecting all Rx queuesdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+57 -1600 replies
14/51net/mlx4: revert flow API RSS supportdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_flow.c +1 more+20 -2000 replies
15/51net/mlx4: revert RSS parent queue refactoringdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_flow.c+97 -2670 replies
16/51net/mlx4: drop RSS supportdoc/guides/nics/features/mlx4.ini doc/guides/nics/mlx4.rst drivers/net/mlx4/mlx4.c +1 more+14 -2180 replies
17/51net/mlx4: drop checksum offloads supportdoc/guides/nics/features/mlx4.ini doc/guides/nics/mlx4.rst drivers/net/mlx4/mlx4.c +1 more+4 -970 replies
18/51net/mlx4: drop packet type recognition supportdoc/guides/nics/features/mlx4.ini drivers/net/mlx4/mlx4.c+2 -690 replies
19/51net/mlx4: drop scatter/gather supportdoc/guides/nics/features/mlx4.ini doc/guides/nics/mlx4.rst drivers/net/mlx4/mlx4.c +1 more+26 -8640 replies
20/51net/mlx4: drop inline receive supportdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+0 -530 replies
21/51net/mlx4: use standard QP attributesdrivers/net/mlx4/mlx4.c+11 -140 replies
22/51net/mlx4: revert resource domain supportdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_flow.c+20 -1000 replies
23/51net/mlx4: revert multicast echo preventiondrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c+1 -120 replies
24/51net/mlx4: revert fast Verbs interface for Txdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+52 -720 replies
25/51net/mlx4: revert fast Verbs interface for Rxdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+33 -960 replies
26/51net/mlx4: simplify Rx buffer handlingdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+12 -690 replies
27/51net/mlx4: simplify link update functiondrivers/net/mlx4/mlx4.c+2 -70 replies
28/51net/mlx4: standardize on negative errno valuesdrivers/net/mlx4/mlx4.c+273 -2100 replies
29/51net/mlx4: clean up coding style inconsistenciesdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4_flow.c+28 -500 replies
30/51net/mlx4: remove control path locksdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_flow.c+6 -1030 replies
31/51net/mlx4: remove unnecessary wrapper functionsdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4_flow.c+32 -1350 replies
32/51net/mlx4: remove mbuf macro definitionsdrivers/net/mlx4/mlx4.c+10 -190 replies
33/51net/mlx4: use standard macro to get array sizedrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+6 -80 replies
34/51net/mlx4: separate debugging macrosdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_flow.c +1 more+100 -530 replies
35/51net/mlx4: use a single interrupt handledrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+21 -140 replies
36/51net/mlx4: rename alarm fielddrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+10 -100 replies
37/51net/mlx4: refactor interrupt FD settingsdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h +2 more+99 -390 replies
38/51net/mlx4: clean up interrupt functions prototypesdrivers/net/mlx4/mlx4.c+55 -900 replies
39/51net/mlx4: compact interrupt functionsdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h+41 -1590 replies
40/51net/mlx4: separate interrupt handlingdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h +1 more+392 -3360 replies
41/51net/mlx4: separate Rx/Tx definitionsdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_flow.c +2 more+127 -670 replies
42/51net/mlx4: separate Rx/Tx functionsdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h +2 more+545 -4780 replies
43/51net/mlx4: separate device control functionsdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h +2 more+830 -7430 replies
44/51net/mlx4: separate Tx configuration functionsdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4_rxtx.h +1 more+483 -4200 replies
45/51net/mlx4: separate Rx configuration functionsdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4_rxq.c +1 more+597 -5350 replies
46/51net/mlx4: group flow API handlers in common filedrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4_flow.c drivers/net/mlx4/mlx4_flow.h+76 -830 replies
47/51net/mlx4: rename private functions in flow APIdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4_flow.c drivers/net/mlx4/mlx4_flow.h+19 -190 replies
48/51net/mlx4: separate memory management functionsdrivers/net/mlx4/Makefile drivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h +1 more+188 -1190 replies
49/51net/mlx4: clean up includes and commentsdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_flow.c +1 more+32 -190 replies
50/51net/mlx4: remove isolated mode constraintdrivers/net/mlx4/mlx4_flow.c+13 -200 replies
51/51net/mlx4: rely on ethdev for Tx/Rx queue arraysdrivers/net/mlx4/mlx4.c drivers/net/mlx4/mlx4.h drivers/net/mlx4/mlx4_ethdev.c +4 more+48 -1070 replies

Reviews trailers per patch

1 of 51 patches has a Reviewed-by or Acked-by.

PatchAllain Legacy
1/51
2/51
3/51A-b
4/51
5/51
6/51
7/51
8/51
9/51
10/51
11/51
12/51
13/51
14/51
15/51
16/51
17/51
18/51
19/51
20/51
21/51
22/51
23/51
24/51
25/51
26/51
27/51
28/51
29/51
30/51
31/51
32/51
33/51
34/51
35/51
36/51
37/51
38/51
39/51
40/51
41/51
42/51
43/51
44/51
45/51
46/51
47/51
48/51
49/51
50/51
51/51

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

Read the v2 thread

Cover letter [PATCH v2 00/51] net/mlx4: trim and refactor entire PMD

The main purpose of this large series is to relieve the mlx4 PMD from its dependency on Mellanox OFED to instead rely on the standard rdma-core package provided by Linux distributions.

While compatibility with Mellanox OFED is preserved, all nonstandard functionality has to be stripped from the PMD in order to re-implement it through an approach compatible with rdma-core.

Due to the amount of changes necessary to achieve this goal, this rework starts off by removing extraneous code to simplify the PMD as much as possible before either replacing or dismantling functionality that relies on nonstandard Verbs.

What remains after applying this series is single-segment Tx/Rx support, without offloads nor RSS, on the default MAC address (which cannot be configured). Support for multiple queues and the flow API (minus the RSS action) are also preserved.

Missing functionality that needs substantial work will be restored later by subsequent series.

Also because the mlx4 PMD is mostly contained in a single very large source file of 6400+ lines (mlx4.c) which has become extremely difficult to maintain, this rework is used as an opportunity to finally group functions into separate files, as in mlx5.

This rework targets DPDK 17.11.

Changes since v1:

- Rebased series on top of the latest upstream fixes.

- Cleaned up remaining typos and coding style issues.

- "net/mlx4: check max number of ports dynamically":
Removed extra loop and added error message on maximum number of ports according to Allain's suggestion.

- "net/mlx4: drop scatter/gather support":
Additionally removed unnecessary mbuf pool from rxq_alloc_elts().

- "net/mlx4: simplify Rx buffer handling":
New patch removing unnecessary code from the simplified Rx path.

- "net/mlx4: remove isolated mode constraint":
New patch removing needless constraint for isolated mode, which can now be toggled anytime.

- "net/mlx4: rely on ethdev for Tx/Rx queue arrays":
New patch refactoring duplicated information from ethdev.

Adrien Mazarguil (51):
net/mlx4: add consistency to copyright notices net/mlx4: remove limitation on number of instances net/mlx4: check max number of ports dynamically net/mlx4: remove useless compilation checks net/mlx4: remove secondary process support net/mlx4: remove useless code
net/mlx4: remove soft counters compilation option net/mlx4: remove scatter mode compilation option net/mlx4: remove Tx inline compilation option net/mlx4: remove allmulti and promisc support net/mlx4: remove VLAN filter support net/mlx4: remove MAC address configuration support net/mlx4: drop MAC flows affecting all Rx queues net/mlx4: revert flow API RSS support net/mlx4: revert RSS parent queue refactoring net/mlx4: drop RSS support
net/mlx4: drop checksum offloads support net/mlx4: drop packet type recognition support net/mlx4: drop scatter/gather support net/mlx4: drop inline receive support net/mlx4: use standard QP attributes net/mlx4: revert resource domain support net/mlx4: revert multicast echo prevention net/mlx4: revert fast Verbs interface for Tx net/mlx4: revert fast Verbs interface for Rx net/mlx4: simplify Rx buffer handling net/mlx4: simplify link update function net/mlx4: standardize on negative errno values net/mlx4: clean up coding style inconsistencies net/mlx4: remove control path locks net/mlx4: remove unnecessary wrapper functions net/mlx4: remove mbuf macro definitions net/mlx4: use standard macro to get array size net/mlx4: separate debugging macros net/mlx4: use a single interrupt handle net/mlx4: rename alarm field
net/mlx4: refactor interrupt FD settings net/mlx4: clean up interrupt functions prototypes net/mlx4: compact interrupt functions net/mlx4: separate interrupt handling net/mlx4: separate Rx/Tx definitions net/mlx4: separate Rx/Tx functions net/mlx4: separate device control functions net/mlx4: separate Tx configuration functions net/mlx4: separate Rx configuration functions net/mlx4: group flow API handlers in common file net/mlx4: rename private functions in flow API net/mlx4: separate memory management functions net/mlx4: clean up includes and comments net/mlx4: remove isolated mode constraint net/mlx4: rely on ethdev for Tx/Rx queue arrays

 config/common_base                |    3 -
 doc/guides/nics/features/mlx4.ini |   13 -
 doc/guides/nics/mlx4.rst          |   37 +-
 drivers/net/mlx4/Makefile         |   41 +-
 drivers/net/mlx4/mlx4.c           | 6354 ++------------------------------
 drivers/net/mlx4/mlx4.h           |  333 +-
 drivers/net/mlx4/mlx4_ethdev.c    |  788 ++++
 drivers/net/mlx4/mlx4_flow.c      |  491 +--
 drivers/net/mlx4/mlx4_flow.h      |   51 +-
 drivers/net/mlx4/mlx4_intr.c      |  375 ++
 drivers/net/mlx4/mlx4_mr.c        |  183 +
 drivers/net/mlx4/mlx4_rxq.c       |  579 +++
 drivers/net/mlx4/mlx4_rxtx.c      |  524 +++
 drivers/net/mlx4/mlx4_rxtx.h      |  154 +
 drivers/net/mlx4/mlx4_txq.c       |  472 +++
 drivers/net/mlx4/mlx4_utils.c     |   66 +
 drivers/net/mlx4/mlx4_utils.h     |  111 +
 17 files changed, 3737 insertions(+), 6838 deletions(-)
 create mode 100644 drivers/net/mlx4/mlx4_ethdev.c
 create mode 100644 drivers/net/mlx4/mlx4_intr.c
 create mode 100644 drivers/net/mlx4/mlx4_mr.c
 create mode 100644 drivers/net/mlx4/mlx4_rxq.c
 create mode 100644 drivers/net/mlx4/mlx4_rxtx.c
 create mode 100644 drivers/net/mlx4/mlx4_rxtx.h
 create mode 100644 drivers/net/mlx4/mlx4_txq.c
 create mode 100644 drivers/net/mlx4/mlx4_utils.c
 create mode 100644 drivers/net/mlx4/mlx4_utils.h
Signature · 1 line
2.1.4