summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_netlink.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2016-02-12 15:43:57 +0100
committerDavid S. Miller <davem@davemloft.net>2016-02-17 02:21:48 +0100
commitd71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8 (patch)
tree142081880ca68e3f066df14ecfb2371b229e76fd /net/openvswitch/flow_netlink.c
parentnet: use dst_cache for vxlan device (diff)
downloadlinux-d71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8.tar.xz
linux-d71785ffc7e7cae3fbdc4ea8a9d05b7a1c59f7b8.zip
net: add dst_cache to ovs vxlan lwtunnel
In case of UDP traffic with datagram length below MTU this give about 2% performance increase when tunneling over ipv4 and about 60% when tunneling over ipv6 Signed-off-by: Paolo Abeni <pabeni@redhat.com> Suggested-and-acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/openvswitch/flow_netlink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index d1bd4a45ca2d..58b8efc23668 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -1959,6 +1959,12 @@ static int validate_and_copy_set_tun(const struct nlattr *attr,
if (!tun_dst)
return -ENOMEM;
+ err = dst_cache_init(&tun_dst->u.tun_info.dst_cache, GFP_KERNEL);
+ if (err) {
+ dst_release((struct dst_entry *)tun_dst);
+ return err;
+ }
+
a = __add_action(sfa, OVS_KEY_ATTR_TUNNEL_INFO, NULL,
sizeof(*ovs_tun), log);
if (IS_ERR(a)) {