Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f3b39da authored by Chris Mi's avatar Chris Mi Committed by David S. Miller
Browse files

net/sched: Fix the logic error to decide the ingress qdisc



The offending commit used a newly added helper function.
But the logic is wrong. Without this fix, the affected NICs
can't do HW offload. Error -EOPNOTSUPP will be returned directly.

Fixes: a2e8da93 ("net/sched: use newly added classid identity helpers")
Signed-off-by: default avatarChris Mi <chrism@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ed272b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2892,7 +2892,7 @@ static int cxgb_set_tx_maxrate(struct net_device *dev, int index, u32 rate)
static int cxgb_setup_tc_cls_u32(struct net_device *dev,
				 struct tc_cls_u32_offload *cls_u32)
{
	if (is_classid_clsact_ingress(cls_u32->common.classid) ||
	if (!is_classid_clsact_ingress(cls_u32->common.classid) ||
	    cls_u32->common.chain_index)
		return -EOPNOTSUPP;

+1 −1
Original line number Diff line number Diff line
@@ -9230,7 +9230,7 @@ static int ixgbe_setup_tc_cls_u32(struct net_device *dev,
{
	struct ixgbe_adapter *adapter = netdev_priv(dev);

	if (is_classid_clsact_ingress(cls_u32->common.classid) ||
	if (!is_classid_clsact_ingress(cls_u32->common.classid) ||
	    cls_u32->common.chain_index)
		return -EOPNOTSUPP;

+1 −1
Original line number Diff line number Diff line
@@ -3031,7 +3031,7 @@ static int mlx5e_setup_tc_cls_flower(struct net_device *dev,
{
	struct mlx5e_priv *priv = netdev_priv(dev);

	if (is_classid_clsact_ingress(cls_flower->common.classid) ||
	if (!is_classid_clsact_ingress(cls_flower->common.classid) ||
	    cls_flower->common.chain_index)
		return -EOPNOTSUPP;

+1 −1
Original line number Diff line number Diff line
@@ -657,7 +657,7 @@ mlx5e_rep_setup_tc_cls_flower(struct net_device *dev,
{
	struct mlx5e_priv *priv = netdev_priv(dev);

	if (is_classid_clsact_ingress(cls_flower->common.classid) ||
	if (!is_classid_clsact_ingress(cls_flower->common.classid) ||
	    cls_flower->common.chain_index)
		return -EOPNOTSUPP;

+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static int nfp_bpf_setup_tc(struct nfp_app *app, struct net_device *netdev,
	struct nfp_net *nn = netdev_priv(netdev);

	if (type != TC_SETUP_CLSBPF || !nfp_net_ebpf_capable(nn) ||
	    is_classid_clsact_ingress(cls_bpf->common.classid) ||
	    !is_classid_clsact_ingress(cls_bpf->common.classid) ||
	    cls_bpf->common.protocol != htons(ETH_P_ALL) ||
	    cls_bpf->common.chain_index)
		return -EOPNOTSUPP;
Loading