From owner-freebsd-drivers@freebsd.org Sun Mar 22 08:35:19 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 D4ACF27AC22; Sun, 22 Mar 2020 08:35:19 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 48lW6Z6F1lz4HMl; Sun, 22 Mar 2020 08:35:18 +0000 (UTC) (envelope-from rajfbsd@gmail.com) Received: by mail-wm1-x343.google.com with SMTP id z18so2085368wmk.2; Sun, 22 Mar 2020 01:35:18 -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=EYIQJb1muH+DqawygoCbMbt+0ntrkdsrjLtRTAPbABY=; b=lSn5i/47yfFEj+ZJgRSikBSxwXN+qpUqogBM5IX0LeAoshqVNU+BJTRNUNt2t+PIRm tOf+S83fVh3rKB8cGXQ9CzBW3Y2Wf/ioWuS6XD56o3WxrgTBdFhUGShDyKcf4xy9lDNf imaCrrmONk+Muh2ubxIPpIaLOGYouivETp6dceMxVdN1iFpABO0NK1kA+4HRHsfziEjt IzejI0I/HYj37lUH0teUlEsDhNlgbDYHp+erTpvHoNkE9ksntkAZzfuteyOR6+3/rNhU 8rilhusJi6XqKl32LNaH8XpiL1YMXoLr3scdUVxh97h9vIcNTs8MmvtBlnR3rbTJfDaM ccFw== 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=EYIQJb1muH+DqawygoCbMbt+0ntrkdsrjLtRTAPbABY=; b=XJ/+qMPEBPpQQwpaRR+eGUJp16+Igu3THNBXjIl7KQvBMPJDS1vzUkXXDdr6w1PWiR Soi73L0tZIcJZ/0mdrueci3KlMAVmldTXXZvf5zyJN2sJI2JQRZ25OQq4PprMCrBBvG8 LaLuAbaI2LLgm6zryCUfe/OqA0aQQnPAMwTtQd0LsLXRKGNYOYSbrPkY0fbb0uZdJJog +nYsXh/zF/1aceYUsiKebcZUIUCGrK5ubAkCiRLdocJcte5xGejQ3oZdEJlLodsAHqfB cY4sflwjFEynOLjsSfqY4itCO7tWubHi0jVCqiHaOBW9h+zwdw5xvxH4GTK8U4/gauDT YPuQ== X-Gm-Message-State: ANhLgQ25uRH4NceJ8NWd8HIISE0SNHi0WammXJuI6VGPl+dWN4lQAARs fFq0I2ZwNRzT5NiTIVcnrVRUizFqkHFMdvdLca1mS8zR X-Google-Smtp-Source: ADFU+vvbT6ihRx18N1JVvH1QHNTmkLlgiOFAQ8bmp0r4Vi+1HYmlcT/+6kWc+5K7SJP1nbsGKe+u94xbRTwkHiyPn18= X-Received: by 2002:a1c:f607:: with SMTP id w7mr5994970wmc.162.1584866117019; Sun, 22 Mar 2020 01:35:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rajesh Kumar Date: Sun, 22 Mar 2020 14:05:02 +0530 Message-ID: Subject: Re: How to build a out-of-box network module with RSS To: freebsd-drivers@freebsd.org, FreeBSD Hackers X-Rspamd-Queue-Id: 48lW6Z6F1lz4HMl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=lSn5i/47; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rajfbsd@gmail.com designates 2a00:1450:4864:20::343 as permitted sender) smtp.mailfrom=rajfbsd@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (2.94), ipnet: 2a00:1450::/32(-2.39), asn: 15169(-0.72), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[3.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.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 08:35:19 -0000 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. Am I missing something? or doing something wrong? 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. >> >