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>
This commit is contained in:

committed by
David S. Miller

parent
0c1d70af92
commit
d71785ffc7
@@ -10,6 +10,7 @@ config OPENVSWITCH
|
||||
select LIBCRC32C
|
||||
select MPLS
|
||||
select NET_MPLS_GSO
|
||||
select DST_CACHE
|
||||
---help---
|
||||
Open vSwitch is a multilayer Ethernet switch targeted at virtualized
|
||||
environments. In addition to supporting a variety of features
|
||||
|
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user