diff mbox series

[net-next] net: ethtool: Monotonically increase the message sequence number

Message ID 20240711080934.2071869-1-danieller@nvidia.com (mailing list archive)
State Accepted
Commit 275a63c9fe10f39066782d2d775d7d3efb20b01f
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ethtool: Monotonically increase the message sequence number | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 816 this patch: 816
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 821 this patch: 821
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 821 this patch: 821
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-11--18-00 (tests: 696)

Commit Message

Danielle Ratson July 11, 2024, 8:09 a.m. UTC
Currently, during the module firmware flashing process, unicast
notifications are sent from the kernel using the same sequence number,
making it impossible for user space to track missed notifications.

Monotonically increase the message sequence number, so the order of
notifications could be tracked effectively.

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
---
 net/ethtool/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Petr Machata July 11, 2024, 2:09 p.m. UTC | #1
Danielle Ratson <danieller@nvidia.com> writes:

> Currently, during the module firmware flashing process, unicast
> notifications are sent from the kernel using the same sequence number,
> making it impossible for user space to track missed notifications.
>
> Monotonically increase the message sequence number, so the order of
> notifications could be tracked effectively.
>
> Signed-off-by: Danielle Ratson <danieller@nvidia.com>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>

Applied, thanks.
Petr Machata July 11, 2024, 2:23 p.m. UTC | #2
Petr Machata <petrm@nvidia.com> writes:

> Danielle Ratson <danieller@nvidia.com> writes:
>
>> Currently, during the module firmware flashing process, unicast
>> notifications are sent from the kernel using the same sequence number,
>> making it impossible for user space to track missed notifications.
>>
>> Monotonically increase the message sequence number, so the order of
>> notifications could be tracked effectively.
>>
>> Signed-off-by: Danielle Ratson <danieller@nvidia.com>
>> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
>
> Applied, thanks.

Oops, never mind, I was talking about our internal queue and the reply
shouldn't have gone public.
Jakub Kicinski July 12, 2024, 12:43 a.m. UTC | #3
On Thu, 11 Jul 2024 11:09:34 +0300 Danielle Ratson wrote:
> Currently, during the module firmware flashing process, unicast
> notifications are sent from the kernel using the same sequence number,
> making it impossible for user space to track missed notifications.
> 
> Monotonically increase the message sequence number, so the order of
> notifications could be tracked effectively.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
patchwork-bot+netdevbpf@kernel.org July 13, 2024, 10:50 p.m. UTC | #4
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 11 Jul 2024 11:09:34 +0300 you wrote:
> Currently, during the module firmware flashing process, unicast
> notifications are sent from the kernel using the same sequence number,
> making it impossible for user space to track missed notifications.
> 
> Monotonically increase the message sequence number, so the order of
> notifications could be tracked effectively.
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethtool: Monotonically increase the message sequence number
    https://git.kernel.org/netdev/net-next/c/275a63c9fe10

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/ethtool/module.c b/net/ethtool/module.c
index aba78436d350..6988e07bdcd6 100644
--- a/net/ethtool/module.c
+++ b/net/ethtool/module.c
@@ -488,7 +488,7 @@  ethnl_module_fw_flash_ntf(struct net_device *dev,
 	if (!skb)
 		return;
 
-	hdr = ethnl_unicast_put(skb, ntf_params->portid, ntf_params->seq,
+	hdr = ethnl_unicast_put(skb, ntf_params->portid, ++ntf_params->seq,
 				ETHTOOL_MSG_MODULE_FW_FLASH_NTF);
 	if (!hdr)
 		goto err_skb;