lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Dec 2018 11:08:29 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     jiangyiwen@...wei.com
Cc:     stefanha@...hat.com, mst@...hat.com, jasowang@...hat.com,
        netdev@...r.kernel.org, kvm@...r.kernel.org,
        virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH v2 1/5] VSOCK: support fill mergeable rx buffer in guest

From: jiangyiwen <jiangyiwen@...wei.com>
Date: Wed, 12 Dec 2018 17:28:16 +0800

> +static int fill_mergeable_rx_buff(struct virtio_vsock *vsock,
> +		struct virtqueue *vq)
> +{
> +	struct page_frag *alloc_frag = &vsock->alloc_frag;
> +	struct scatterlist sg;
> +	/* Currently we don't use ewma len, use PAGE_SIZE instead, because too
> +	 * small size can't fill one full packet, sadly we only 128 vq num now.
> +	 */
> +	unsigned int len = PAGE_SIZE, hole;
> +	void *buf;
> +	int err;

Please don't break up a set of local variable declarations with a
comment like this.  The comment seems to be about the initialization
of 'len', so move that initialization into the code below the variable
declarations and bring the comment along for the ride as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ