From: Federico Musto <federico@rimpianto.com>
To: netdev-bot+sashiko@kernel.org
Cc: Federico Musto <federico@rimpianto.com>,
Chris Snook <chris.snook@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH net v5 2/2] net: atl1c: free the RX buffer when the descriptor reports an error
Date: Mon, 30 Nov 2026 21:07:18 +0100 [thread overview]
Message-ID: <20261130200718.34828-1-federico@rimpianto.com> (raw)
In-Reply-To: <179595291831.3146.7906490727635927112@kernel.org>
Thank you for the review.
[Medium] A legitimate multi-RFD frame becomes a controller reset.
The arithmetic is correct. For an MTU of 1501 to 1522
atl1c_set_rxbufsize() leaves rx_buffer_len at AT_RX_BUF_SIZE (1522),
while atl1c_configure_mac() programs REG_MTU with mtu + 22, that is
1523 to 1544. A frame the MAC accepts can then be larger than one RFD.
I have not confirmed whether the device splits such a frame over two
RFDs or truncates it into one: the card I test on has only been run at
MTU 1500 and 1600.
Either way the reset should not depend on that. In v6:
- an RRD whose RFD count is 2 to 15 and whose index matches
rfd_ring->next_to_clean is dropped: every RFD of the frame is
unmapped, freed and recycled, each slot being checked for a buffer
first, and RX carries on;
- the reset is kept for a real loss of sync only: a count of 0, an
index that differs from next_to_clean, or a slot with no buffer.
Sizing rx_buffer_len from the same expression as REG_MTU looks right as
well, but it changes the buffer size for those MTUs and is a separate
patch.
Before posting v6 I will run the card at MTU 1508 with frames of about
1530 bytes and report what the device does with them.
The reply to the review of patch 1 carries the pw-bot line and a
question to the maintainers about the direction for v6:
https://lore.kernel.org/netdev/20261130200709.34802-1-federico@rimpianto.com/
prev parent reply other threads:[~2026-11-30 20:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 11:31 [PATCH net v5 0/2] net: atl1c: fix the RX buffer leak on errored frames Federico Musto
2026-11-25 11:31 ` [PATCH net v5 1/2] net: atl1c: wait for in-flight RX polls before the link-down ring reset Federico Musto
2026-11-29 11:48 ` netdev-bot+sashiko
2026-11-30 20:07 ` Federico Musto
2026-11-25 11:31 ` [PATCH net v5 2/2] net: atl1c: free the RX buffer when the descriptor reports an error Federico Musto
2026-11-29 11:48 ` netdev-bot+sashiko
2026-11-30 20:07 ` Federico Musto [this message]
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=20261130200718.34828-1-federico@rimpianto.com \
--to=federico@rimpianto.com \
--cc=andrew+netdev@lunn.ch \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®