diff options
Diffstat (limited to 'net/openvswitch/flow.c')
| -rw-r--r-- | net/openvswitch/flow.c | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 9d81d2c7bf82..38147e6a20f5 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c @@ -842,6 +842,9 @@ static int key_extract_mac_proto(struct sk_buff *skb)  int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,  			 struct sk_buff *skb, struct sw_flow_key *key)  { +#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT) +	struct tc_skb_ext *tc_ext; +#endif  	int res, err;  	/* Extract metadata from packet. */ @@ -874,7 +877,17 @@ int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,  	if (res < 0)  		return res;  	key->mac_proto = res; + +#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT) +	if (static_branch_unlikely(&tc_recirc_sharing_support)) { +		tc_ext = skb_ext_find(skb, TC_SKB_EXT); +		key->recirc_id = tc_ext ? tc_ext->chain : 0; +	} else { +		key->recirc_id = 0; +	} +#else  	key->recirc_id = 0; +#endif  	err = key_extract(skb, key);  	if (!err)  |