diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-03-23 14:35:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-23 23:56:28 +0300 |
commit | 45c9b3c09490ef4a4ac19df75b5919849423f3e7 (patch) | |
tree | 77418d96c3b36a0ef4a8cfd6b08f5e3e941652bd /drivers/net/ethernet/broadcom/bgmac.h | |
parent | 0addb83d4c71a68fa716fbd69a605ac0ba5e2b50 (diff) | |
download | linux-45c9b3c09490ef4a4ac19df75b5919849423f3e7.tar.xz |
bgmac: implement GRO and use build_skb
This improves performance for routing and local rx
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bgmac.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bgmac.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.h b/drivers/net/ethernet/broadcom/bgmac.h index 1f9f36f2b658..3ad965fe7fcc 100644 --- a/drivers/net/ethernet/broadcom/bgmac.h +++ b/drivers/net/ethernet/broadcom/bgmac.h @@ -362,6 +362,8 @@ #define BGMAC_RX_FRAME_OFFSET 30 /* There are 2 unused bytes between header and real data */ #define BGMAC_RX_MAX_FRAME_SIZE 1536 /* Copied from b44/tg3 */ #define BGMAC_RX_BUF_SIZE (BGMAC_RX_FRAME_OFFSET + BGMAC_RX_MAX_FRAME_SIZE) +#define BGMAC_RX_ALLOC_SIZE (SKB_DATA_ALIGN(BGMAC_RX_BUF_SIZE) + \ + SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) #define BGMAC_BFL_ENETROBO 0x0010 /* has ephy roboswitch spi */ #define BGMAC_BFL_ENETADM 0x0080 /* has ADMtek switch */ @@ -383,7 +385,10 @@ #define ETHER_MAX_LEN 1518 struct bgmac_slot_info { - struct sk_buff *skb; + union { + struct sk_buff *skb; + void *buf; + }; dma_addr_t dma_addr; }; |