net/mlx5e: IPsec: Refactor checksum code in tx data path
authorRaed Salem <raeds@nvidia.com>
Tue, 26 Oct 2021 07:10:42 +0000 (10:10 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 29 Oct 2021 20:53:28 +0000 (13:53 -0700)
commit428ffea0711a11efa0c1c4ee1fac27903ed091be
treeb3c825f56c8e598bccb4b93173c44de6e8a99651
parentae2ee3be99a87fdbc01bd82e77eb26dcb69d874a
net/mlx5e: IPsec: Refactor checksum code in tx data path

Part of code that is related solely to IPsec is always compiled in the
driver code regardless if the IPsec functionality is enabled or disabled
in the driver code, this will add unnecessary branch in case IPsec is
disabled at Tx data path.

Move IPsec related code to IPsec related file such that in case of IPsec
is disabled and because of unlikely macro the compiler should be able to
optimize and omit the checksum IPsec code all together from Tx data path

Signed-off-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Emeel Hakim <ehakim@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.h
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c