netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Sai Krishna <saikrishnag@marvell.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sgoutham@marvell.com>, <gakula@marvell.com>,
	<hkelam@marvell.com>, <sbhatta@marvell.com>
Subject: Re: [net-next PATCH v2] octeontx2-pf: Reset MAC stats during probe
Date: Thu, 7 Mar 2024 20:47:25 -0800	[thread overview]
Message-ID: <20240307204725.4dddcc9d@kernel.org> (raw)
In-Reply-To: <20240305082707.213332-1-saikrishnag@marvell.com>

On Tue, 5 Mar 2024 13:57:07 +0530 Sai Krishna wrote:
> +int otx2_reset_mac_stats(struct otx2_nic *pfvf);
>  
>  /* RVU block related APIs */
>  int otx2_attach_npa_nix(struct otx2_nic *pfvf);
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> index e5fe67e73865..a91f5b7e84c6 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> @@ -1124,6 +1124,24 @@ static int otx2_cgx_config_linkevents(struct otx2_nic *pf, bool enable)
>  	return err;
>  }
>  
> +int otx2_reset_mac_stats(struct otx2_nic *pfvf)
> +{
> +	struct msg_req *req;
> +	int err;
> +
> +	mutex_lock(&pfvf->mbox.lock);
> +	req = otx2_mbox_alloc_msg_cgx_stats_rst(&pfvf->mbox);
> +	if (!req) {
> +		mutex_unlock(&pfvf->mbox.lock);
> +		return -ENOMEM;
> +	}
> +
> +	err = otx2_sync_mbox_msg(&pfvf->mbox);
> +	mutex_unlock(&pfvf->mbox.lock);
> +	return err;
> +}
> +EXPORT_SYMBOL(otx2_reset_mac_stats);

Why the export? I see only one call to this function and it's right
below..

>  static int otx2_cgx_config_loopback(struct otx2_nic *pf, bool enable)
>  {
>  	struct msg_req *msg;
> @@ -3048,6 +3066,9 @@ static int otx2_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  
>  	otx2_qos_init(pf, qos_txqs);
>  
> +	/* reset CGX/RPM MAC stats */
> +	otx2_reset_mac_stats(pf);
> +


  reply	other threads:[~2024-03-08  4:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  8:27 [net-next PATCH v2] octeontx2-pf: Reset MAC stats during probe Sai Krishna
2024-03-08  4:47 ` Jakub Kicinski [this message]
2024-03-08  6:09   ` Sai Krishna Gajula

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=20240307204725.4dddcc9d@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saikrishnag@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).