Bug 713337

Summary: backport checksum optimization for virtio_net
Product: Red Hat Enterprise Linux 6 Reporter: jason wang <jasowang>
Component: kernelAssignee: jason wang <jasowang>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.2CC: akong, juzhang, mst, rhod, tburke, vrozenfe, wquan, yvugenfi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: developer-ack-6.2
Fixed In Version: kernel-2.6.32-176.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 713643 (view as bug list) Environment:
Last Closed: 2011-12-06 13:41:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 713643    
Attachments:
Description Flags
summary-1vm-external-to0guest-gro-off test result none

Description jason wang 2011-06-15 02:55:37 UTC
Description of problem:
   
There's no need for the guest to validate the checksum if it have been
validated by host nics. So this patch introduces a new flag -
VIRTIO_NET_HDR_F_DATA_VALID which is used to bypass the checksum
examing in guest. The backend (tap/macvtap) may set this flag when
met skbs with CHECKSUM_UNNECESSARY to save cpu utilization.
    
No feature negotiation is needed as old driver just ignore this flag.
    
Iperf shows 12%-30% performance improvement for UDP traffic. For TCP,
when gro is on no difference as it produces skb with partial
checksum. But when gro is disabled, 20% or even higher improvement
could be measured by netperf.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Ronen Hod 2011-06-15 06:35:46 UTC
Jason,
Did you do any sanity testing for Windows guests? If there are no problems, then surely this nice performance gain should be included it in 6.2.
Thanks, Ronen.

Comment 3 RHEL Program Management 2011-06-15 12:49:54 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 5 jason wang 2011-06-16 03:23:09 UTC
*** Bug 713615 has been marked as a duplicate of this bug. ***

Comment 7 Aristeu Rozanski 2011-08-02 13:58:01 UTC
Patch(es) available on kernel-2.6.32-176.el6

Comment 10 Quan Wenli 2011-10-10 07:44:11 UTC
Created attachment 527175 [details]
summary-1vm-external-to0guest-gro-off test result

Comment 11 Quan Wenli 2011-10-10 07:45:19 UTC
As checksum only effect RX packages, so runnning netperf TCP_STREAM (vm acts as server) test in GRO OFF to verify it between kernel-175 and 176 with qemu kvm_0.12.1.2-2.183.
from posted result shows 12% avg improvement in sum normalize.
for detail infomation, please refer summary-1vm-external-to-guest-gro-off.out file.

So change it to verified. thanks ~

Comment 12 Yvugenfi@redhat.com 2011-10-14 14:25:32 UTC
Can you describe test setup? 

I implemented this feature for Windows guest driver but I cannot test it as I don't see that we are getting VIRTIO_NET_HDR_F_DATA_VALID flag from the host.

Comment 13 jason wang 2011-10-17 02:13:31 UTC
(In reply to comment #12)
> Can you describe test setup? 
> 
> I implemented this feature for Windows guest driver but I cannot test it as I
> don't see that we are getting VIRTIO_NET_HDR_F_DATA_VALID flag from the host.

Hello Yan:

GRO is normally enabled in host, so we can not see VIRITO_NET_HDR_F_DATA_VALID for tcp stream. You can test with udp or disable GRO in host.

Comment 14 errata-xmlrpc 2011-12-06 13:41:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1530.html