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

Commit 5fd9fc4e authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

net: sched: push cls related args into cls_common structure



As ndo_setup_tc is generic offload op for whole tc subsystem, does not
really make sense to have cls-specific args. So move them under
cls_common structurure which is embedded in all cls structs.

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 74897ef0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1919,7 +1919,6 @@ static void xgbe_poll_controller(struct net_device *netdev)
#endif /* End CONFIG_NET_POLL_CONTROLLER */

static int xgbe_setup_tc(struct net_device *netdev, enum tc_setup_type type,
			 u32 handle, u32 chain_index, __be16 proto,
			 struct tc_to_netdev *tc_to_netdev)
{
	struct xgbe_prv_data *pdata = netdev_priv(netdev);
+0 −1
Original line number Diff line number Diff line
@@ -4285,7 +4285,6 @@ int bnx2x_setup_tc(struct net_device *dev, u8 num_tc)
}

int __bnx2x_setup_tc(struct net_device *dev, enum tc_setup_type type,
		     u32 handle, u32 chain_index, __be16 proto,
		     struct tc_to_netdev *tc)
{
	if (type != TC_SETUP_MQPRIO)
+0 −1
Original line number Diff line number Diff line
@@ -487,7 +487,6 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev);
/* setup_tc callback */
int bnx2x_setup_tc(struct net_device *dev, u8 num_tc);
int __bnx2x_setup_tc(struct net_device *dev, enum tc_setup_type type,
		     u32 handle, u32 chain_index, __be16 proto,
		     struct tc_to_netdev *tc);

int bnx2x_get_vf_config(struct net_device *dev, int vf,
+0 −1
Original line number Diff line number Diff line
@@ -7238,7 +7238,6 @@ int bnxt_setup_mq_tc(struct net_device *dev, u8 tc)
}

static int bnxt_setup_tc(struct net_device *dev, enum tc_setup_type type,
			 u32 handle, u32 chain_index, __be16 proto,
			 struct tc_to_netdev *ntc)
{
	if (type != TC_SETUP_MQPRIO)
+5 −9
Original line number Diff line number Diff line
@@ -2890,27 +2890,24 @@ 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,
				 enum tc_setup_type type,
				 u32 handle, u32 chain_index, __be16 proto,
				 struct tc_cls_u32_offload *cls_u32)
{
	if (TC_H_MAJ(handle) != TC_H_MAJ(TC_H_INGRESS) ||
	    chain_index)
	if (TC_H_MAJ(cls_u32->common.handle) != TC_H_MAJ(TC_H_INGRESS) ||
	    cls_u32->common.chain_index)
		return -EOPNOTSUPP;

	switch (cls_u32->command) {
	case TC_CLSU32_NEW_KNODE:
	case TC_CLSU32_REPLACE_KNODE:
		return cxgb4_config_knode(dev, proto, cls_u32);
		return cxgb4_config_knode(dev, cls_u32);
	case TC_CLSU32_DELETE_KNODE:
		return cxgb4_delete_knode(dev, proto, cls_u32);
		return cxgb4_delete_knode(dev, cls_u32);
	default:
		return -EOPNOTSUPP;
	}
}

static int cxgb_setup_tc(struct net_device *dev, enum tc_setup_type type,
			 u32 handle, u32 chain_index, __be16 proto,
			 struct tc_to_netdev *tc)
{
	struct port_info *pi = netdev2pinfo(dev);
@@ -2925,8 +2922,7 @@ static int cxgb_setup_tc(struct net_device *dev, enum tc_setup_type type,

	switch (type) {
	case TC_SETUP_CLSU32:
		return cxgb_setup_tc_cls_u32(dev, type, handle, chain_index,
					     proto, tc->cls_u32);
		return cxgb_setup_tc_cls_u32(dev, tc->cls_u32);
	default:
		return -EOPNOTSUPP;
	}
Loading