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

Danielle Ratson posted 1 patch 1 year, 5 months ago
net/ethtool/module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH net-next] net: ethtool: Monotonically increase the message sequence number
Posted by Danielle Ratson 1 year, 5 months ago
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(-)

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;
-- 
2.45.0
Re: [PATCH net-next] net: ethtool: Monotonically increase the message sequence number
Posted by Jakub Kicinski 1 year, 5 months ago
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>
Re: [PATCH net-next] net: ethtool: Monotonically increase the message sequence number
Posted by Petr Machata 1 year, 5 months ago
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.
Re: [PATCH net-next] net: ethtool: Monotonically increase the message sequence number
Posted by Petr Machata 1 year, 5 months ago
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.