NetBSD-Bugs archive

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

kern/57650: Unable to change MTU on lagg device



>Number:         57650
>Category:       kern
>Synopsis:       Unable to change MTU on lagg device
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 10 01:05:00 +0000 2023
>Originator:     Sverre Froyen
>Release:        10.99.10
>Organization:
>Environment:
NetBSD gateway.fesk.me 10.99.10 NetBSD 10.99.10 (GENERIC) #4: Sat Oct  7 16:19:15 MDT 2023  sverre%gateway.fesk.me@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
There are two separate issues:

1) The command "ifconfig lagg0 MTU <any value>" results in a locking against myself panic.

crash output and backtrace:

# crash -M netbsd.5.core -N netbsd.5
Crash version 10.99.10, image version 10.99.10.
crash: _kvm_kvatop(0)
Kernel compiled without options LOCKDEBUG.
System panicked: lock error: Mutex: mutex_vector_enter,549: locking against myself: lock 0xffffb357a1535800 cpu 1 lwp 0xffffb357b6bf1400
Backtrace from time of crash is available.

crash> bt
__kernel_end() at 0
kern_reboot() at sys_reboot
vpanic() at vpanic+0x17d
panic() at printf_nostamp
lockdebug_abort() at lockdebug_abort+0x114
mutex_vector_enter() at mutex_vector_enter+0x371
lagg_init() at lagg_init+0x13
lagg_ioctl() at lagg_ioctl+0x828
doifioctl() at doifioctl+0x30c
sys_ioctl() at sys_ioctl+0x56d
syscall() at syscall+0x17a
--- syscall (number 54) ---
syscall+0x17a:

Checking the source, the problem is obvious:
lagg_init is called with the lock already set (by lagg_ioctl)

Possible fixes:
should lagg_init_locked be used instead?
or
should lagg_ioctl not set the lock?

2) Attempting to configure a jumbo MTU on boot fails with an invalid value error

With /etc/ifconfig.lagg0 containing

!ifconfig wm0 up mtu 1500
!ifconfig wm1 up mtu 1500
create
laggproto lacp laggport wm0 laggport wm1 192.168.2.1 netmask 255.255.255.0
up

lagg0 works perfectly. If I change the MTUs on the wm interfaces to 9000 (or anything > 1500), I get an invalid error and lagg0 does not work.

PS The wm interfaces are I211 Ethernet (COPPER) and work fine with MTU 9000.

>How-To-Repeat:
1) With the system running and lagg0 configured as in the description with MTU 1500, enter the command

ifconfig lagg0 mtu 9000

and observe the panic

2) Change /etc/ifconfig.lagg0 to

!ifconfig wm0 up mtu 9000
!ifconfig wm1 up mtu 9000
create
laggproto lacp laggport wm0 laggport wm1 192.168.2.1 netmask 255.255.255.0
up

and reboot

Watch the error message in the network configuration output

>Fix:
1) See my comments in the description regarding the locking

2) ?



Home | Main Index | Thread Index | Old Index