summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2014-01-20 15:59:19 +0400
committerDavid S. Miller <davem@davemloft.net>2014-01-22 06:05:04 +0400
commitb582ef0990d457f7ce8ccf827af51a575ca0b4a6 (patch)
tree2893cba0f3c386795a7324c71851d165a68d891e /include/net
parent2618abb73c8953f0848511fc13f68da4d8337574 (diff)
downloadlinux-b582ef0990d457f7ce8ccf827af51a575ca0b4a6.tar.xz
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/net')
-rw-r--r--include/net/protocol.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 0e5f8665d7fb..a7e986b08147 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -108,6 +108,9 @@ int inet_del_offload(const struct net_offload *prot, unsigned char num);
void inet_register_protosw(struct inet_protosw *p);
void inet_unregister_protosw(struct inet_protosw *p);
+int udp_add_offload(struct udp_offload *prot);
+void udp_del_offload(struct udp_offload *prot);
+
#if IS_ENABLED(CONFIG_IPV6)
int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char num);
int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char num);