summaryrefslogtreecommitdiff
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2011-02-25 02:36:01 +0300
committerBen Hutchings <bhutchings@solarflare.com>2011-03-01 02:57:23 +0300
commit8ba5366adacef220b6ce16dca777600433a22a42 (patch)
tree5eaa58616988d2e08e65ab4175671d74782d2548 /drivers/net/sfc/net_driver.h
parent5b2c4dd2ec12cf0e53b2bd2926f0fe2d1fbb4eda (diff)
downloadlinux-8ba5366adacef220b6ce16dca777600433a22a42.tar.xz
sfc: Reduce size of efx_rx_buffer by unionising skb and page
[bwh: Forward-ported to net-next-2.6.] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 15b9068e5b87..59ff32ac7ec6 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -216,13 +216,17 @@ struct efx_tx_queue {
* If both this and skb are %NULL, the buffer slot is currently free.
* @data: Pointer to ethernet header
* @len: Buffer length, in bytes.
+ * @is_page: Indicates if @page is valid. If false, @skb is valid.
*/
struct efx_rx_buffer {
dma_addr_t dma_addr;
- struct sk_buff *skb;
- struct page *page;
+ union {
+ struct sk_buff *skb;
+ struct page *page;
+ } u;
char *data;
unsigned int len;
+ bool is_page;
};
/**