From: Jakub Kicinski <kuba@kernel.org>
To: Paul Blakey <paulb@mellanox.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>,
Oz Shlomo <ozsh@mellanox.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Vlad Buslov <vladbu@mellanox.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Jiri Pirko <jiri@resnulli.us>, Roi Dayan <roid@mellanox.com>
Subject: Re: [PATCH net-next v2 01/13] net: sched: support skb chain ext in tc classification path
Date: Wed, 22 Jan 2020 07:29:16 -0800 [thread overview]
Message-ID: <20200122072916.23fc3416@cakuba> (raw)
In-Reply-To: <1579701178-24624-2-git-send-email-paulb@mellanox.com>
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?
> + }
> +#endif
> +
> + return tcf_classify(skb, tp, orig_tp, res, compat_mode);
> +}
> +EXPORT_SYMBOL(tcf_classify_ingress);
next prev parent reply other threads:[~2020-01-22 15:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 13:52 [PATCH net-next v2 00/13] Handle multi chain hardware misses Paul Blakey
2020-01-22 13:52 ` [PATCH net-next v2 01/13] net: sched: support skb chain ext in tc classification path Paul Blakey
2020-01-22 15:29 ` Jakub Kicinski [this message]
2020-01-23 7:06 ` Jiri Pirko
2020-01-24 8:46 ` Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 02/13] net/mlx5: Add new driver lib for mappings unique ids to data Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 03/13] net/mlx5: E-Switch, Move source port on reg_c0 to the upper 16 bits Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 04/13] net/mlx5: E-Switch, Get reg_c0 value on CQE Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 05/13] net/mlx5: E-Switch, Mark miss packets with new chain id mapping Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 06/13] net/mlx5e: Rx, Split rep rx mpwqe handler from nic Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 07/13] net/mlx5: E-Switch, Restore chain id on miss Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 08/13] net/mlx5e: Allow re-allocating mod header actions Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 09/13] net/mlx5e: Move tc tunnel parsing logic with the rest at tc_tun module Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 10/13] net/mlx5e: Disallow inserting vxlan/vlan egress rules without decap/pop Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 11/13] net/mlx5e: Support inner header rewrite with goto action Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 12/13] net/mlx5: E-Switch, Get reg_c1 value on miss Paul Blakey
2020-01-22 13:52 ` [PATCH net-next-mlx5 v2 13/13] net/mlx5e: Restore tunnel metadata " Paul Blakey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200122072916.23fc3416@cakuba \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=ozsh@mellanox.com \
--cc=paulb@mellanox.com \
--cc=roid@mellanox.com \
--cc=saeedm@mellanox.com \
--cc=vladbu@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).