From owner-freebsd-bugs@freebsd.org Thu Feb 16 22:48:41 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37354CE2749 for ; Thu, 16 Feb 2017 22:48:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26E6D1A62 for ; Thu, 16 Feb 2017 22:48:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v1GMmfRq004233 for ; Thu, 16 Feb 2017 22:48:41 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 217156] Kernel panic using Netmap with selected NIC queue Date: Thu, 16 Feb 2017 22:48:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: milosz.kaniewski@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 22:48:41 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217156 Bug ID: 217156 Summary: Kernel panic using Netmap with selected NIC queue Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: milosz.kaniewski@gmail.com CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org Created attachment 180063 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D180063&action= =3Dedit Test program which ends with kernel panic. Hello, when I try to use netmap with specified NIC queue (ie. when I use flag NR_REG_ONE_NIC) I get kernel panic: panic: Assertion slot !=3D NULL failed at /usr/src/sys/modules/cxgbe/if_cxgbe/../../../dev/cxgbe/t4_netmap.c:353 cpuid =3D 14 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0660f53= 000 vpanic() at vpanic+0x186/frame 0xfffffe0660f53080 kassert_panic() at kassert_panic+0x126/frame 0xfffffe0660f530f0 cxgbe_netmap_reg() at cxgbe_netmap_reg+0x8d8/frame 0xfffffe0660f531c0 netmap_hw_reg() at netmap_hw_reg+0x2c/frame 0xfffffe0660f531f0 netmap_do_regif() at netmap_do_regif+0x2cb/frame 0xfffffe0660f53230 netmap_ioctl() at netmap_ioctl+0xa57/frame 0xfffffe0660f53620 freebsd_netmap_ioctl() at freebsd_netmap_ioctl+0x3e/frame 0xfffffe0660f53650 devfs_ioctl() at devfs_ioctl+0xc3/frame 0xfffffe0660f536a0 VOP_IOCTL_APV() at VOP_IOCTL_APV+0xe0/frame 0xfffffe0660f536d0 vn_ioctl() at vn_ioctl+0x124/frame 0xfffffe0660f537d0 devfs_ioctl_f() at devfs_ioctl_f+0x1f/frame 0xfffffe0660f537f0 kern_ioctl() at kern_ioctl+0x2b0/frame 0xfffffe0660f53850 sys_ioctl() at sys_ioctl+0x13f/frame 0xfffffe0660f53930 amd64_syscall() at amd64_syscall+0x2f9/frame 0xfffffe0660f53ab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0660f53ab0 --- syscall (54, FreeBSD ELF64, sys_ioctl), rip =3D 0x80097c97a, rsp =3D 0x7fffffffea88, rbp =3D 0x7fffffffeb20 --- KDB: enter: panic If the queue is not specified then everything works ok. To repeat this error: 1. Run 'pkt-gen -i vcxl0-1' or 2. Run program netmap_test.c. uname -a: FreeBSD test0 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r313561: Fri Feb 10 20:1= 8:01 UTC 2017 root@releng3.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd= 64 network card: Chelsio T540-CR /boot/loader.conf content: hw.cxgbe.num_vis=3D2 root@freebsd:~ # ifconfig vcxl0 vcxl0: flags=3D8843 metric 0 mtu 15= 00=20=20=20=20 =20=20 options=3Dec07bb ether 00:07:43:31:cf:52 nd6 options=3D29 media: Ethernet 10Gbase-SR status: active --=20 You are receiving this mail because: You are the assignee for the bug.=