diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-08-16 03:24:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-18 14:13:23 -0700 |
commit | ef01adae0e43cfb2468d0ea07137cc63cf31495c (patch) | |
tree | 7b121a6c43a9abbb9502e8ed54c8f4d5fa0fbbe8 /include/net/pkt_cls.h | |
parent | 44ef3a03252844a8753479b0cea7f29e4a804bdc (diff) |
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>
Diffstat (limited to 'include/net/pkt_cls.h')
-rw-r--r-- | include/net/pkt_cls.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index e429809ca90d..98be18ef1ed3 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -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; } |