log: register with standardized names
[dpdk.git] / drivers / net / mlx5 / linux / mlx5_os.c
index 8206640..5ac7871 100644 (file)
@@ -1097,7 +1097,8 @@ err_secondary:
        }
        if (devx_port.comp_mask & MLX5DV_DEVX_PORT_VPORT) {
                priv->vport_id = devx_port.vport_num;
-       } else if (spawn->pf_bond >= 0) {
+       } else if (spawn->pf_bond >= 0 &&
+                  (switch_info->representor || switch_info->master)) {
                DRV_LOG(ERR, "can't deduce vport index for port %d"
                             " on bonding device %s",
                             spawn->phys_port,
@@ -1299,13 +1300,14 @@ err_secondary:
                        if (log_obj_size >=
                        config->hca_attr.qos.log_meter_aso_granularity &&
                        log_obj_size <=
-                       config->hca_attr.qos.log_meter_aso_max_alloc) {
+                       config->hca_attr.qos.log_meter_aso_max_alloc)
                                sh->meter_aso_en = 1;
-                               err = mlx5_aso_flow_mtrs_mng_init(priv->sh);
-                               if (err) {
-                                       err = -err;
-                                       goto error;
-                               }
+               }
+               if (priv->mtr_en) {
+                       err = mlx5_aso_flow_mtrs_mng_init(priv->sh);
+                       if (err) {
+                               err = -err;
+                               goto error;
                        }
                }
 #endif
@@ -1321,6 +1323,19 @@ err_secondary:
                        DRV_LOG(DEBUG, "Flow Hit ASO is supported.");
                }
 #endif /* HAVE_MLX5_DR_CREATE_ACTION_ASO */
+#if defined(HAVE_MLX5_DR_CREATE_ACTION_ASO) && \
+       defined(HAVE_MLX5_DR_ACTION_ASO_CT)
+               if (config->hca_attr.ct_offload &&
+                   priv->mtr_color_reg == REG_C_3) {
+                       err = mlx5_flow_aso_ct_mng_init(sh);
+                       if (err) {
+                               err = -err;
+                               goto error;
+                       }
+                       DRV_LOG(DEBUG, "CT ASO is supported.");
+                       sh->ct_aso_en = 1;
+               }
+#endif /* HAVE_MLX5_DR_CREATE_ACTION_ASO && HAVE_MLX5_DR_ACTION_ASO_CT */
 #if defined(HAVE_MLX5DV_DR) && defined(HAVE_MLX5_DR_CREATE_ACTION_FLOW_SAMPLE)
                if (config->hca_attr.log_max_ft_sampler_num > 0  &&
                    config->dv_flow_en) {