Netdev List
 help / color / mirror / Atom feed
From: "Nazle Asmade, Muhammad Nazim Amirul" <muhammad.nazim.amirul.nazle.asmade@altera.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"rmk+kernel@armlinux.org.uk" <rmk+kernel@armlinux.org.uk>,
	"maxime.chevallier@bootlin.com" <maxime.chevallier@bootlin.com>,
	"Jose.Abreu@synopsys.com" <Jose.Abreu@synopsys.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests
Date: Tue, 16 Jun 2026 04:29:02 +0000	[thread overview]
Message-ID: <97b3283b-6936-4be8-9b8d-c6644906446f@altera.com> (raw)
In-Reply-To: <20260609174318.3e34e62b@kernel.org>

On 10/6/2026 8:43 am, Jakub Kicinski wrote:
> On Fri,  5 Jun 2026 02:01:13 -0700
> muhammad.nazim.amirul.nazle.asmade@altera.com wrote:
>> +    /* Both network proto and transport proto not present in the key */
>> +    if (!match.mask || !(match.mask->n_proto || match.mask->ip_proto))
>> +            return -EOPNOTSUPP;
>> +
>> +    /* If the proto is present in the key and is not full mask */
>> +    if ((match.mask->n_proto && match.mask->n_proto != ETHER_TYPE_FULL_MASK) ||
>> +        (match.mask->ip_proto && match.mask->ip_proto != IP_PROTO_FULL_MASK))
>> +            return -EOPNOTSUPP;
>> +
>> +    /* Network proto is present in the key and is not IPv4 */
>> +    if (match.mask->n_proto && match.key->n_proto != cpu_to_be16(ETH_P_IP))
>> +            return -EOPNOTSUPP;
>> +
>> +    /* Transport proto is present in the key and is not TCP or UDP */
>> +    if (match.mask->ip_proto &&
>> +        match.key->ip_proto != IPPROTO_TCP &&
>> +        match.key->ip_proto != IPPROTO_UDP)
>> +            return -EOPNOTSUPP;
>
> Please add extack messages to let user know which part of the match is
> unsupported. Extack pointer is somewhere inside struct flow_cls_offload
>
> FWIW Sashiko points out a bunch of other potential issues, not sure if
> they matter
> https://sashiko.dev/#/patchset/20260605090114.16028-2-muhammad.nazim.amirul.nazle.asmade@altera.com
Hi Jakub,
Thank you for the review! After going through the Shashiko review, there
are some that valid and related. It was quite helpful! Here are the
changes in v3 of patch 2/3:
1. Added extack messages to all four -EOPNOTSUPP return paths in
    tc_add_basic_flow() so users know exactly which part of the match
    is unsupported.
2. Fixed a bug in v2: using break when -EOPNOTSUPP was returned
    silently discarded the error on FLOW_CLS_REPLACE - entry->in_use
    is already true on replace, so tc_add_flow() would fall through
    and return 0 (success) for an unsupported rule. Fixed by returning
    ret directly instead.
Patches 1/3 and 3/3 are unchanged.

Posted patch set with the updates above.

https://lore.kernel.org/all/20260616042655.7782-1-muhammad.nazim.amirul.nazle.asmade@altera.com/


BR,
Nazim

  reply	other threads:[~2026-06-16  4:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05  9:01 [PATCH v2 0/3] net: stmmac: L3/L4 filter bug fixes muhammad.nazim.amirul.nazle.asmade
2026-06-05  9:01 ` [PATCH v2 1/3] net: stmmac: xgmac: fix l4 filter port overwrite on register update muhammad.nazim.amirul.nazle.asmade
2026-06-05  9:01 ` [PATCH v2 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests muhammad.nazim.amirul.nazle.asmade
2026-06-10  0:43   ` Jakub Kicinski
2026-06-16  4:29     ` Nazle Asmade, Muhammad Nazim Amirul [this message]
2026-06-05  9:01 ` [PATCH v2 3/3] net: stmmac: reset residual action in L3L4 filters on delete muhammad.nazim.amirul.nazle.asmade
  -- strict thread matches above, loose matches on Subject: below --
2026-06-04  8:33 [PATCH 0/4] net: stmmac: L3/L4 filter fixes and improvements muhammad.nazim.amirul.nazle.asmade
2026-06-04  8:33 ` [PATCH v2 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests muhammad.nazim.amirul.nazle.asmade

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=97b3283b-6936-4be8-9b8d-c6644906446f@altera.com \
    --to=muhammad.nazim.amirul.nazle.asmade@altera.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rmk+kernel@armlinux.org.uk \
    /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