[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250916122807.GX224143@horms.kernel.org>
Date: Tue, 16 Sep 2025 13:28:07 +0100
From: Simon Horman <horms@...nel.org>
To: Sathesh B Edara <sedara@...vell.com>
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
On Mon, Sep 15, 2025 at 09:17:36AM +0000, Sathesh B Edara wrote:
>
>
> > > 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, in that case this change good to me.
Given that the patch has been marked as Changes Requested, I assume on the
basis of my feedback, if it's not to much trouble could you repost with a
space after the 'octeon_ep:' in the subject.
Subject: [PATCH net] octeon_ep: fix VF MAC address lifecycle handling
Feel free to add:
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists