From owner-freebsd-net@FreeBSD.ORG Tue Aug 14 21:06:58 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7643C106566C for ; Tue, 14 Aug 2012 21:06:58 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 322A98FC08 for ; Tue, 14 Aug 2012 21:06:57 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 982FB7300A; Tue, 14 Aug 2012 23:25:53 +0200 (CEST) Date: Tue, 14 Aug 2012 23:25:53 +0200 From: Luigi Rizzo To: Nikolay Denev Message-ID: <20120814212553.GA34207@onelab2.iet.unipi.it> References: <20120813111722.GA79347@onelab2.iet.unipi.it> <0B0751C8-DD87-4891-820C-624BFAADB334@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0B0751C8-DD87-4891-820C-624BFAADB334@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: net@freebsd.org Subject: Re: ipfw meets netmap (6.5 Mpps in userspace) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2012 21:06:58 -0000 On Tue, Aug 14, 2012 at 10:53:38PM +0300, Nikolay Denev wrote: > On Aug 13, 2012, at 2:17 PM, Luigi Rizzo wrote: ... > Hi Luigi, > > I've tried copying netmap sources from HEAD to the latest RELENG_9 branch, but running > kipfw with two VALE interfaces produced immediate kernel panic (transcribed by hand, possible typos): i suspect kernel and userland headers out of sync, causing some ioctl() to be called with invalid parameters (and perhaps a missing check in the kernel does the rest, otherwise of course the kernel should not crash). Please make sure you also update net/netmap*.h FWIW, i tested the code in RELENG_9 on my workstation. cheers luigi > Fatal trap 12: page fault while in kernel mode > cpuid = 1; apic id = 01 > fault virtual address = 0x28 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff808274da > stack pointer = 0x28:0xffffff88df1a5530 > frame pointer = 0x28:0xffffff88df1a5550 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 2349 (kipfw) > [ thread pid 2349 tid 100612 ] > Stopped at ifunit_ref+0x2a: > db> bt > Tracing pid 2349 tid 100612 td 0xfffffe0094fd1000 > ifunit_ref() at ifunit_ref+0x2a > ifioctl() at ifioctl+0x1cd > netmap_ioctl() at netmap_ioctl+0x121 > devfs_ioctl_f() at devfs_ioctl_f+0x7b > kern_ioctl() at kern_ioctl+0x115 > sys_ioctl() at sys_ioctl+0xfd > amd64_syscall() at amd64_syscall+0x5ea > Xfast_syscall() at Xfast_syscall+0xf7 > --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x800b5eaec, rsp = 0x7fffffffd > 888, rbp = 0xc0206911 --- > > > > Anyways, many thanks for you great work on NETMAP and not the super cool user-space IPFW! > > Cheers, > Nikolay