From owner-freebsd-stable@freebsd.org Thu Feb 4 18:47:21 2016 Return-Path: Delivered-To: freebsd-stable@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 81D3DA9B9E3 for ; Thu, 4 Feb 2016 18:47:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 60B4385A for ; Thu, 4 Feb 2016 18:47:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 5DF31A9B9E2; Thu, 4 Feb 2016 18:47:21 +0000 (UTC) Delivered-To: stable@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 5D7DEA9B9E1 for ; Thu, 4 Feb 2016 18:47:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 269F2859 for ; Thu, 4 Feb 2016 18:47:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x232.google.com with SMTP id rs20so22428940igc.0 for ; Thu, 04 Feb 2016 10:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=gbC9ionT2WzSQTneJAckqoVoSNsU1e4ZuDzadkL7Jj4=; b=lWXZ0tZM2XaKYfoQiTefr/fZPx1b89xS0v3DiDTcKvoQ62i1voB09pyg9sn6A89bty YLSMK//IiYj2Ge/39SoHAgnCxKCUSVOt/JYonC1QBkrvxbVfrF8bvhBuQsyNg4gCdVR0 VjzwXHBcDI4uP/+11KvVsO+8hMqh0hgWonRhAHRXYE7vBavJd+CDNDgnNmeu6V+2Lh+0 6BEt/jgSgv0jvjBFcE6E6esbYMHKmNMn0LWEg8J+bCf99g2f2qtxH6gtLQfFjXLPS+Sb ALGUqKGzOy0PLULfs1ek1OgZ6V/Fx0p1AR9NYR5Mxa4+UIKdaT00+IL1gF3OzdClTHhU 9S0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=gbC9ionT2WzSQTneJAckqoVoSNsU1e4ZuDzadkL7Jj4=; b=eu/791cdHLf2eZ2RaFCCN8HxIBqi1NiUJsbGBtdBmwx2qp7Pa/jAN5J/MGyNehI0s2 EwkHxYUXTmQ6A0qx6IAW2g0dDFdlnjqD9+cvojHeIrHK2AjyYObzfQ4A4Ui+jPrQyv9s qlBLZfAkeJZREPnE8cDVfH7Z4ceksueXqCRX1h7JMVJ8Sxa2towU09DqFFQdud5+cMA2 nTzdB4Oy8tvD1jxBBhdappizRWw+mkBMUpqoZwLJE/zEfP4s62NMt8HbC9/iFaObacdq aQkKyrC1cKRxmsqOyJvJsj3xKKqd7GwJBz2qgpk73bC7bLG2PC70nS1fX9tmrZgbTDLW 6nXA== X-Gm-Message-State: AG10YOTGOhGbAVbVBWZQv0fB1luXPnPuGMvZInfewUs2oggr+JACKG/pq8BBQzGCDbvvba9tbmijtKgtCaCFrQ== MIME-Version: 1.0 X-Received: by 10.50.178.178 with SMTP id cz18mr11139015igc.37.1454611640560; Thu, 04 Feb 2016 10:47:20 -0800 (PST) Received: by 10.36.14.19 with HTTP; Thu, 4 Feb 2016 10:47:20 -0800 (PST) In-Reply-To: <20160204130029.GC88527@zxy.spb.ru> References: <20151018185639.GF42243@zxy.spb.ru> <20151018210049.GT6469@zxy.spb.ru> <20151022163519.GF6469@zxy.spb.ru> <20160202204446.GQ88527@zxy.spb.ru> <20160204130029.GC88527@zxy.spb.ru> Date: Thu, 4 Feb 2016 10:47:20 -0800 Message-ID: Subject: Re: 82576 + NETMAP + VLAN From: Adrian Chadd To: Slawa Olhovchenkov Cc: Luigi Rizzo , "stable@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 18:47:21 -0000 I've no time to help with this, I'm sorry :( -a On 4 February 2016 at 05:00, Slawa Olhovchenkov wrote: > On Tue, Feb 02, 2016 at 11:44:47PM +0300, Slawa Olhovchenkov wrote: > >> On Thu, Oct 22, 2015 at 11:24:53AM -0700, Luigi Rizzo wrote: >> >> > On Thu, Oct 22, 2015 at 11:12 AM, Adrian Chadd wrote: >> > > On 22 October 2015 at 09:35, Slawa Olhovchenkov wro= te: >> > >> On Sun, Oct 18, 2015 at 07:45:52PM -0700, Adrian Chadd wrote: >> > >> >> > >>> Heh, file a bug with luigi; it should be defined better inside net= map itself. >> > >> >> > >> I am CC: luigi. >> > >> >> > >> Next question: do kevent RX/TX sync? >> > >> In my setup I am need to manual NIOCTXSYNC/NIOCRXSYNC. >> > > >> > > Hi, >> > > >> > > Nope. kqueue() doesn't do the implicit sync like poll() does; it's >> > > just the notification path. >> > >> > actually not. When the file descriptor is registered there >> > is an implicit sync, and there is another one when an event >> > is posted for the file descriptor. >> > >> > unless there are bugs, of course. >> >> I found strange behaivor: >> >> 1. open netmap and register in main thread >> 2. kevent register in different thread >> 3. result: got event by kevent but no ring sinc (all head,tail,cur >> still 0). >> >> Is this normal? Or is this bug? >> >> open and registering netmap in same thread as kevent resolve this. > > Also, kevent+netmap deadlocked for me: > > PID TID COMM TDNAME KSTACK > 1095 100207 addos - mi_switch+0xe1 sleepq_catc= h_signals+0xab sleepq_timedwait_sig+0x10 _sleep+0x238 kern_nanosleep+0x10e = sys_nanosleep+0x51 amd64_syscall+0x40f Xfast_syscall+0xfb > 1095 100208 addos worker#0 mi_switch+0xe1 sleepq_catc= h_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d kern_kevent+0x401 sys_keven= t+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb > 1095 100209 addos worker#1 mi_switch+0xe1 turnstile_w= ait+0x42a __mtx_lock_sleep+0x26b knote+0x38 freebsd_selwakeup+0x8b netmap_n= otify+0x55 netmap_pipe_txsync+0x156 netmap_poll+0x400 netmap_knrw+0x6e kque= ue_register+0x799 kern_kevent+0x158 sys_kevent+0x12a amd64_syscall+0x40f Xf= ast_syscall+0xfb > 1095 100210 addos worker#2 mi_switch+0xe1 sleepq_catc= h_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d kern_kevent+0x401 sys_keven= t+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb > 1095 100211 addos worker#NOIP mi_switch+0xe1 sleepq_catc= h_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d kern_kevent+0x401 sys_keven= t+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb > 1095 100212 addos balancer mi_switch+0xe1 turnstile_w= ait+0x42a __mtx_lock_sleep+0x26b knote+0x38 freebsd_selwakeup+0x8b netmap_n= otify+0x2a netmap_pipe_rxsync+0x54 netmap_poll+0x774 netmap_knrw+0x6e kern_= kevent+0x5cc sys_kevent+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb