Bug 4001
Summary: | (net via_velocity) can't lower mtu | ||
---|---|---|---|
Product: | Drivers | Reporter: | Fadi Adlouni (fadlouni) |
Component: | Network | Assignee: | Francois Romieu (romieu) |
Status: | CLOSED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | alan, bunk, romieu |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.10 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Fadi Adlouni
2005-01-06 15:30:11 UTC
Francois, can you comment on this issue? Did you to to modify the MTU on your changed driver after the module gets loaded but before the device is ifconfiged up ? -- Ueimor hi. just tried it and indeed it works if i do the following: - do the changes i made to the header file. - load the module - shutdown the interface: ifconfig eth0 down - change the mtu: ifconfig eth0 mtu 1400 - bring up the interface: ifconfig eth0 up. root /home/fadlouni/ #ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:50:8D:EB:AC:A4 inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3146 errors:0 dropped:0 overruns:0 frame:0 TX packets:2586 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3731036 (3.5 Mb) TX bytes:333838 (326.0 Kb) Interrupt:17 Base address:0xb400 root /home/fadlouni/ #ifconfig eth0 mtu 1400 root /home/fadlouni/ #ping 192.168.0.254 PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data. --- 192.168.0.254 ping statistics --- 21 packets transmitted, 0 received, 100% packet loss, time 19995ms <--------ping doesn't work after changing mtu while interface up. root /home/fadlouni/ #ifconfig eth0 down root /home/fadlouni/ #ifconfig eth0 mtu 1400 root /home/fadlouni/ #ifconfig eth0 up root /home/fadlouni/ #ping 192.168.0.254 PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data. 64 bytes from 192.168.0.254: icmp_seq=1 ttl=255 time=4.76 ms 64 bytes from 192.168.0.254: icmp_seq=2 ttl=255 time=1.76 ms 64 bytes from 192.168.0.254: icmp_seq=3 ttl=255 time=1.65 ms --- 192.168.0.254 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 1.656/2.728/4.764/1.441 ms now what is causing changing the mtu not to work when the interface is up? Thanks for the tip, Fadi. Fadi, can you try the last patch included in http://bugzilla.kernel.org/show_bug.cgi?id=4380 against 2.6.16-rc5 ? Despite the apparently different topic, it could fix the issue. -- Ueimor yes it works. seems the patch adds my change as well (change min mtu to 64). i patched my kernel: 2.6.15-gentoo-r1 with the patch and it works. i loaded the module, made sure the interface is up, changed MTU to 500 and ping works, changed it again to 1500/1350/1000 and it worked all the time. Thanks, Fadi. Thanks for your patience Fadi. The fix has just been included in the mainstream. You can now have it through the gentoo git-kernel-of-the-day. -- Ueimor just upgraded to gentoo 2.6.17-r5 and i couldn't change MTU again. it seems the patch provided through the other bug, fixed the memory corruption. but it didn't set the MIN_MTU to 64!. so the other bug which was concerned about larger MTUs (>1500) got fixed, but my bug with a lower MTU didn't!. the fix is simple, in file drivers/net/via-velocity.h change: #define VELOCITY_MIN_MTU (1514-14) To #define VELOCITY_MIN_MTU (64) then recompile and now this issue concerning lowering mtu is fixed. The fix for the lower bound of the MTU has been in the kernel since 2.6.18-rc1. -- Ueimor |