From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: muhammad.nazim.amirul.nazle.asmade@altera.com, netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, rmk+kernel@armlinux.org.uk,
Jose.Abreu@synopsys.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests
Date: Tue, 14 Jul 2026 11:09:36 +0200 [thread overview]
Message-ID: <222c0e2e-93b2-4209-b20e-0895090cf655@bootlin.com> (raw)
In-Reply-To: <20260714023716.29865-4-muhammad.nazim.amirul.nazle.asmade@altera.com>
Hi,
On 7/14/26 04:37, muhammad.nazim.amirul.nazle.asmade@altera.com wrote:
> From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
>
> The basic flow parser in tc_add_basic_flow() does not validate match
> keys before proceeding. Unsupported offload configurations such as
> partial protocol masks, non-IPv4 network proto, or non-TCP/UDP transport
> proto are silently accepted instead of returning -EOPNOTSUPP.
>
> Add validation to return -EOPNOTSUPP early for:
> - No network or transport proto present in the key
> - Partial protocol mask (only full mask supported)
> - Network proto is not IPv4
> - Transport proto is not TCP or UDP
>
> Each rejection includes an extack message so the user knows which part
> of the match is unsupported.
>
> Also propagate -EOPNOTSUPP from tc_add_basic_flow() in tc_add_flow()
> by returning it directly rather than using break. The break was silently
> discarding the error for FLOW_CLS_REPLACE operations where entry->in_use
> is already true, causing tc_add_flow() to return 0 (success) for
> unsupported replace requests.
>
> Fixes: 425eabddaf0f ("net: stmmac: Implement L3/L4 Filters using TC Flower")
> Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
> Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
next prev parent reply other threads:[~2026-07-14 9:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260714074756eucas1p1f342d5332d22cb1f10c364de4c311fa6@eucas1p1.samsung.com>
2026-07-14 2:37 ` [PATCH net v3 0/3] net: stmmac: L3/L4 filter bug fixes muhammad.nazim.amirul.nazle.asmade
2026-07-14 2:37 ` muhammad.nazim.amirul.nazle.asmade
2026-07-14 2:37 ` [PATCH net v3 1/3] net: stmmac: xgmac: fix l4 filter port overwrite on register update muhammad.nazim.amirul.nazle.asmade
2026-07-14 9:04 ` Maxime Chevallier
2026-07-14 2:37 ` [PATCH net v3 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests muhammad.nazim.amirul.nazle.asmade
2026-07-14 9:09 ` Maxime Chevallier [this message]
2026-07-14 2:37 ` [PATCH net v3 3/3] net: stmmac: reset residual action in L3L4 filters on delete muhammad.nazim.amirul.nazle.asmade
2026-07-14 9:10 ` Maxime Chevallier
2026-07-14 7:47 ` [PATCH net v3 0/3] net: stmmac: L3/L4 filter bug fixes Jakub Raczynski
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=222c0e2e-93b2-4209-b20e-0895090cf655@bootlin.com \
--to=maxime.chevallier@bootlin.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=muhammad.nazim.amirul.nazle.asmade@altera.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