From: David Miller <davem@davemloft.net>
To: David.Laight@ACULAB.COM
Cc: rmody@brocade.com, netdev@vger.kernel.org,
bhutchings@solarflare.com,
adapter_linux_open_src_team@brocade.com
Subject: Re: [net-next 2/7] bna: Tx and Rx Optimizations
Date: Fri, 07 Dec 2012 12:46:08 -0500 (EST) [thread overview]
Message-ID: <20121207.124608.444520170061639362.davem@davemloft.net> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B70E5@saturn3.aculab.com>
From: "David Laight" <David.Laight@ACULAB.COM>
Date: Fri, 7 Dec 2012 10:46:22 -0000
>> #define BNA_QE_INDX_ADD(_qe_idx, _qe_num, _q_depth) \
>> ((_qe_idx) = ((_qe_idx) + (_qe_num)) & ((_q_depth) - 1))
>>
>> +#define BNA_QE_INDX_INC(_idx, _q_depth) \
>> +do { \
>> + (_idx)++; \
>> + if ((_idx) == (_q_depth)) \
>> + (_idx) = 0; \
>> +} while (0)
>> +
>
> If q_depth has to be a power of 2 (implied by BNA_QE_IND_ADD())
> then you should mask in BNA_QE_INDX_INC() to save the conditional.
> Or just:
> #define BNA_QE_INDX_INC(_idx, _q_depth) BNA_QE_INDX_ADD(_idx, 1, _q_depth)
Agreed.
next prev parent reply other threads:[~2012-12-07 17:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 23:17 [net-next 0/7] bna: Driver Version Updated to 3.1.2.1 Rasesh Mody
2012-12-06 23:17 ` [net-next 1/7] bna: Code Cleanup and Enhancements Rasesh Mody
2012-12-06 23:17 ` [net-next 2/7] bna: Tx and Rx Optimizations Rasesh Mody
2012-12-07 10:46 ` David Laight
2012-12-07 17:46 ` David Miller [this message]
2012-12-06 23:17 ` [net-next 3/7] bna: TX Intr Coalescing Fix Rasesh Mody
2012-12-06 23:17 ` [net-next 4/7] bna: Rx Page Based Allocation Rasesh Mody
2012-12-06 23:17 ` [net-next 5/7] bna: Add RX State Rasesh Mody
2012-12-06 23:17 ` [net-next 6/7] bna: Firmware update Rasesh Mody
2012-12-06 23:17 ` [net-next 7/7] bna: Driver Version Updated to 3.1.2.1 Rasesh Mody
-- strict thread matches above, loose matches on Subject: below --
2012-12-10 21:41 [net-next 0/7] " Rasesh Mody
2012-12-10 21:42 ` [net-next 2/7] bna: Tx and Rx Optimizations Rasesh Mody
2012-12-11 22:24 [net-next 0/7] bna: Driver Version Updated to 3.1.2.1 Rasesh Mody
2012-12-11 22:24 ` [net-next 2/7] bna: Tx and Rx Optimizations Rasesh Mody
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=20121207.124608.444520170061639362.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=David.Laight@ACULAB.COM \
--cc=adapter_linux_open_src_team@brocade.com \
--cc=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=rmody@brocade.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).