net/mlx5: Expose PCAM, MCAM registers infrastructure
[sfrench/cifs-2.6.git] / include / linux / mlx5 / mlx5_ifc.h
index 6f19e4b8574fcec96b9928be608c3ca4496b0eb4..e8061a95326ac3ceded3db6f1f19e171df1e3380 100644 (file)
@@ -826,7 +826,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
        u8         nic_flow_table[0x1];
        u8         eswitch_flow_table[0x1];
        u8         early_vf_enable[0x1];
-       u8         reserved_at_1a9[0x2];
+       u8         mcam_reg[0x1];
+       u8         pcam_reg[0x1];
        u8         local_ca_ack_delay[0x5];
        u8         port_module_event[0x1];
        u8         reserved_at_1b1[0x1];
@@ -7481,6 +7482,63 @@ struct mlx5_ifc_peir_reg_bits {
        u8         error_type[0x8];
 };
 
+struct mlx5_ifc_pcam_enhanced_features_bits {
+       u8         reserved_at_0[0x7e];
+
+       u8         ppcnt_discard_group[0x1];
+       u8         ppcnt_statistical_group[0x1];
+};
+
+struct mlx5_ifc_pcam_reg_bits {
+       u8         reserved_at_0[0x8];
+       u8         feature_group[0x8];
+       u8         reserved_at_10[0x8];
+       u8         access_reg_group[0x8];
+
+       u8         reserved_at_20[0x20];
+
+       union {
+               u8         reserved_at_0[0x80];
+       } port_access_reg_cap_mask;
+
+       u8         reserved_at_c0[0x80];
+
+       union {
+               struct mlx5_ifc_pcam_enhanced_features_bits enhanced_features;
+               u8         reserved_at_0[0x80];
+       } feature_cap_mask;
+
+       u8         reserved_at_1c0[0xc0];
+};
+
+struct mlx5_ifc_mcam_enhanced_features_bits {
+       u8         reserved_at_0[0x7f];
+
+       u8         pcie_performance_group[0x1];
+};
+
+struct mlx5_ifc_mcam_reg_bits {
+       u8         reserved_at_0[0x8];
+       u8         feature_group[0x8];
+       u8         reserved_at_10[0x8];
+       u8         access_reg_group[0x8];
+
+       u8         reserved_at_20[0x20];
+
+       union {
+               u8         reserved_at_0[0x80];
+       } mng_access_reg_cap_mask;
+
+       u8         reserved_at_c0[0x80];
+
+       union {
+               struct mlx5_ifc_mcam_enhanced_features_bits enhanced_features;
+               u8         reserved_at_0[0x80];
+       } mng_feature_cap_mask;
+
+       u8         reserved_at_1c0[0x80];
+};
+
 struct mlx5_ifc_pcap_reg_bits {
        u8         reserved_at_0[0x8];
        u8         local_port[0x8];