Commit 93a07599 authored by Lama Kayal's avatar Lama Kayal Committed by Saeed Mahameed

net/mlx5e: Introduce flow steering debug macros

Introduce flow steering debug macros family, fs_*.
These macros bring clean finish to the decoupling of flow steering
process such that all flow steering flows can report warnings and
provide debug information via these exclusive macros.
Signed-off-by: default avatarLama Kayal <lkayal@nvidia.com>
Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 9c2c1c5e
...@@ -176,5 +176,18 @@ int mlx5e_fs_vlan_rx_kill_vid(struct mlx5e_flow_steering *fs, ...@@ -176,5 +176,18 @@ int mlx5e_fs_vlan_rx_kill_vid(struct mlx5e_flow_steering *fs,
struct net_device *netdev, struct net_device *netdev,
__be16 proto, u16 vid); __be16 proto, u16 vid);
void mlx5e_fs_init_l2_addr(struct mlx5e_flow_steering *fs, struct net_device *netdev); void mlx5e_fs_init_l2_addr(struct mlx5e_flow_steering *fs, struct net_device *netdev);
#define fs_err(fs, fmt, ...) \
mlx5_core_err(mlx5e_fs_get_mdev(fs), fmt, ##__VA_ARGS__)
#define fs_dbg(fs, fmt, ...) \
mlx5_core_dbg(mlx5e_fs_get_mdev(fs), fmt, ##__VA_ARGS__)
#define fs_warn(fs, fmt, ...) \
mlx5_core_warn(mlx5e_fs_get_mdev(fs), fmt, ##__VA_ARGS__)
#define fs_warn_once(fs, fmt, ...) \
mlx5_core_warn_once(mlx5e_fs_get_mdev(fs), fmt, ##__VA_ARGS__)
#endif /* __MLX5E_FLOW_STEER_H__ */ #endif /* __MLX5E_FLOW_STEER_H__ */
...@@ -105,8 +105,8 @@ mlx5e_fs_tt_redirect_udp_add_rule(struct mlx5e_flow_steering *fs, ...@@ -105,8 +105,8 @@ mlx5e_fs_tt_redirect_udp_add_rule(struct mlx5e_flow_steering *fs,
if (IS_ERR(rule)) { if (IS_ERR(rule)) {
err = PTR_ERR(rule); err = PTR_ERR(rule);
mlx5_core_err(mlx5e_fs_get_mdev(fs), "%s: add %s rule failed, err %d\n", fs_err(fs, "%s: add %s rule failed, err %d\n",
__func__, fs_udp_type2str(type), err); __func__, fs_udp_type2str(type), err);
} }
return rule; return rule;
} }
...@@ -127,9 +127,8 @@ static int fs_udp_add_default_rule(struct mlx5e_flow_steering *fs, enum fs_udp_t ...@@ -127,9 +127,8 @@ static int fs_udp_add_default_rule(struct mlx5e_flow_steering *fs, enum fs_udp_t
rule = mlx5_add_flow_rules(fs_udp_t->t, NULL, &flow_act, &dest, 1); rule = mlx5_add_flow_rules(fs_udp_t->t, NULL, &flow_act, &dest, 1);
if (IS_ERR(rule)) { if (IS_ERR(rule)) {
err = PTR_ERR(rule); err = PTR_ERR(rule);
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs, "%s: add default rule failed, fs type=%d, err %d\n",
"%s: add default rule failed, fs type=%d, err %d\n", __func__, type, err);
__func__, type, err);
return err; return err;
} }
...@@ -264,9 +263,8 @@ static int fs_udp_disable(struct mlx5e_flow_steering *fs) ...@@ -264,9 +263,8 @@ static int fs_udp_disable(struct mlx5e_flow_steering *fs)
/* Modify ttc rules destination to point back to the indir TIRs */ /* Modify ttc rules destination to point back to the indir TIRs */
err = mlx5_ttc_fwd_default_dest(ttc, fs_udp2tt(i)); err = mlx5_ttc_fwd_default_dest(ttc, fs_udp2tt(i));
if (err) { if (err) {
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs, "%s: modify ttc[%d] default destination failed, err(%d)\n",
"%s: modify ttc[%d] default destination failed, err(%d)\n", __func__, fs_udp2tt(i), err);
__func__, fs_udp2tt(i), err);
return err; return err;
} }
} }
...@@ -288,9 +286,8 @@ static int fs_udp_enable(struct mlx5e_flow_steering *fs) ...@@ -288,9 +286,8 @@ static int fs_udp_enable(struct mlx5e_flow_steering *fs)
/* Modify ttc rules destination to point on the accel_fs FTs */ /* Modify ttc rules destination to point on the accel_fs FTs */
err = mlx5_ttc_fwd_dest(ttc, fs_udp2tt(i), &dest); err = mlx5_ttc_fwd_dest(ttc, fs_udp2tt(i), &dest);
if (err) { if (err) {
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs, "%s: modify ttc[%d] destination to accel failed, err(%d)\n",
"%s: modify ttc[%d] destination to accel failed, err(%d)\n", __func__, fs_udp2tt(i), err);
__func__, fs_udp2tt(i), err);
return err; return err;
} }
} }
...@@ -389,8 +386,8 @@ mlx5e_fs_tt_redirect_any_add_rule(struct mlx5e_flow_steering *fs, ...@@ -389,8 +386,8 @@ mlx5e_fs_tt_redirect_any_add_rule(struct mlx5e_flow_steering *fs,
if (IS_ERR(rule)) { if (IS_ERR(rule)) {
err = PTR_ERR(rule); err = PTR_ERR(rule);
mlx5_core_err(mlx5e_fs_get_mdev(fs), "%s: add ANY rule failed, err %d\n", fs_err(fs, "%s: add ANY rule failed, err %d\n",
__func__, err); __func__, err);
} }
return rule; return rule;
} }
...@@ -410,9 +407,8 @@ static int fs_any_add_default_rule(struct mlx5e_flow_steering *fs) ...@@ -410,9 +407,8 @@ static int fs_any_add_default_rule(struct mlx5e_flow_steering *fs)
rule = mlx5_add_flow_rules(fs_any_t->t, NULL, &flow_act, &dest, 1); rule = mlx5_add_flow_rules(fs_any_t->t, NULL, &flow_act, &dest, 1);
if (IS_ERR(rule)) { if (IS_ERR(rule)) {
err = PTR_ERR(rule); err = PTR_ERR(rule);
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs, "%s: add default rule failed, fs type=ANY, err %d\n",
"%s: add default rule failed, fs type=ANY, err %d\n", __func__, err);
__func__, err);
return err; return err;
} }
...@@ -524,9 +520,9 @@ static int fs_any_disable(struct mlx5e_flow_steering *fs) ...@@ -524,9 +520,9 @@ static int fs_any_disable(struct mlx5e_flow_steering *fs)
/* Modify ttc rules destination to point back to the indir TIRs */ /* Modify ttc rules destination to point back to the indir TIRs */
err = mlx5_ttc_fwd_default_dest(ttc, MLX5_TT_ANY); err = mlx5_ttc_fwd_default_dest(ttc, MLX5_TT_ANY);
if (err) { if (err) {
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs,
"%s: modify ttc[%d] default destination failed, err(%d)\n", "%s: modify ttc[%d] default destination failed, err(%d)\n",
__func__, MLX5_TT_ANY, err); __func__, MLX5_TT_ANY, err);
return err; return err;
} }
return 0; return 0;
...@@ -545,9 +541,9 @@ static int fs_any_enable(struct mlx5e_flow_steering *fs) ...@@ -545,9 +541,9 @@ static int fs_any_enable(struct mlx5e_flow_steering *fs)
/* Modify ttc rules destination to point on the accel_fs FTs */ /* Modify ttc rules destination to point on the accel_fs FTs */
err = mlx5_ttc_fwd_dest(ttc, MLX5_TT_ANY, &dest); err = mlx5_ttc_fwd_dest(ttc, MLX5_TT_ANY, &dest);
if (err) { if (err) {
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs,
"%s: modify ttc[%d] destination to accel failed, err(%d)\n", "%s: modify ttc[%d] destination to accel failed, err(%d)\n",
__func__, MLX5_TT_ANY, err); __func__, MLX5_TT_ANY, err);
return err; return err;
} }
return 0; return 0;
......
...@@ -92,11 +92,11 @@ struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs, ...@@ -92,11 +92,11 @@ struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs,
case AF_INET: case AF_INET:
accel_fs_tcp_set_ipv4_flow(spec, sk); accel_fs_tcp_set_ipv4_flow(spec, sk);
ft = &fs_tcp->tables[ACCEL_FS_IPV4_TCP]; ft = &fs_tcp->tables[ACCEL_FS_IPV4_TCP];
mlx5_core_dbg(mlx5e_fs_get_mdev(fs), "%s flow is %pI4:%d -> %pI4:%d\n", __func__, fs_dbg(fs, "%s flow is %pI4:%d -> %pI4:%d\n", __func__,
&inet_sk(sk)->inet_rcv_saddr, &inet_sk(sk)->inet_rcv_saddr,
inet_sk(sk)->inet_sport, inet_sk(sk)->inet_sport,
&inet_sk(sk)->inet_daddr, &inet_sk(sk)->inet_daddr,
inet_sk(sk)->inet_dport); inet_sk(sk)->inet_dport);
break; break;
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
case AF_INET6: case AF_INET6:
...@@ -138,8 +138,7 @@ struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs, ...@@ -138,8 +138,7 @@ struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs,
flow = mlx5_add_flow_rules(ft->t, spec, &flow_act, &dest, 1); flow = mlx5_add_flow_rules(ft->t, spec, &flow_act, &dest, 1);
if (IS_ERR(flow)) if (IS_ERR(flow))
mlx5_core_err(mlx5e_fs_get_mdev(fs), "mlx5_add_flow_rules() failed, flow is %ld\n", fs_err(fs, "mlx5_add_flow_rules() failed, flow is %ld\n", PTR_ERR(flow));
PTR_ERR(flow));
out: out:
kvfree(spec); kvfree(spec);
...@@ -163,9 +162,8 @@ static int accel_fs_tcp_add_default_rule(struct mlx5e_flow_steering *fs, ...@@ -163,9 +162,8 @@ static int accel_fs_tcp_add_default_rule(struct mlx5e_flow_steering *fs,
rule = mlx5_add_flow_rules(accel_fs_t->t, NULL, &flow_act, &dest, 1); rule = mlx5_add_flow_rules(accel_fs_t->t, NULL, &flow_act, &dest, 1);
if (IS_ERR(rule)) { if (IS_ERR(rule)) {
err = PTR_ERR(rule); err = PTR_ERR(rule);
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs, "%s: add default rule failed, accel_fs type=%d, err %d\n",
"%s: add default rule failed, accel_fs type=%d, err %d\n", __func__, type, err);
__func__, type, err);
return err; return err;
} }
...@@ -284,8 +282,8 @@ static int accel_fs_tcp_create_table(struct mlx5e_flow_steering *fs, enum accel_ ...@@ -284,8 +282,8 @@ static int accel_fs_tcp_create_table(struct mlx5e_flow_steering *fs, enum accel_
return err; return err;
} }
mlx5_core_dbg(mlx5e_fs_get_mdev(fs), "Created fs accel table id %u level %u\n", fs_dbg(fs, "Created fs accel table id %u level %u\n",
ft->t->id, ft->t->level); ft->t->id, ft->t->level);
err = accel_fs_tcp_create_groups(ft, type); err = accel_fs_tcp_create_groups(ft, type);
if (err) if (err)
...@@ -310,9 +308,9 @@ static int accel_fs_tcp_disable(struct mlx5e_flow_steering *fs) ...@@ -310,9 +308,9 @@ static int accel_fs_tcp_disable(struct mlx5e_flow_steering *fs)
/* Modify ttc rules destination to point back to the indir TIRs */ /* Modify ttc rules destination to point back to the indir TIRs */
err = mlx5_ttc_fwd_default_dest(ttc, fs_accel2tt(i)); err = mlx5_ttc_fwd_default_dest(ttc, fs_accel2tt(i));
if (err) { if (err) {
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs,
"%s: modify ttc[%d] default destination failed, err(%d)\n", "%s: modify ttc[%d] default destination failed, err(%d)\n",
__func__, fs_accel2tt(i), err); __func__, fs_accel2tt(i), err);
return err; return err;
} }
} }
...@@ -334,9 +332,8 @@ static int accel_fs_tcp_enable(struct mlx5e_flow_steering *fs) ...@@ -334,9 +332,8 @@ static int accel_fs_tcp_enable(struct mlx5e_flow_steering *fs)
/* Modify ttc rules destination to point on the accel_fs FTs */ /* Modify ttc rules destination to point on the accel_fs FTs */
err = mlx5_ttc_fwd_dest(ttc, fs_accel2tt(i), &dest); err = mlx5_ttc_fwd_dest(ttc, fs_accel2tt(i), &dest);
if (err) { if (err) {
mlx5_core_err(mlx5e_fs_get_mdev(fs), fs_err(fs, "%s: modify ttc[%d] destination to accel failed, err(%d)\n",
"%s: modify ttc[%d] destination to accel failed, err(%d)\n", __func__, fs_accel2tt(i), err);
__func__, fs_accel2tt(i), err);
return err; return err;
} }
} }
......
...@@ -177,9 +177,8 @@ static int mlx5e_vport_context_update_vlans(struct mlx5e_flow_steering *fs) ...@@ -177,9 +177,8 @@ static int mlx5e_vport_context_update_vlans(struct mlx5e_flow_steering *fs)
max_list_size = 1 << MLX5_CAP_GEN(fs->mdev, log_max_vlan_list); max_list_size = 1 << MLX5_CAP_GEN(fs->mdev, log_max_vlan_list);
if (list_size > max_list_size) { if (list_size > max_list_size) {
mlx5_core_warn(fs->mdev, fs_warn(fs, "netdev vlans list size (%d) > (%d) max vport list size, some vlans will be dropped\n",
"netdev vlans list size (%d) > (%d) max vport list size, some vlans will be dropped\n", list_size, max_list_size);
list_size, max_list_size);
list_size = max_list_size; list_size = max_list_size;
} }
...@@ -196,8 +195,8 @@ static int mlx5e_vport_context_update_vlans(struct mlx5e_flow_steering *fs) ...@@ -196,8 +195,8 @@ static int mlx5e_vport_context_update_vlans(struct mlx5e_flow_steering *fs)
err = mlx5_modify_nic_vport_vlans(fs->mdev, vlans, list_size); err = mlx5_modify_nic_vport_vlans(fs->mdev, vlans, list_size);
if (err) if (err)
mlx5_core_err(fs->mdev, "Failed to modify vport vlans list err(%d)\n", fs_err(fs, "Failed to modify vport vlans list err(%d)\n",
err); err);
kvfree(vlans); kvfree(vlans);
return err; return err;
...@@ -278,7 +277,7 @@ static int __mlx5e_add_vlan_rule(struct mlx5e_flow_steering *fs, ...@@ -278,7 +277,7 @@ static int __mlx5e_add_vlan_rule(struct mlx5e_flow_steering *fs,
if (IS_ERR(*rule_p)) { if (IS_ERR(*rule_p)) {
err = PTR_ERR(*rule_p); err = PTR_ERR(*rule_p);
*rule_p = NULL; *rule_p = NULL;
mlx5_core_err(fs->mdev, "%s: add rule failed\n", __func__); fs_err(fs, "%s: add rule failed\n", __func__);
} }
return err; return err;
...@@ -390,8 +389,8 @@ int mlx5e_add_vlan_trap(struct mlx5e_priv *priv, int trap_id, int tir_num) ...@@ -390,8 +389,8 @@ int mlx5e_add_vlan_trap(struct mlx5e_priv *priv, int trap_id, int tir_num)
if (IS_ERR(rule)) { if (IS_ERR(rule)) {
err = PTR_ERR(rule); err = PTR_ERR(rule);
priv->fs->vlan->trap_rule = NULL; priv->fs->vlan->trap_rule = NULL;
mlx5_core_err(priv->fs->mdev, "%s: add VLAN trap rule failed, err %d\n", fs_err(priv->fs, "%s: add VLAN trap rule failed, err %d\n",
__func__, err); __func__, err);
return err; return err;
} }
priv->fs->vlan->trap_rule = rule; priv->fs->vlan->trap_rule = rule;
...@@ -416,8 +415,8 @@ int mlx5e_add_mac_trap(struct mlx5e_priv *priv, int trap_id, int tir_num) ...@@ -416,8 +415,8 @@ int mlx5e_add_mac_trap(struct mlx5e_priv *priv, int trap_id, int tir_num)
if (IS_ERR(rule)) { if (IS_ERR(rule)) {
err = PTR_ERR(rule); err = PTR_ERR(rule);
priv->fs->l2.trap_rule = NULL; priv->fs->l2.trap_rule = NULL;
mlx5_core_err(priv->fs->mdev, "%s: add MAC trap rule failed, err %d\n", fs_err(priv->fs, "%s: add MAC trap rule failed, err %d\n",
__func__, err); __func__, err);
return err; return err;
} }
priv->fs->l2.trap_rule = rule; priv->fs->l2.trap_rule = rule;
...@@ -491,7 +490,7 @@ int mlx5e_fs_vlan_rx_add_vid(struct mlx5e_flow_steering *fs, ...@@ -491,7 +490,7 @@ int mlx5e_fs_vlan_rx_add_vid(struct mlx5e_flow_steering *fs,
{ {
if (!fs->vlan) { if (!fs->vlan) {
mlx5_core_err(fs->mdev, "Vlan doesn't exist\n"); fs_err(fs, "Vlan doesn't exist\n");
return -EINVAL; return -EINVAL;
} }
...@@ -508,7 +507,7 @@ int mlx5e_fs_vlan_rx_kill_vid(struct mlx5e_flow_steering *fs, ...@@ -508,7 +507,7 @@ int mlx5e_fs_vlan_rx_kill_vid(struct mlx5e_flow_steering *fs,
__be16 proto, u16 vid) __be16 proto, u16 vid)
{ {
if (!fs->vlan) { if (!fs->vlan) {
mlx5_core_err(fs->mdev, "Vlan doesn't exist\n"); fs_err(fs, "Vlan doesn't exist\n");
return -EINVAL; return -EINVAL;
} }
...@@ -597,8 +596,9 @@ static void mlx5e_execute_l2_action(struct mlx5e_flow_steering *fs, ...@@ -597,8 +596,9 @@ static void mlx5e_execute_l2_action(struct mlx5e_flow_steering *fs,
} }
if (l2_err) if (l2_err)
mlx5_core_warn(fs->mdev, "MPFS, failed to %s mac %pM, err(%d)\n", fs_warn(fs, "MPFS, failed to %s mac %pM, err(%d)\n",
action == MLX5E_ACTION_ADD ? "add" : "del", mac_addr, l2_err); action == MLX5E_ACTION_ADD ? "add" : "del",
mac_addr, l2_err);
} }
static void mlx5e_sync_netdev_addr(struct mlx5e_flow_steering *fs, static void mlx5e_sync_netdev_addr(struct mlx5e_flow_steering *fs,
...@@ -669,9 +669,8 @@ static void mlx5e_vport_context_update_addr_list(struct mlx5e_flow_steering *fs, ...@@ -669,9 +669,8 @@ static void mlx5e_vport_context_update_addr_list(struct mlx5e_flow_steering *fs,
size++; size++;
if (size > max_size) { if (size > max_size) {
mlx5_core_warn(fs->mdev, fs_warn(fs, "mdev %s list size (%d) > (%d) max vport list size, some addresses will be dropped\n",
"mdev %s list size (%d) > (%d) max vport list size, some addresses will be dropped\n", is_uc ? "UC" : "MC", size, max_size);
is_uc ? "UC" : "MC", size, max_size);
size = max_size; size = max_size;
} }
...@@ -687,9 +686,8 @@ static void mlx5e_vport_context_update_addr_list(struct mlx5e_flow_steering *fs, ...@@ -687,9 +686,8 @@ static void mlx5e_vport_context_update_addr_list(struct mlx5e_flow_steering *fs,
err = mlx5_modify_nic_vport_mac_list(fs->mdev, list_type, addr_array, size); err = mlx5_modify_nic_vport_mac_list(fs->mdev, list_type, addr_array, size);
out: out:
if (err) if (err)
mlx5_core_err(fs->mdev, fs_err(fs, "Failed to modify vport %s list err(%d)\n",
"Failed to modify vport %s list err(%d)\n", is_uc ? "UC" : "MC", err);
is_uc ? "UC" : "MC", err);
kfree(addr_array); kfree(addr_array);
} }
...@@ -759,7 +757,7 @@ static int mlx5e_add_promisc_rule(struct mlx5e_flow_steering *fs) ...@@ -759,7 +757,7 @@ static int mlx5e_add_promisc_rule(struct mlx5e_flow_steering *fs)
if (IS_ERR(*rule_p)) { if (IS_ERR(*rule_p)) {
err = PTR_ERR(*rule_p); err = PTR_ERR(*rule_p);
*rule_p = NULL; *rule_p = NULL;
mlx5_core_err(fs->mdev, "%s: add promiscuous rule failed\n", __func__); fs_err(fs, "%s: add promiscuous rule failed\n", __func__);
} }
kvfree(spec); kvfree(spec);
return err; return err;
...@@ -779,7 +777,7 @@ static int mlx5e_create_promisc_table(struct mlx5e_flow_steering *fs) ...@@ -779,7 +777,7 @@ static int mlx5e_create_promisc_table(struct mlx5e_flow_steering *fs)
ft->t = mlx5_create_auto_grouped_flow_table(fs->ns, &ft_attr); ft->t = mlx5_create_auto_grouped_flow_table(fs->ns, &ft_attr);
if (IS_ERR(ft->t)) { if (IS_ERR(ft->t)) {
err = PTR_ERR(ft->t); err = PTR_ERR(ft->t);
mlx5_core_err(fs->mdev, "fail to create promisc table err=%d\n", err); fs_err(fs, "fail to create promisc table err=%d\n", err);
return err; return err;
} }
...@@ -836,8 +834,8 @@ void mlx5e_fs_set_rx_mode_work(struct mlx5e_flow_steering *fs, ...@@ -836,8 +834,8 @@ void mlx5e_fs_set_rx_mode_work(struct mlx5e_flow_steering *fs,
if (err) if (err)
enable_promisc = false; enable_promisc = false;
if (!fs->vlan_strip_disable && !err) if (!fs->vlan_strip_disable && !err)
mlx5_core_warn_once(fs->mdev, fs_warn_once(fs,
"S-tagged traffic will be dropped while C-tag vlan stripping is enabled\n"); "S-tagged traffic will be dropped while C-tag vlan stripping is enabled\n");
} }
if (enable_allmulti) if (enable_allmulti)
mlx5e_add_l2_flow_rule(fs, &ea->allmulti, MLX5E_ALLMULTI); mlx5e_add_l2_flow_rule(fs, &ea->allmulti, MLX5E_ALLMULTI);
...@@ -988,8 +986,7 @@ static int mlx5e_add_l2_flow_rule(struct mlx5e_flow_steering *fs, ...@@ -988,8 +986,7 @@ static int mlx5e_add_l2_flow_rule(struct mlx5e_flow_steering *fs,
ai->rule = mlx5_add_flow_rules(ft, spec, &flow_act, &dest, 1); ai->rule = mlx5_add_flow_rules(ft, spec, &flow_act, &dest, 1);
if (IS_ERR(ai->rule)) { if (IS_ERR(ai->rule)) {
mlx5_core_err(fs->mdev, "%s: add l2 rule(mac:%pM) failed\n", fs_err(fs, "%s: add l2 rule(mac:%pM) failed\n", __func__, mv_dmac);
__func__, mv_dmac);
err = PTR_ERR(ai->rule); err = PTR_ERR(ai->rule);
ai->rule = NULL; ai->rule = NULL;
} }
...@@ -1298,6 +1295,8 @@ int mlx5e_create_flow_steering(struct mlx5e_priv *priv) ...@@ -1298,6 +1295,8 @@ int mlx5e_create_flow_steering(struct mlx5e_priv *priv)
{ {
struct mlx5_flow_namespace *ns = mlx5_get_flow_namespace(priv->fs->mdev, struct mlx5_flow_namespace *ns = mlx5_get_flow_namespace(priv->fs->mdev,
MLX5_FLOW_NAMESPACE_KERNEL); MLX5_FLOW_NAMESPACE_KERNEL);
struct mlx5e_flow_steering *fs = priv->fs;
int err; int err;
if (!ns) if (!ns)
...@@ -1306,36 +1305,31 @@ int mlx5e_create_flow_steering(struct mlx5e_priv *priv) ...@@ -1306,36 +1305,31 @@ int mlx5e_create_flow_steering(struct mlx5e_priv *priv)
mlx5e_fs_set_ns(priv->fs, ns, false); mlx5e_fs_set_ns(priv->fs, ns, false);
err = mlx5e_arfs_create_tables(priv); err = mlx5e_arfs_create_tables(priv);
if (err) { if (err) {
mlx5_core_err(priv->fs->mdev, "Failed to create arfs tables, err=%d\n", fs_err(fs, "Failed to create arfs tables, err=%d\n", err);
err);
priv->netdev->hw_features &= ~NETIF_F_NTUPLE; priv->netdev->hw_features &= ~NETIF_F_NTUPLE;
} }
err = mlx5e_create_inner_ttc_table(priv); err = mlx5e_create_inner_ttc_table(priv);
if (err) { if (err) {
mlx5_core_err(priv->fs->mdev, fs_err(fs, "Failed to create inner ttc table, err=%d\n", err);
"Failed to create inner ttc table, err=%d\n", err);
goto err_destroy_arfs_tables; goto err_destroy_arfs_tables;
} }
err = mlx5e_create_ttc_table(priv); err = mlx5e_create_ttc_table(priv);
if (err) { if (err) {
mlx5_core_err(priv->fs->mdev, "Failed to create ttc table, err=%d\n", fs_err(fs, "Failed to create ttc table, err=%d\n", err);
err);
goto err_destroy_inner_ttc_table; goto err_destroy_inner_ttc_table;
} }
err = mlx5e_create_l2_table(priv); err = mlx5e_create_l2_table(priv);
if (err) { if (err) {
mlx5_core_err(priv->fs->mdev, "Failed to create l2 table, err=%d\n", fs_err(fs, "Failed to create l2 table, err=%d\n", err);
err);
goto err_destroy_ttc_table; goto err_destroy_ttc_table;
} }
err = mlx5e_fs_create_vlan_table(priv->fs); err = mlx5e_fs_create_vlan_table(priv->fs);
if (err) { if (err) {
mlx5_core_err(priv->fs->mdev, "Failed to create vlan table, err=%d\n", fs_err(fs, "Failed to create vlan table, err=%d\n", err);
err);
goto err_destroy_l2_table; goto err_destroy_l2_table;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment