Subject: Re: [PATCHv4 RFC net-next 1/4] sunvnet: NAPIfy sunvnet

From: David L Stevens <[email-masked]>
Date: Wed, 15 Oct 2014 14:51:03 -0400

On 10/15/2014 02:01 PM, Sowmini Varadhan wrote:

> @@ -482,13 +485,26 @@ static int vnet_walk_rx(struct vnet_port *port, struct vio_dring_state *dr,
>  				return err;
>  			ack_start = -1;
>  		}
> +		if ((*npkts) >= budget) {
> +			send_ack = false;
> +			break;
> +		}
>  	}

I still don't like this-- it's virtually "boolean_variable = true;if (condition) boolean_variable = false".
Yes, it has the extra "break;", but I think it's clearer to say "send an ACK when
we're under budget; don't send an ACK and break when we're over," or:

		send_ack = *npkts < budget;
		if (!send_ack)
			break;

I can live with either way, though.

Acked-by: David L Stevens <[email-masked]>

						+-DLS