]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc1e0a8a85bbced8dd8b85ac3c7e36d0c1ceb0933
treeb3c825f56c8e598bccb4b93173c44de6e8a99651
parent542639cc09f6af86cfa7aad9e6577ad5045adaa1
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