]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Use skb_zerocopy() for upcall
authorThomas Graf <tgraf@suug.ch>
Fri, 13 Dec 2013 14:22:21 +0000 (15:22 +0100)
committerJesse Gross <jesse@nicira.com>
Mon, 6 Jan 2014 23:53:17 +0000 (15:53 -0800)
commit7ac152e92f35b64184b46891229d64fda2d7dd25
treeb3deb68ee339b9857796a51a4a68deba0188fede
parent0fa37a0db28a55c2f2c3b9618cbfcdb16805fc08
openvswitch: Use skb_zerocopy() for upcall

Use of skb_zerocopy() can avoid the expensive call to memcpy()
when copying the packet data into the Netlink skb. Completes
checksum through skb_checksum_help() if not already done in
GSO segmentation.

Zerocopy is only performed if user space supported unaligned
Netlink messages. memory mapped netlink i/o is preferred over
zerocopy if it is set up.

Cost of upcall is significantly reduced from:
+   7.48%       vhost-8471  [k] memcpy
+   5.57%     ovs-vswitchd  [k] memcpy
+   2.81%       vhost-8471  [k] csum_partial_copy_generic

to:
+   5.72%     ovs-vswitchd  [k] memcpy
+   3.32%       vhost-5153  [k] memcpy
+   0.68%       vhost-5153  [k] skb_zerocopy

(megaflows disabled)

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
net/openvswitch/datapath.c