Bug 771820

Summary: there is no packet longer than MTU when tso is on (e1000)
Product: Red Hat Enterprise Linux 6 Reporter: Siyuan Wang <siywang>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, akong, bsarathy, jasowang, juzhang, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-05 07:25:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
this file is generated by cmd "tcpdump -i switch -w host62_guest62_e1000_tso_on.dump" none

Description Siyuan Wang 2012-01-05 05:31:22 UTC
Created attachment 550811 [details]
this file is generated by cmd "tcpdump -i switch -w host62_guest62_e1000_tso_on.dump"

Description of problem:
there is no packet longer than MTU when tso is on in e1000

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.213.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. boot a guest with e1000 nic and open tso on guest:
ethtool -K eth0 tso on

2. scp from guest to host

3. use tcpdump to capture the packets on host
tcpdump -i switch -w host62_guest62_e1000_tso_on.dump

4. analyze the result, there is no packet longer than MTU
wireshark host62_guest62_e1000_tso_on.dump

Actual results:
there is no packet longer than MTU

Expected results:
there are packets longer than MTU

Additional info:

1. virtio nic
rhel6.2 guest --> pass

2. e1000 nic
rhel6.2 guest --> Failed

Comment 2 jason wang 2012-01-05 05:51:24 UTC
(In reply to comment #0)
> Created attachment 550811 [details]
> this file is generated by cmd "tcpdump -i switch -w
> host62_guest62_e1000_tso_on.dump"
> 
> Description of problem:
> there is no packet longer than MTU when tso is on in e1000
> 
> Version-Release number of selected component (if applicable):
> qemu-kvm-0.12.1.2-2.213.el6.x86_64
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1. boot a guest with e1000 nic and open tso on guest:
> ethtool -K eth0 tso on
> 
> 2. scp from guest to host
> 
> 3. use tcpdump to capture the packets on host
> tcpdump -i switch -w host62_guest62_e1000_tso_on.dump
> 
> 4. analyze the result, there is no packet longer than MTU
> wireshark host62_guest62_e1000_tso_on.dump
> 
> Actual results:
> there is no packet longer than MTU
> 
> Expected results:
> there are packets longer than MTU

This is not the expected result, you can not get a packet larger than MTU even for a real e1000 card. The reason why virtio can is that it passes GSO packet to host directly.

> 
> Additional info:
> 
> 1. virtio nic
> rhel6.2 guest --> pass
> 
> 2. e1000 nic
> rhel6.2 guest --> Failed

Comment 3 Amos Kong 2012-01-05 06:10:57 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > Created attachment 550811 [details]
> > this file is generated by cmd "tcpdump -i switch -w
> > host62_guest62_e1000_tso_on.dump"
> > 
> > Description of problem:
> > there is no packet longer than MTU when tso is on in e1000
> > 
> > Version-Release number of selected component (if applicable):
> > qemu-kvm-0.12.1.2-2.213.el6.x86_64
> > 
> > How reproducible:
> > 100%
> > 
> > Steps to Reproduce:
> > 1. boot a guest with e1000 nic and open tso on guest:
> > ethtool -K eth0 tso on
> > 
> > 2. scp from guest to host
> > 
> > 3. use tcpdump to capture the packets on host
> > tcpdump -i switch -w host62_guest62_e1000_tso_on.dump

Hi siyuan,

| autotest/client/tests/ethtool.py :(+125)
|        logging.debug("Listen using command: %s", tcpdump_cmd)
|        session2.sendline(tcpdump_cmd)

^^^^^^^  tcpdump is executed in guest, large packets would be cut by emulated e1000 nic (not guest protocol layer, TSO is enabled).

|        if not virt_utils.wait_for(
|                        lambda:session.cmd_status("pgrep tcpdump") == 0, 30):

Please try to capture packets in guest.

Comment 4 Siyuan Wang 2012-01-05 07:12:04 UTC
I can capture large packets in guest, so it's not a bug.