Skip to content

introduce fail-safe PMD

Gaetan Rivet dpdk-dev 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest11 patches 6 repliesIn review
  2. v1011 patches 17 repliesSuperseded
  3. v911 patches 1 replySuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v811 patches4 repliesSuperseded
v711 patches3 repliesSuperseded
v622 patches2 repliesSuperseded
v512 patches8 repliesSuperseded
v412 patches20 repliesSuperseded
v311 patches0 repliesSuperseded
v213 patches15 repliesSuperseded
v112 patches7 repliesSuperseded

Changes in v11 from the cover letter

- Added Glossary in documentation.
- Fixed issues oulined in [1].
- Removed Rx offload advertizement in feature matrix.

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11ethdev: add deferred intermediate device statelib/librte_ether/rte_ethdev.c lib/librte_ether/rte_ethdev.h+3 -11 reply
2/11ethdev: count devices consistentlylib/librte_ether/rte_ethdev.c lib/librte_ether/rte_ethdev.h+15 -141 reply
3/11net/failsafe: add fail-safe PMDMAINTAINERS config/common_base doc/guides/nics/fail_safe.rst +12 more+1930 -00 replies
4/11net/failsafe: add plug-in supportdoc/guides/nics/fail_safe.rst drivers/net/failsafe/Makefile drivers/net/failsafe/failsafe.c +5 more+428 -420 replies
5/11net/failsafe: add flexible device definitiondoc/guides/nics/fail_safe.rst drivers/net/failsafe/failsafe_args.c drivers/net/failsafe/failsafe_ether.c +1 more+128 -10 replies
6/11net/failsafe: support flow APIdoc/guides/nics/features/failsafe.ini drivers/net/failsafe/Makefile drivers/net/failsafe/failsafe.c +5 more+336 -00 replies
7/11net/failsafe: support Rx offload capabilitiesdrivers/net/failsafe/failsafe_ops.c+129 -20 replies
8/11net/failsafe: add fast burst functionsdrivers/net/failsafe/failsafe_private.h drivers/net/failsafe/failsafe_rxtx.c+111 -200 replies
9/11net/failsafe: support device removaldoc/guides/nics/fail_safe.rst drivers/net/failsafe/failsafe.c drivers/net/failsafe/failsafe_args.c +5 more+234 -200 replies
10/11net/failsafe: support link status change eventdoc/guides/nics/features/failsafe.ini drivers/net/failsafe/failsafe.c drivers/net/failsafe/failsafe_ether.c +2 more+46 -00 replies
11/11net/failsafe: support flow API isolation modedrivers/net/failsafe/failsafe_ether.c drivers/net/failsafe/failsafe_flow.c drivers/net/failsafe/failsafe_private.h+65 -20 replies

Reviews trailers per patch

9 of 11 patches have a Reviewed-by or Acked-by.

PatchOlga ShernThomas Monjalon
1/11A-b
2/11A-b
3/11A-b
4/11A-b
5/11A-b
6/11A-b
7/11A-b
8/11A-b
9/11A-b
10/11
11/11

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

Read the v11 thread

Cover letter [PATCH v11 00/11] introduce fail-safe PMD

This PMD intercepts and manages Ethernet device removal events issued by slave PMDs and re-initializes them transparently when brought back so that existing applications do not need to be modified to benefit from true hot-plugging support.

The stacked PMD approach shares many similarities with the bonding PMD but with a different purpose. While bonding provides the ability to group several links into a single logical device for enhanced throughput and supports fail-over at link level, this one manages the sudden disappearance of the underlying device; it guarantees applications face a valid device in working order at all times.

Each fail-safe instance is configured to run atop one or several devices, with one defined as the preferred device. Hot-plug events are handled on all of them, and Tx is always directed to the preferred device if present or to the next available failover device (Rx is always performed on all devices for simplicity).

Moreover, the configured slaves (preferred or failover) do not need to be present at initialization time and may appear later.

Slaves configuration is continuously synchronized with that of the virtual device, which exposes their common set of capabilities to the application. Failure to apply the current configuration state to a slave for any reason simply reschedules its initialization.

This patchset depends on:

[dpdk-dev] [PATCH v4 0/8] fix hotplug API
http://dpdk.org/ml/archives/dev/2017-July/071340.html

v1 --> v2:

- Wrote documentation
- Fixed commit logs, signed-off-by
- Added LSC event support
- A few minor fixes

v2 --> v3:

- Numerous bug fixes.
- Complete sub-EAL rework to follow new bus API.
- burst protection on sub removal.
- more flexible sub definition.
- flow isolated mode support.

v3 --> v4:

- Split back commits
net/failsafe: add fast burst functions net/failsafe: support device removal
That were squashed by error during a rebase
- Fix segfault on port plugin
- Fix isolate mode support for MLX4 ports plugin

v4 --> v5:

- Follow new plug / unplug API.

v5 --> v6:

- Follow new hotplug API.
- Improve usability of hotplug API.
- Fix rte_dev hotplug API implementation.
- Introduce rte_eal_devargs_rmv API as EXPERIMENTAL.
- Use it to clean up resources on hotplug_remove.
- Fix hotplug implementation and support un pci bus. The scan was not idempotent, nor clean. Neither were the device fields.
- Implement plug operation for vdev bus.
This is needed for hotplug support and to make the EAL independent from vdev-specific API.
- Remove useless parameters from plug / unplug API.

This patchset is fairly big and complex. The hotplug API has been rushed and has never been tested outside of the special case of vdev bus.

These evolutions are proposed alongside this PMD as only this PMD allows to test this API at the moment, and without those evolutions this PMD cannot be used.

v6 --> v7

- Split the series in three, with
vlan filter configuration store standing alone Hotplug API fixes separated
Fail-safe PMD on its own.

These changes should ease integration.

v7 --> v8

- Fix usage examples in documentation.
- Use rte_eth_dev_allocated when relevant.

v8 --> v9

- Use calloc instead of rte_realloc for command line parsing.
- Include errno only when necessary.

v9 --> v10

- Fix rte_flow description double-free issue. Thanks Raslan for finding the issue :)
- Use RTE_ASSERT instead of assert.
Integrate the debug log of the fail-safe to RTE_LOG_DEBUG macro as well, allowing dynamic log levels.
- Remove devices post-state-sync during slave upkeep, to avoid a useless early probe attempt.

v10 --> v11

- Added Glossary in documentation.
- Fixed issues oulined in [1].
- Removed Rx offload advertizement in feature matrix.

[1]: http://dpdk.org/ml/archives/dev/2017-July/071406.html

Gaetan Rivet (11):
ethdev: add deferred intermediate device state
ethdev: count devices consistently
net/failsafe: add fail-safe PMD
net/failsafe: add plug-in support
net/failsafe: add flexible device definition
net/failsafe: support flow API
net/failsafe: support Rx offload capabilities
net/failsafe: add fast burst functions
net/failsafe: support device removal
net/failsafe: support link status change event
net/failsafe: support flow API isolation mode

 MAINTAINERS                                       |   5 +
 config/common_base                                |   5 +
 doc/guides/nics/fail_safe.rst                     | 221 ++++++
 doc/guides/nics/features/failsafe.ini             |  26 +
 doc/guides/nics/index.rst                         |   1 +
 drivers/net/Makefile                              |   2 +
 drivers/net/failsafe/Makefile                     |  60 ++
 drivers/net/failsafe/failsafe.c                   | 299 ++++++++
 drivers/net/failsafe/failsafe_args.c              | 468 ++++++++++++
 drivers/net/failsafe/failsafe_eal.c               | 118 +++
 drivers/net/failsafe/failsafe_ether.c             | 437 +++++++++++
 drivers/net/failsafe/failsafe_flow.c              | 244 ++++++
 drivers/net/failsafe/failsafe_ops.c               | 867 ++++++++++++++++++++++
 drivers/net/failsafe/failsafe_private.h           | 359 +++++++++
 drivers/net/failsafe/failsafe_rxtx.c              | 203 +++++
 drivers/net/failsafe/rte_pmd_failsafe_version.map |   4 +
 lib/librte_ether/rte_ethdev.c                     |  19 +-
 lib/librte_ether/rte_ethdev.h                     |  14 +-
 mk/rte.app.mk                                     |   1 +
 19 files changed, 3338 insertions(+), 15 deletions(-)
 create mode 100644 doc/guides/nics/fail_safe.rst
 create mode 100644 doc/guides/nics/features/failsafe.ini
 create mode 100644 drivers/net/failsafe/Makefile
 create mode 100644 drivers/net/failsafe/failsafe.c
 create mode 100644 drivers/net/failsafe/failsafe_args.c
 create mode 100644 drivers/net/failsafe/failsafe_eal.c
 create mode 100644 drivers/net/failsafe/failsafe_ether.c
 create mode 100644 drivers/net/failsafe/failsafe_flow.c
 create mode 100644 drivers/net/failsafe/failsafe_ops.c
 create mode 100644 drivers/net/failsafe/failsafe_private.h
 create mode 100644 drivers/net/failsafe/failsafe_rxtx.c
 create mode 100644 drivers/net/failsafe/rte_pmd_failsafe_version.map
Signature · 1 line
2.1.4