From: David L Stevens <david.stevens@oracle.com>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>,
davem@davemloft.net, bob.picco@oracle.com,
dwight.engen@oracle.com, raghuram.kothakota@oracle.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCHv4 RFC net-next 1/4] sunvnet: NAPIfy sunvnet
Date: Wed, 15 Oct 2014 14:51:03 -0400 [thread overview]
Message-ID: <543EC217.6060306@oracle.com> (raw)
In-Reply-To: <20141015180115.GH11840@oracle.com>
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@oracle.com>
+-DLS
prev parent reply other threads:[~2014-10-15 18:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 18:01 [PATCHv4 RFC net-next 1/4] sunvnet: NAPIfy sunvnet Sowmini Varadhan
2014-10-15 18:51 ` David L Stevens [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=543EC217.6060306@oracle.com \
--to=david.stevens@oracle.com \
--cc=bob.picco@oracle.com \
--cc=davem@davemloft.net \
--cc=dwight.engen@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=raghuram.kothakota@oracle.com \
--cc=sowmini.varadhan@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).