From: Nicolai Buchwitz <nb@tipi-net.de>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: "Andrew Lunn" <andrew+netdev@lunn.ch>,
"Jakub Kicinski" <kuba@kernel.org>,
davem@davemloft.net, "Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Russell King" <linux@armlinux.org.uk>,
thomas.petazzoni@bootlin.com,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac4: Use the full perfect filter ability for UC filter
Date: Mon, 31 Aug 2026 14:06:01 +0200 [thread overview]
Message-ID: <04156e434531ec68e8862e23bd84bc20@tipi-net.de> (raw)
In-Reply-To: <20260831070121.349778-3-maxime.chevallier@bootlin.com>
Hi Maxime
On 31.8.2026 09:01, Maxime Chevallier wrote:
> Contrary to dwmac1000 that gets its number of perfect filter entries
> through the 'snps,perfect-filter-entries' property, dwmac4 allows
> reading the filter size from the HW features registers.
>
> Perfect filter is used for Unicast filtering, and can contain up to 128
> entries, each having its own set of registers to access it.
>
> The registers are always at the same location in the map, regardless
> whether or not the entry is implemented in hardware. Accessing a
> register
> for an un-implemented entry just doesn't do anything.
>
> The filter is made of one always-available entry, and 3 configurable
> banks :
>
> Entry 0 : Always implemented, stores the primary MAC address
>
> Entry 1 \
> ... + -- Can contain between 0 and 31 entries. Number of
> available
> Entry 31 / entries in HW_Features0[18:22].
>
> Entry 32 \
> ... + -- Additional 32 entries, all or nothing. Availability is
> Entry 63 / specified by HW_Features0[23]
>
> Entry 64 \
> ... + - Additional 64 entries, all or nothing. Availability is
> Entry 127 / specified by HW_Features0[24].
>
> Each of the 3 configurable banks are independently selectable, meaning
> we can have gaps in the register banks.
>
> For instance, a setup with 50 addresses enabled will have 17 entries in
> the first bank and the additional 32 bank enabled (50 = 32 + 17 + 1).
>
> Another example with 70 addresses : 64 addr bank on, 5 addresses in the
> first bank (70 = 64 + 5 + 1).
>
> While I haven't seen HW with gaps in the banks, Synopsys confirmed this
> is a real possibility.
>
> Let's therefore introduce a dwmac4 helper to get the physical slot
> number of a given entry, allowing to configure the correct bank when
> populating the filter. As we need the HW feature-set to compute the
> index, store the bank info in the mac_device_info struct.
>
> The total number of available entries is computed based on the
> discovered parameters, instead of using the default value of 1.
>
> Results on HW that uses dwmac4 :
>
> - imx8mp : goes from 1 entry to 64 (1 + 31 + 32)
> - stm32mp1 : goes from 1 entry to 4 (1 + 3)
> - jh7110 : goes from 1 entry to 9 (1 + 8)
> - yt6801 : goes from 1 entry to hum, 1 entry (no extra addresses)
>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> [...]
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks,
Nicolai
next prev parent reply other threads:[~2026-08-31 12:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 7:01 [PATCH net-next 0/2] net: stmmac: dwmac4: Auto-discover UC filter size Maxime Chevallier
2026-08-31 7:01 ` [PATCH net-next 1/2] net: stmmac: dwmac4: Read the UC filter size from hardware capabilities Maxime Chevallier
2026-08-31 12:04 ` Nicolai Buchwitz
2026-08-31 12:15 ` Maxime Chevallier
2026-08-31 12:26 ` Nicolai Buchwitz
2026-09-01 0:26 ` Andrew Lunn
2026-09-01 7:04 ` Maxime Chevallier
2026-09-01 12:38 ` Andrew Lunn
2026-09-01 7:08 ` Maxime Chevallier
2026-08-31 7:01 ` [PATCH net-next 2/2] net: stmmac: dwmac4: Use the full perfect filter ability for UC filter Maxime Chevallier
2026-08-31 12:06 ` Nicolai Buchwitz [this message]
2026-09-01 0:12 ` Andrew Lunn
2026-09-01 6:37 ` Maxime Chevallier
2026-09-01 12:21 ` Andrew Lunn
2026-09-01 12:27 ` Maxime Chevallier
2026-09-01 12:50 ` Andrew Lunn
2026-09-03 9:00 ` [PATCH net-next 0/2] net: stmmac: dwmac4: Auto-discover UC filter size 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=04156e434531ec68e8862e23bd84bc20@tipi-net.de \
--to=nb@tipi-net.de \
--cc=alexandre.torgue@foss.st.com \
--cc=alexis.lothore@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.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