From: Paolo Abeni <pabeni@redhat.com>
To: sukhdeeps@marvell.com
Cc: netdev@vger.kernel.org, irusskikh@marvell.com,
epomozov@marvell.com, richardcochran@gmail.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/9] net: atlantic: move active_ipv4/ipv6 bitmap updates after HW write updates after HW write
Date: Tue, 12 May 2026 11:53:31 +0200 [thread overview]
Message-ID: <20260512095339.134878-1-pabeni@redhat.com> (raw)
In-Reply-To: <20260506135706.2834-3-sukhdeeps@marvell.com>
From: AI Reviewer <ai@example.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.
Full review at: https://netdev-ai.bots.linux.dev/sashiko/
---
net: atlantic: move active_ipv4/ipv6 bitmap updates after HW write updates after HW write
This change moves the active_ipv4/active_ipv6 bitmap updates out of
aq_set_data_fl3l4() and into aq_add_del_fl3l4() after the HW write, and
removes the bitmap manipulation from aq_nic_reserve_filter() and
aq_nic_release_filter().
> net: atlantic: move active_ipv4/ipv6 bitmap updates after HW write updates after HW write
The subject line repeats "updates after HW write" twice. Was this
intended, or should it read "net: atlantic: move active_ipv4/ipv6 bitmap
updates after HW write"?
A few other subjects in this series look like they have the same
copy-paste pattern (for example "masking and IPv6 handling masking and
IPv6 handling", "driver internals driver internals", "TX path setup TX
path setup", "(Antigua) (Antigua)") and may want the same cleanup.
> diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> index ef9447810071..3cec853e9fad 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> @@ -1522,8 +1522,6 @@ u8 aq_nic_reserve_filter(struct aq_nic_s *self, enum aq_rx_filter_type type)
> case aq_rx_filter_l3l4:
> fltr_cnt = AQ_RX_LAST_LOC_FL3L4 - AQ_RX_FIRST_LOC_FL3L4;
> n_bit = fltr_cnt - self->aq_hw_rx_fltrs.fl3l4.reserved_count;
> -
> - self->aq_hw_rx_fltrs.fl3l4.active_ipv4 |= BIT(n_bit);
> self->aq_hw_rx_fltrs.fl3l4.reserved_count++;
> location = n_bit;
> break;
Could dropping the active_ipv4 update here regress PTP's IPv4/IPv6
collision protection?
The PTP path calls aq_nic_reserve_filter(aq_rx_filter_l3l4) from
aq_ptp_init() to grab a single L3L4 slot, and then programs its IPv4 UDP
filter by calling hw_ops->hw_filter_l3l4_set() directly from
aq_ptp_hwtstamp_config_set() / aq_ptp_prepare_filters() — it never goes
through aq_add_del_fl3l4() where the new bitmap update now lives.
Before this change, aq_nic_reserve_filter() set:
self->aq_hw_rx_fltrs.fl3l4.active_ipv4 |= BIT(n_bit);
which caused aq_check_approve_fl3l4() to reject any later IPv6 L3L4 rule,
protecting PTP's reserved slot.
After this change, active_ipv4 stays zero while PTP is actively filtering
IPv4 in hardware. Can a user now add an IPv6 L3L4 rule at
AQ_RX_FIRST_LOC_FL3L4 + 4 (still within AQ_RX_LAST_LOC_FL3L4) and have
the IPv6 filter program HW slots 4..7, silently overwriting PTP's IPv4
filter at HW slot 7?
I looked through the rest of the series including the AQC113 PTP patches
(aq_ptp_dpath_enable / aq_ptp_add_a2_filter) and they also call
hw_filter_l3l4_set() directly rather than going through
aq_add_del_fl3l4(), so the reserved PTP slot does not get re-reflected
into active_ipv4 by a later patch.
> @@ -1543,7 +1541,6 @@ void aq_nic_release_filter(struct aq_nic_s *self, enum aq_rx_filter_type type,
> break;
> case aq_rx_filter_l3l4:
> self->aq_hw_rx_fltrs.fl3l4.reserved_count--;
> - self->aq_hw_rx_fltrs.fl3l4.active_ipv4 &= ~BIT(location);
> break;
Would it be worth keeping these updates (or adding equivalent ones on the
PTP reserve/release path) so that aq_check_approve_fl3l4() continues to
see PTP's reserved slot as active_ipv4?
--
This is an AI-generated review.
next prev parent reply other threads:[~2026-05-12 9:53 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 13:56 [PATCH net-next 0/9] net: atlantic: add PTP support for AQC113 (Antigua) sukhdeeps
2026-05-06 13:56 ` [PATCH net-next 1/9] net: atlantic: correct L3L4 filter flow_type masking and IPv6 handling masking and IPv6 handling sukhdeeps
2026-05-06 13:56 ` [PATCH net-next 2/9] net: atlantic: move active_ipv4/ipv6 bitmap updates after HW write updates after HW write sukhdeeps
2026-05-12 9:53 ` Paolo Abeni [this message]
2026-05-06 13:57 ` [PATCH net-next 3/9] net: atlantic: decouple aq_set_data_fl3l4() from driver internals driver internals sukhdeeps
2026-05-06 13:57 ` [PATCH net-next 4/9] net: atlantic: add AQC113 hardware register definitions and accessors definitions and accessors sukhdeeps
2026-05-06 13:57 ` [PATCH net-next 5/9] net: atlantic: add AQC113 filter data structures and firmware query and firmware query firmware query sukhdeeps
2026-05-12 9:53 ` Paolo Abeni
2026-05-06 13:57 ` [PATCH net-next 6/9] net: atlantic: implement AQC113 L2/L3/L4 RX filter management filter management management sukhdeeps
2026-05-06 22:43 ` Vadim Fedorenko
2026-05-08 6:56 ` [EXTERNAL] " Sukhdeep Soni [C]
2026-05-12 9:54 ` Paolo Abeni
2026-05-06 13:57 ` [PATCH net-next 7/9] net: atlantic: add AQC113 PTP traffic class and TX path setup TX path setup sukhdeeps
2026-05-12 9:54 ` Paolo Abeni
2026-05-06 13:57 ` [PATCH net-next 8/9] net: atlantic: extend hw_ops and TX descriptor for AQC113 PTP for AQC113 PTP sukhdeeps
2026-05-06 13:57 ` [PATCH net-next 9/9] net: atlantic: add PTP support for AQC113 (Antigua) (Antigua) sukhdeeps
2026-05-12 9:54 ` Paolo Abeni
2026-05-08 12:01 ` [PATCH net-next v2 0/9] net: atlantic: add PTP support for AQC113 (Antigua) sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 1/9] net: atlantic: correct L3L4 filter flow_type masking and IPv6 handling masking and IPv6 handling sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 2/9] net: atlantic: move active_ipv4/ipv6 bitmap updates after HW write updates after HW write sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 3/9] net: atlantic: decouple aq_set_data_fl3l4() from driver internals driver internals sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 4/9] net: atlantic: add AQC113 hardware register definitions and accessors definitions and accessors sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 5/9] net: atlantic: add AQC113 filter data structures and firmware query and firmware query firmware query sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 6/9] net: atlantic: implement AQC113 L2/L3/L4 RX filter management filter management management sukhdeeps
2026-05-12 10:00 ` Paolo Abeni
2026-05-12 10:04 ` Paolo Abeni
2026-05-08 12:01 ` [PATCH net-next v2 7/9] net: atlantic: add AQC113 PTP traffic class and TX path setup TX path setup sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 8/9] net: atlantic: extend hw_ops and TX descriptor for AQC113 PTP for AQC113 PTP sukhdeeps
2026-05-08 12:01 ` [PATCH net-next v2 9/9] net: atlantic: add PTP support for AQC113 (Antigua) (Antigua) sukhdeeps
2026-05-12 10:01 ` Paolo Abeni
2026-05-12 10:17 ` Paolo Abeni
2026-05-08 23:06 ` [PATCH net-next v2 0/9] net: atlantic: add PTP support for AQC113 (Antigua) Jakub Kicinski
2026-05-11 12:26 ` [EXTERNAL] " Sukhdeep Soni [C]
2026-05-11 23:50 ` Jakub Kicinski
2026-05-12 11:27 ` Simon Horman
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=20260512095339.134878-1-pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=epomozov@marvell.com \
--cc=irusskikh@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sukhdeeps@marvell.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