From: Paolo Abeni <pabeni@redhat.com>
To: "Tariq Toukan" <ttoukan.linux@gmail.com>,
"Asbjørn Sloth Tønnesen" <ast@fiberby.net>,
netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Jianbo Liu <jianbol@nvidia.com>
Subject: Re: [PATCH net-next v2] net/mlx5e: flower: check for unsupported control flags
Date: Thu, 02 May 2024 13:30:26 +0200 [thread overview]
Message-ID: <b3e2ea3cc3c3a4c8be831a837bc23d40e3395dfe.camel@redhat.com> (raw)
In-Reply-To: <25a4890f-8b6f-4fb3-970f-b022b7ad5be8@gmail.com>
On Tue, 2024-04-30 at 08:15 +0300, Tariq Toukan wrote:
>
> On 22/04/2024 18:27, Asbjørn Sloth Tønnesen wrote:
> > Use flow_rule_is_supp_control_flags() to reject filters
> > with unsupported control flags.
> >
> > In case any unsupported control flags are masked,
> > flow_rule_is_supp_control_flags() sets a NL extended
> > error message, and we return -EOPNOTSUPP.
> >
> > Remove FLOW_DIS_FIRST_FRAG specific error message,
> > and treat it as any other unsupported control flag.
> >
> > Only compile-tested.
> >
> > Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
> > ---
> >
> > Changelog:
> >
> > v2:
> > - remove existing FLOW_DIS_FIRST_FRAG "support" (requested by Jianbo)
> >
> > v1: https://lore.kernel.org/netdev/20240417135110.99900-1-ast@fiberby.net/
> >
> > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 ++++------
> > 1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > index aeb32cb27182..30673292e15f 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> > @@ -2801,12 +2801,6 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
> > flow_rule_match_control(rule, &match);
> > addr_type = match.key->addr_type;
> >
> > - /* the HW doesn't support frag first/later */
> > - if (match.mask->flags & FLOW_DIS_FIRST_FRAG) {
> > - NL_SET_ERR_MSG_MOD(extack, "Match on frag first/later is not supported");
> > - return -EOPNOTSUPP;
> > - }
> > -
> > if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) {
> > MLX5_SET(fte_match_set_lyr_2_4, headers_c, frag, 1);
> > MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag,
> > @@ -2819,6 +2813,10 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
> > else
> > *match_level = MLX5_MATCH_L3;
> > }
> > +
> > + if (!flow_rule_is_supp_control_flags(FLOW_DIS_IS_FRAGMENT,
> > + match.mask->flags, extack))
> > + return -EOPNOTSUPP;
> > }
> >
> > if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_BASIC)) {
>
> Acked-by: Tariq Toukan <tariqt@nvidia.com>
@Tariq/@Saeed: do you want to take this patch towards your tree and
send or do you prefer we merge it directly? I tend to read the above
ack as the 2nd option, but given this is only build tested I guess the
first would be better...
Thanks,
Paolo
next prev parent reply other threads:[~2024-05-02 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 15:27 [PATCH net-next v2] net/mlx5e: flower: check for unsupported control flags Asbjørn Sloth Tønnesen
2024-04-23 3:54 ` Jianbo Liu
2024-04-23 14:08 ` Simon Horman
2024-04-30 5:15 ` Tariq Toukan
2024-05-02 11:30 ` Paolo Abeni [this message]
2024-05-03 1:40 ` patchwork-bot+netdevbpf
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=b3e2ea3cc3c3a4c8be831a837bc23d40e3395dfe.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=ast@fiberby.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jianbol@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=ttoukan.linux@gmail.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