mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
net: sched: use newly added classid identity helpers
Instead of checking handle, which does not have the inner class information and drivers wrongly assume clsact->egress as ingress, use the newly introduced classid identification helpers. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7690f2a51d
commit
a2e8da9378
8 changed files with 30 additions and 9 deletions
|
@ -914,7 +914,14 @@ static void dsa_slave_del_cls_matchall(struct net_device *dev,
|
|||
static int dsa_slave_setup_tc_cls_matchall(struct net_device *dev,
|
||||
struct tc_cls_matchall_offload *cls)
|
||||
{
|
||||
bool ingress = TC_H_MAJ(cls->common.handle) == TC_H_MAJ(TC_H_INGRESS);
|
||||
bool ingress;
|
||||
|
||||
if (is_classid_clsact_ingress(cls->common.classid))
|
||||
ingress = true;
|
||||
else if (is_classid_clsact_egress(cls->common.classid))
|
||||
ingress = false;
|
||||
else
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (cls->common.chain_index)
|
||||
return -EOPNOTSUPP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue