All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Sathesh B Edara <sedara@marvell.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Satananda Burla <sburla@marvell.com>,
	Veerasenareddy Burru <vburru@marvell.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Haseeb Gani <hgani@marvell.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	Shinas Rasheed <srasheed@marvell.com>
Subject: Re: [EXTERNAL] Re: [net PATCH] octeon_ep:fix VF MAC address lifecycle handling
Date: Tue, 16 Sep 2025 13:28:07 +0100	[thread overview]
Message-ID: <20250916122807.GX224143@horms.kernel.org> (raw)
In-Reply-To: <CO1PR18MB47474A8DA6ECB6FFF3A5C02BD815A@CO1PR18MB4747.namprd18.prod.outlook.com>

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@kernel.org>

      reply	other threads:[~2025-09-16 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 14:49 [net PATCH] octeon_ep:fix VF MAC address lifecycle handling Sathesh B Edara
2025-09-12 17:02 ` Simon Horman
2025-09-15  9:17   ` [EXTERNAL] " Sathesh B Edara
2025-09-16 12:28     ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250916122807.GX224143@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hgani@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sburla@marvell.com \
    --cc=sedara@marvell.com \
    --cc=srasheed@marvell.com \
    --cc=vburru@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.