Re: [PATCH] hv_netvsc: Make sure out channel is fully opened on send

From: Dan Carpenter
Date: Wed Mar 14 2018 - 04:32:24 EST


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