netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] vxlan: Fix to enable UDP checksums on interface
@ 2014-11-07  2:06 Tom Herbert
  2014-11-07  3:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Herbert @ 2014-11-07  2:06 UTC (permalink / raw)
  To: davem, netdev

Add definition to vxlan nla_policy for UDP checksum. This is necessary
to enable UDP checksums on VXLAN.

In some instances, enabling UDP checksums can improve performance on
receive for devices that return legacy checksum-unnecessary for UDP/IP.
Also, UDP checksum provides some protection against VNI corruption.

Testing:

Ran 200 instances of TCP_STREAM and TCP_RR on bnx2x.

TCP_STREAM
  IPv4, without UDP checksums
      14.41% TX CPU utilization
      25.71% RX CPU utilization
      9083.4 Mbps
  IPv4, with UDP checksums
      13.99% TX CPU utilization
      13.40% RX CPU utilization
      9095.65 Mbps

TCP_RR
  IPv4, without UDP checksums
      94.08% TX CPU utilization
      156/248/462 90/95/99% latencies
      1.12743e+06 tps
  IPv4, with UDP checksums
      94.43% TX CPU utilization
      158/250/462 90/95/99% latencies
      1.13345e+06 tps

Signed-off-by: Tom Herbert <therbert@google.com>
---
 drivers/net/vxlan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ca30982..0ab4114 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2233,6 +2233,9 @@ static const struct nla_policy vxlan_policy[IFLA_VXLAN_MAX + 1] = {
 	[IFLA_VXLAN_L2MISS]	= { .type = NLA_U8 },
 	[IFLA_VXLAN_L3MISS]	= { .type = NLA_U8 },
 	[IFLA_VXLAN_PORT]	= { .type = NLA_U16 },
+	[IFLA_VXLAN_UDP_CSUM]	= { .type = NLA_U8 },
+	[IFLA_VXLAN_UDP_ZERO_CSUM6_TX]	= { .type = NLA_U8 },
+	[IFLA_VXLAN_UDP_ZERO_CSUM6_RX]	= { .type = NLA_U8 },
 };
 
 static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[])
-- 
2.1.0.rc2.206.gedb03e5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] vxlan: Fix to enable UDP checksums on interface
  2014-11-07  2:06 [PATCH net-next] vxlan: Fix to enable UDP checksums on interface Tom Herbert
@ 2014-11-07  3:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-07  3:00 UTC (permalink / raw)
  To: therbert; +Cc: netdev

From: Tom Herbert <therbert@google.com>
Date: Thu,  6 Nov 2014 18:06:01 -0800

> Add definition to vxlan nla_policy for UDP checksum. This is necessary
> to enable UDP checksums on VXLAN.
> 
> In some instances, enabling UDP checksums can improve performance on
> receive for devices that return legacy checksum-unnecessary for UDP/IP.
> Also, UDP checksum provides some protection against VNI corruption.
> 
> Testing:
 ...
> Signed-off-by: Tom Herbert <therbert@google.com>

Applied, thanks Tom.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-07  3:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-07  2:06 [PATCH net-next] vxlan: Fix to enable UDP checksums on interface Tom Herbert
2014-11-07  3:00 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).