mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: propagate tc filter chain index down the ndo_setup_tc call
We need to push the chain index down to the drivers, so they have the information to which chain the rule belongs. For now, no driver supports multichain offload, so only chain 0 is supported. This is needed to prevent chain squashes during offload for now. Later this will be used to implement multichain offload. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
50dffe7fad
commit
a5fcf8a6c9
26 changed files with 88 additions and 53 deletions
|
@ -836,10 +836,13 @@ static void dsa_slave_del_cls_matchall(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int dsa_slave_setup_tc(struct net_device *dev, u32 handle,
|
||||
__be16 protocol, struct tc_to_netdev *tc)
|
||||
u32 chain_index, __be16 protocol,
|
||||
struct tc_to_netdev *tc)
|
||||
{
|
||||
bool ingress = TC_H_MAJ(handle) == TC_H_MAJ(TC_H_INGRESS);
|
||||
int ret = -EOPNOTSUPP;
|
||||
|
||||
if (chain_index)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
switch (tc->type) {
|
||||
case TC_SETUP_MATCHALL:
|
||||
|
@ -853,10 +856,8 @@ static int dsa_slave_setup_tc(struct net_device *dev, u32 handle,
|
|||
return 0;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void dsa_cpu_port_ethtool_init(struct ethtool_ops *ops)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue