From owner-freebsd-questions@FreeBSD.ORG Sun Nov 12 15:29:26 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 638E816A403 for ; Sun, 12 Nov 2006 15:29:26 +0000 (UTC) (envelope-from gurdiga@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9441643DA0 for ; Sun, 12 Nov 2006 15:29:23 +0000 (GMT) (envelope-from gurdiga@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so867529wxc for ; Sun, 12 Nov 2006 07:29:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lOmidH2kSAI+1Ic7uoRZqMDfDPp1NnCL4CkaZYX13iK/sFOQ1rxRlXSsZGLB1T8yv+8umusWO+d1pm3nRAkCxdKRz4v4YyaYu4H5DkgZPlOaTa2VHWFONU/0WSOzDg8uSOMCENBc+6zOQmqmkQu2oc+3+n5ISXjEA4gmeYA+dnU= Received: by 10.90.105.19 with SMTP id d19mr2319417agc.1163345363101; Sun, 12 Nov 2006 07:29:23 -0800 (PST) Received: by 10.90.120.15 with HTTP; Sun, 12 Nov 2006 07:29:23 -0800 (PST) Message-ID: Date: Sun, 12 Nov 2006 17:29:23 +0200 From: "Vlad GURDIGA" To: freebsd-questions@freebsd.org In-Reply-To: <44zmaw66cv.fsf@be-well.ilk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44zmaw66cv.fsf@be-well.ilk.org> Subject: Re: bpf kernel module X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 15:29:26 -0000 On 12/11/06, Lowell Gilbert wrote: > "Vlad GURDIGA" writes: > > > I'm trying to keep very close touch with 6.1_STABLE cvsupping sources > > once a week or even more often. I'm thinking of removing as much as > > possible devices from the kernel loading them from /boot/loader.conf > > instead, so I could rebuild and install them without a whole > > kernel/world rebuild and reboot when sources change. I'm not sure this > > is a correct way, any piece of advice regarding this would be highly > > appreciated. :) > > > > So, I've successfully done that with sound and network card drivers, > > but did not succeed with removing bpf from the kernel. Booting a > > kernel with no bpf support, and with > > ng_bpf_load="YES" in my loader.conf, the pflogd fails to start with this error: > > > > Nov 11 20:22:33 uxterm pflogd[10251]: Failed to initialize: (no > > devices found) /dev/bpf0: No such file or directory > > Nov 11 20:22:33 uxterm pflogd[10251]: Exiting, init failure > > > > And, tcpdump also fails saying that "no suitable device found". Of > > course there is no /dev/bpf0. > > > > Is there any way to have the bpf0 device without booting a kernel with > > bpf device included? > > The kernel module *should* work. I suspect that there is an error > message when it tries to load the module and fails. You could check > for that error message, or try to load the module by hand and see if > you get a clue to the problem. > Here is how I did: commented out the "device bpf" line in the kernel, built and installed the kernel, and added ng_bpf_load="YES" in loader.conf. I guess this is the module for the bpf (is this correct? I'm not 100% sure). So, booting with the new kernel, and the module being loaded from the loader.conf, the pflogd fails to start with this error: Nov 11 20:22:33 uxterm pflogd[10251]: Failed to initialize: (no devices found) /dev/bpf0: No such file or directory Nov 11 20:22:33 uxterm pflogd[10251]: Exiting, init failure And, tcpdump also fails saying that "no suitable device found". Of course there is no /dev/bpf0. Unfortunately, I do not have enough experience to figure out how to load this device at runtime. Is there any solution to this situation?