From owner-freebsd-drivers@freebsd.org Sun Mar 22 13:20:36 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 5C34E261179; Sun, 22 Mar 2020 13:20:36 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ldRm1pzrz4cqG; Sun, 22 Mar 2020 13:20:36 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: by mail-wr1-x431.google.com with SMTP id h9so13194808wrc.8; Sun, 22 Mar 2020 06:20:36 -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 :cc; bh=YpzLvzaut23noywhqJdtiWc3XYASm+UtjTOBaFX89DM=; b=L7yO71rUvwYjY3T8vzdTCABmr8Xgb+AsU2lMmloRmYPrME7gogcqdeLdwCMCGzSjtO dTBAhc9acfJjVBEBxDp0zRPYiH4AM2e3cNT/8wDjAQwxAoL3brzv2w8dchhWXoxjelD9 6khy6CoVuVLNT/JUT6eUQXGfBZCqdlwGcl5aDQH24joz7GrMx7p69kYPISCCLQi4ndAk oPdb3T8W+1HdmU0pHQYMnSMr7jutbIvtv8ceklVgZOyskf2D17yIHc6wYRVqy6+nvDBp EZ4SLu4pA6h8IT3FU+5ye3Mth8lVzG+e/KKFqKHzt7/NWdxZkjMUpGFjn22eAYfxEv/O Ed4A== 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:cc; bh=YpzLvzaut23noywhqJdtiWc3XYASm+UtjTOBaFX89DM=; b=hWR5TrqnHyyGUie71JximDMvPRWj+PbI3h8IiMGlDxeei246X5beJ2CR10Vb35R4gg Fm10TIisoOFGfePxZfxSvNRONKD38mDflLHOh55n2ahNEzgKOL56HGeOj6RxfIXtwDBC kTgBwfwIk1mqwvBjrwvvweZpqBx7Uw1jqDXszAjoqYtFagcZf4USufTUeSrv/U5KRf11 pywe8hTj5kZAGFawBJuuwg6mTy9Llm/FZXODcscR/HsV6z5rHHI9EByFycW1k//HkDhh fGJvot5IX6i593p5xgRV4iDAekBMGAaL2rYJIunob15eXxRyz6LAZrMHvtNRkg5goejW twMQ== X-Gm-Message-State: ANhLgQ1LAGvbPPe3DkYHznpBZrK8gTq3ghqKwVTa8/PQ2mUgcscfIKpP UFAhATvTpjX7Xlm0qmTJD4rXSnyO2QTV7ned31kVqw== X-Google-Smtp-Source: ADFU+vsVY6wSauu4AujpXdE1+TMWEh2nwhLsz+zTaa/tNoQEwtZ4saVI3VUnBog8r4O3C9EujviTanHv5NCOcBZ8R6I= X-Received: by 2002:a5d:674f:: with SMTP id l15mr5044002wrw.196.1584883234286; Sun, 22 Mar 2020 06:20:34 -0700 (PDT) MIME-Version: 1.0 References: <20200322113857.GU1992@kib.kiev.ua> In-Reply-To: <20200322113857.GU1992@kib.kiev.ua> From: Rajesh Kumar Date: Sun, 22 Mar 2020 18:50:22 +0530 Message-ID: Subject: Re: How to build a out-of-box network module with RSS To: Konstantin Belousov Cc: freebsd-drivers@freebsd.org, FreeBSD Hackers X-Rspamd-Queue-Id: 48ldRm1pzrz4cqG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.96 / 15.00]; NEURAL_HAM_MEDIUM(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-0.99)[-0.993,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 13:20:36 -0000 Ok. Thanks for your inputs Konstantin. I will do some more tests to see how I can use that and will update the thread if I could figure out. On Sun, Mar 22, 2020 at 5:09 PM Konstantin Belousov wrote: > 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" >