]> 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)
commit0633c1c436b4ddf02f723b63a113c696dcea2d68
treeb3c825f56c8e598bccb4b93173c44de6e8a99651
parent2a2b008e15c7a6581ed3b4bded86da62c55a2ec1
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