From: Jakub Kicinski <kuba@kernel.org>
To: sukhdeeps@marvell.com
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
linux-kernel@vger.kernel.org, horms@kernel.org,
vadim.fedorenko@linux.dev
Subject: Re: [PATCH net-next v4 6/12] net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address
Date: Thu, 4 Jun 2026 19:38:31 -0700 [thread overview]
Message-ID: <20260605023831.3629095-1-kuba@kernel.org> (raw)
In-Reply-To: <20260602135452.516-7-sukhdeeps@marvell.com>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
---
net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address
This patch updates hw_atl2 init to use firmware-reported ART and L2
filter base indices for AQC113, adds hw_atl2_hw_mac_addr_set() that
programs the MAC into the firmware-assigned L2 filter slot, and wires
.hw_get_regs into hw_atl2_ops.
> diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
> index 0ce9caae8799..27a62fffbc29 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
[ ... ]
> @@ -484,6 +508,7 @@ static int hw_atl2_act_rslvr_table_set(struct aq_hw_s *self, u8 location,
> static int hw_atl2_hw_init_rx_path(struct aq_hw_s *self)
> {
> struct aq_nic_cfg_s *cfg = self->aq_nic_cfg;
> + struct hw_atl2_priv *priv = self->priv;
> int i;
>
> /* Rx TC/RSS number config */
> @@ -499,7 +524,9 @@ static int hw_atl2_hw_init_rx_path(struct aq_hw_s *self)
>
> /* Multicast filters */
> for (i = HW_ATL2_MAC_MAX; i--;) {
> - hw_atl_rpfl2_uc_flr_en_set(self, (i == 0U) ? 1U : 0U, i);
> + hw_atl_rpfl2_uc_flr_en_set(self,
> + (i == priv->l2_filters_base_index) ?
> + 1U : 0U, i);
> hw_atl_rpfl2unicast_flr_act_set(self, 1U, i);
> }
[High]
Can the multicast list handler now collide with the UC MAC slot?
After this patch, the host MAC is programmed at slot
priv->l2_filters_base_index (firmware-supplied, clamped by the new check
in hw_atl2_utils_get_filter_caps() to the range [0, HW_ATL2_MAC_MAX-1]
i.e. [0, 37]). However, hw_atl2_hw_multicast_list_set() still iterates
multicast entries into slots HW_ATL2_MAC_MIN + i (i.e. starting at slot
1):
for (cfg->mc_list_count = 0U;
cfg->mc_list_count < count;
++cfg->mc_list_count) {
u32 i = cfg->mc_list_count;
...
hw_atl_rpfl2_uc_flr_en_set(self, 0U, HW_ATL2_MAC_MIN + i);
hw_atl_rpfl2unicast_dest_addresslsw_set(self, l,
HW_ATL2_MAC_MIN + i);
hw_atl_rpfl2unicast_dest_addressmsw_set(self, h,
HW_ATL2_MAC_MIN + i);
hw_atl2_rpfl2_uc_flr_tag_set(self, 1, HW_ATL2_MAC_MIN + i);
hw_atl_rpfl2_uc_flr_en_set(self, (cfg->is_mc_list_enabled),
HW_ATL2_MAC_MIN + i);
}
If the firmware reports any value N in [1, 37] for
l2_filters_base_index (which is the case the patch is intended to
support, since for N=0 the change vs. the old hardcoded HW_ATL2_MAC_UC=0
is a no-op) and the multicast list contains at least N entries, the
iteration with i = N - 1 writes to slot HW_ATL2_MAC_MIN + (N - 1) = N,
which is the UC MAC filter slot.
Wouldn't routine ndo_set_rx_mode invocations (for example IGMP/MLD
group joins or link state changes) then silently overwrite the host
MAC's UC filter with a multicast address, causing the NIC to stop
accepting unicast frames for the host?
Should hw_atl2_hw_multicast_list_set() also be updated to skip or
offset around priv->l2_filters_base_index, in the same way
hw_atl2_hw_init_rx_path() and hw_atl2_hw_mac_addr_set() were?
next prev parent reply other threads:[~2026-06-05 2:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 13:54 [PATCH net-next v4 0/12] net: atlantic: add PTP support for AQC113 (Antigua) sukhdeeps
2026-06-02 13:54 ` [PATCH net-next v4 1/12] net: atlantic: correct L3L4 filter flow_type masking and IPv6 handling sukhdeeps
2026-06-02 13:54 ` [PATCH net-next v4 2/12] net: atlantic: move active_ipv4/ipv6 bitmap updates after HW write sukhdeeps
2026-06-02 13:54 ` [PATCH net-next v4 3/12] net: atlantic: decouple aq_set_data_fl3l4() from driver internals sukhdeeps
2026-06-02 13:54 ` [PATCH net-next v4 4/12] net: atlantic: add AQC113 hardware register definitions and accessors sukhdeeps
2026-06-02 13:54 ` [PATCH net-next v4 5/12] net: atlantic: add AQC113 filter data structures and firmware query sukhdeeps
2026-06-05 2:38 ` Jakub Kicinski
2026-06-02 13:54 ` [PATCH net-next v4 6/12] net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address sukhdeeps
2026-06-05 2:38 ` Jakub Kicinski [this message]
2026-06-02 13:54 ` [PATCH net-next v4 7/12] net: atlantic: implement AQC113 L2/L3/L4 RX filter ops sukhdeeps
2026-06-05 2:38 ` Jakub Kicinski
2026-06-02 13:54 ` [PATCH net-next v4 8/12] net: atlantic: add AQC113 PTP traffic class and TX path setup sukhdeeps
2026-06-02 13:54 ` [PATCH net-next v4 9/12] net: atlantic: extend hw_ops and TX descriptor for AQC113 PTP sukhdeeps
2026-06-02 13:54 ` [PATCH net-next v4 10/12] net: atlantic: add AQC113 PTP hardware ops in hw_atl2 sukhdeeps
2026-06-05 2:38 ` Jakub Kicinski
2026-06-02 13:54 ` [PATCH net-next v4 11/12] net: atlantic: add AQC113 TX timestamp polling and PTP TX classification sukhdeeps
2026-06-05 2:38 ` Jakub Kicinski
2026-06-02 13:54 ` [PATCH net-next v4 12/12] net: atlantic: add AQC113 PTP support in aq_ptp and driver core sukhdeeps
2026-06-05 2:38 ` Jakub Kicinski
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=20260605023831.3629095-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sukhdeeps@marvell.com \
--cc=vadim.fedorenko@linux.dev \
/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