]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: MACsec, fix RX data path 16 RX security channel limit
authorRaed Salem <raeds@nvidia.com>
Thu, 27 Oct 2022 12:47:17 +0000 (15:47 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 24 Nov 2022 08:03:21 +0000 (00:03 -0800)
commite6da83152db2ce15d9ba3c4b0e407a8826f7fd98
tree30ae4be085b7393e1608d9811d3b36933ba6e922
parentf4103b48c6d9658d485d97386f1945cfb9915b43
net/mlx5e: MACsec, fix RX data path 16 RX security channel limit

Currently the data path metadata flow id mask wrongly limits the
number of different RX security channels (SC) to 16, whereas in
adding RX SC the limit is "2^16 - 1" this cause an overlap in
metadata flow id once more than 16 RX SCs is added, this corrupts
MACsec RX offloaded flow handling.

Fix by using the correct mask, while at it improve code to use this
mask when adding the Rx rule and improve visibility of such errors
by adding debug massage.

Fixes: f80402fd302f ("net/mlx5e: Implement MACsec Rx data path using MACsec skb_metadata_dst")
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/macsec.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_fs.c