Commit 3e0e8266 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: sched: make egress_dev flag part of flower offload struct

Since this is specific to flower now, make it part of the flower offload
struct.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ade9b658
...@@ -661,7 +661,7 @@ static int mlx5e_rep_ndo_setup_tc(struct net_device *dev, ...@@ -661,7 +661,7 @@ static int mlx5e_rep_ndo_setup_tc(struct net_device *dev,
if (TC_H_MAJ(handle) != TC_H_MAJ(TC_H_INGRESS)) if (TC_H_MAJ(handle) != TC_H_MAJ(TC_H_INGRESS))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (tc->egress_dev) { if (type == TC_SETUP_CLSFLOWER && tc->cls_flower->egress_dev) {
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
struct net_device *uplink_dev = mlx5_eswitch_get_uplink_netdev(esw); struct net_device *uplink_dev = mlx5_eswitch_get_uplink_netdev(esw);
......
...@@ -792,7 +792,6 @@ struct tc_to_netdev { ...@@ -792,7 +792,6 @@ struct tc_to_netdev {
struct tc_cls_bpf_offload *cls_bpf; struct tc_cls_bpf_offload *cls_bpf;
struct tc_mqprio_qopt *mqprio; struct tc_mqprio_qopt *mqprio;
}; };
bool egress_dev;
}; };
/* These structures hold the attributes of xdp state that are being passed /* These structures hold the attributes of xdp state that are being passed
......
...@@ -504,6 +504,7 @@ struct tc_cls_flower_offload { ...@@ -504,6 +504,7 @@ struct tc_cls_flower_offload {
struct fl_flow_key *mask; struct fl_flow_key *mask;
struct fl_flow_key *key; struct fl_flow_key *key;
struct tcf_exts *exts; struct tcf_exts *exts;
bool egress_dev;
}; };
enum tc_matchall_command { enum tc_matchall_command {
......
...@@ -259,7 +259,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp, ...@@ -259,7 +259,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp,
return tc_skip_sw(f->flags) ? -EINVAL : 0; return tc_skip_sw(f->flags) ? -EINVAL : 0;
} }
dev = f->hw_dev; dev = f->hw_dev;
tc->egress_dev = true; offload.egress_dev = true;
} else { } else {
f->hw_dev = dev; f->hw_dev = dev;
} }
......
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