examples/ipsec-secgw: allow disabling some Rx/Tx offloads
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Thu, 10 Jan 2019 21:09:04 +0000 (21:09 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 10 Jan 2019 15:57:22 +0000 (16:57 +0100)
commit03128be4cd4d7c46c92c5b3170456e208f41ea86
tree2105b7b16a45ced417ea0836cbfaf00730ab16ed
parent9ef6cb1a1583ea52857f1b898f74ee0393f3a4e3
examples/ipsec-secgw: allow disabling some Rx/Tx offloads

Right now ipsec-secgw always enables TX offloads
(DEV_TX_OFFLOAD_MULTI_SEGS, DEV_TX_OFFLOAD_SECURITY),
even when they are not requested by the config.
That causes many PMD to choose full-featured TX function,
which in many cases is much slower then one without offloads.
That patch adds ability for the user to disable unneeded HW offloads.
If DEV_TX_OFFLOAD_IPV4_CKSUM is disabled by user, then
SW version of ip cksum calculation is used.
That allows to use vector TX function, when inline-ipsec is not
requested.

Signed-off-by: Remy Horton <remy.horton@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
doc/guides/sample_app_ug/ipsec_secgw.rst
examples/ipsec-secgw/ipsec-secgw.c
examples/ipsec-secgw/ipsec.h
examples/ipsec-secgw/sa.c