All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: sunil.kovvuri@gmail.com
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	Tomasz Duszynski <tduszynski@marvell.com>,
	Sunil Goutham <sgoutham@marvell.com>
Subject: Re: [PATCH v2 net-next 4/7] octeontx2-vf: Ethtool support
Date: Fri, 13 Mar 2020 19:56:25 +0200	[thread overview]
Message-ID: <20200313175625.GB67638@unreal> (raw)
In-Reply-To: <1584092566-4793-5-git-send-email-sunil.kovvuri@gmail.com>

On Fri, Mar 13, 2020 at 03:12:43PM +0530, sunil.kovvuri@gmail.com wrote:
> From: Tomasz Duszynski <tduszynski@marvell.com>
>
> Added ethtool support for VF devices for
>  - Driver stats, Tx/Rx perqueue stats
>  - Set/show Rx/Tx queue count
>  - Set/show Rx/Tx ring sizes
>  - Set/show IRQ coalescing parameters
>  - RSS configuration etc
>
> It's the PF which owns the interface, hence VF
> cannot display underlying CGX interface stats.
> Except for this rest ethtool support reuses PF's
> APIs.
>
> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
> Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> ---
>  .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   1 +
>  .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  | 133 ++++++++++++++++++++-
>  .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c   |   4 +
>  3 files changed, 136 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> index ca757b2..95b8f1e 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
> @@ -631,6 +631,7 @@ void otx2_update_lmac_stats(struct otx2_nic *pfvf);
>  int otx2_update_rq_stats(struct otx2_nic *pfvf, int qidx);
>  int otx2_update_sq_stats(struct otx2_nic *pfvf, int qidx);
>  void otx2_set_ethtool_ops(struct net_device *netdev);
> +void otx2vf_set_ethtool_ops(struct net_device *netdev);
>
>  int otx2_open(struct net_device *netdev);
>  int otx2_stop(struct net_device *netdev);
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> index f450111..1751e2d 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> @@ -17,6 +17,7 @@
>  #include "otx2_common.h"
>
>  #define DRV_NAME	"octeontx2-nicpf"
> +#define DRV_VF_NAME	"octeontx2-nicvf"
>
>  struct otx2_stat {
>  	char name[ETH_GSTRING_LEN];
> @@ -63,14 +64,34 @@ static const unsigned int otx2_n_dev_stats = ARRAY_SIZE(otx2_dev_stats);
>  static const unsigned int otx2_n_drv_stats = ARRAY_SIZE(otx2_drv_stats);
>  static const unsigned int otx2_n_queue_stats = ARRAY_SIZE(otx2_queue_stats);
>
> +int __weak otx2vf_open(struct net_device *netdev)
> +{
> +	return 0;
> +}
> +
> +int __weak otx2vf_stop(struct net_device *netdev)
> +{
> +	return 0;
> +}

We tried very politely to explain that drivers shouldn't have "__weak"
in their code, sorry if it wasn't clear enough.

Thanks

  reply	other threads:[~2020-03-13 17:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13  9:42 [PATCH v2 net-next 0/7] octeontx2-vf: Add network driver for virtual function sunil.kovvuri
2020-03-13  9:42 ` [PATCH v2 net-next 1/7] octeontx2-pf: Enable SRIOV and added VF mbox handling sunil.kovvuri
2020-03-13  9:42 ` [PATCH v2 net-next 2/7] octeontx2-pf: Handle VF function level reset sunil.kovvuri
2020-03-13 18:16   ` Leon Romanovsky
2020-03-14 15:42     ` Sunil Kovvuri
2020-03-13  9:42 ` [PATCH v2 net-next 3/7] octeontx2-vf: Virtual function driver support sunil.kovvuri
2020-03-13 18:11   ` Leon Romanovsky
2020-03-14 15:40     ` Sunil Kovvuri
2020-03-14 17:59       ` Leon Romanovsky
2020-03-14 19:12       ` Leon Romanovsky
2020-03-15  8:42         ` Andrew Lunn
2020-03-13  9:42 ` [PATCH v2 net-next 4/7] octeontx2-vf: Ethtool support sunil.kovvuri
2020-03-13 17:56   ` Leon Romanovsky [this message]
2020-03-14 15:42     ` Sunil Kovvuri
2020-03-13  9:42 ` [PATCH v2 net-next 5/7] octeontx2-vf: Link event notification support sunil.kovvuri
2020-03-13  9:42 ` [PATCH v2 net-next 6/7] octeontx2-pf: Cleanup all receive buffers in SG descriptor sunil.kovvuri
2020-03-13  9:42 ` [PATCH v2 net-next 7/7] octeontx2-af: Remove driver version and fix authorship sunil.kovvuri

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=20200313175625.GB67638@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sgoutham@marvell.com \
    --cc=sunil.kovvuri@gmail.com \
    --cc=tduszynski@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.