net/mlx5: Introduce MACsec Connect-X offload hardware bits and structures
[sfrench/cifs-2.6.git] / include / linux / mlx5 / device.h
index b5f58fd37a0f75905a86a6253861e1bd05bfb9e7..2927810f172b0f7569f678a44252509a48f88dd5 100644 (file)
@@ -1198,6 +1198,7 @@ enum mlx5_cap_type {
        MLX5_CAP_DEV_EVENT = 0x14,
        MLX5_CAP_IPSEC,
        MLX5_CAP_DEV_SHAMPO = 0x1d,
+       MLX5_CAP_MACSEC = 0x1f,
        MLX5_CAP_GENERAL_2 = 0x20,
        MLX5_CAP_PORT_SELECTION = 0x25,
        /* NUM OF CAP Types */
@@ -1446,6 +1447,9 @@ enum mlx5_qcam_feature_groups {
 #define MLX5_CAP_DEV_SHAMPO(mdev, cap)\
        MLX5_GET(shampo_cap, mdev->caps.hca_cur[MLX5_CAP_DEV_SHAMPO], cap)
 
+#define MLX5_CAP_MACSEC(mdev, cap)\
+       MLX5_GET(macsec_cap, (mdev)->caps.hca[MLX5_CAP_MACSEC]->cur, cap)
+
 enum {
        MLX5_CMD_STAT_OK                        = 0x0,
        MLX5_CMD_STAT_INT_ERR                   = 0x1,