[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080516202942.GJ28241@solarflare.com>
Date: Fri, 16 May 2008 21:29:43 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Michael Chan <mchan@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, andy@...yhouse.net,
benli@...adcom.com
Subject: Re: [PATCH net-next 3/6] [BNX2]: Remove the rx_offset field from the bnx2 structure.
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.
--
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