gro: Optimise Ethernet header comparison
This patch optimises the Ethernet header comparison to use 2-byte and 4-byte xors instead of memcmp. In order to facilitate this, the actual comparison is now carried out by the callers of the shared dev_gro_receive function. This has a significant impact when receiving 1500B packets through 10GbE. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -85,7 +85,9 @@ static int vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
|
||||
goto drop;
|
||||
|
||||
for (p = napi->gro_list; p; p = p->next) {
|
||||
NAPI_GRO_CB(p)->same_flow = p->dev == skb->dev;
|
||||
NAPI_GRO_CB(p)->same_flow =
|
||||
p->dev == skb->dev && !compare_ether_header(
|
||||
skb_mac_header(p), skb_gro_mac_header(skb));
|
||||
NAPI_GRO_CB(p)->flush = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user