linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Li Wang <li.wang@windriver.com>, mst@redhat.com
Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vhost: reduce stack usage in log_used
Date: Tue, 15 Sep 2020 15:53:15 +0800	[thread overview]
Message-ID: <7c22eeb8-6060-929d-15d7-f1403b98c17f@redhat.com> (raw)
In-Reply-To: <1600106889-25013-1-git-send-email-li.wang@windriver.com>


On 2020/9/15 上午2:08, Li Wang wrote:
> Fix the warning: [-Werror=-Wframe-larger-than=]
>
> drivers/vhost/vhost.c: In function log_used:
> drivers/vhost/vhost.c:1906:1:
> warning: the frame size of 1040 bytes is larger than 1024 bytes
>
> Signed-off-by: Li Wang <li.wang@windriver.com>
> ---
>   drivers/vhost/vhost.c | 2 +-
>   drivers/vhost/vhost.h | 1 +
>   2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index b45519c..31837a5
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -1884,7 +1884,7 @@ static int log_write_hva(struct vhost_virtqueue *vq, u64 hva, u64 len)
>   
>   static int log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len)
>   {
> -	struct iovec iov[64];
> +	struct iovec *iov = vq->log_iov;
>   	int i, ret;
>   
>   	if (!vq->iotlb)
> diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
> index 9032d3c..5fe4b47
> --- a/drivers/vhost/vhost.h
> +++ b/drivers/vhost/vhost.h
> @@ -123,6 +123,7 @@ struct vhost_virtqueue {
>   	/* Log write descriptors */
>   	void __user *log_base;
>   	struct vhost_log *log;
> +	struct iovec log_iov[64];
>   
>   	/* Ring endianness. Defaults to legacy native endianness.
>   	 * Set to true when starting a modern virtio device. */


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



      reply	other threads:[~2020-09-15  7:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 15:09 [PATCH] vhost: reduce stack usage in log_used Li Wang
2020-09-14  2:42 ` Jason Wang
2020-09-14 18:08   ` Li Wang
2020-09-15  7:53     ` Jason Wang [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=7c22eeb8-6060-929d-15d7-f1403b98c17f@redhat.com \
    --to=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=li.wang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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).