[PATCH v2 06/14] common/sfc_efx/base: fix annotations in client MAC addr get

Ivan Malov ivan.malov at arknetworks.am
Wed Aug 12 19:08:26 CEST 2026


From: Andy Moreton <andy.moreton at amd.com>

Fix annotations to show the size written to addr_bytes.

Fixes: 78b82063df10 ("common/sfc_efx/base: manage VNIC MAC address by MCDI handle")
Cc: stable at dpdk.org

Signed-off-by: Andy Moreton <andy.moreton at amd.com>
Reviewed-by: Ivan Malov <ivan.malov at arknetworks.am>
Reviewed-by: Viacheslav Galaktionov <viacheslav.galaktionov at arknetworks.am>
---
 drivers/common/sfc_efx/base/efx.h      | 3 ++-
 drivers/common/sfc_efx/base/efx_mcdi.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 2aa52b401d..b8d1ccd7bd 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -439,7 +439,8 @@ extern	__checkReturn	efx_rc_t
 efx_mcdi_client_mac_addr_get(
 	__in		efx_nic_t *enp,
 	__in		uint32_t client_handle,
-	__out		uint8_t addr_bytes[EFX_MAC_ADDR_LEN]);
+	__out_bcount(EFX_MAC_ADDR_LEN)
+			uint8_t addr_bytes[EFX_MAC_ADDR_LEN]);
 
 LIBEFX_API
 extern	__checkReturn	efx_rc_t
diff --git a/drivers/common/sfc_efx/base/efx_mcdi.c b/drivers/common/sfc_efx/base/efx_mcdi.c
index 58ad1a1bc1..8f14f38cdc 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -737,7 +737,8 @@ efx_mcdi_get_own_client_handle(
 efx_mcdi_client_mac_addr_get(
 	__in		efx_nic_t *enp,
 	__in		uint32_t client_handle,
-	__out		uint8_t addr_bytes[EFX_MAC_ADDR_LEN])
+	__out_bcount(EFX_MAC_ADDR_LEN)
+			uint8_t addr_bytes[EFX_MAC_ADDR_LEN])
 {
 	efx_mcdi_req_t req;
 	EFX_MCDI_DECLARE_BUF(payload,
-- 
2.47.3



More information about the dev mailing list