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

Commit 064f3902 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'sched-couple-of-ndo_setup_tc-fixes-and-adjustments'



Jiri Pirko says:

====================
net: sched: couple of ndo_setup_tc fixes and adjustments

This patchset includes couple of patches that fix or adjust default
cases and return values in ndo_setup_tc implementations in drivers.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 0ef8b456 246ab6f0
Loading
Loading
Loading
Loading
+5 −11
Original line number Original line Diff line number Diff line
@@ -1544,22 +1544,16 @@ void bnxt_tc_flow_stats_work(struct bnxt *bp)
int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
			 struct tc_cls_flower_offload *cls_flower)
			 struct tc_cls_flower_offload *cls_flower)
{
{
	int rc = 0;

	switch (cls_flower->command) {
	switch (cls_flower->command) {
	case TC_CLSFLOWER_REPLACE:
	case TC_CLSFLOWER_REPLACE:
		rc = bnxt_tc_add_flow(bp, src_fid, cls_flower);
		return bnxt_tc_add_flow(bp, src_fid, cls_flower);
		break;

	case TC_CLSFLOWER_DESTROY:
	case TC_CLSFLOWER_DESTROY:
		rc = bnxt_tc_del_flow(bp, cls_flower);
		return bnxt_tc_del_flow(bp, cls_flower);
		break;

	case TC_CLSFLOWER_STATS:
	case TC_CLSFLOWER_STATS:
		rc = bnxt_tc_get_flow_stats(bp, cls_flower);
		return bnxt_tc_get_flow_stats(bp, cls_flower);
		break;
	default:
		return -EOPNOTSUPP;
	}
	}
	return rc;
}
}


static const struct rhashtable_params bnxt_tc_flow_ht_params = {
static const struct rhashtable_params bnxt_tc_flow_ht_params = {
+1 −1
Original line number Original line Diff line number Diff line
@@ -7522,7 +7522,7 @@ static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np,
	case TC_CLSFLOWER_STATS:
	case TC_CLSFLOWER_STATS:
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;
	default:
	default:
		return -EINVAL;
		return -EOPNOTSUPP;
	}
	}
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -2884,7 +2884,7 @@ static int i40evf_setup_tc_cls_flower(struct i40evf_adapter *adapter,
	case TC_CLSFLOWER_STATS:
	case TC_CLSFLOWER_STATS:
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;
	default:
	default:
		return -EINVAL;
		return -EOPNOTSUPP;
	}
	}
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -2698,7 +2698,7 @@ static int igb_setup_tc_cls_flower(struct igb_adapter *adapter,
	case TC_CLSFLOWER_STATS:
	case TC_CLSFLOWER_STATS:
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;
	default:
	default:
		return -EINVAL;
		return -EOPNOTSUPP;
	}
	}
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -576,10 +576,10 @@ nfp_flower_repr_offload(struct nfp_app *app, struct net_device *netdev,
		return nfp_flower_del_offload(app, netdev, flower, egress);
		return nfp_flower_del_offload(app, netdev, flower, egress);
	case TC_CLSFLOWER_STATS:
	case TC_CLSFLOWER_STATS:
		return nfp_flower_get_stats(app, netdev, flower, egress);
		return nfp_flower_get_stats(app, netdev, flower, egress);
	}
	default:

		return -EOPNOTSUPP;
		return -EOPNOTSUPP;
	}
	}
}


int nfp_flower_setup_tc_egress_cb(enum tc_setup_type type, void *type_data,
int nfp_flower_setup_tc_egress_cb(enum tc_setup_type type, void *type_data,
				  void *cb_priv)
				  void *cb_priv)