lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <CO1PR18MB47474A8DA6ECB6FFF3A5C02BD815A@CO1PR18MB4747.namprd18.prod.outlook.com>
Date: Mon, 15 Sep 2025 09:17:36 +0000
From: Sathesh B Edara <sedara@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Satananda
 Burla <sburla@...vell.com>,
        Veerasenareddy Burru <vburru@...vell.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        Haseeb Gani <hgani@...vell.com>, "andrew@...n.ch"
	<andrew@...n.ch>,
        Shinas Rasheed <srasheed@...vell.com>
Subject: RE: [EXTERNAL] Re: [net PATCH] octeon_ep:fix VF MAC address lifecycle
 handling



> > diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
> > b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
> > index ebecdd29f3bd..0867fab61b19 100644
> > --- a/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
> > +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_pfvf_mbox.c
> > @@ -196,6 +196,7 @@ static void octep_pfvf_get_mac_addr(struct
> octep_device *oct,  u32 vf_id,
> >  			vf_id);
> >  		return;
> >  	}
> > +	ether_addr_copy(oct->vf_info[vf_id].mac_addr,
> > +rsp->s_set_mac.mac_addr);
> >  	rsp->s_set_mac.type = OCTEP_PFVF_MBOX_TYPE_RSP_ACK;  }
> >
> > @@ -205,6 +206,8 @@ static void octep_pfvf_dev_remove(struct
> > octep_device *oct,  u32 vf_id,  {
> >  	int err;
> >
> > +	/* Reset VF-specific information maintained by the PF */
> > +	memset(&oct->vf_info[vf_id], 0, sizeof(struct octep_pfvf_info));
> 
> Hi Sathesh,
> 
> Can the following be used here?
> (completely untested)
> 
> 	eth_zero_addr(oct->vf_info[vf_id].mac_addr);
> 
> Or does more of oct->vf_info[vf_id] need to be reset?

Hi Simon,
Thank you for your comments.
Yes, in addition to clearing the MAC address, we also need to reset other fields within oct->vf_info[vf_id] to fully clean up the VF-specific state maintained at the PF level.
This ensures that all VF-related configuration and runtime data are properly cleared when the VF is removed.

Thanks,
Sathesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ