From: Ben Hutchings <bhutchings@solarflare.com>
To: Michael Chan <mchan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, andy@greyhouse.net,
benli@broadcom.com
Subject: Re: [PATCH net-next 3/6] [BNX2]: Remove the rx_offset field from the bnx2 structure.
Date: Fri, 16 May 2008 21:29:43 +0100 [thread overview]
Message-ID: <20080516202942.GJ28241@solarflare.com> (raw)
In-Reply-To: <1210973417.5507.19.camel@dell>
Michael Chan wrote:
> [BNX2]: Remove the rx_offset field from the bnx2 structure.
>
> The rx_offset field is set to a constant value and initialized
> only once. By replacing all references to the rx_offset field,
> we can eliminate rx_offset from the bnx2 structure. This will
> save 4 bytes for every bnx2 instance.
Probably not, since slab will round it up.
[...]
> bp->rx_buf_use_size = rx_size;
> /* hw alignment */
> bp->rx_buf_size = bp->rx_buf_use_size + BNX2_RX_ALIGN;
> - bp->rx_jumbo_thresh = rx_size - bp->rx_offset;
> + bp->rx_jumbo_thresh = rx_size - BNX2_RX_OFFSET;
> bp->rx_ring_size = size;
> bp->rx_max_ring = bnx2_find_max_ring(size, MAX_RX_RINGS);
> bp->rx_max_ring_idx = (bp->rx_max_ring * RX_DESC_CNT) - 1;
[...]
> +#define BNX2_RX_OFFSET sizeof(struct l2_fhdr) + 2
The definition needs parentheses around it. You would get away this
except for this one place where BNX2_RX_OFFSET is subtracted.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
next prev parent reply other threads:[~2008-05-16 20:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 21:30 [PATCH net-next 3/6] [BNX2]: Remove the rx_offset field from the bnx2 structure Michael Chan
2008-05-16 20:29 ` Ben Hutchings [this message]
2008-05-16 22:07 ` Michael Chan
2008-05-16 22:18 ` [PATCH net-next 3/6 revised] " Michael Chan
2008-05-17 5:19 ` David Miller
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=20080516202942.GJ28241@solarflare.com \
--to=bhutchings@solarflare.com \
--cc=andy@greyhouse.net \
--cc=benli@broadcom.com \
--cc=davem@davemloft.net \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.