Skip to content

Commit c860874

Browse files
author
CKI KWF Bot
committed
Merge: octeon_ep: fix VF MAC address lifecycle handling
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7369 JIRA: https://issues.redhat.com/browse/RHEL-109634 commit a72175c Author: Sathesh B Edara <sedara@marvell.com> Date: Tue Sep 16 06:32:07 2025 -0700 octeon_ep: fix VF MAC address lifecycle handling Currently, VF MAC address info is not updated when the MAC address is configured from VF, and it is not cleared when the VF is removed. This leads to stale or missing MAC information in the PF, which may cause incorrect state tracking or inconsistencies when VFs are hot-plugged or reassigned. Fix this by: - storing the VF MAC address in the PF when it is set from VF - clearing the stored VF MAC address when the VF is removed This ensures that the PF always has correct VF MAC state. Fixes: cde29af ("octeon_ep: add PF-VF mailbox communication") Signed-off-by: Sathesh B Edara <sedara@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250916133207.21737-1-sedara@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kamal Heib <kheib@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Michal Schmidt <mschmidt@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 1e83e39 + 8c5b620 commit c860874

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static void octep_pfvf_get_mac_addr(struct octep_device *oct, u32 vf_id,
195195
vf_id);
196196
return;
197197
}
198+
ether_addr_copy(oct->vf_info[vf_id].mac_addr, rsp->s_set_mac.mac_addr);
198199
rsp->s_set_mac.type = OCTEP_PFVF_MBOX_TYPE_RSP_ACK;
199200
}
200201

@@ -204,6 +205,8 @@ static void octep_pfvf_dev_remove(struct octep_device *oct, u32 vf_id,
204205
{
205206
int err;
206207

208+
/* Reset VF-specific information maintained by the PF */
209+
memset(&oct->vf_info[vf_id], 0, sizeof(struct octep_pfvf_info));
207210
err = octep_ctrl_net_dev_remove(oct, vf_id);
208211
if (err) {
209212
rsp->s.type = OCTEP_PFVF_MBOX_TYPE_RSP_NACK;

0 commit comments

Comments
 (0)