[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <543EC217.6060306@oracle.com>
Date: Wed, 15 Oct 2014 14:51:03 -0400
From: David L Stevens <david.stevens@...cle.com>
To: Sowmini Varadhan <sowmini.varadhan@...cle.com>,
davem@...emloft.net, bob.picco@...cle.com, dwight.engen@...cle.com,
raghuram.kothakota@...cle.com
CC: netdev@...r.kernel.org
Subject: Re: [PATCHv4 RFC net-next 1/4] sunvnet: NAPIfy sunvnet
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 <david.stevens@...cle.com>
+-DLS
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists