From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 12 19:36:49 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C058F16A4CE for ; Sat, 12 Jun 2004 19:36:49 +0000 (GMT) Received: from fire.securenet-server.net (fire.securenet-server.net [63.247.80.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84C2743D46 for ; Sat, 12 Jun 2004 19:36:49 +0000 (GMT) (envelope-from eric@theeric.com) Received: from 165.sub-166-141-30.myvzw.com ([166.141.30.165] helo=localhost) by fire.securenet-server.net with asmtp (Exim 4.34) id 1BZEIf-00040T-1I for freebsd-hackers@freebsd.org; Sat, 12 Jun 2004 15:36:26 -0400 Date: Sat, 12 Jun 2004 15:36:07 -0400 From: Eric Jacobs To: freebsd-hackers@freebsd.org Message-Id: <20040612153607.2634c989.eric@theeric.com> In-Reply-To: <20040612184617.65b746f4.sebastian.ssmoller@gmx.net> References: <20040612184617.65b746f4.sebastian.ssmoller@gmx.net> X-Mailer: Sylpheed version 0.8.5 (GTK+ 1.2.10; i386-portbld-freebsd4.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - fire.securenet-server.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - theeric.com X-Source: X-Source-Args: X-Source-Dir: X-Mailman-Approved-At: Sun, 13 Jun 2004 11:43:34 +0000 Subject: Re: lpt module X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2004 19:36:49 -0000 On Sat, 12 Jun 2004 18:46:17 +0200 sebastian ssmoller wrote: > > so i decided to play around a bit with the lpt module. first thing i > noticed when compiled lpt as module is: i cannot unload it (kldunload > says: device not configured). somewhere in the net i read that this is > an expected behaviour (as it is for usb afaik) because lpt module does > not release memory properly (?) The lpt driver needs a device_detach method in sys/ppbus/lpt.c. Might want to look at sio_detach in sio for hints. It will need to ensure that the device is closed, release bus resources, and destroy its cdevs, and possibly some other non-obvious things (haven't looked closely) From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 13 20:22:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3246D16A4D0; Sun, 13 Jun 2004 20:22:53 +0000 (GMT) Received: from genius.tao.org.uk (genius.tao.org.uk [212.135.162.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F8B543D31; Sun, 13 Jun 2004 20:22:51 +0000 (GMT) (envelope-from joe@tao.org.uk) Received: by genius.tao.org.uk (Postfix, from userid 100) id A42D342DA; Sun, 13 Jun 2004 21:22:36 +0100 (BST) Date: Sun, 13 Jun 2004 21:22:36 +0100 From: Josef Karthauser To: hackers@freebsd.org, net@FreeBSD.org Message-ID: <20040613202236.GJ4570@genius.tao.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GQS4QOk0ejoUc4Db" Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: 100mhz Wavelab on -current PCI and PCCARD. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2004 20:22:53 -0000 --GQS4QOk0ejoUc4Db Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Does anyone have wireless experience? I'm off to the US next week and I thought I'd buy some (cheaper) wireless kit whilst I'm out there. I would like to run 100mb wireless (802.11g?) on both my laptop and my home server which I guess means that I'd like a recommendation for both pccard as well as pci. I'm running -current on the laptop and -stable on the server, although this can be upgraded to 5.x if necessary. The server is currently an ethernet bridging firewall (IPFW) and ideally I'd like to be able to filter the wireless segment also. Is it possible to using a wireless card in the machine and be able to filter at a MAC address level? I want a bit of control of the network. Is there a recommended configuration? Joe --=20 Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D An eclectic mix of fact an= d theory. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --GQS4QOk0ejoUc4Db Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iEYEARECAAYFAkDMt4wACgkQXVIcjOaxUBYlPgCgun9OyKjKaFMmKN147sIZ4sq+ TXMAoL9e1f07AJMC/+beC8RB1khxpxVh =04/b -----END PGP SIGNATURE----- --GQS4QOk0ejoUc4Db-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 09:47:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8356016A4CE for ; Mon, 14 Jun 2004 09:47:39 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0D6243D5D for ; Mon, 14 Jun 2004 09:47:37 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i5E9l8B23536 for freebsd-hackers@freebsd.org; Mon, 14 Jun 2004 12:47:08 +0300 Date: Mon, 14 Jun 2004 12:47:08 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040614124708.A22679@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Subject: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 09:47:39 -0000 Traffic analysis applications running on high-speed networks are using BPF to capture packet. However, on heavy traffic frequent context switches caused by read(2) from a BPF device is a overhead. I implemented a prototype module that stores captured packets in user mmap-able area. I want to describe the prototype and discuss benchmark results. The module is a netgraph node, called ng_mmq. mmq stands for memory-mapped queue. The node has one hook, called "input". When this hook is connected, o memory buffer is allocated. size is controlled by the debug.mmq_size sysctl. o a device /dev/mmqX is created, where X is a node ID o /dev/mmqX is mmap-able by the user, mmap() returns an allocated buffer o when packet arrives on hook, it is copied to the buffer, which is actually a ringbuffer. The ringbuffer's head is advanced. o user spins until tail != head, which means new data arrived. Then it reads from ringbuffer, and advances the tail. o no mutexes are used The code is at So this is the basic idea. I connected ng_mmq node to my rl0: ethernet node via the ng_hub, and benchmarked it against the pcap, using the same pcap callback function. Packet processing was simulated by the delay() function that just takes some CPU cycles. What I have found is: 1. bpf seems to be faster, i.e. it drops less packets than mmq 2. mmq seems to capture more packets. This is sample output from the benchmark utility: # ./benchmark rl0 /dev/mmq5 1000 pcap: rcvd: 15061, dropped: 14047, seen: 1000 mmq: rcvd: 23172, dropped: 21789, seen: 1000 Now, the questions: 1. is my interpretation of benchmark results correct? 2. if they are correct, why bpf is faster? 3. is it OK to have no mutexes for ringbuffer operations ? The ng_mmq code, as well as the benchmark code, are at http://oasis.uptsoft.com/~devnull/ng_mmq/ Setup instructions are at http://oasis.uptsoft.com/~devnull/ng_mmq/README -- Sergey Lyubka, Network Security Consultant NetFort Technologies Ltd, Galway, Ireland From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 13 21:16:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35B3C16A4CE for ; Sun, 13 Jun 2004 21:16:25 +0000 (GMT) Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.157.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B344D43D31 for ; Sun, 13 Jun 2004 21:16:24 +0000 (GMT) (envelope-from mark@grondar.org) Received: from storm.FreeBSD.org.uk (Ugrondar@localhost [127.0.0.1]) i5DLGJM9004424; Sun, 13 Jun 2004 22:16:19 +0100 (BST) (envelope-from mark@grondar.org) Received: (from Ugrondar@localhost)i5DLGJ9A004423; Sun, 13 Jun 2004 22:16:19 +0100 (BST) (envelope-from mark@grondar.org) X-Authentication-Warning: storm.FreeBSD.org.uk: Ugrondar set sender to mark@grondar.org using -f Received: from grondar.org (localhost [127.0.0.1])i5DKP8sm049077; Sun, 13 Jun 2004 21:25:09 +0100 (BST) (envelope-from mark@grondar.org) From: Mark Murray Message-Id: <200406132025.i5DKP8sm049077@grimreaper.grondar.org> To: Alexander Mueller In-Reply-To: Your message of "Sat, 05 Jun 2004 12:29:29 +0200." <40C1A089.20707@6by9.org> Date: Sun, 13 Jun 2004 21:25:08 +0100 Sender: mark@grondar.org X-Scanned-By: milter-sender/0.55.730 (storm.FreeBSD.org.uk []); Sun, 13 Jun 2004 22:16:19 +0100 X-Mailman-Approved-At: Mon, 14 Jun 2004 11:36:44 +0000 cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to build lint libraries, e.g. llib-lc.ln? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2004 21:16:25 -0000 Alexander Mueller writes: > when writing C applications I'd like to check them using lint. > Unfortunately FreeBSD comes with only "llib-lposix.ln" and > "llib-lstdc.ln" in "/usr/libdata/lint". Is there an easy, i.e. > automated, way to create lint libraries (e.g. llib-lc.ln) for > all the libs in "/usr/src/lib"? yes. In current use WANT_LINT= yes in /etc/make.conf. This won't work in STABLE; I haven't MFCed it. M -- Mark Murray iumop ap!sdn w,I idlaH From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 11:55:42 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F14816A4D2 for ; Mon, 14 Jun 2004 11:55:42 +0000 (GMT) Received: from noconname.org (19.Red-80-26-109.pooles.rima-tde.net [80.26.109.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0911943D45 for ; Mon, 14 Jun 2004 11:55:41 +0000 (GMT) (envelope-from jncastellano@noconname.org) Received: from peron (hugo.noconname.org [192.168.0.2]) by noconname.org (Postfix) with SMTP id 5ECF841 for ; Mon, 14 Jun 2004 14:00:36 +0200 (CEST) Message-ID: <003801c45207$01ddfa70$0200a8c0@peron> From: =?iso-8859-1?Q?Jos=E9_Nicol=E1s_Castellano?= To: Date: Mon, 14 Jun 2004 13:59:11 +0200 Organization: Asoc. No cON Name MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2739.300 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: freebsd asm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 11:55:42 -0000 Hello to all, I'm proud to join this mailing, having posibilities to learn some new features of freebsd system. I have to mention i did some tests in asm from freebsd-devel and i get surprised, look at this: [demon]~$ uname -a FreeBSD demon.noconname.org 5.2.1-RELEASE-p4 FreeBSD 5.2.1-RELEASE-p4 = #0: Tue Apr 6 19:35:49 CEST 2004 root@demon.noconname.org:/usr/obj/usr/src/sys/NocONName i386 [demon]~$ cat hello.asm %include 'system.inc' section .data hola db 'Hola', 0Ah hbytes equ $-hola section .text global _start _start: push dword hbytes push dword hola push dword stdout sys.write push dword 0 sys.exit [demon]~$ nasm -f elf hello.asm hello.asm:1: fatal: unable to open include file `system.inc' =BFWhere is that file?... the -current port of nasm is incomplete ? Ok... we take some modifications... << %include 'system.inc' < Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE19116A4CE for ; Mon, 14 Jun 2004 12:39:49 +0000 (GMT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6006F43D1F for ; Mon, 14 Jun 2004 12:39:49 +0000 (GMT) (envelope-from emaste@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id ; Mon, 14 Jun 2004 08:38:58 -0400 Message-ID: From: Ed Maste To: 'Sergey Lyubka' , freebsd-hackers@freebsd.org Date: Mon, 14 Jun 2004 08:38:57 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Subject: RE: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 12:39:50 -0000 > The module is a netgraph node, called ng_mmq. mmq stands for > memory-mapped queue. The node has one hook, called "input". > When this hook is connected, > o memory buffer is allocated. size is controlled by the > debug.mmq_size sysctl. > o a device /dev/mmqX is created, where X is a node ID > o /dev/mmqX is mmap-able by the user, mmap() returns an > allocated buffer > o when packet arrives on hook, it is copied to the buffer, > which is actually a ringbuffer. The ringbuffer's head is > advanced. > o user spins until tail != head, which means new data arrived. > Then it reads from ringbuffer, and advances the tail. > o no mutexes are used > > The code is at > > So this is the basic idea. I connected ng_mmq node to my rl0: > ethernet node via the ng_hub, and benchmarked it against the > pcap, using the same pcap callback function. Packet processing was > simulated by the delay() function that just takes some CPU cycles. > What I have found is: > 1. bpf seems to be faster, i.e. it drops less packets than mmq > 2. mmq seems to capture more packets. > > This is sample output from the benchmark utility: > # ./benchmark rl0 /dev/mmq5 1000 > pcap: rcvd: 15061, dropped: 14047, seen: 1000 > mmq: rcvd: 23172, dropped: 21789, seen: 1000 > > Now, the questions: > 1. is my interpretation of benchmark results correct? > 2. if they are correct, why bpf is faster? > 3. is it OK to have no mutexes for ringbuffer operations ? Hello Sergey. I haven't looked at your code, but I'll provide some comments, having implemented a mmaped ringbuffer BPF replacement myself. First off, you should be able to do significantly better than vanilla BPF. Gigabit line rate is doable for "reasonable" sized packets and good hardware. Watch how much time you spend in your simulated packet processing. I also needed to add a delay to my benchmarking, because without it I'd run into the hardware limit (i.e. 1gbps), hiding the effects of further tweaking. However, if it's too great it will overwhelm the bpf/ringbuffer overhead, making your results less useful. I did my benchmark by increasing the packet rate until I found the point at which packets started to be dropped. In my testing I found the call to microtime() to be quite expensive. (It will vary depending on which timecounter is being used.) Is this in a SMP or uniprocesor environment? I think your gain from a ringbuffer interface will be more significant in the SMP case. Does the ng_hub cause the packet to be copied? If so you've still got the same number of copies as vanilla BPF. Are you using the same snap length (or copying the entire packet) in each case? As for question 3, be careful that you're atomically modifying the head and tail indices/pointers. But yes, you can do it without a mutex. -ed From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 13:05:44 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E1AC16A4CE for ; Mon, 14 Jun 2004 13:05:44 +0000 (GMT) Received: from mail.teleri.net (teleri.net [216.193.194.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0626643D48 for ; Mon, 14 Jun 2004 13:05:44 +0000 (GMT) (envelope-from wd@teleri.net) Received: by mail.teleri.net (Postfix, from userid 501) id BF9DB11448; Mon, 14 Jun 2004 06:05:34 -0700 (PDT) Date: Mon, 14 Jun 2004 08:05:34 -0500 From: Chip Norkus To: hackers@freebsd.org Message-ID: <20040614130534.GI17367@teleri.net> References: <20040611025307.GG17367@teleri.net> <20040611140740.GA3355@schweikhardt.net> <20040611171029.GH17367@teleri.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040611171029.GH17367@teleri.net> User-Agent: Mutt/1.4.1i Subject: Re: indent bugfix / added features X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 13:05:44 -0000 Followup: I was off most of the weekend, but I did find one bug and have corrected it. The new patch can be found at http://telekinesis.org/indent/indent.patch. I whipped up a simple script to test it over /usr/src and that is at http://telekinesis.org/indent/test.sh. I found that my patched version (when run with no options) produced identical output to the existing version. -chip -- personal: chip norkus; renaissance hacker; wd@teleri.net work: systems engineer @ lunarpages, inc.; chip@lunarpages.com info: finger wd@teleri.net for plan or keys; http://telekinesis.org From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 14:04:34 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8E2916A4CE for ; Mon, 14 Jun 2004 14:04:34 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id C6FF943D1F for ; Mon, 14 Jun 2004 14:04:32 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 14904 invoked from network); 14 Jun 2004 14:02:15 -0000 Received: from office.sbnd.net (HELO straylight.m.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 14 Jun 2004 14:02:14 -0000 Received: (qmail 24470 invoked by uid 1000); 14 Jun 2004 14:04:01 -0000 Date: Mon, 14 Jun 2004 17:04:00 +0300 From: Peter Pentchev To: Jos? Nicol?s Castellano Message-ID: <20040614140400.GF827@straylight.m.ringlet.net> Mail-Followup-To: Jos? Nicol?s Castellano , freebsd-hackers@freebsd.org References: <003801c45207$01ddfa70$0200a8c0@peron> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bGR76rFJjkSxVeRa" Content-Disposition: inline In-Reply-To: <003801c45207$01ddfa70$0200a8c0@peron> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: freebsd asm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 14:04:34 -0000 --bGR76rFJjkSxVeRa Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 14, 2004 at 01:59:11PM +0200, Jos? Nicol?s Castellano wrote: > Hello to all, >=20 > I'm proud to join this mailing, having posibilities to learn some new > features of freebsd system. >=20 > I have to mention i did some tests in asm from freebsd-devel and i get > surprised, look at this: >=20 > [demon]~$ uname -a > FreeBSD demon.noconname.org 5.2.1-RELEASE-p4 FreeBSD 5.2.1-RELEASE-p4 #0: > Tue Apr 6 19:35:49 CEST 2004 > root@demon.noconname.org:/usr/obj/usr/src/sys/NocONName i386 >=20 > [demon]~$ cat hello.asm > %include 'system.inc' > section .data > hola db 'Hola', 0Ah > hbytes equ $-hola > section .text > global _start > _start: > push dword hbytes > push dword hola > push dword stdout > sys.write > push dword 0 > sys.exit >=20 > [demon]~$ nasm -f elf hello.asm > hello.asm:1: fatal: unable to open include file `system.inc' >=20 > ?Where is that file?... the -current port of nasm is incomplete ? I assume you are referring to the system.inc file mentioned in http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x86-po= rtable-code.html If so, note that this page says that you need to create this file yourself, it is neither part of nasm nor part of the standard FreeBSD distribution :) See the last paragraph on the page - "Go ahead, enter it into your editor and save it as system.inc." :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 "yields falsehood, when appended to its quotation." yields falsehood, when = appended to its quotation. --bGR76rFJjkSxVeRa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAzbBQ7Ri2jRYZRVMRAhgjAJoD2VkUdzQy/0P1uiY/qNktlyAASwCeLRRR 8zKxQCkIlv1KVuAxwvOJZSo= =tgVH -----END PGP SIGNATURE----- --bGR76rFJjkSxVeRa-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 16:11:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A2D516A4CE for ; Mon, 14 Jun 2004 16:11:24 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AA6643D2D for ; Mon, 14 Jun 2004 16:10:41 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i5EG8eP09504 for freebsd-hackers@freebsd.org; Mon, 14 Jun 2004 19:08:40 +0300 Date: Mon, 14 Jun 2004 19:08:40 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040614190840.A29587@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from emaste@sandvine.com on Mon, Jun 14, 2004 at 08:38:57AM -0400 X-OS: FreeBSD 4.5-STABLE Subject: Re: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 16:11:24 -0000 Hi Ed, > I did my benchmark by increasing the packet rate until I found > the point at which packets started to be dropped. A bit offtopic - what traffic generator you use ? > In my testing I found the call to microtime() to be quite > expensive. (It will vary depending on which timecounter is > being used.) I haven't added the timestamp to the header yet, so what would you recommed to use ? > Is this in a SMP or uniprocesor environment? I think your gain > from a ringbuffer interface will be more significant in the SMP > case. I gonna test it much more on both SMP and UP machines > Does the ng_hub cause the packet to be copied? If so you've > still got the same number of copies as vanilla BPF. I think ng_hub does not do a copy, instead it passes mbufs through. Originally, I wanted this architecture: ng_ether / \ (lower) (upper) \ / ng_hub | ng_bpf | ng_mmq This way, you intercept all Ethernet traffic trough ng_hub. Then, ng_bpf does BPF filtering, if any. If no filtering is needed, then ng_bpf node may be omitted. And, at last, ng_mmq does queuing. > Are you using the same snap length (or copying the entire packet) > in each case? Hmm not sure what are you mean here. I am copying whole mbuf chain the same way BPF does. mbuf chain comes from the hook, and it can arrive to the hook from whatever source. > As for question 3, be careful that you're atomically modifying > the head and tail indices/pointers. But yes, you can do it > without a mutex. Any points how to do that ? the only thing I can think of is having atomic variable in shared memory chunk, and using spinlock + atomic change. sergey From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 16:41:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8D5016A4CE for ; Mon, 14 Jun 2004 16:41:08 +0000 (GMT) Received: from episec.com (episec.com [69.55.237.141]) by mx1.FreeBSD.org (Postfix) with SMTP id AC6A043D53 for ; Mon, 14 Jun 2004 16:41:08 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 98607 invoked by uid 1024); 14 Jun 2004 16:40:40 -0000 Date: Mon, 14 Jun 2004 12:40:40 -0400 From: ari edelkind To: freebsd-hackers@freebsd.org Message-ID: <20040614164040.GN14968@episec.com> Mail-Followup-To: ari edelkind , freebsd-hackers@freebsd.org References: <003801c45207$01ddfa70$0200a8c0@peron> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003801c45207$01ddfa70$0200a8c0@peron> Subject: Re: freebsd asm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 16:41:09 -0000 jncastellano@noconname.org said this stuff: [...] > [demon]~$ cat hello.asm > %include 'system.inc' > section .data > hola db 'Hola', 0Ah > hbytes equ $-hola > section .text > global _start > _start: > push dword hbytes > push dword hola > push dword stdout > sys.write > push dword 0 > sys.exit > > [demon]~$ nasm -f elf hello.asm > hello.asm:1: fatal: unable to open include file `system.inc' > > ?Where is that file?... the -current port of nasm is incomplete ? system.inc is not a part of nasm. > Ok... we take some modifications... > > << %include 'system.inc' > < style directives, so they are ignored. The directives in question would be located in the system.inc file that you don't have, and your program may as well be: hola db 'Hola', 0Ah hbytes equ $-hola section .text global _start _start: push dword hbytes push dword hola push dword 1 push dword 0 ... which doesn't exit, therefore your program accesses memory addresses that aren't meant to supply program code, and it crashes. Freebsd system calls are generally accessed using interrupt vector 0x80. The function that deals with this interrupt in the kernel expects the number of the system call in eax, and it expects the program to have called a function along the way. Thus, it's looking for the following stack structure: [RRRR][DDDD][SSSS][NNNN] RRRR: return address, inserted by 'call' instruction DDDD: descriptor vector SSSS: string address NNNN: number of bytes to write. To get this, you can try something like the following: hola db 'Hola', 0Ah hbytes equ $-hola section .text global _start _start: push dword hbytes push dword hola push dword 1 mov eax, 4 ; SYS_write call doint push dword 0 mov eax, 1 ; SYS_exit call doint doint: int 0x80 ret You can find the necessary system call numbers in /usr/include/sys/syscall.h . ari From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 17:12:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60EC316A4CF for ; Mon, 14 Jun 2004 17:12:10 +0000 (GMT) Received: from noconname.org (19.Red-80-26-109.pooles.rima-tde.net [80.26.109.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFB3743D1F for ; Mon, 14 Jun 2004 17:12:09 +0000 (GMT) (envelope-from jncastellano@noconname.org) Received: from peron (hugo.noconname.org [192.168.0.2]) by noconname.org (Postfix) with SMTP id F0DDE25; Mon, 14 Jun 2004 19:17:21 +0200 (CEST) Message-ID: <005001c45233$42d8f120$0200a8c0@peron> From: =?iso-8859-1?Q?Jos=E9_Nicol=E1s_Castellano?= To: "ari edelkind" , References: <003801c45207$01ddfa70$0200a8c0@peron> <20040614164040.GN14968@episec.com> Date: Mon, 14 Jun 2004 19:15:58 +0200 Organization: Asoc. No cON Name MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2739.300 Subject: Re: freebsd asm X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 17:12:10 -0000 ----- Original Message ----- > ... which doesn't exit, therefore your program accesses memory addresses > that aren't meant to supply program code, and it crashes. > > Freebsd system calls are generally accessed using interrupt vector 0x80. > The function that deals with this interrupt in the kernel expects the > number of the system call in eax, and it expects the program to have > called a function along the way. Thus, it's looking for the following > stack structure: > > [RRRR][DDDD][SSSS][NNNN] > > RRRR: return address, inserted by 'call' instruction > DDDD: descriptor vector > SSSS: string address > NNNN: number of bytes to write. > > ... > > You can find the necessary system call numbers in > /usr/include/sys/syscall.h . Tnaks a lot! i understand all perfectly ;-) From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 17:15:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AA1C16A4CE for ; Mon, 14 Jun 2004 17:15:54 +0000 (GMT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2BDB43D58 for ; Mon, 14 Jun 2004 17:15:53 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc12) with ESMTP id <2004061417151601400c22kge>; Mon, 14 Jun 2004 17:15:16 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id KAA30709; Mon, 14 Jun 2004 10:15:15 -0700 (PDT) Date: Mon, 14 Jun 2004 10:15:14 -0700 (PDT) From: Julian Elischer To: Ed Maste In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: 'Sergey Lyubka' Subject: RE: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 17:15:54 -0000 On Mon, 14 Jun 2004, Ed Maste wrote: > > > > > Now, the questions: > > 1. is my interpretation of benchmark results correct? > > 2. if they are correct, why bpf is faster? > > 3. is it OK to have no mutexes for ringbuffer operations ? > don't forget that bpf is not copying the entire packet, just the header.. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 17:45:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1431616A4CE for ; Mon, 14 Jun 2004 17:45:59 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB12B43D45 for ; Mon, 14 Jun 2004 17:45:58 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id C92E46520E; Mon, 14 Jun 2004 18:45:57 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 66619-02-8; Mon, 14 Jun 2004 18:45:57 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 22B83651F4; Mon, 14 Jun 2004 18:45:55 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 478586119; Mon, 14 Jun 2004 18:45:54 +0100 (BST) Date: Mon, 14 Jun 2004 18:45:54 +0100 From: Bruce M Simpson To: Julian Elischer Message-ID: <20040614174554.GE14722@empiric.dek.spc.org> Mail-Followup-To: Julian Elischer , Ed Maste , freebsd-hackers@freebsd.org, 'Sergey Lyubka' References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-hackers@freebsd.org cc: Ed Maste cc: 'Sergey Lyubka' Subject: Re: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 17:45:59 -0000 On Mon, Jun 14, 2004 at 10:15:14AM -0700, Julian Elischer wrote: > don't forget that bpf is not copying the entire packet, just the > header.. If you look at Sergey's benchmark.c, you will see that the snaplen was set to 32KB. BMS From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 17:48:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13D5316A4CE for ; Mon, 14 Jun 2004 17:48:04 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCFA143D1D for ; Mon, 14 Jun 2004 17:48:03 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 80FBA6520F; Mon, 14 Jun 2004 18:47:51 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 66619-02-12; Mon, 14 Jun 2004 18:47:51 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id E7131651F4; Mon, 14 Jun 2004 18:47:50 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id C5B786119; Mon, 14 Jun 2004 18:47:49 +0100 (BST) Date: Mon, 14 Jun 2004 18:47:49 +0100 From: Bruce M Simpson To: Ed Maste Message-ID: <20040614174749.GF14722@empiric.dek.spc.org> Mail-Followup-To: Ed Maste , 'Sergey Lyubka' , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-hackers@freebsd.org cc: 'Sergey Lyubka' Subject: Re: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 17:48:04 -0000 On Mon, Jun 14, 2004 at 08:38:57AM -0400, Ed Maste wrote: > Hello Sergey. I haven't looked at your code, but I'll provide > some comments, having implemented a mmaped ringbuffer BPF > replacement myself. We've had some prior interest in this. Do you have patches? If so, I'd be more than happy to look at them. Linux has something similar, but when I looked at the mechanism involved, I was loathe to adopt the same logic because the buffer(s) involved were allocated from userland and then mapped accordingly; we generally can't afford to take a page fault in that path, for mutex related reasons. Regards, BMS From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 19:24:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05C5516A4CE for ; Mon, 14 Jun 2004 19:24:10 +0000 (GMT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6EE043D58 for ; Mon, 14 Jun 2004 19:24:09 +0000 (GMT) (envelope-from garycor@comcast.net) Received: from comcast.net (pcp09118143pcs.union01.nj.comcast.net[69.142.234.88]) by comcast.net (rwcrmhc12) with SMTP id <2004061419240901400bv3cte> (Authid: garycor); Mon, 14 Jun 2004 19:24:09 +0000 Message-ID: <40CDFD39.3090309@comcast.net> Date: Mon, 14 Jun 2004 15:32:09 -0400 From: Gary Corcoran User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: FreeBSD or other BSD for no-MMU ARM processor ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 19:24:10 -0000 Does anyone know if there is a port of FreeBSD, or any of the other BSDs (e.g. NetBSD) for that matter, which will run on an ARM processor which does NOT have an MMU (Memory Management Unit)? Thanks, Gary From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 22:43:15 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B824516A4CE for ; Mon, 14 Jun 2004 22:43:15 +0000 (GMT) Received: from huva.hittite.isp.9tel.net (huva.hittite.isp.9tel.net [62.62.156.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3354843D58 for ; Mon, 14 Jun 2004 22:43:15 +0000 (GMT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (unknown [80.119.178.102]) by huva.hittite.isp.9tel.net (Postfix) with SMTP id 2C4E39BDDE; Tue, 15 Jun 2004 00:44:45 +0200 (CEST) Message-ID: <017701c45260$efef9350$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: "Chip Norkus" , References: <20040611025307.GG17367@teleri.net><20040611140740.GA3355@schweikhardt.net> <20040611171029.GH17367@teleri.net> <20040614130534.GI17367@teleri.net> Date: Tue, 15 Jun 2004 00:42:55 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Re: indent bugfix / added features X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 22:43:15 -0000 "Chip Norkus" wrote > > I was off most of the weekend, but I did find one bug and have > corrected it. The new patch can be found at > http://telekinesis.org/indent/indent.patch. I whipped up a simple > script to test it over /usr/src and that is at > http://telekinesis.org/indent/test.sh. I found that my patched version > (when run with no options) produced identical output to the existing > version. don't know if you submit a PR, if not, man send-pr. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 06:28:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6013716A4D0 for ; Tue, 15 Jun 2004 06:28:24 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id DC2BC43D60 for ; Tue, 15 Jun 2004 06:28:22 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 22341 invoked from network); 15 Jun 2004 06:26:10 -0000 Received: from office.sbnd.net (HELO straylight.m.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 15 Jun 2004 06:26:09 -0000 Received: (qmail 34836 invoked by uid 1000); 15 Jun 2004 06:28:01 -0000 Date: Tue, 15 Jun 2004 09:28:01 +0300 From: Peter Pentchev To: Gary Corcoran Message-ID: <20040615062800.GD987@straylight.m.ringlet.net> Mail-Followup-To: Gary Corcoran , freebsd-hackers@freebsd.org References: <40CDFD39.3090309@comcast.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y7xTucakfITjPcLV" Content-Disposition: inline In-Reply-To: <40CDFD39.3090309@comcast.net> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD or other BSD for no-MMU ARM processor ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 06:28:24 -0000 --Y7xTucakfITjPcLV Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 14, 2004 at 03:32:09PM -0400, Gary Corcoran wrote: >=20 > Does anyone know if there is a port of FreeBSD, or any of the > other BSDs (e.g. NetBSD) for that matter, which will run on an > ARM processor which does NOT have an MMU (Memory Management Unit)? Your best bet would be http://www.netbsd.org/Ports/ Unfortunately, I'm not too familiar with the ARM line of processors, so it's not really obvious to me if NetBSD supports architecturs without MMU's. ISTR that there was a decision very early down the line for FreeBSD to *not* support anything that didn't have an MMU.. or was that even earlier, and does it also hold true for other BSD's? G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If the meanings of 'true' and 'false' were switched, then this sentence wou= ldn't be false. --Y7xTucakfITjPcLV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAzpbw7Ri2jRYZRVMRAq4eAJ9nZYk+GysYYD9m3udjlnlp1ateHwCgrqpg h3nmHxyL9SvyOTlGgbuttk4= =KMxg -----END PGP SIGNATURE----- --Y7xTucakfITjPcLV-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 08:23:12 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FE8816A4CE for ; Tue, 15 Jun 2004 08:23:12 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FA7643D5D for ; Tue, 15 Jun 2004 08:23:11 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i5F8K3d9028559 for freebsd-hackers@freebsd.org.checked; (8.12.8/vak/2.1) Tue, 15 Jun 2004 12:20:03 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i5F8JAxi028524 for ; (8.12.8/vak/2.1) Tue, 15 Jun 2004 12:19:10 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <40CEB0BE.5020604@cronyx.ru> Date: Tue, 15 Jun 2004 12:18:06 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: activation of interrupt X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 08:23:12 -0000 Hi, I have problem with activation/deactivation of interrupts. I have a device driver for one ISA card. Since it is legacy ISA it's interrupt line (or it's possible interrupt lines if we were loaded with autodetection) could be assigned for PNP devices. The simplest way to find out if we able to work with this interrupt line to try to generate it and check if we see it (for example via isa_irq_pending()). Now about my proble :-). At first load of my driver all is ok. I able to work with interrupt. But at second one this interrupt is detected as non-functional. If I ignore this test, it seems that all work Ok. So problem only while I am at attach code. More over system tells me about stray irq. So I guess that this interrupt was blocked after it was unregistered. Since I don't have any more ideas what to do with this situation I ask for help and open for any advices. rik From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 09:56:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF57816A4CF for ; Tue, 15 Jun 2004 09:56:59 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFC4343D5C for ; Tue, 15 Jun 2004 09:56:58 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i5F9r8LT033200 for hackers@freebsd.org.checked; (8.12.8/vak/2.1) Tue, 15 Jun 2004 13:53:08 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru with ESMTP id i5F9qukT033172; (8.12.8/vak/2.1) Tue, 15 Jun 2004 13:52:56 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <40CEC6B9.6080703@cronyx.ru> Date: Tue, 15 Jun 2004 13:51:53 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Josef Karthauser References: <20040613202236.GJ4570@genius.tao.org.uk> In-Reply-To: <20040613202236.GJ4570@genius.tao.org.uk> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org cc: net@FreeBSD.org Subject: Re: 100mhz Wavelab on -current PCI and PCCARD. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 09:56:59 -0000 Hi, We use SMC cards, and SMS hubs (they have a couple of normal ports). I didn't heard about problems with pccard variant and hubs works just fine. But pci cards works unstable.Since I do not work in that segment and I don't have any in my PCs I can't say why we have problems with them. rik Josef Karthauser wrote: >Does anyone have wireless experience? I'm off to the US next week and I >thought I'd buy some (cheaper) wireless kit whilst I'm out there. I >would like to run 100mb wireless (802.11g?) on both my laptop and my >home server which I guess means that I'd like a recommendation for both >pccard as well as pci. I'm running -current on the laptop and -stable >on the server, although this can be upgraded to 5.x if necessary. The >server is currently an ethernet bridging firewall (IPFW) and ideally I'd >like to be able to filter the wireless segment also. Is it possible to >using a wireless card in the machine and be able to filter at a MAC >address level? I want a bit of control of the network. Is there a >recommended configuration? > >Joe > > From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 19:49:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B3E816A4CE for ; Mon, 14 Jun 2004 19:49:36 +0000 (GMT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (80-219-170-238.dclient.hispeed.ch [80.219.170.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2BF443D39 for ; Mon, 14 Jun 2004 19:49:33 +0000 (GMT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [2002:50db:aaee:0:220:afff:fed4:dbcb]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id i5EJnA201267 verified NO) for ; Mon, 14 Jun 2004 21:49:14 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.11.6/FNORD) id i5EJn8n01266; Mon, 14 Jun 2004 21:49:09 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Mon, 14 Jun 2004 21:49:09 +0200 (CEST) Message-Id: <200406141949.i5EJn8n01266@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL References: <200312230007.hBN07lr03615@NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk> From: Barry Bouwsma To: Hackers Haven X-Mailman-Approved-At: Tue, 15 Jun 2004 12:19:28 +0000 Subject: Re: pci_cfgintr: can't route an interrupt ... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 19:49:36 -0000 This message is ancient, but I finally got things (sort of) working just now. More context can be found in the first message in this thread On Tue, 23 Dec 2003, John Baldwin wrote: > On 23-Dec-2003 Barry Bouwsma wrote: > > > There was a thread about this in this list back in late may of 2003. > > I recently found a mainboard which exhibits this problem with one particular > > card I have -- a combi OHCI+EHCI USB card with firewire, and an on-card > > HiNT PCI-PCI bridge. > FreeBSD-4 is not going to route interrupts correctly across an onboard > PCI-PCI bridge or any devices behind it. FreeBSD-5 will, but 4.x will > not. Try disabling PNP OS in your BIOS if you have it set to get the > BIOS to route all the interrupts if possible. Well, I decided to take the easy way out. I saw nothing in the BIOS of this particular machine that would make any difference (no PNP OS choice). Rather than using an older machine whose BIOS does assign interrupts to every controller, or buying a newer machine, or using 5.x, I decided to try to hack in parts of -current into 4.x to make it work. And I had some success. But the hacks really aren't worthy of public sharing, since, for starters, the assign_interrupt_method kept wanting to give me irq 6 -- the floppy controller irq which is assigned later in the boot. Certainly my fault. I have a handful of ideas for what could be wrong here. But I hacked around this by overriding the irq to something reasonable, and that worked, although I had to set the values precisely for things to work (intpin b to irq 11; intpin c to irq 10). And work it did, and I was overjoyed. Problems were observed elsewhere, as expected. But finally I could access devices on these two controllers. Unfortunately, I don't know what I'm doing enough to have created a clean patch that Just Works with 4.x, which is what I had hoped to offer in a message like this one, to be able to share and enjoy. sorry, barry bouwsma From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 14 20:12:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE58C16A4CE for ; Mon, 14 Jun 2004 20:12:48 +0000 (GMT) Received: from mta10.srv.hcvlny.cv.net (mta10.srv.hcvlny.cv.net [167.206.5.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FFB943D48 for ; Mon, 14 Jun 2004 20:12:48 +0000 (GMT) (envelope-from truk@optonline.net) Received: from truk (ool-182e24b7.dyn.optonline.net [24.46.36.183]) by mta10.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with SMTP id <0HZB001X8ET95X@mta10.srv.hcvlny.cv.net> for freebsd-hackers@freebsd.org; Mon, 14 Jun 2004 16:12:46 -0400 (EDT) Date: Mon, 14 Jun 2004 16:12:38 -0400 From: Kurt Miller To: freebsd-hackers@freebsd.org Message-id: <002601c4524b$f0c873b0$290110ac@truk> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Mailer: Microsoft Outlook Express 6.00.2800.1409 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT X-Priority: 3 X-MSMail-priority: Normal X-Mailman-Approved-At: Tue, 15 Jun 2004 12:19:28 +0000 Subject: gcc 2.95 thread model (single or posix)? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 20:12:48 -0000 What thread model is gcc 2.95 configured for on FreeBSD 4.9 (single or posix)? I asked on gcc-help and they suggested asking here. Thanks, -Kurt I'm not subscribed. Please cc me in reply. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 14:35:30 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D59B16A4CE for ; Tue, 15 Jun 2004 14:35:30 +0000 (GMT) Received: from mps4.plala.or.jp (c147240.vh.plala.or.jp [210.150.147.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBD7843D55 for ; Tue, 15 Jun 2004 14:35:28 +0000 (GMT) (envelope-from e-kamo@trio.plala.or.jp) Received: from msvc2.plala.or.jp ([172.23.8.210]) by mps4.plala.or.jp with SMTP id <20040615143519.UKSS3017.mps4.plala.or.jp@msvc2.plala.or.jp> for ; Tue, 15 Jun 2004 23:35:19 +0900 Received: ( 3713 invoked from network); 15 Jun 2004 23:35:18 +0900 X-SVCK: Received: from unknown (HELO mpb1.plala.or.jp) (172.23.8.16) by msvc2 with SMTP; 15 Jun 2004 23:35:18 +0900 Received: from trio.plala.or.jp ([219.25.148.126]) by mpb1.plala.or.jp with ESMTP id <20040615143518.CYAV19716.mpb1.plala.or.jp@trio.plala.or.jp>; Tue, 15 Jun 2004 23:35:18 +0900 Message-ID: <40CF0A84.1020807@trio.plala.or.jp> Date: Tue, 15 Jun 2004 23:41:08 +0900 From: Eitarou Kamo User-Agent: Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: ja MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, simon@comsys.ntu-kpi.kiev.ua X-Enigmail-Version: 0.76.8.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Subject: umass0: CBI reset failed, Timeout.... 4.10-R X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 14:35:30 -0000 Hi, I have some questions about umass and USB. I installed 4.10-R to Sony vaio laptop. and rebooted without any memory stick. In boot process, my machine said that umass0: CBI reset failed, TIMEOUT umass0: CBI bulk-in stall clear failed, TIMEOUT umass0: CBI bulk-out stall clear failed, TIMEOUT 5 times( about 20 min). and didn't prompt "login:". and I look into source code by my debug print. It seems that reflexive loop occurs between uhci_callout( , , uhci_poll_hub,) and uhci_poll_hub(). Now uhci_callout is called from uhci_power(). and uhci_poll_hub() have a path if (p[0] == 0) /* No change, try again in a while */ return; If return here, loop occurs. Because uhci_poll_hub() includes uhci_callout( , , uhci_poll_hub,). Does anyone know? any idea? Any suggestion will be appreciated. ++++++++++++++ unci_poll_hub()+++++++++++++++ void uhci_poll_hub(void *addr) { usbd_xfer_handle xfer = addr; usbd_pipe_handle pipe = xfer->pipe; uhci_softc_t *sc = (uhci_softc_t *)pipe->device->bus; int s; u_char *p; DPRINTFN(20, ("uhci_poll_hub\n")); usb_callout(sc->sc_poll_handle, sc->sc_ival, uhci_poll_hub, xfer); p = KERNADDR(&xfer->dmabuf, 0); p[0] = 0; if (UREAD2(sc, UHCI_PORTSC1) & (UHCI_PORTSC_CSC|UHCI_PORTSC_OCIC)) p[0] |= 1<<1; if (UREAD2(sc, UHCI_PORTSC2) & (UHCI_PORTSC_CSC|UHCI_PORTSC_OCIC)) p[0] |= 1<<2; if (p[0] == 0) /* No change, try again in a while */ return; xfer->actlen = 1; xfer->status = USBD_NORMAL_COMPLETION; s = splusb(); xfer->device->bus->intr_context++; usb_transfer_complete(xfer); xfer->device->bus->intr_context--; splx(s); } ++++++++++++++ unci_poll_hub()+++++++++++++++ -- *********************** Eitarou Kamo Tel. +81 75 7035997 Fax +81 75 7035997 VoIP 050 10585997(domestic only) e$B!>(Bmail e-kamo@trio.plala.or.jp For business: Feel free to mail me(above), please. Donation http://www.PayPal.Com GPG FingerPrint: 032D FDF9 D27B 23F7 9A81 BF4C 626C FBAA BC3A 9895 ************************************************************************ From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 18:16:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5337716A4CE for ; Tue, 15 Jun 2004 18:16:31 +0000 (GMT) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10C4A43D1F for ; Tue, 15 Jun 2004 18:16:31 +0000 (GMT) (envelope-from wes@softweyr.com) Received: from salty.rapid.stbernard.com (unknown [198.147.128.71]) by smtp-relay.omnis.com (Postfix) with ESMTP id 2E7B6FCF89; Tue, 15 Jun 2004 11:15:52 -0700 (PDT) From: Wes Peters Organization: Softweyr.com To: Gary Corcoran , freebsd-hackers@freebsd.org Date: Tue, 15 Jun 2004 11:16:36 -0700 User-Agent: KMail/1.5.4 References: <40CDFD39.3090309@comcast.net> In-Reply-To: <40CDFD39.3090309@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200406151116.36832.wes@softweyr.com> Subject: Re: FreeBSD or other BSD for no-MMU ARM processor ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 18:16:31 -0000 On Monday 14 June 2004 12:32 pm, Gary Corcoran wrote: > Does anyone know if there is a port of FreeBSD, or any of the > other BSDs (e.g. NetBSD) for that matter, which will run on an > ARM processor which does NOT have an MMU (Memory Management Unit)? No, and there's not likely to be one anytime soon (unless you do it). NetBSD has ports for a couple of ARM920T designs, which do have an MMU. (I think they've recently popped a port for the Cogent CSB337, based on the Atmel chip.) The general feeling seems to be that without an MMU and the added features of memory protection it provides, the heavyweight process-oriented UNIX kernel doesn't really offer much advantage over a lighter-weight solution like RTEMS or eCos. The uClinux gang disagrees with this assessment, obviously, so you do have that choice as well. -- "Where am I, and what am I doing in this handbasket?" Wes Peters wes@softweyr.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 18:42:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C27016A4CE for ; Tue, 15 Jun 2004 18:42:53 +0000 (GMT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E81D43D1F for ; Tue, 15 Jun 2004 18:42:53 +0000 (GMT) (envelope-from garycor@comcast.net) Received: from comcast.net (pcp09118143pcs.union01.nj.comcast.net[69.142.234.88]) by comcast.net (rwcrmhc12) with SMTP id <2004061518422401400c4ehfe> (Authid: garycor); Tue, 15 Jun 2004 18:42:24 +0000 Message-ID: <40CF44FB.6030709@comcast.net> Date: Tue, 15 Jun 2004 14:50:35 -0400 From: Gary Corcoran User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wes Peters References: <40CDFD39.3090309@comcast.net> <200406151116.36832.wes@softweyr.com> In-Reply-To: <200406151116.36832.wes@softweyr.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD or other BSD for no-MMU ARM processor ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 18:42:53 -0000 Wes Peters wrote: > On Monday 14 June 2004 12:32 pm, Gary Corcoran wrote: > >>Does anyone know if there is a port of FreeBSD, or any of the >>other BSDs (e.g. NetBSD) for that matter, which will run on an >>ARM processor which does NOT have an MMU (Memory Management Unit)? > > > No, and there's not likely to be one anytime soon (unless you do it). Thanks for the definitive reply. We don't have enough resources for our work as it is, so no, we're not going to do it - we need something already available. > NetBSD has ports for a couple of ARM920T designs, which do have an MMU. > (I think they've recently popped a port for the Cogent CSB337, based on the > Atmel chip.) > > The general feeling seems to be that without an MMU and the added features > of memory protection it provides, the heavyweight process-oriented UNIX > kernel doesn't really offer much advantage over a lighter-weight solution > like RTEMS or eCos. The uClinux gang disagrees with this assessment, > obviously, so you do have that choice as well. Thanks for the pointers. My boss (and our customer) has mentioned eCos, so we'll be looking into that. RTEMS I hadn't heard of - I'll have to check into that too. But since I like, and am somewhat familiar with, *BSD, I thought I'd ask if that might be an option... Gary From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 18:48:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CBEF16A4CE for ; Tue, 15 Jun 2004 18:48:26 +0000 (GMT) Received: from mail.teleri.net (teleri.net [216.193.194.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E20343D2D for ; Tue, 15 Jun 2004 18:48:26 +0000 (GMT) (envelope-from wd@teleri.net) Received: by mail.teleri.net (Postfix, from userid 501) id 4E72D11448; Tue, 15 Jun 2004 11:48:21 -0700 (PDT) Date: Tue, 15 Jun 2004 13:48:21 -0500 From: Chip Norkus To: Cyrille Lefevre Message-ID: <20040615184821.GM17367@teleri.net> References: <20040611171029.GH17367@teleri.net> <20040614130534.GI17367@teleri.net> <017701c45260$efef9350$7890a8c0@dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <017701c45260$efef9350$7890a8c0@dyndns.org> User-Agent: Mutt/1.4.1i cc: hackers@freebsd.org Subject: Re: indent bugfix / added features X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 18:48:26 -0000 On Tue Jun 15, 2004; 12:42AM +0200 Cyrille Lefevre propagated the following: > "Chip Norkus" wrote > > > > I was off most of the weekend, but I did find one bug and have > > corrected it. The new patch can be found at > > http://telekinesis.org/indent/indent.patch. I whipped up a simple > > script to test it over /usr/src and that is at > > http://telekinesis.org/indent/test.sh. I found that my patched version > > (when run with no options) produced identical output to the existing > > version. > > > don't know if you submit a PR, if not, man send-pr. I have now. It is bin/67983. Thanks for the pointer. > > Cyrille Lefevre. > -- > home: mailto:cyrille.lefevre@laposte.net -chip -- personal: chip norkus; renaissance hacker; wd@teleri.net work: systems engineer @ lunarpages, inc.; chip@lunarpages.com info: finger wd@teleri.net for plan or keys; http://telekinesis.org From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 19:04:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8E7216A4CE for ; Tue, 15 Jun 2004 19:04:01 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by mx1.FreeBSD.org (Postfix) with SMTP id 531C543D49 for ; Tue, 15 Jun 2004 19:04:01 +0000 (GMT) (envelope-from aldrinleal@gmail.com) Received: by mproxy.gmail.com with SMTP id 34so56510rnh for ; Tue, 15 Jun 2004 12:03:52 -0700 (PDT) Received: by 10.38.97.26 with SMTP id u26mr92627rnb; Tue, 15 Jun 2004 11:57:12 -0700 (PDT) Message-ID: <3534b0b3040615115713cc3589@mail.gmail.com> Date: Tue, 15 Jun 2004 15:57:12 -0300 From: Aldrin Leal To: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org, freebsd-ipfw@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Bridging Code - MAC Filtering X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 19:04:01 -0000 Hello, Does the bridging code in FreeBSD 5.2-RELEASE have the hability to perform mac checking for a given IP? If it doesn't, does any kernel hacker could point me to places where i could do it myself? Maybe proper pointers on debugging the bridging facilities, tips, general guidance and so forth? Thanks in advance! -- Aldrin Leal, aldrinleal@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 19:48:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E45A516A4CE for ; Tue, 15 Jun 2004 19:48:10 +0000 (GMT) Received: from cruzio.com (dsl3-63-249-85-132.cruzio.com [63.249.85.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AF3743D4C for ; Tue, 15 Jun 2004 19:48:10 +0000 (GMT) (envelope-from brucem@mail.cruzio.com) Received: from mail.cruzio.com (localhost [127.0.0.1]) by cruzio.com (8.12.10/8.12.10) with ESMTP id i5FJl98M000794; Tue, 15 Jun 2004 12:47:09 -0700 (PDT) (envelope-from brucem@mail.cruzio.com) Received: (from brucem@localhost) by mail.cruzio.com (8.12.10/8.12.10/Submit) id i5FJl9Pg000793; Tue, 15 Jun 2004 12:47:09 -0700 (PDT) (envelope-from brucem) Date: Tue, 15 Jun 2004 12:47:09 -0700 (PDT) From: "Bruce R. Montague" Message-Id: <200406151947.i5FJl9Pg000793@mail.cruzio.com> To: freebsd-hackers@freebsd.org cc: garycor@comcast.net Subject: Re: FreeBSD or other BSD for no-MMU ARM processor ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 19:48:11 -0000 Hi, re: >>Does anyone know if there is a port of FreeBSD, or any of the >>other BSDs (e.g. NetBSD) for that matter, which will run on an >>ARM processor which does NOT have an MMU (Memory Management Unit)? > > The general feeling seems to be that without an MMU and the added features > of memory protection it provides, the heavyweight process-oriented UNIX > kernel doesn't really offer much advantage over a lighter-weight solution > like RTEMS or eCos. The uClinux gang disagrees with this assessment, Another such light-weight embedded C kernel with unmapped ARM support that seems to be popular lately is microC/OS, sometimes called uC/OS or "mucos". My _impression_ is that it is a free open source system but that a number of companies sell support and a number of embedded companies specialize in getting it past validation suites in vertical niche markets, etc.. I think it's been used for digital cameras and such. http://www.accu.org/bookreviews/public/reviews/m/m002257.htm http://www.cmpbooks.com/product/1057 - bruce From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 19:49:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C28316A4CE for ; Tue, 15 Jun 2004 19:49:01 +0000 (GMT) Received: from moutvdomng.kundenserver.de (moutvdom.kundenserver.de [212.227.126.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id D489943D4C for ; Tue, 15 Jun 2004 19:49:00 +0000 (GMT) (envelope-from liamfoy@sepulcrum.org) Received: from [212.227.126.224] (helo=mrvdomng.kundenserver.de) by moutvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BaJuS-0001Kt-00 for hackers@freebsd.org; Tue, 15 Jun 2004 21:47:52 +0200 Received: from [81.153.214.77] (helo=liamfoy.ath.cx) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BaJuS-0006fi-00 for hackers@freebsd.org; Tue, 15 Jun 2004 21:47:52 +0200 Date: Tue, 15 Jun 2004 20:46:32 +0100 From: "Liam J. Foy" To: hackers@freebsd.org Message-Id: <20040615204632.0769a41e.liamfoy@sepulcrum.org> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: GDB/Kernel Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 19:49:01 -0000 Hey guys, Am trying to follow line by line of some code in userland. Now in the userland program it calls a kernel function. Is there a way I can carry on following it line by line in the kernel function and once it has finished return back to the userland program? Of course, my kernel is compiled with the -g options. Love to hear if it can be done and if so now, thanks in advance ! -- -Liam Foy http://liamfoy.kerneled.org "Do only what only you can do." From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 19:53:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E76D16A4CE for ; Tue, 15 Jun 2004 19:53:03 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by mx1.FreeBSD.org (Postfix) with SMTP id C30F843D53 for ; Tue, 15 Jun 2004 19:53:02 +0000 (GMT) (envelope-from aldrinleal@gmail.com) Received: by mproxy.gmail.com with SMTP id 34so58320rnh for ; Tue, 15 Jun 2004 12:52:44 -0700 (PDT) Received: by 10.38.97.42 with SMTP id u42mr94268rnb; Tue, 15 Jun 2004 12:52:44 -0700 (PDT) Message-ID: <3534b0b304061512522dccd522@mail.gmail.com> Date: Tue, 15 Jun 2004 16:52:44 -0300 From: Aldrin Leal To: freebsd-hackers@freebsd.org In-Reply-To: <1087327033.65518.3.camel@jose.hostarica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <3534b0b3040615115713cc3589@mail.gmail.com> <1087327033.65518.3.camel@jose.hostarica.net> Subject: Re: Bridging Code - MAC Filtering X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 19:53:03 -0000 I'll check arpwatch, but i'm more interested in tuning the bridging code, making it suitable to my needs. Any pointers? ----- Original Message ----- From: Jose Hidalgo Herrera Date: Tue, 15 Jun 2004 13:17:14 -0600 Subject: Re: Bridging Code - MAC Filtering To: Aldrin Leal Cc: jose@hostarica.com, freebsd-net@freebsd.org, freebsd-ipfw@freebsd.org I use arpwatch to monitor IPs, because I filter everything via IP address(ipfw) so if any user plays hacker I'm gonna kick his xxx : - ) On Tue, 2004-06-15 at 12:57, Aldrin Leal wrote: Hello, Does the bridging code in FreeBSD 5.2-RELEASE have the hability to perform mac checking for a given IP? If it doesn't, does any kernel hacker could point me to places where i could do it myself? Maybe proper pointers on debugging the bridging facilities, tips, general guidance and so forth? Thanks in advance! -- Aldrin Leal, aldrinleal@gmail.com _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Jose Hidalgo PGP: 15524480 jose at hostarica.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 19:57:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7BA2316A4CE; Tue, 15 Jun 2004 19:57:11 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i5FJvA8s006292; Tue, 15 Jun 2004 15:57:10 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i5FJvAPB006291; Tue, 15 Jun 2004 15:57:10 -0400 (EDT) (envelope-from green) Date: Tue, 15 Jun 2004 15:57:09 -0400 From: Brian Fundakowski Feldman To: hackers@FreeBSD.org Message-ID: <20040615195709.GE1016@green.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i cc: alc@FreeBSD.org cc: dillon@backplane.com cc: peter@FreeBSD.org Subject: contigmalloc(9) rewrite X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 19:57:11 -0000 As I still couldn't get the reliability I wanted with contigmalloc(9) (due to fundamental brokenness), I decided to do a reimplementation of it that provides much more reliability and quite a bit less ugly churn of the presently-allocated pageable memory. In the new version, allocations start at the top of the usable memory such that space is not gratuitously wired at low physical addresses, as it is now, leaving more room for those contigmalloc() calls that really do require lower memory ranges. I've tested it out a bit and had good results even with a fair bit of load and full memory usage. Limitations should only be on the kernel pressure of VM page holdings and object locks, and wired/kernel memory allocated. I am primarily testing it out with ath(4), but I can provoke lock-ups with or without any contigmalloc() changes eventually when repeatedly hot-plugging the Atheros 802.11 card, so it is not a very goodtest. The patch, which applies to 5-CURRENT, can be found here: The default is to use the old contigmalloc(). You can set the sysctl or loader tunable "vm.old_contigmalloc" to 0 to enable it. For anyone that normally runs into failed allocations hot-plugging hardware, please try this and see if it helps out. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 20:07:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8337616A4CE; Tue, 15 Jun 2004 20:07:11 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 8AED043D48; Tue, 15 Jun 2004 20:07:10 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 15 Jun 2004 21:06:59 +0100 (BST) Date: Tue, 15 Jun 2004 21:06:59 +0100 From: David Malone To: Aldrin Leal Message-ID: <20040615200659.GA97862@walton.maths.tcd.ie> References: <3534b0b3040615115713cc3589@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3534b0b3040615115713cc3589@mail.gmail.com> User-Agent: Mutt/1.5.3i Sender: dwmalone@maths.tcd.ie cc: freebsd-net@freebsd.org cc: freebsd-ipfw@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: Bridging Code - MAC Filtering X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 20:07:11 -0000 On Tue, Jun 15, 2004 at 03:57:12PM -0300, Aldrin Leal wrote: > Does the bridging code in FreeBSD 5.2-RELEASE have the hability > to perform mac checking for a given IP? You could use ipfw2, which can match both on IP address and MAC address. David. From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 20:14:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BB8016A4CE for ; Tue, 15 Jun 2004 20:14:20 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by mx1.FreeBSD.org (Postfix) with SMTP id 9DA6943D45 for ; Tue, 15 Jun 2004 20:14:19 +0000 (GMT) (envelope-from aldrinleal@gmail.com) Received: by mproxy.gmail.com with SMTP id 34so58926rnh for ; Tue, 15 Jun 2004 13:14:17 -0700 (PDT) Received: by 10.38.97.42 with SMTP id u42mr94890rnb; Tue, 15 Jun 2004 13:14:17 -0700 (PDT) Message-ID: <3534b0b304061513145a56e804@mail.gmail.com> Date: Tue, 15 Jun 2004 17:14:17 -0300 From: Aldrin Leal To: freebsd-hackers@freebsd.org In-Reply-To: <20040615200043.GB11154@annelo.epita.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <3534b0b3040615115713cc3589@mail.gmail.com> <20040615200043.GB11154@annelo.epita.fr> Subject: Re: Bridging Code - MAC Filtering X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 20:14:20 -0000 I couldn't find any help on the exact syntax. And the manpage says it's somewhat difficult. Have you seen any practical article on this scenario? I couldn't find any. Better yet: Has anyone ever tried this at home? :) On Tue, 15 Jun 2004 22:00:43 +0200, Jeremie Le Hen wrote: > > > Does the bridging code in FreeBSD 5.2-RELEASE have the hability > > to perform mac checking for a given IP? > > Since you can filter bridged packets using ipfw(8) and the latter is able > to match against MAC address, I would say yes. Nevertheless, it may not > be suitable enough for your needs, because it requires changing your rules > each time you add a machine or change a network card. > > Regards, > -- > Jeremie LE HEN aka TtZ/TataZ jeremie.le-hen@epita.fr > ttz@epita.fr > Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! > From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 20:28:42 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA4C716A4CE for ; Tue, 15 Jun 2004 20:28:42 +0000 (GMT) Received: from deliver.epitech.net (deliver.epitech.net [163.5.0.25]) by mx1.FreeBSD.org (Postfix) with SMTP id 3C11843D31 for ; Tue, 15 Jun 2004 20:28:42 +0000 (GMT) (envelope-from le-hen_j@epita.fr) Received: from epita.fr ([10.42.1.60]) by deliver.epitech.net (SAVSMTP 3.1.2.35) with SMTP id M2004061522231024594 ; Tue, 15 Jun 2004 22:23:10 +0200 Received: from annelo (annelo.epita.fr [10.42.120.68]) by epita.fr id i5FKSAw21612 Tue, 15 Jun 2004 22:28:11 +0200 (CEST) Date: Tue, 15 Jun 2004 22:28:10 +0200 From: Jeremie Le Hen To: Aldrin Leal Message-ID: <20040615202809.GM11154@annelo.epita.fr> References: <3534b0b3040615115713cc3589@mail.gmail.com> <20040615200043.GB11154@annelo.epita.fr> <3534b0b304061513145a56e804@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3534b0b304061513145a56e804@mail.gmail.com> User-Agent: Mutt/1.4i cc: freebsd-hackers@freebsd.org Subject: Re: Bridging Code - MAC Filtering X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 20:28:42 -0000 > I couldn't find any help on the exact syntax. And the manpage says > it's somewhat difficult. > > Have you seen any practical article on this scenario? I couldn't find any. There is some documentation written on this topic by Alex Dupre: http://www.freebsd.org/doc/en/articles/filtering-bridges/article.html You may also read this, although this is a bit old: http://people.freebsd.org/~nsayer/bdg-ipfw.txt And Google is your friend: http://www.google.fr/search?q=site%3Alists.freebsd.org+ipfw+bridge Good Luck ! Regards, -- Jeremie LE HEN aka TtZ/TataZ jeremie.le-hen@epita.fr ttz@epita.fr Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 20:29:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0A4D016A4CE; Tue, 15 Jun 2004 20:29:23 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i5FKTMwN006526; Tue, 15 Jun 2004 16:29:22 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i5FKTLO7006525; Tue, 15 Jun 2004 16:29:21 -0400 (EDT) (envelope-from green) Date: Tue, 15 Jun 2004 16:29:21 -0400 From: Brian Feldman To: Ed Maste , "'Sergey Lyubka'" , freebsd-hackers@freebsd.org Message-ID: <20040615202921.GF1016@green.homeunix.org> References: <20040614174749.GF14722@empiric.dek.spc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040614174749.GF14722@empiric.dek.spc.org> User-Agent: Mutt/1.5.6i Subject: Re: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 20:29:23 -0000 On Mon, Jun 14, 2004 at 06:47:49PM +0100, Bruce M Simpson wrote: > On Mon, Jun 14, 2004 at 08:38:57AM -0400, Ed Maste wrote: > > Hello Sergey. I haven't looked at your code, but I'll provide > > some comments, having implemented a mmaped ringbuffer BPF > > replacement myself. > > We've had some prior interest in this. Do you have patches? If so, I'd be > more than happy to look at them. > > Linux has something similar, but when I looked at the mechanism involved, > I was loathe to adopt the same logic because the buffer(s) involved were > allocated from userland and then mapped accordingly; we generally can't > afford to take a page fault in that path, for mutex related reasons. If I finally get to finish fixing wiring, you should simply be able to call vslock(9) in your kernel module and get that functionality. As it is, vslock(9) is broken.... -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 15 20:46:38 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B748716A4CE for ; Tue, 15 Jun 2004 20:46:38 +0000 (GMT) Received: from event-horizon.royalcomp.hu (event-horizon.royalcomp.hu [195.70.35.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0024A43D45 for ; Tue, 15 Jun 2004 20:46:37 +0000 (GMT) (envelope-from ice@wormhole.hu) Received: from border.royalcomp.hu ([195.70.42.158]) by event-horizon.royalcomp.hu with esmtp (Exim 3.36 #1 (Debian)) id 1BaKe5-0005Kh-00 for ; Tue, 15 Jun 2004 22:35:01 +0200 Received: from dawn.royalcomp.hu ([195.70.42.152]) by border.royalcomp.hu with esmtp (Exim 3.33 #1 (Debian)) id 1BaKYs-0006VX-00 for ; Tue, 15 Jun 2004 22:29:38 +0200 Date: Tue, 15 Jun 2004 22:34:57 +0200 (CEST) From: Tamas TEVESZ To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: 4.10-RELEASE and -STABLE crashing regularly under load X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 20:46:38 -0000 hi folks, [i've posted the following message to -bugs@ a while ago, but then was directed here by a friend freebsder. while reposting, i also corrected some minor facts i missed in the previous post] i have a dell poweredge 2600 (4G ram, 2x2.8ghz xeon cpus, some disk, full dmesg below), running a heavily loaded website (apache13, php, cgi, pure-ftpd). this is a brand new 4.10-release install, brought to sync with -stable, both exhibit the exact same problem), which every once in a while crashes badly. 4.10-R did that every ~2.5 days, 4.10-S did it for the first time after one day. (before that, system was running 4.9-stable on a poweredge 4600 with one xeon cpu, no ht, no smp, no nothing like that, and was very stable). i cannot entirely rule out bad hardware as this is a brand new system, but we haven't had many problems with dell stuff before. everything i think to be related is included below; if anything else is needed just please tell so. thanks in advance. misc related information: ================================== # sysctl machdep.hlt_logical_cpus machdep.hlt_logical_cpus: 1 # kldstat Id Refs Address Size Name 1 2 0xc0100000 1e5214 kernel 2 1 0xc02e6000 21c4 accf_http.ko # information from gdb: ================================== # gdb -k kernel.debug.1 vmcore.1 GNU gdb 4.18 (FreeBSD) Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf SMP 4 cpus IdlePTD at physical address 0x00309000 initial pcb at physical address 0x0027b3c0 panicstr: page fault panic messages: --- Fatal trap 12: page fault while in kernel mode mp_lock = 02000002; cpuid = 2; lapic.id = 06000000 fault virtual address = 0xbfc00000 fault code = supervisor write, page not present instruction pointer = 0x8:0xc0213fd9 stack pointer = 0x10:0xfc749e04 frame pointer = 0x10:0xfc749e10 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 73408 (grep) interrupt mask = none <- SMP: XXX trap number = 12 panic: page fault mp_lock = 02000002; cpuid = 2; lapic.id = 06000000 boot() called on cpu#2 syncing disks... 45 7 done Uptime: 1d0h14m54s amr0: flushing cache...done amr1: flushing cache...done dumping to dev #amrd/0x20001, offset 1048960 dump 3583 3582 3581 3580 3579 3578 3577 3576 3575 3574 3573 3572 3571 [...] #0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487 487 if (dumping++) { (kgdb) bt #0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487 #1 0xc01664df in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:316 #2 0xc0166938 in poweroff_wait (junk=0xc024ff79, howto=-1071318481) at /usr/src/sys/kern/kern_shutdown.c:595 #3 0xc0217e98 in trap_fatal (frame=0xfc749dc4, eva=3217031168) at /usr/src/sys/i386/i386/trap.c:974 #4 0xc0217b29 in trap_pfault (frame=0xfc749dc4, usermode=0, eva=3217031168) at /usr/src/sys/i386/i386/trap.c:867 #5 0xc02176c7 in trap (frame={tf_fs = 24, tf_es = -68485104, tf_ds = 134610960, tf_edi = -99396280, tf_esi = 0, tf_ebp = -59466224, tf_isp = -59466256, tf_ebx = 3, tf_edx = -1043777528, tf_ecx = 0, tf_eax = 1245573123, tf_trapno = 12, tf_err = 2, tf_eip = -1071562791, tf_cs = 8, tf_eflags = 66054, tf_esp = 134660096, tf_ss = 134660096}) at /usr/src/sys/i386/i386/trap.c:466 #6 0xc0213fd9 in pmap_qenter (va=0, m=0xfa135548, count=4) at /usr/src/sys/i386/i386/pmap.c:848 #7 0xc017711a in pipe_build_write_buffer (wpipe=0xfa135520, uio=0xfc749ed0) at /usr/src/sys/kern/sys_pipe.c:594 #8 0xc01772e0 in pipe_direct_write (wpipe=0xfa135520, uio=0xfc749ed0) at /usr/src/sys/kern/sys_pipe.c:709 #9 0xc0177682 in pipe_write (fp=0xce43cec0, uio=0xfc749ed0, cred=0xcd0c6080, flags=0, p=0xfbeb3ee0) at /usr/src/sys/kern/sys_pipe.c:827 #10 0xc0175a05 in dofilewrite (p=0xfbeb3ee0, fp=0xce43cec0, fd=1, buf=0x8068000, nbyte=16384, offset=-1, flags=0) at /usr/src/sys/sys/file.h:163 #11 0xc01758be in write (p=0xfbeb3ee0, uap=0xfc749f80) at /usr/src/sys/kern/sys_generic.c:329 #12 0xc02181c9 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 134643712, tf_esi = 672187864, tf_ebp = -1077937456, tf_isp = -59465772, tf_ebx = 672188332, tf_edx = 672187864, tf_ecx = 0, tf_eax = 4, tf_trapno = 12, tf_err = 2, tf_eip = 672141560, tf_cs = 31, tf_eflags = 663, tf_esp = -1077937500, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1175 #13 0xc02056fb in Xint0x80_syscall () #14 0x280fedd2 in ?? () #15 0x280fed41 in ?? () #16 0x280fbc26 in ?? () #17 0x280a50d5 in ?? () #18 0x804ec04 in ?? () #19 0x804edc6 in ?? () #20 0x804eec5 in ?? () #21 0x804f0c7 in ?? () #22 0x804f3a4 in ?? () #23 0x80500f3 in ?? () #24 0x8049046 in ?? () (kgdb) list *0xc0213fd9 0xc0213fd9 is in pmap_qenter (/usr/src/sys/i386/i386/pmap.c:848). 843 void 844 pmap_qenter(vm_offset_t va, vm_page_t *m, int count) 845 { 846 while (count-- > 0) { 847 pt_entry_t *pte = vtopte(va); 848 *pte = VM_PAGE_TO_PHYS(*m) | PG_RW | PG_V | pgeflag; 849 #ifdef SMP 850 cpu_invlpg((void *)va); 851 #else 852 invltlb_1pg(va); (kgdb) dmesg: ================================== Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.10-STABLE #3: Mon Jun 14 12:39:29 CEST 2004 root@mammut.swi.hu:/usr/obj/usr/src/sys/MAMMUT Timecounter "i8254" frequency 1193182 Hz CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2791.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff Hyperthreading: 2 logical CPUs real memory = 3757899776 (3669824K bytes) avail memory = 3660173312 (3574388K bytes) Changing APIC ID for IO APIC #0 from 0 to 8 on chip Changing APIC ID for IO APIC #1 from 0 to 9 on chip Changing APIC ID for IO APIC #2 from 0 to 10 on chip Changing APIC ID for IO APIC #3 from 0 to 11 on chip Changing APIC ID for IO APIC #4 from 0 to 12 on chip Programming 24 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 Programming 24 pins in IOAPIC #1 Programming 24 pins in IOAPIC #2 Programming 24 pins in IOAPIC #3 Programming 24 pins in IOAPIC #4 FreeBSD/SMP: Multiprocessor motherboard: 4 CPUs cpu0 (BSP): apic id: 0, version: 0x00050014, at 0xfee00000 cpu1 (AP): apic id: 1, version: 0x00050014, at 0xfee00000 cpu2 (AP): apic id: 6, version: 0x00050014, at 0xfee00000 cpu3 (AP): apic id: 7, version: 0x00050014, at 0xfee00000 io0 (APIC): apic id: 8, version: 0x00178020, at 0xfec00000 io1 (APIC): apic id: 9, version: 0x00178020, at 0xfec80000 io2 (APIC): apic id: 10, version: 0x00178020, at 0xfec81000 io3 (APIC): apic id: 11, version: 0x00178020, at 0xfec82000 io4 (APIC): apic id: 12, version: 0x00178020, at 0xfec82800 Preloaded elf kernel "kernel" at 0xc02ea000. Preloaded elf module "accf_http.ko" at 0xc02ea09c. Warning: Pentium 4 CPU: PSE disabled module_register_init: MOD_LOAD (accf_http, c0180dc0, 0xc02e7a60) error 17 Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 12 entries at 0xc00fc160 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard IOAPIC #0 intpin 16 -> irq 2 pci0: on pcib0 pcib1: at device 2.0 on pci0 pci1: on pcib1 pci1: (vendor=0x8086, dev=0x1461) at 28.0 pcib2: at device 29.0 on pci1 pci2: on pcib2 pci1: (vendor=0x8086, dev=0x1461) at 30.0 pcib3: at device 31.0 on pci1 IOAPIC #1 intpin 4 -> irq 5 pci3: on pcib3 em0: port 0xece0-0xecff mem 0xfdcc0000-0xfdcdffff,0xfdce0000-0xfdcfffff irq 5 at device 1.0 on pci3 em0: Speed:N/A Duplex:N/A pcib4: at device 3.0 on pci0 pci4: on pcib4 pci4: (vendor=0x8086, dev=0x1461) at 28.0 pcib5: at device 29.0 on pci4 pci5: on pcib5 pci4: (vendor=0x8086, dev=0x1461) at 30.0 pcib6: at device 31.0 on pci4 pci6: on pcib6 pcib7: at device 4.0 on pci0 pci7: on pcib7 pci7: (vendor=0x8086, dev=0x1461) at 28.0 pcib8: at device 29.0 on pci7 IOAPIC #3 intpin 0 -> irq 7 pci8: on pcib8 amr0: mem 0xf7ff0000-0xf7ffffff irq 7 at device 8.0 on pci8 amr0: Firmware 2.48, BIOS 1.06, 128MB RAM pci7: (vendor=0x8086, dev=0x1461) at 30.0 pcib9: at device 31.0 on pci7 pci10: on pcib9 pcib10: at device 6.0 on pci10 IOAPIC #4 intpin 1 -> irq 11 pci11: on pcib10 pcib11: at device 0.0 on pci11 IOAPIC #4 intpin 0 -> irq 13 pci12: on pcib11 amr1: mem 0xe8000000-0xefffffff irq 13 at device 0.0 on pci12 amr1: Firmware 1.80, BIOS 3.29, 128MB RAM pci11: (vendor=0x1077, dev=0x1216) at 1.0 irq 11 pci0: at 29.0 irq 2 pcib12: at device 30.0 on pci0 pci13: on pcib12 pci13: at 4.0 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xfc00-0xfc0f,0-0x3,0-0x7,0-0x3,0-0x7 irq 2 at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 orm0: