From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send Date: Wed, 14 Mar 2018 11:27:01 +0300 Message-ID: <20180314082701.2inzz2etg67r3zry@mwanda> References: <1520968010-20733-1-git-send-email-mgamal@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: otubo@redhat.com, sthemmin@microsoft.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, vkuznets@redhat.com, davem@davemloft.net To: Mohammed Gamal Return-path: Content-Disposition: inline In-Reply-To: <1520968010-20733-1-git-send-email-mgamal@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org On Tue, Mar 13, 2018 at 08:06:50PM +0100, Mohammed Gamal wrote: > @@ -791,6 +791,7 @@ static inline int netvsc_send_pkt( > VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); > } > > + ring_avail = hv_ringbuf_avail_percent(&out_channel->outbound); > if (ret == 0) { > atomic_inc_return(&nvchan->queue_sends); > Could you move the assignment inside the "ret == 0" path closer to where it's used? regards, dan carpenter