diff options
| author | Or Gerlitz <ogerlitz@mellanox.com> | 2014-01-20 11:59:19 (GMT) |
|---|---|---|
| committer | Tim Gardner <rtg@gomeisa.buildd> | 2014-04-04 13:25:54 (GMT) |
| commit | 2da204a8f67fbe25816cbce8cc8551f03d5b951a (patch) | |
| tree | d4ddd6be9989054561c5e34aca637e36f8d2dbfa /include/linux/netdevice.h | |
| parent | 5349948414f8ca5dde4c837018d99ab75f866fcc (diff) | |
net: Add GRO support for UDP encapsulating protocols
Add GRO handlers for protocols that do UDP encapsulation, with the intent of
being able to coalesce packets which encapsulate packets belonging to
the same TCP session.
For GRO purposes, the destination UDP port takes the role of the ether type
field in the ethernet header or the next protocol in the IP header.
The UDP GRO handler will only attempt to coalesce packets whose destination
port is registered to have gro handler.
Use a mark on the skb GRO CB data to disallow (flush) running the udp gro receive
code twice on a packet. This solves the problem of udp encapsulated packets whose
inner VM packet is udp and happen to carry a port which has registered offloads.
Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(back ported from commit b582ef0990d457f7ce8ccf827af51a575ca0b4a6)
Conflicts:
include/linux/netdevice.h
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7a686c9..6e392d2 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1655,7 +1655,10 @@ struct napi_gro_cb { unsigned long age; /* Used in ipv6_gro_receive() */ - int proto; + u16 proto; + + /* Used in udp_gro_receive */ + u16 udp_mark; /* used to support CHECKSUM_COMPLETE for tunneling protocols */ __wsum csum; @@ -1694,6 +1697,20 @@ struct packet_offload { struct list_head list; }; +struct udp_offload { + __be16 port; + struct offload_callbacks callbacks; +}; + +/* often modified stats are per cpu, other are shared (netdev->stats) */ +struct pcpu_sw_netstats { + u64 rx_packets; + u64 rx_bytes; + u64 tx_packets; + u64 tx_bytes; + struct u64_stats_sync syncp; +}; + #include <linux/notifier.h> /* netdevice notifier chain. Please remember to update the rtnetlink |
