]> www.infradead.org Git - nvme.git/commitdiff
net: ethtool: Monotonically increase the message sequence number
authorDanielle Ratson <danieller@nvidia.com>
Thu, 11 Jul 2024 08:09:34 +0000 (11:09 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Jul 2024 22:37:36 +0000 (15:37 -0700)
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>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20240711080934.2071869-1-danieller@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/module.c

index aba78436d350a64fde96d6d015c6b764b825ae8b..6988e07bdcd6d46e8d08c1254e4f57501bca4d93 100644 (file)
@@ -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;