ethdev: introduce IP reassembly offload
authorAkhil Goyal <gakhil@marvell.com>
Tue, 8 Feb 2022 22:20:25 +0000 (03:50 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 10 Feb 2022 10:23:11 +0000 (11:23 +0100)
commita75ab6e519431fcd00ba435fdb7de8dac516e081
tree20956814ac9f86bdd566079a342c433635928710
parent988cd040eee9cfbdc8e7586665f6e5d11b1cdd18
ethdev: introduce IP reassembly offload

IP Reassembly is a costly operation if it is done in software.
The operation becomes even more costlier if IP fragments are encrypted.
However, if it is offloaded to HW, it can considerably save application
cycles.

Hence, a new offload feature is exposed in eth_dev ops for devices which
can attempt IP reassembly of packets in hardware.
- rte_eth_ip_reassembly_capability_get() - to get the maximum values
  of reassembly configuration which can be set.
- rte_eth_ip_reassembly_conf_set() - to set IP reassembly configuration
  and to enable the feature in the PMD (to be called before
  rte_eth_dev_start()).
- rte_eth_ip_reassembly_conf_get() - to get the current configuration
  set in PMD.

Now when the offload is enabled using rte_eth_ip_reassembly_conf_set(),
the resulting reassembled IP packet would be a typical segmented mbuf in
case of success.

And if reassembly of IP fragments is failed or is incomplete (if
fragments do not come before the reass_timeout, overlap, etc), the mbuf
dynamic flags can be updated by the PMD. This is updated in a subsequent
patch.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
doc/guides/nics/features.rst
doc/guides/nics/features/default.ini
doc/guides/rel_notes/release_22_03.rst
lib/ethdev/ethdev_driver.h
lib/ethdev/rte_ethdev.c
lib/ethdev/rte_ethdev.h
lib/ethdev/version.map