提交 6a08d194 编写于 作者: J Jesse Brandeburg 提交者: David S. Miller

e1000: use GRO for receive

E1000 can benefit from calling the GRO receive functions.
Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: NJeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 338c15e4
...@@ -3664,13 +3664,14 @@ static void e1000_consume_page(struct e1000_buffer *bi, struct sk_buff *skb, ...@@ -3664,13 +3664,14 @@ static void e1000_consume_page(struct e1000_buffer *bi, struct sk_buff *skb,
static void e1000_receive_skb(struct e1000_adapter *adapter, u8 status, static void e1000_receive_skb(struct e1000_adapter *adapter, u8 status,
__le16 vlan, struct sk_buff *skb) __le16 vlan, struct sk_buff *skb)
{ {
if (unlikely(adapter->vlgrp && (status & E1000_RXD_STAT_VP))) { skb->protocol = eth_type_trans(skb, adapter->netdev);
vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
le16_to_cpu(vlan) & if ((unlikely(adapter->vlgrp && (status & E1000_RXD_STAT_VP))))
E1000_RXD_SPC_VLAN_MASK); vlan_gro_receive(&adapter->napi, adapter->vlgrp,
} else { le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK,
netif_receive_skb(skb); skb);
} else
napi_gro_receive(&adapter->napi, skb);
} }
/** /**
...@@ -3828,8 +3829,6 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter, ...@@ -3828,8 +3829,6 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
goto next_desc; goto next_desc;
} }
skb->protocol = eth_type_trans(skb, netdev);
e1000_receive_skb(adapter, status, rx_desc->special, skb); e1000_receive_skb(adapter, status, rx_desc->special, skb);
next_desc: next_desc:
...@@ -3992,8 +3991,6 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, ...@@ -3992,8 +3991,6 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
((u32)(rx_desc->errors) << 24), ((u32)(rx_desc->errors) << 24),
le16_to_cpu(rx_desc->csum), skb); le16_to_cpu(rx_desc->csum), skb);
skb->protocol = eth_type_trans(skb, netdev);
e1000_receive_skb(adapter, status, rx_desc->special, skb); e1000_receive_skb(adapter, status, rx_desc->special, skb);
next_desc: next_desc:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册