net: sched: use major priority number as hardware priority
tc transparently maps the software priority number to hardware. Update it to pass the major priority which is what most drivers expect. Update drivers too so they do not need to lshift the priority field of the flow_cls_common_offload object. The stmmac driver is an exception, since this code assumes the tc software priority is fine, therefore, lshift it just to be conservative. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
44ef3a0325
commit
ef01adae0e
@@ -646,7 +646,7 @@ tc_cls_common_offload_init(struct flow_cls_common_offload *cls_common,
|
||||
{
|
||||
cls_common->chain_index = tp->chain->index;
|
||||
cls_common->protocol = tp->protocol;
|
||||
cls_common->prio = tp->prio;
|
||||
cls_common->prio = tp->prio >> 16;
|
||||
if (tc_skip_sw(flags) || flags & TCA_CLS_FLAGS_VERBOSE)
|
||||
cls_common->extack = extack;
|
||||
}
|
||||
|
Reference in New Issue
Block a user