NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/38748: msk fails to set large MTU



>Number:         38748
>Category:       kern
>Synopsis:       Setting an MTU over 1500 silently fails with msk
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 25 19:30:06 +0000 2008
>Originator:     Scott Ellis
>Release:        NetBSD 4.99.63
>Organization:
        
>Environment:
        
        
System: NetBSD intrepid 4.99.63 NetBSD 4.99.63 (INTREPID.P5W.DEBUG) #1: Sun May 
25 11:08:06 PDT 2008 
scotte@intrepid:/nbu/source/netbsd/src/obj.amd64/nbu/source/netbsd/src/sys/arch/amd64/compile/INTREPID.P5W.DEBUG
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        
Attemtpting to enable jumbo frames using:
ifconfig msk1 mtu 9000

silently fails.  The command reports success, but the MTU remains at 1500,
as verified by tcpdump and ifconfig.
The culprit is the change to use ifioctl_common() (if_msk.c 1.16).  I'm not
entirely sure WHY this fails, but reverting that change, just letting the
ioctl fall through to ether_ioctl() works fine.

>How-To-Repeat:
        
ifconfig msk1 mtu 9000
observe mtu is still 1500
>Fix:
        
Revert change to use ifioctl_common(), or just let ether_ioctl() handle it.

--- if_msk.c.orig       2008-05-25 11:24:29.000000000 -0700
+++ if_msk.c    2008-05-25 11:24:45.000000000 -0700
@@ -690,23 +690,11 @@
 msk_ioctl(struct ifnet *ifp, u_long command, void *data)
 {
        struct sk_if_softc *sc_if = ifp->if_softc;
-       struct ifreq *ifr = (struct ifreq *) data;
        int s, error = 0;
 
        s = splnet();
 
        switch(command) {
-       case SIOCSIFMTU:
-               if (ifr->ifr_mtu < ETHERMIN)
-                       return EINVAL;
-               else if (sc_if->sk_softc->sk_type != SK_YUKON_FE) {
-                       if (ifr->ifr_mtu > SK_JUMBO_MTU)
-                               error = EINVAL;
-               } else if (ifr->ifr_mtu > ETHERMTU)
-                       error = EINVAL;
-               else if ((error = ifioctl_common(ifp, command, data)) == 
ENETRESET)
-                       error = 0;
-               break;
        default:
                DPRINTFN(2, ("msk_ioctl ETHER\n"));
                error = ether_ioctl(ifp, command, data);

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index