doc: update flow API guide for rule removal on stop
authorGregory Etelson <getelson@nvidia.com>
Wed, 18 Nov 2020 16:15:20 +0000 (18:15 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 25 Nov 2020 23:40:15 +0000 (00:40 +0100)
commit4467fed6f9abe01e8193eeb9a7be7de69a4fd336
tree960e7f73218d70d265dee342291fa911f4900622
parentc57f6e5c604a3101fe1a08ef01dfff5fbf1dfbea
doc: update flow API guide for rule removal on stop

There is a discrepancy between ethdev API and flow rules guide
regarding flow rules maintenance after port stop.
librte_ethdev.h declares that flow rules will not be stored in PMD
after port stop:
>>>>> Quote start
 Please note that some configuration is not stored between calls to
 rte_eth_dev_stop()/rte_eth_dev_start(). The following configuration
 will be retained:

 - MTU
 - flow control settings
 - receive mode configuration (promiscuous mode, all-multicast mode,
   hardware checksum mode, RSS/VMDQ settings etc.)
 - VLAN filtering configuration
 - default MAC address
 - MAC addresses supplied to MAC address array
 - flow director filtering mode (but not filtering rules)
 - NIC queue statistics mappings
<<<< Quote end

PMD cannot always correctly restore flow rules after port stop / port
start because application may alter port configuration after port stop
without PMD knowledge about undergoing changes.  Consider the
following scenario:
application configures 2 queues 0 and 1 and creates a flow rule with
'queue index 1' action. After that application stops the port and
removes queue 1.
Although PMD can implement flow rule shadow copy to be used for
restore after port start, attempt to restore flow rule from shadow
will fail in example above and PMD could not notify application about
that failure.  As the result, flow rules map in HW will differ from
what application expects.  In addition, flow rules shadow copy used
for port start restore consumes considerable amount of system memory,
especially in systems with millions of flow rules.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
doc/guides/prog_guide/rte_flow.rst