* [PATCH net] r8169: add tally counter fields added with RTL8125
@ 2024-10-07 18:42 Heiner Kallweit
2024-10-08 0:47 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Heiner Kallweit @ 2024-10-07 18:42 UTC (permalink / raw)
To: Paolo Abeni, Jakub Kicinski, David Miller, Eric Dumazet
Cc: netdev@vger.kernel.org
RTL8125 added fields to the tally counter, what may result in the chip
dma'ing these new fields to unallocated memory. Therefore make sure
that the allocated memory area is big enough to hold all of the
tally counter values, even if we use only parts of it.
Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
Cc: stable@vger.kernel.org # up to 6.11
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
- adjusted fix version for kernel versions up to 6.11
---
drivers/net/ethernet/realtek/r8169_main.c | 27 +++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 31e8634a6..d0a188cb3 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -579,6 +579,33 @@ struct rtl8169_counters {
__le32 rx_multicast;
__le16 tx_aborted;
__le16 tx_underun;
+ /* new since RTL8125 */
+ __le64 tx_octets;
+ __le64 rx_octets;
+ __le64 rx_multicast64;
+ __le64 tx_unicast64;
+ __le64 tx_broadcast64;
+ __le64 tx_multicast64;
+ __le32 tx_pause_on;
+ __le32 tx_pause_off;
+ __le32 tx_pause_all;
+ __le32 tx_deferred;
+ __le32 tx_late_collision;
+ __le32 tx_all_collision;
+ __le32 tx_aborted32;
+ __le32 align_errors32;
+ __le32 rx_frame_too_long;
+ __le32 rx_runt;
+ __le32 rx_pause_on;
+ __le32 rx_pause_off;
+ __le32 rx_pause_all;
+ __le32 rx_unknown_opcode;
+ __le32 rx_mac_error;
+ __le32 tx_underrun32;
+ __le32 rx_mac_missed;
+ __le32 rx_tcam_dropped;
+ __le32 tdu;
+ __le32 rdu;
};
struct rtl8169_tc_offsets {
--
2.46.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH net] r8169: add tally counter fields added with RTL8125
2024-10-07 18:42 [PATCH net] r8169: add tally counter fields added with RTL8125 Heiner Kallweit
@ 2024-10-08 0:47 ` Jakub Kicinski
2024-10-08 5:36 ` Heiner Kallweit
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2024-10-08 0:47 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Paolo Abeni, David Miller, Eric Dumazet, netdev@vger.kernel.org
On Mon, 7 Oct 2024 20:42:23 +0200 Heiner Kallweit wrote:
> RTL8125 added fields to the tally counter, what may result in the chip
> dma'ing these new fields to unallocated memory. Therefore make sure
> that the allocated memory area is big enough to hold all of the
> tally counter values, even if we use only parts of it.
doesn't seem to apply
--
pw-bot: cr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] r8169: add tally counter fields added with RTL8125
2024-10-08 0:47 ` Jakub Kicinski
@ 2024-10-08 5:36 ` Heiner Kallweit
0 siblings, 0 replies; 6+ messages in thread
From: Heiner Kallweit @ 2024-10-08 5:36 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Paolo Abeni, David Miller, Eric Dumazet, netdev@vger.kernel.org
On 08.10.2024 02:47, Jakub Kicinski wrote:
> On Mon, 7 Oct 2024 20:42:23 +0200 Heiner Kallweit wrote:
>> RTL8125 added fields to the tally counter, what may result in the chip
>> dma'ing these new fields to unallocated memory. Therefore make sure
>> that the allocated memory area is big enough to hold all of the
>> tally counter values, even if we use only parts of it.
>
> doesn't seem to apply
This version of the patch is meant to be applied to stable kernels up to 6.11.
I think I should have sent it to stable@vger.kernel.org directly.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net] r8169: add tally counter fields added with RTL8125
@ 2024-09-17 21:04 Heiner Kallweit
2024-09-18 7:22 ` Simon Horman
2024-09-24 9:22 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Heiner Kallweit @ 2024-09-17 21:04 UTC (permalink / raw)
To: Paolo Abeni, Jakub Kicinski, David Miller, Eric Dumazet,
Realtek linux nic maintainers
Cc: netdev@vger.kernel.org
RTL8125 added fields to the tally counter, what may result in the chip
dma'ing these new fields to unallocated memory. Therefore make sure
that the allocated memory area is big enough to hold all of the
tally counter values, even if we use only parts of it.
Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
Cc: stable@vger.kernel.org
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 27 +++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 31e8634a6..d0a188cb3 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -579,6 +579,33 @@ struct rtl8169_counters {
__le32 rx_multicast;
__le16 tx_aborted;
__le16 tx_underrun;
+ /* new since RTL8125 */
+ __le64 tx_octets;
+ __le64 rx_octets;
+ __le64 rx_multicast64;
+ __le64 tx_unicast64;
+ __le64 tx_broadcast64;
+ __le64 tx_multicast64;
+ __le32 tx_pause_on;
+ __le32 tx_pause_off;
+ __le32 tx_pause_all;
+ __le32 tx_deferred;
+ __le32 tx_late_collision;
+ __le32 tx_all_collision;
+ __le32 tx_aborted32;
+ __le32 align_errors32;
+ __le32 rx_frame_too_long;
+ __le32 rx_runt;
+ __le32 rx_pause_on;
+ __le32 rx_pause_off;
+ __le32 rx_pause_all;
+ __le32 rx_unknown_opcode;
+ __le32 rx_mac_error;
+ __le32 tx_underrun32;
+ __le32 rx_mac_missed;
+ __le32 rx_tcam_dropped;
+ __le32 tdu;
+ __le32 rdu;
};
struct rtl8169_tc_offsets {
--
2.46.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH net] r8169: add tally counter fields added with RTL8125
2024-09-17 21:04 Heiner Kallweit
@ 2024-09-18 7:22 ` Simon Horman
2024-09-24 9:22 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2024-09-18 7:22 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Paolo Abeni, Jakub Kicinski, David Miller, Eric Dumazet,
Realtek linux nic maintainers, netdev
On Tue, Sep 17, 2024 at 11:04:46PM +0200, Heiner Kallweit wrote:
> RTL8125 added fields to the tally counter, what may result in the chip
> dma'ing these new fields to unallocated memory. Therefore make sure
> that the allocated memory area is big enough to hold all of the
> tally counter values, even if we use only parts of it.
>
> Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
> Cc: stable@vger.kernel.org
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net] r8169: add tally counter fields added with RTL8125
2024-09-17 21:04 Heiner Kallweit
2024-09-18 7:22 ` Simon Horman
@ 2024-09-24 9:22 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-24 9:22 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: pabeni, kuba, davem, edumazet, nic_swsd, netdev
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 17 Sep 2024 23:04:46 +0200 you wrote:
> RTL8125 added fields to the tally counter, what may result in the chip
> dma'ing these new fields to unallocated memory. Therefore make sure
> that the allocated memory area is big enough to hold all of the
> tally counter values, even if we use only parts of it.
>
> Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
> Cc: stable@vger.kernel.org
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>
> [...]
Here is the summary with links:
- [net] r8169: add tally counter fields added with RTL8125
https://git.kernel.org/netdev/net/c/ced8e8b8f40a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-08 5:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 18:42 [PATCH net] r8169: add tally counter fields added with RTL8125 Heiner Kallweit
2024-10-08 0:47 ` Jakub Kicinski
2024-10-08 5:36 ` Heiner Kallweit
-- strict thread matches above, loose matches on Subject: below --
2024-09-17 21:04 Heiner Kallweit
2024-09-18 7:22 ` Simon Horman
2024-09-24 9:22 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).