From: "Michael S. Tsirkin" <mst@redhat.com>
To: Heng Qi <hengqi@linux.alibaba.com>
Cc: netdev@vger.kernel.org, "Jason Wang" <jasowang@redhat.com>,
virtualization@lists.linux.dev, "Paolo Abeni" <pabeni@redhat.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Eric Dumazet" <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>
Subject: Re: [PATCH net v3 2/2] virtio-net: unbreak vq resizing when coalescing is not negotiated
Date: Thu, 1 Aug 2024 08:30:44 -0400 [thread overview]
Message-ID: <20240801082947-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20240801122739.49008-3-hengqi@linux.alibaba.com>
On Thu, Aug 01, 2024 at 08:27:39PM +0800, Heng Qi wrote:
> Don't break the resize action if the vq coalescing feature
> named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated.
>
> Fixes: f61fe5f081cf ("virtio-net: fix the vq coalescing setting for vq resize")
> Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
> Acked-by: Eugenio Pé rez <eperezma@redhat.com>
> Acked-by: Jason Wang <jasowang@redhat.com>
> ---
> v2->v3:
> - Break out the feature check and the fix into separate patches.
>
> v1->v2:
> - Rephrase the subject.
> - Put the feature check inside the virtnet_send_{r,t}x_ctrl_coal_vq_cmd().
>
> drivers/net/virtio_net.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index b1176be8fcfd..2b566d893ea3 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -3749,7 +3749,7 @@ static int virtnet_set_ringparam(struct net_device *dev,
> err = virtnet_send_tx_ctrl_coal_vq_cmd(vi, i,
> vi->intr_coal_tx.max_usecs,
> vi->intr_coal_tx.max_packets);
> - if (err)
> + if (err && err != -EOPNOTSUPP)
> return err;
> }
>
> @@ -3764,7 +3764,7 @@ static int virtnet_set_ringparam(struct net_device *dev,
> vi->intr_coal_rx.max_usecs,
> vi->intr_coal_rx.max_packets);
> mutex_unlock(&vi->rq[i].dim_lock);
> - if (err)
> + if (err && err != -EOPNOTSUPP)
> return err;
This needs a comment.
> }
> }
> --
> 2.32.0.3.g01195cf9f
next prev parent reply other threads:[~2024-08-01 12:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 12:27 [PATCH net v3 0/2] virtio-net: unbreak vq resizing if vq coalescing is not supported Heng Qi
2024-08-01 12:27 ` [PATCH net v3 1/2] virtio-net: check feature before configuring the vq coalescing command Heng Qi
2024-08-01 12:27 ` [PATCH net v3 2/2] virtio-net: unbreak vq resizing when coalescing is not negotiated Heng Qi
2024-08-01 12:30 ` Michael S. Tsirkin [this message]
2024-08-01 12:37 ` Heng Qi
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=20240801082947-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=virtualization@lists.linux.dev \
--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).