net/mlx5: Generalize Flow Context for new crypto fields
authorLior Nahmanson <liorna@nvidia.com>
Tue, 6 Sep 2022 05:21:17 +0000 (22:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Sep 2022 13:02:08 +0000 (14:02 +0100)
commite227ee990bf974f655ec3132b496409990f6634b
tree1c8dd19b66627a210b74002198a70fda8290a8a2
parentd1b2234b7fbf94348901bed4ea8d015c8a819d02
net/mlx5: Generalize Flow Context for new crypto fields

In order to support MACsec offload (and maybe some other crypto features
in the future), generalize flow action parameters / defines to be used by
crypto offlaods other than IPsec.
The following changes made:
ipsec_obj_id field at flow action context was changed to crypto_obj_id,
intreduced a new crypto_type field where IPsec is the default zero type
for backward compatibility.
Action ipsec_decrypt was changed to crypto_decrypt.
Action ipsec_encrypt was changed to crypto_encrypt.

IPsec offload code was updated accordingly for backward compatibility.

Signed-off-by: Lior Nahmanson <liorna@nvidia.com>
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
include/linux/mlx5/fs.h
include/linux/mlx5/mlx5_ifc.h