diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-19 23:29:13 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:28 -0400 |
commit | 27a884dc3cb63b93c2b3b643f5b31eed5f8a4d26 (patch) | |
tree | 5a267e40f9b94014be38dad5de0a52b6628834e0 /drivers/net/e1000/e1000_main.c | |
parent | be8bd86321fa7f06359d866ef61fb4d2f3e9dce9 (diff) |
[SK_BUFF]: Convert skb->tail to sk_buff_data_t
So that it is also an offset from skb->head, reduces its size from 8 to 4 bytes
on 64bit architectures, allowing us to combine the 4 bytes hole left by the
layer headers conversion, reducing struct sk_buff size to 256 bytes, i.e. 4
64byte cachelines, and since the sk_buff slab cache is SLAB_HWCACHE_ALIGN...
:-)
Many calculations that previously required that skb->{transport,network,
mac}_header be first converted to a pointer now can be done directly, being
meaningful as offsets or pointers.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index e86deb2ef823..e7c93f44f810 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3304,7 +3304,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3304 | * NOTE: this is a TSO only workaround | 3304 | * NOTE: this is a TSO only workaround |
3305 | * if end byte alignment not correct move us | 3305 | * if end byte alignment not correct move us |
3306 | * into the next dword */ | 3306 | * into the next dword */ |
3307 | if ((unsigned long)(skb->tail - 1) & 4) | 3307 | if ((unsigned long)(skb_tail_pointer(skb) - 1) & 4) |
3308 | break; | 3308 | break; |
3309 | /* fall through */ | 3309 | /* fall through */ |
3310 | case e1000_82571: | 3310 | case e1000_82571: |
@@ -4388,7 +4388,7 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
4388 | PCI_DMA_FROMDEVICE); | 4388 | PCI_DMA_FROMDEVICE); |
4389 | vaddr = kmap_atomic(ps_page->ps_page[0], | 4389 | vaddr = kmap_atomic(ps_page->ps_page[0], |
4390 | KM_SKB_DATA_SOFTIRQ); | 4390 | KM_SKB_DATA_SOFTIRQ); |
4391 | memcpy(skb->tail, vaddr, l1); | 4391 | memcpy(skb_tail_pointer(skb), vaddr, l1); |
4392 | kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ); | 4392 | kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ); |
4393 | pci_dma_sync_single_for_device(pdev, | 4393 | pci_dma_sync_single_for_device(pdev, |
4394 | ps_page_dma->ps_page_dma[0], | 4394 | ps_page_dma->ps_page_dma[0], |