[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ca08ea10-cf6a-e8ed-afda-54ac301660ad@mellanox.com>
Date: Fri, 24 Jan 2020 08:46:22 +0000
From: Paul Blakey <paulb@...lanox.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Saeed Mahameed <saeedm@...lanox.com>,
Oz Shlomo <ozsh@...lanox.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Vlad Buslov <vladbu@...lanox.com>,
David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jiri Pirko <jiri@...nulli.us>, Roi Dayan <roid@...lanox.com>
Subject: Re: [PATCH net-next v2 01/13] net: sched: support skb chain ext in tc
classification path
On 22/01/2020 17:29, Jakub Kicinski wrote:
> On Wed, 22 Jan 2020 15:52:46 +0200, Paul Blakey wrote:
>> +int tcf_classify_ingress(struct sk_buff *skb,
>> + const struct tcf_block *ingress_block,
>> + const struct tcf_proto *tp, struct tcf_result *res,
>> + bool compat_mode)
>> +{
>> + const struct tcf_proto *orig_tp = tp;
>> +
>> +#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
>> + {
>> + struct tc_skb_ext *ext = skb_ext_find(skb, TC_SKB_EXT);
>> +
>> + if (ext && ext->chain && ingress_block) {
>> + struct tcf_chain *fchain;
>> +
>> + fchain = tcf_chain_lookup_rcu(ingress_block,
>> + ext->chain);
>> + if (!fchain)
>> + return TC_ACT_UNSPEC;
>> +
>> + tp = rcu_dereference_bh(fchain->filter_chain);
>> + }
> Doesn't this skb ext have to be somehow "consumed" by the first lookup?
> What if the skb finds its way to an ingress of another device?
[Resending this reply again, as original reply was rejected]
Good point, This also applies to reclassify.
Simply consuming the skb extension will not handle the tc miss path to ovs.
I will post a v3 where the skb extension will be initialized with the last processed chain.
>
>> + }
>> +#endif
>> +
>> + return tcf_classify(skb, tp, orig_tp, res, compat_mode);
>> +}
>> +EXPORT_SYMBOL(tcf_classify_ingress);
Powered by blists - more mailing lists