From owner-freebsd-net@freebsd.org Tue Sep 4 18:20:53 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79FA1FF7A40 for ; Tue, 4 Sep 2018 18:20:53 +0000 (UTC) (envelope-from v.maffione@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 12F0A7AB36 for ; Tue, 4 Sep 2018 18:20:53 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id CC37DFF7A3F; Tue, 4 Sep 2018 18:20:52 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90B3DFF7A3D for ; Tue, 4 Sep 2018 18:20:52 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E1117AB32 for ; Tue, 4 Sep 2018 18:20:52 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-qt0-x22b.google.com with SMTP id h4-v6so5102583qtj.7 for ; Tue, 04 Sep 2018 11:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ftpU4I5MCFF0fKJXfQbBxWm+xNOboRmhVe6/ayIMCKI=; b=T6wNWZGa3YrprGcJlKkaXq4XYwVAqJI8FB0UvSu9B5NaVTHwQr3jvyRnq5AiPHwNDs kXQv08bGUuPF1VdOu+XHJhzKDf0mMJVo5y5VHS5/WNxGuY8kZxQaOGYW8aGVpPZnLaPu wb4WDzrZeF+URBvzUVkW3h9kDeJY/sZ30+SxbImAavslEkWCuefWQNsZi4+H3aQoKUQ+ ZTNzDPBvOka2U79WfthcH6NDeqs6vnxOkRTRsWJ0ObaGePmvo7w0uwa1eFjSHt4S2fva utwr4moWwaYq0NYpycEiMnN+HMevnSVSa+y1CDvnrg5mFmN0oCH4VueHcutyySN8BN3V 9mww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ftpU4I5MCFF0fKJXfQbBxWm+xNOboRmhVe6/ayIMCKI=; b=fN1IB+GhEIV8UbOHULZVD54YndPbpPJHGB1kBRP43uHaiXGR70Gk0dwS9mTrAfh+uP CUFZYbrdyV4A205CMPjT+/gYlvY1ZGZB7YhqD5h3B3izTKPGwfsEL40Li5T30OI+jYn+ FZnf0VcdGS4AmmLGS2PbINW4KhXxAVlU5s0mRmzmRsyM4kq2KJr/kZ/vfmYH2trRI7qj 1OHIAIzLri0FRzbpbPrmhmPuED+p0RuvtjCGJ3G4oOvy3gjRCX5OW3FmpsurbGmfid72 XHBdSiOe1O+bMTsbPM2FdFtrMljunmLQ7NwihoFgmnKOujdoJp+hjTVaxJeO7tUV2VdO xgSg== X-Gm-Message-State: APzg51DjN7PVi+JmiTgsOz9vg0AcYM6vm8Tus7LHEivX0x7kwQhvlVUB hGjXEYof/GyuSXZWz05RJ4UQWoAkWd++GzaQSvMc8FLB X-Google-Smtp-Source: ANB0VdYl4ZS52AWQUrL5CDrWqgvHnOYy/zY+9x62wt0y6jgGfdFaJglFtvEP/5bgp+sG654TsJ9QYSlvG7Hw6Z5VVpQ= X-Received: by 2002:a0c:fa08:: with SMTP id q8-v6mr28720650qvn.179.1536085251516; Tue, 04 Sep 2018 11:20:51 -0700 (PDT) MIME-Version: 1.0 References: <20180901014953.GV45503@funkthat.com> <20180901211123.GZ45503@funkthat.com> <20180904164303.68c43b6e@x23> <20180904162815.GA75530@funkthat.com> In-Reply-To: <20180904162815.GA75530@funkthat.com> From: Vincenzo Maffione Date: Tue, 4 Sep 2018 20:18:29 +0200 Message-ID: Subject: Re: vale and netmap module questions To: Marko Zec , Luigi Rizzo , "freebsd-net@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 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, 04 Sep 2018 18:20:53 -0000 Hi, I don't think the panic depends on the architecture. Also, it does not depend on using emulated mode or not. We have seen this happening on x86_64 on FreeBSD 12 head. As John-Mark says, kdloading netmap.ko is not enough. You need to open a netmap port corresponding to any network interface, e.g. # pkt-gen -i eth0 because this will trigger ifunit_ref() in the kernel (netmap tries to grab the interface called "eth0"). The ifunit_ref() panics and we still need to figure out why. Cheers, Vincenzo Il giorno mar 4 set 2018 alle ore 18:28 John-Mark Gurney ha scritto: > Marko Zec wrote this message on Tue, Sep 04, 2018 at 16:43 +0200: > > On Sat, 1 Sep 2018 14:11:23 -0700 > > John-Mark Gurney wrote: > > > Vincenzo Maffione wrote this message on Sat, Sep 01, 2018 at 22:25 > > > +0200: > > ... > > > > On x86_64 netmap is not built as a module, so everything works > > > > fine. I don't see any reason why it should be a module in aarch64. > > > > > > Well, sys/modules/netmap exists... If it isn't planned on ever being > > > made to work, it should be removed so people don't get confused, or > > > at least marked broken so it doesn't get built... > > > > > > I built it manually because it was quicker than recompiling an entire > > > kernel and rebooting... > > > > Hi John-Mark, > > > > out of curiosity I tested all four kernel config combinations with > > "device netmap" and "options VIMAGE" being on and off (both are on by > > default now in GENERIC) on amd64 @r338446, and found that kldloading > > netmap.ko can't provoke a panic. Was there a particular sequence of > > commands issued after kldloading netmap which led to the crash you > > reported earlier? > > Nope. I would kldload netmap, and then run the tcpdump command listed > in the original report, and it would just panic... > > Also note that my panic was on arm64, NOT amd64.. so it could be > something platform specific... > > > Nevertheless, note that building the kernel without "device netmap" is > > borderline pointless even if netmap core built as a kld module works, as > > this will result in all the drivers being built without the required > > netmap bits, which means they will only work in the painfully slow > > "emulation" mode with netmap. > > I was only doing it to test something out quickly.. > > > Perhaps the panic you stepped into was related to the emulation mode > > being used with netmap, instead of using the native netmap hooks in > > device drivers? Or maybe was it vale + VNET related? > > All I know was that it was the arm64 GENERIC kernel + module netmap > + running tcpdump w/ that command... Nothing special configured, just > a single ethernet interface configured w/ DHCP. No firewall configured, > just sshd and ntpd enabled.. > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." > -- Vincenzo