X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fnics%2Ffail_safe.rst;h=34ecae2d1933696caa72bd9ced8af17e89d7122c;hb=76f5f48c51ccbb5ab696af6ae22a7c1acbe63a07;hp=000589235ecb463e5368e24401948612caf449ff;hpb=ebea83f899d8739e7143209e7575aa97f4f3ab08;p=dpdk.git diff --git a/doc/guides/nics/fail_safe.rst b/doc/guides/nics/fail_safe.rst index 000589235e..34ecae2d19 100644 --- a/doc/guides/nics/fail_safe.rst +++ b/doc/guides/nics/fail_safe.rst @@ -51,6 +51,12 @@ The Fail-safe PMD only supports a limited set of features. If you plan to use a device underneath the Fail-safe PMD with a specific feature, this feature must be supported by the Fail-safe PMD to avoid throwing any error. +A notable exception is the device removal feature. The fail-safe PMD being a +virtual device, it cannot currently be removed in the sense of a specific bus +hotplug, like for PCI for example. It will however enable this feature for its +sub-device automatically, detecting those that are capable and register the +relevant callback for such event. + Check the feature matrix for the complete set of supported features. Compilation option @@ -87,6 +93,19 @@ Fail-safe command line parameters additional sub-device parameters if need be. They will be passed on to the sub-device. +- **exec()** parameter + + This parameter allows the user to provide a command to the fail-safe PMD to + execute and define a sub-device. + It is done within a regular shell context. + The first line of its output is read by the fail-safe PMD and otherwise + interpreted as if passed by the regular **dev** parameter. + Any other line is discarded. + If the command fail or output an incorrect string, the sub-device is not + initialized. + All commas within the ``shell command`` are replaced by spaces before + executing the command. This helps using scripts to specify devices. + - **mac** parameter [MAC address] This parameter allows the user to set a default MAC address to the fail-safe @@ -134,6 +153,13 @@ This section shows some example of using **testpmd** with a fail-safe PMD. --vdev 'net_failsafe0,mac=de:ad:be:ef:01:02,dev(84:00.0),dev(net_ring0)' -w 81:00.0 -- -i +#. Start testpmd using a flexible device definition + + .. code-block:: console + + $RTE_TARGET/build/app/testpmd -c 0xff -n 4 --no-pci \ + --vdev='net_failsafe0,exec(echo 84:00.0)' -- -i + Using the Fail-safe PMD from an application ------------------------------------------- @@ -159,6 +185,14 @@ apply it upon the probing of its missing sub-device. After this configuration pass, the new sub-device will be synchronized with other sub-devices, i.e. be started if the fail-safe PMD has been started by the user before. +Plug-out feature +---------------- + +A sub-device supporting the device removal event can be removed from its bus at +any time. The fail-safe PMD will register a callback for such event and react +accordingly. It will try to safely stop, close and uninit the sub-device having +emitted this event, allowing it to free its eventual resources. + Fail-safe glossary ------------------ @@ -175,6 +209,7 @@ Preferred device : Primary device Upkeep round Periodical process when slaves are serviced. Each devices having a state different to that of the fail-safe device itself, is synchronized with it. + Additionally, each slave having the remove flag set are cleaned-up. Slave In the context of the fail-safe PMD, synonymous to sub-device.