net/sched: Enable tc skb ext allocation on chain miss only when needed
Currently tc skb extension is used to send miss info from tc to ovs datapath module, and driver to tc. For the tc to ovs miss it is currently always allocated even if it will not be used by ovs datapath (as it depends on a requested feature). Export the static key which is used by openvswitch module to guard this code path as well, so it will be skipped if ovs datapath doesn't need it. Enable this code path once ovs datapath needs it. Signed-off-by: Paul Blakey <paulb@nvidia.com> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ed8c8f605c
commit
35d39fecbc
@@ -34,6 +34,7 @@
|
||||
#include <net/mpls.h>
|
||||
#include <net/ndisc.h>
|
||||
#include <net/nsh.h>
|
||||
#include <net/pkt_cls.h>
|
||||
#include <net/netfilter/nf_conntrack_zones.h>
|
||||
|
||||
#include "conntrack.h"
|
||||
@@ -895,7 +896,7 @@ int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,
|
||||
key->mac_proto = res;
|
||||
|
||||
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
|
||||
if (static_branch_unlikely(&tc_recirc_sharing_support)) {
|
||||
if (tc_skb_ext_tc_enabled()) {
|
||||
tc_ext = skb_ext_find(skb, TC_SKB_EXT);
|
||||
key->recirc_id = tc_ext ? tc_ext->chain : 0;
|
||||
OVS_CB(skb)->mru = tc_ext ? tc_ext->mru : 0;
|
||||
|
||||
Reference in New Issue
Block a user