From owner-freebsd-drivers@freebsd.org Sun Mar 22 11:39:12 2020 Return-Path: Delivered-To: freebsd-drivers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5D7727E6E8; Sun, 22 Mar 2020 11:39:12 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48lbBm2VBWz4Ypj; Sun, 22 Mar 2020 11:39:12 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 02MBcviq069340 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 22 Mar 2020 13:39:00 +0200 (EET) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 02MBcviq069340 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 02MBcvln069339; Sun, 22 Mar 2020 13:38:57 +0200 (EET) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Sun, 22 Mar 2020 13:38:57 +0200 From: Konstantin Belousov To: Rajesh Kumar Cc: freebsd-drivers@freebsd.org, FreeBSD Hackers Subject: Re: How to build a out-of-box network module with RSS Message-ID: <20200322113857.GU1992@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 48lbBm2VBWz4Ypj X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [1.74 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_LONG(0.99)[0.987,0]; NEURAL_SPAM_MEDIUM(0.75)[0.748,0]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 11:39:12 -0000 On Sun, Mar 22, 2020 at 02:05:02PM +0530, Rajesh Kumar wrote: > Hi Konstantin, > > > Set KERNBUILDDIR env (or make) variable to the full path of the > > build directory for your custom kernel. > > Thanks for your inputs. I tried setting the KERNBUILDDIR, but seems still > it's not taking the opt_rss.h properly. Not sure I am missing something. > > I built and installed the custom kernel from a directory "freebsd_12_kern" > with the sys/amd64/conf/GENERIC added with the PCBGROUP and RSS options. I > see the following obj directory > > */usr/obj/root/freebsd_12_kern/amd64.amd64/sys/GENERIC* -> where opt_rss.h > file has RSS defined. > > After that, I tried to build my network module from another directory > "freebsd_12_dev" as below > > *freebsd_12_dev/sys/modules/netgbe # make KERNBUILDDIR= > /usr/obj/root/freebsd_12_kern/amd64.amd64/sys/GENERIC * > > which generates the following object module directory > > */usr/obj/root/freebsd_12_dev/amd64.amd64/sys/modules/netgbe* -> where > opt_rss.h file has RSS NOT defined. opt_rss.h must not be generated in the module build directory. The point of KERNBUILDDIR is that it is taken from the kernel config dir. > > Am I missing something? or doing something wrong? No idea. > > Thanks, > Rajesh > > On Sun, Mar 22, 2020 at 10:50 AM Rajesh Kumar wrote: > > > Hi, > > > > Any thoughts about how to build a out-of-box network module with RSS > > enabled? > > > > Thanks, > > Rajesh. > > > > On Fri, Mar 20, 2020 at 11:34 AM Rajesh Kumar wrote: > > > >> Hi, > >> > >> I am writing a network driver. I am trying to test with RSS feature. I > >> see the default kernel config doesn't have RSS included. So, I built a > >> custom kernel with the following options set and installed the kernel with > >> a different name > >> > >> options PCBGROUP > >> options RSS > >> > >> After booting to the custom kernel, I am trying to build my network > >> module with opt_rss.h in my makefile. But I don't see "#define RSS 1" in > >> opt_rss.h in my module object directory. But I see it defined the custom > >> kernel OBJ directory. > >> > >> So, should I build my network modules as inbuilt module to have it work > >> with RSS? Or anyway I can build my module out-of-box with RSS? > >> > >> Please let me know if any details needed. > >> > >> Thanks, > >> Rajesh. > >> > > > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org"