virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Gavin Li <gavinl@nvidia.com>
Cc: xuanzhuo@linux.alibaba.com, hawk@kernel.org,
	daniel@iogearbox.net, mst@redhat.com, netdev@vger.kernel.org,
	john.fastabend@gmail.com, ast@kernel.org, edumazet@google.com,
	jiri@nvidia.com, kuba@kernel.org, bpf@vger.kernel.org,
	pabeni@redhat.com, virtualization@lists.linux-foundation.org,
	davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next V1 2/4] virtio_net: extract get/set interrupt coalesce to a function
Date: Wed, 12 Jul 2023 15:39:53 +0800	[thread overview]
Message-ID: <CACGkMEsXC-BLvt2RuF99_veiKnYrnrg3rJNhoeP7FhCFSWbgAA@mail.gmail.com> (raw)
In-Reply-To: <20230710092005.5062-3-gavinl@nvidia.com>


[-- Attachment #1.1: Type: text/plain, Size: 2637 bytes --]

On Mon, Jul 10, 2023 at 5:21 PM Gavin Li <gavinl@nvidia.com> wrote:

> Extract get/set interrupt coalesce to a function to be reused by global
> and per queue config.
>
> Signed-off-by: Gavin Li <gavinl@nvidia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> ---
>  drivers/net/virtio_net.c | 22 +++++++++++++++++-----
>  1 file changed, 17 insertions(+), 5 deletions(-)
>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks


>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index dd5fec073a27..802ed21453f5 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -3093,10 +3093,8 @@ static int virtnet_coal_params_supported(struct
> ethtool_coalesce *ec)
>         return 0;
>  }
>
> -static int virtnet_set_coalesce(struct net_device *dev,
> -                               struct ethtool_coalesce *ec,
> -                               struct kernel_ethtool_coalesce
> *kernel_coal,
> -                               struct netlink_ext_ack *extack)
> +static int virtnet_set_coalesce_one(struct net_device *dev,
> +                                   struct ethtool_coalesce *ec)
>  {
>         struct virtnet_info *vi = netdev_priv(dev);
>         int ret, i, napi_weight;
> @@ -3127,10 +3125,16 @@ static int virtnet_set_coalesce(struct net_device
> *dev,
>         return ret;
>  }
>
> -static int virtnet_get_coalesce(struct net_device *dev,
> +static int virtnet_set_coalesce(struct net_device *dev,
>                                 struct ethtool_coalesce *ec,
>                                 struct kernel_ethtool_coalesce
> *kernel_coal,
>                                 struct netlink_ext_ack *extack)
> +{
> +       return virtnet_set_coalesce_one(dev, ec);
> +}
> +
> +static int virtnet_get_coalesce_one(struct net_device *dev,
> +                                   struct ethtool_coalesce *ec)
>  {
>         struct virtnet_info *vi = netdev_priv(dev);
>
> @@ -3149,6 +3153,14 @@ static int virtnet_get_coalesce(struct net_device
> *dev,
>         return 0;
>  }
>
> +static int virtnet_get_coalesce(struct net_device *dev,
> +                               struct ethtool_coalesce *ec,
> +                               struct kernel_ethtool_coalesce
> *kernel_coal,
> +                               struct netlink_ext_ack *extack)
> +{
> +       return virtnet_get_coalesce_one(dev, ec);
> +}
> +
>  static void virtnet_init_settings(struct net_device *dev)
>  {
>         struct virtnet_info *vi = netdev_priv(dev);
> --
> 2.39.1
>
>

[-- Attachment #1.2: Type: text/html, Size: 3691 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2023-07-12  7:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230710092005.5062-1-gavinl@nvidia.com>
2023-07-10  9:25 ` [PATCH net-next V1 0/4] virtio_net: add per queue interrupt coalescing support Xuan Zhuo
     [not found]   ` <ea32a1cf-3a77-d63b-034f-0f80d2dd80ea@nvidia.com>
2023-07-11  3:10     ` Xuan Zhuo
     [not found] ` <20230710092005.5062-2-gavinl@nvidia.com>
2023-07-12  7:35   ` [PATCH net-next V1 1/4] virtio_net: extract interrupt coalescing settings to a structure Jason Wang
     [not found] ` <20230710092005.5062-3-gavinl@nvidia.com>
2023-07-12  7:39   ` Jason Wang [this message]
     [not found] ` <20230710092005.5062-4-gavinl@nvidia.com>
2023-07-12  8:01   ` [PATCH net-next V1 3/4] virtio_net: support per queue interrupt coalesce command Jason Wang
2023-07-12  9:39   ` Xuan Zhuo
2023-07-13 11:40 ` [PATCH net-next V1 0/4] virtio_net: add per queue interrupt coalescing support Michael S. Tsirkin
2023-07-14  2:10   ` Xuan Zhuo
2023-08-30 19:42     ` Michael S. Tsirkin

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=CACGkMEsXC-BLvt2RuF99_veiKnYrnrg3rJNhoeP7FhCFSWbgAA@mail.gmail.com \
    --to=jasowang@redhat.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gavinl@nvidia.com \
    --cc=hawk@kernel.org \
    --cc=jiri@nvidia.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.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).