From owner-freebsd-net@freebsd.org Thu Sep 6 06:35:41 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 CCA21FEEB5D for ; Thu, 6 Sep 2018 06:35:41 +0000 (UTC) (envelope-from zec@fer.hr) 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 6F2F888AD4 for ; Thu, 6 Sep 2018 06:35:41 +0000 (UTC) (envelope-from zec@fer.hr) Received: by mailman.ysv.freebsd.org (Postfix) id 31547FEEB54; Thu, 6 Sep 2018 06:35:41 +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 1FF53FEEB53 for ; Thu, 6 Sep 2018 06:35:41 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.fer.hr", Issuer "TERENA SSL CA 3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 980FC88AD2; Thu, 6 Sep 2018 06:35:40 +0000 (UTC) (envelope-from zec@fer.hr) Received: from x23 (161.53.19.9) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.3.399.0; Thu, 6 Sep 2018 08:35:31 +0200 Date: Thu, 6 Sep 2018 08:35:35 +0200 From: Marko Zec To: John-Mark Gurney CC: Vincenzo Maffione , , Luigi Rizzo , "freebsd-net@freebsd.org" Subject: Re: vale and netmap module questions Message-ID: <20180906083535.36ac39ce@x23> In-Reply-To: <20180906004206.GB75530@funkthat.com> References: <20180901014953.GV45503@funkthat.com> <20180901211123.GZ45503@funkthat.com> <20180904164303.68c43b6e@x23> <20180904162815.GA75530@funkthat.com> <20180905104433.08ad13b8@x23> <20180905124730.0f266c37@x23> <20180906004206.GB75530@funkthat.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd11.1) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [161.53.19.9] 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: Thu, 06 Sep 2018 06:35:42 -0000 On Wed, 5 Sep 2018 17:42:06 -0700 John-Mark Gurney wrote: > Marko Zec wrote this message on Wed, Sep 05, 2018 at 12:47 +0200: > > On Wed, 5 Sep 2018 12:36:38 +0200 > > Vincenzo Maffione wrote: > > > > > Hi Marko, > > > Thanks a lot for identifying the problem. > > > If I understand correctly, simply adding -D VIMAGE here > > > https://github.com/luigirizzo/netmap/blob/master/sys/modules/netmap/Makefile#L11 > > > would at least mitigate the issue. > > > If you think I'm right I'll just add it. > > > > Right, go for it... > > Why not just hook up netmap to the build? I have no idea why it is on by default only on amd64... Perhaps due to the lack of adopters / testers on other platforms? Perhaps the code has some assumptions re. memory coherence model, or unaligned accesses, which hold the water on amd64 but not necessarily elsewhere? > Because if you add -DVIMAGE to the Makefile, you'll now break people > who have kernels w/o VIMAGE.. No, and this is certifiable. At least in this particular case, we have only two macro instances which set / restore curvnet prior to calling into the network stack. If the network stack is of the non-VNET kind, and thus doesn't care about curvnet, that won't do any harm. > And the only reason to build netmap module manually is because it's not hooked up. There's still a reason to retain the possibility to build netmap as module, as this speeds up the development cycles for netmap-internal hackers / experimenters. But beyond that, running netmap without native support in device drivers is pretty much pointless.