summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2014-01-20 06:59:19 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-21 21:05:04 -0500
commitb582ef0990d457f7ce8ccf827af51a575ca0b4a6 (patch)
tree2893cba0f3c386795a7324c71851d165a68d891e /include/linux/netdevice.h
parent2618abb73c8953f0848511fc13f68da4d8337574 (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>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 83ce2aee65e6..c31022980e18 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1675,7 +1675,10 @@ struct napi_gro_cb {
1675 unsigned long age; 1675 unsigned long age;
1676 1676
1677 /* Used in ipv6_gro_receive() */ 1677 /* Used in ipv6_gro_receive() */
1678 int proto; 1678 u16 proto;
1679
1680 /* Used in udp_gro_receive */
1681 u16 udp_mark;
1679 1682
1680 /* used to support CHECKSUM_COMPLETE for tunneling protocols */ 1683 /* used to support CHECKSUM_COMPLETE for tunneling protocols */
1681 __wsum csum; 1684 __wsum csum;
@@ -1714,6 +1717,11 @@ struct packet_offload {
1714 struct list_head list; 1717 struct list_head list;
1715}; 1718};
1716 1719
1720struct udp_offload {
1721 __be16 port;
1722 struct offload_callbacks callbacks;
1723};
1724
1717/* often modified stats are per cpu, other are shared (netdev->stats) */ 1725/* often modified stats are per cpu, other are shared (netdev->stats) */
1718struct pcpu_sw_netstats { 1726struct pcpu_sw_netstats {
1719 u64 rx_packets; 1727 u64 rx_packets;