Bug 602205 - Could not ping guest successfully after changing e1000 MTU
Could not ping guest successfully after changing e1000 MTU
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
medium Severity medium
: beta
: 6.1
Assigned To: Michael S. Tsirkin
Virtualization Bugs
:
Depends On:
Blocks: 580954 678338
  Show dependency treegraph
 
Reported: 2010-06-09 07:58 EDT by Amos Kong
Modified: 2015-05-24 20:05 EDT (History)
13 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.144.el6
Doc Type: Bug Fix
Doc Text:
Cause: qemu-kvm e1000 emulation didn't support multi-buffer packets larger than rxbuf_size. Consequence: setting MTU of e1000 virtual NIC to 16110 caused networking to stop working. Fix: implemented support to multi-buffer packets larger than rxbuf_size in e1000 emulation code. Result: setting MTU of e1000 virtual NIC to 16110 now works.
Story Points: ---
Clone Of:
: 678338 (view as bug list)
Environment:
Last Closed: 2011-05-19 07:29:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 07:20:36 EDT

  None (edit)
Description Amos Kong 2010-06-09 07:58:28 EDT
Description of problem:

I booted up a guest with e1000 nic, change the MTU of guest nic and tap device to 16110 (max MTU of e1000 nic), and added an arp entry on host, then ping guest from host, but it was failed.
# ping $guest_ip -I e1000_0_6001 -s 16082 -M do

This test can pass with virtio_nic / rtl8139 NIC.
) max MTU of virtio_nic: 65520
# ping $guest_ip -I virtio_0_6001 -s 65492 -M do
) max MTU of rtl8139: 1500
# ping $guest_ip -I rtl8139_0_6001 -s 1472 -M do


Version-Release number of selected component (if applicable):
host kernel: 2.6.32-33.el6.x86_64
guest kernel: 2.6.18-201.el5.x86_64
# rpm -qa |grep qemu
gpxe-roms-qemu-0.9.7-6.3.el6.noarch
qemu-img-0.12.1.2-2.69.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.69.el6.x86_64
qemu-kvm-debuginfo-0.12.1.2-2.69.el6.x86_64
qemu-kvm-0.12.1.2-2.69.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Boot up a guest with e1000 nic
2. Change MTU of guest nic and $tap
guest)# ifconfig eth0 mtu 16610
host)# ifconfig $tap 16610
3. Add a arp entry on host
# arp -s $guest_ip $guest_mac -i $tap
4. Ping guest from host  (16110-28=16082, 16110 is max mtu of e1000)
#ping $guest_ip -I $tap -s 16082 -M do

  
Actual results:
could not ping guest successfully
Coudl not captured any ICMP packet on guest's eth0
Can only captured ICMP request packets on tap device
# tcpdump -i e1000_0_6001 icmp
tcpdump: WARNING: e1000_0_6001: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on e1000_0_6001, link-type EN10MB (Ethernet), capture size 65535 bytes
19:35:45.148923 IP dhcp-91-173.nay.redhat.com > dhcp-91-102.nay.redhat.com: ICMP echo request, id 34575, seq 1, length 16090
19:35:46.148542 IP dhcp-91-173.nay.redhat.com > dhcp-91-102.nay.redhat.com: ICMP echo request, id 34575, seq 2, length 16090
19:35:47.148536 IP dhcp-91-173.nay.redhat.com > dhcp-91-102.nay.redhat.com: ICMP echo request, id 34575, seq 3, length 16090

Expected results:
can ping guest successfully


Additional info:

1. QEMU cmd line:
# qemu-kvm -name vm1 -monitor tcp:0:6001,server,nowait -drive file=/root/autotest/client/tests/kvm/images/RHEL-Server-5.5-64-virtio.qcow2,if=ide,cache=none,boot=on -net nic,vlan=0,model=e1000,macaddr=02:A9:7C:6C:de:52 -net tap,vlan=0,ifname=e1000_0_6001,script=/root/autotest/client/tests/kvm/scripts/qemu-ifup,downscript=no -m 512 -smp 1 -soundhw ac97 -redir tcp:5000::22 -vnc :0 -usbdevice tablet -rtc-td-hack -no-hpet -cpu qemu64,+sse2 -no-kvm-pit-reinjection -serial unix:/tmp/serial-20100607-160811-gidK,server,nowait
Comment 2 RHEL Product and Program Management 2010-06-09 08:12:58 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Michael S. Tsirkin 2010-06-20 12:55:28 EDT
Were you able to set mtu to 16610 in guest?
What I get is:
# ifconfig eth0 16610
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:57  
          inet addr:0.0.64.226  Bcast:255.255.255.255  Mask:0.0.0.0
          inet6 addr: fe80::5054:ff:fe12:3457/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1180 (1.1 KiB)  TX bytes:1152 (1.1 KiB)

so mtu can not be set to 16610.
Please confirm.
Comment 4 Amos Kong 2010-06-21 03:40:21 EDT
(In reply to comment #3)
> Were you able to set mtu to 16610 in guest?
> What I get is:
> # ifconfig eth0 16610

The right cmd should be "# ifconfig eth0 mtu 16610"

> # ifconfig eth0
> eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:57  
>           inet addr:0.0.64.226  Bcast:255.255.255.255  Mask:0.0.0.0
>           inet6 addr: fe80::5054:ff:fe12:3457/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:2 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000 
>           RX bytes:1180 (1.1 KiB)  TX bytes:1152 (1.1 KiB)
> 
> so mtu can not be set to 16610.
> Please confirm.
Comment 5 Michael S. Tsirkin 2010-06-21 05:20:46 EDT
Does it succeed for you? I see:

#  ifconfig eth0 mtu 16610
SIOCSIFMTU: Invalid argument
#  ifconfig eth0 
eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:57  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe12:3457/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:590 (590.0 b)  TX bytes:810 (810.0 b)
# dmesg|tail
Adding 2064376k swap on /dev/mapper/vg_dhcp74172-lv_swap.  Priority:-1 extents:1 across:2064376k 
SELinux: initialized (dev binfmt_misc, type binfmt_misc), uses genfs_contexts
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
ip6_tables: (C) 2000-2006 Netfilter Core Team
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: no IPv6 routers present
e1000: eth0: e1000_change_mtu: Invalid MTU setting
Comment 6 Michael S. Tsirkin 2010-06-23 04:52:38 EDT
It seems that qemu allows packets up to 16384.
Please try with mtu 16384.
Comment 7 Amos Kong 2010-06-23 05:17:04 EDT
Hi mst,

(linux-2.6/Documentation/networking/e1000.txt)
The max MTU of e1000 is _16110_, Some Intel gigabit adapters that support Jumbo
Frames have a frame size limit of 9238 bytes, with a corresponding MTU size
limit of 9216 bytes.

--------

guest)# ifconfig eth0 mtu 16110
guest)# echo $?
0
guest)# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 02:A9:7C:6C:7D:8C
          inet addr:10.66.91.102  Bcast:10.66.91.255  Mask:255.255.255.0
          inet6 addr: fe80::a9:7cff:fe6c:7d8c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:16110  Metric:1
          RX packets:610 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41973 (40.9 KiB)  TX bytes:7234 (7.0 KiB)
guest)# dmesg
eth0: no IPv6 routers present
hdc: drive_cmd: status=0x41 { DriveReady Error }
hdc: drive_cmd: error=0x04 { AbortedCommand }
ide: failed opcode was: 0xec
mtrr: type mismatch for f0000000,100000 old: uncachable new: write-combining
mtrr: type mismatch for f0000000,400000 old: uncachable new: write-combining
e1000: eth0 changing MTU from 1500 to 16110
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
guest)# lspci |grep Eth
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet
Controller (rev 03)

guest)# ifconfig eth0 mtu 16111
SIOCSIFMTU: Invalid argument

--------

I can only set mtu of my host e1000 nic to 9216.
# lspci |grep Eth
00:19.0 Ethernet controller: Intel Corporation 82567LM-3 Gigabit Network
Connection (rev 02)
Comment 8 Michael S. Tsirkin 2010-06-23 05:44:36 EDT
In the description of problem you say:
guest)# ifconfig eth0 mtu 16610
host)# ifconfig $tap 16610
Since 16610 > 16110, is this why this works?
Does it work with mtu 16110?
Comment 9 Amos Kong 2010-06-23 06:34:59 EDT
(In reply to comment #8)
> In the description of problem you say:
> guest)# ifconfig eth0 mtu 16610
> host)# ifconfig $tap 16610

This is a write error.  I found this bug with 16110.

> Since 16610 > 16110, is this why this works?
> Does it work with mtu 16110?    

When set mtu to 16110, host could not ping guest successfully.
# ping $guest_ip -I e1000_0_6001 -s 16082 -M do
Comment 18 Amos Kong 2011-02-19 04:22:13 EST
guest) # ifconfig eth0 mtu 16110
host) # ifconfig t0-165012-Ywsy mtu 16110
host) # arp -s 10.66.82.167 9a:0c:2b:2e:ab:13 -i t0-165012-Ywsy
host) # ping 10.66.82.167 -I t0-165012-Ywsy -s 16082 -M do
PING 10.66.82.167 (10.66.82.167) from 10.66.83.176 t0-165012-Ywsy: 16082(16110) bytes of data.
16090 bytes from 10.66.82.167: icmp_seq=1 ttl=64 time=1.65 ms
16090 bytes from 10.66.82.167: icmp_seq=2 ttl=64 time=0.576 ms
16090 bytes from 10.66.82.167: icmp_seq=3 ttl=64 time=0.426 ms
...


Bug can't be reproduced with qemu-kvm-0.12.1.2-2.145.el6.x86_64.
Moving to VERIFIED.
Comment 19 Eduardo Habkost 2011-05-05 09:04:59 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: qemu-kvm e1000 emulation didn't support multi-buffer packets larger than rxbuf_size.

Consequence: setting MTU of e1000 virtual NIC to 16110 caused networking to stop working.

Fix: implemented support to multi-buffer packets larger than rxbuf_size in e1000 emulation code.

Result: setting MTU of e1000 virtual NIC to 16110 now works.
Comment 24 errata-xmlrpc 2011-05-19 07:29:47 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html
Comment 25 errata-xmlrpc 2011-05-19 08:45:34 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

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

Note You need to log in before you can comment on or make changes to this bug.