From owner-freebsd-arch@FreeBSD.ORG Sun Apr 30 17:38:32 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EDC316A405; Sun, 30 Apr 2006 17:38:32 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD2FB43D55; Sun, 30 Apr 2006 17:38:31 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F90B.dip.t-dialin.net [84.165.249.11]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.4/8.13.1) with ESMTP id k3UHVBVZ075590; Sun, 30 Apr 2006 19:31:12 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k3UHcINd024419; Sun, 30 Apr 2006 19:38:19 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sun, 30 Apr 2006 19:38:59 +0200 From: Alexander Leidinger To: arch@freebsd.org Message-ID: <20060430193859.53c65eca@Magellan.Leidinger.net> X-Mailer: Sylpheed-Claws 2.1.1 (GTK+ 2.8.17; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: emulation@freebsd.org, Wilko Bulte Subject: CFR: Removing the linuxolator on alpha X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Apr 2006 17:38:32 -0000 Hi, at http://www.Leidinger.net/FreeBSD/current-patches/linux.diff I have a patch which disconnects the linuxolator on our tier-2 architecture "Alpha". It also moves linprocfs from the generic to the architecture specific "options" and "files" files, since I think linprocfs should only be build on those architectures where it makes sense... those with a linuxolator. The reasons for the removal are: - we don't have a linux_base port which supports Alpha and at the same time is not outdated/obsoleted upstream/in a good condition/ currently working - the upcomming new default linux base port is based upon Fedora Core 3 (security support via http://www.fedoralegacy.org), which isn't available for Alpha (like the current default linux base port which is based upon Red Hat 8) - nobody answered my request for testing it ~1 month ago on current@ and alpha@ (it doesn't surprises me, see first point) - a SoC student wouldn't have to waste time on something which nobody is willing to test Removing the alpha specific linuxolator files and removing the alpha specific hack in the MI files will be done in a separate commit (a little bit later). Please send objections/suggestions for parts of the patch my way. Please direct objections to the removal to the trashcan (except you want to provide patches for the ports collection to make it work before the start of the work in the SoC). Bye, Alexander. -- Secret hacker rule #11: hackers read manuals. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 WL http://www.amazon.de/exec/obidos/registry/1FZ4DTHQE9PQ8/ref=wl_em_to/ From owner-freebsd-arch@FreeBSD.ORG Sun Apr 30 17:40:40 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB5A016A403; Sun, 30 Apr 2006 17:40:40 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4321043D58; Sun, 30 Apr 2006 17:40:35 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k3UHeYws025163; Sun, 30 Apr 2006 11:40:34 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4454F699.7030507@samsco.org> Date: Sun, 30 Apr 2006 11:40:41 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051230 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alexander Leidinger References: <20060430193859.53c65eca@Magellan.Leidinger.net> In-Reply-To: <20060430193859.53c65eca@Magellan.Leidinger.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: emulation@freebsd.org, arch@freebsd.org, Wilko Bulte Subject: Re: CFR: Removing the linuxolator on alpha X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Apr 2006 17:40:41 -0000 Alexander Leidinger wrote: > Hi, > > at http://www.Leidinger.net/FreeBSD/current-patches/linux.diff I have a > patch which disconnects the linuxolator on our tier-2 architecture > "Alpha". It also moves linprocfs from the generic to the architecture > specific "options" and "files" files, since I think linprocfs should > only be build on those architectures where it makes sense... those with > a linuxolator. > > The reasons for the removal are: > - we don't have a linux_base port which supports Alpha and at the > same time is not outdated/obsoleted upstream/in a good condition/ > currently working > - the upcomming new default linux base port is based upon Fedora > Core 3 (security support via http://www.fedoralegacy.org), which > isn't available for Alpha (like the current default linux base > port which is based upon Red Hat 8) > - nobody answered my request for testing it ~1 month ago on > current@ and alpha@ (it doesn't surprises me, see first point) > - a SoC student wouldn't have to waste time on something which > nobody is willing to test > > Removing the alpha specific linuxolator files and removing the alpha > specific hack in the MI files will be done in a separate commit (a > little bit later). > > Please send objections/suggestions for parts of the patch my way. > Please direct objections to the removal to the trashcan (except you > want to provide patches for the ports collection to make it work before > the start of the work in the SoC). > > Bye, > Alexander. > I highly support this. Scott From owner-freebsd-arch@FreeBSD.ORG Thu May 4 17:28:39 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D162B16A405; Thu, 4 May 2006 17:28:39 +0000 (UTC) (envelope-from bushman@rsu.ru) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id C98FC43D48; Thu, 4 May 2006 17:28:38 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from jersey ([80.80.97.196]) (authenticated bits=0) by mail.r61.net (8.13.6/8.13.6) with ESMTP id k44HSExI078924 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Thu, 4 May 2006 21:28:24 +0400 (MSD) (envelope-from bushman@rsu.ru) Message-ID: <019f01c66fa0$34052240$a9655050@jersey> From: "Michael Bushkov" To: "Ceri Davies" , "Robert Watson" References: <002401c66b0a$44c230e0$01655050@jersey> <44529510.6030704@freebsd.org> <20060428222627.GI51777@submonkey.net> <001801c66b42$d48d4740$e8775050@jersey> <20060429100236.GJ51777@submonkey.net> <20060429174129.H11416@fledge.watson.org> Date: Thu, 4 May 2006 21:28:25 +0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: ClamAV version 0.88.1, clamav-milter version 0.88.1 on asterix.r61.net X-Virus-Status: Clean Cc: freebsd-current@FreeBSD.org, Hajimu UMEMOTO , Colin Percival , freebsd-arch@FreeBSD.org Subject: Re: [HEADS UP] upcoming /etc/services updating X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2006 17:28:39 -0000 Hi, > Robert Watson wrote: > BTW, since this is in the context of significantly increasing the size of > the services database, have we: > > (1) Measured what impact adding the cache daemon for local databases has? > Specifically, does adding the cache daemon for a database like > /etc/services, /etc/passwd, etc, improve performance, or add overhead? > > (2) Looked at adding /etc/services.db, similar to the other compiled > database > pieces, in order to improve lookup times for very large tables. This > change would be orthoganal to a cache daemon. getpwXXX() and getgrXXX() functions work slower in about 3 times with cached enabled when only "files" source is used. The thing is, I think, I'll be able to improve cached's performance to reduce this drawback. Currently, cached gives real performance gain with sources such as DNS and LDAP and is not that useful with local sources, except the "services" database (I'll do accurate benchmarking with all types of sources and will post the report with its results). I'll test the cached performance with very large /etc/services file. However, at this moment, the solution with compiled database for services will be probably faster. Anyway, cached can be used right now to allow IANA list importing without significant performance drawbacks, IMHO. With best regards, Michael Bushkov From owner-freebsd-arch@FreeBSD.ORG Thu May 4 18:15:25 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BF6B16A40D; Thu, 4 May 2006 18:15:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDDEC43D45; Thu, 4 May 2006 18:15:24 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.19.131]) ([10.251.19.131]) by a50.ironport.com with ESMTP; 04 May 2006 11:15:18 -0700 Message-ID: <445A44B6.5080906@elischer.org> Date: Thu, 04 May 2006 11:15:18 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: current@freebsd.org, arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: SGI kernel braindump. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2006 18:15:25 -0000 One of the (ex) main developers for the SGI SMP scheduler and related fields has offered to do a brain dump, possibly with some of his ex-cohorts of what they learned in their efforts to make SGI's unix do good SMP scheduling. This would be in the guise of the July 5 BAFUG meeting, and would be webcast as usual, so People from all-over could attend. If we do this I'd like to make sure that there are enough interested people to make it worth the time of these people to go out of their way to collect together information and make presentations, and I'd also like to ask that interested people start thinking about quuestions they'd like to ask. I'd like to start by collecting questions ASAP so that I can forward them on to the speaker to help hi,m gather together information that would be useful for us. Let the comments and Questions come in please! Julian p.s. Last night's recordings of Alan Cox's and Nate Walker's talks will be put up for download in the next couple of days. From owner-freebsd-arch@FreeBSD.ORG Thu May 4 19:17:45 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F8C716A417; Thu, 4 May 2006 19:17:45 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DBAA43D46; Thu, 4 May 2006 19:17:45 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.19.131]) ([10.251.19.131]) by a50.ironport.com with ESMTP; 04 May 2006 12:17:44 -0700 Message-ID: <445A5358.5070004@elischer.org> Date: Thu, 04 May 2006 12:17:44 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <445A44B6.5080906@elischer.org> In-Reply-To: <445A44B6.5080906@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, current@freebsd.org Subject: Re: SGI kernel braindump. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2006 19:17:47 -0000 Julian Elischer wrote: > > One of the (ex) main developers for the SGI SMP scheduler and related > fields > has offered to do a brain dump, possibly with some of his > ex-cohorts of what they learned in their efforts to make SGI's unix > do good SMP > scheduling. > > This would be in the guise of the July 5 BAFUG meeting, and would be > webcast as usual, so People from all-over could attend. > > If we do this I'd like to make sure that there are enough interested > people to make it worth the time of these people to go out of their > way to collect > together information and make presentations, and I'd also like to ask > that interested people > start thinking about quuestions they'd like to ask. I'd like to start > by collecting > questions ASAP so that I can forward them on to the speaker to help > hi,m gather together > information that would be useful for us. > > > Let the comments and Questions come in please! > > Julian > > p.s. Last night's recordings of Alan Cox's and Nate Walker's talks Duh braino.. Nate LAWSON > will be put up for download in the next couple of days. > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" From owner-freebsd-arch@FreeBSD.ORG Fri May 5 03:38:13 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 040BA16A401 for ; Fri, 5 May 2006 03:38:13 +0000 (UTC) (envelope-from lioux@FreeBSD.org) Received: from vette.gigo.com (vette.gigo.com [216.218.228.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCD8543D45 for ; Fri, 5 May 2006 03:38:12 +0000 (GMT) (envelope-from lioux@FreeBSD.org) Received: from 200.193.235.83 (unknown [200.193.235.83]) by vette.gigo.com (Postfix) with ESMTP id 55BE95762 for ; Thu, 4 May 2006 20:38:11 -0700 (PDT) Received: (qmail 76859 invoked by uid 1001); 5 May 2006 00:37:26 -0300 Message-ID: <20060505033749.76815.qmail@exxodus.fedaykin.here> Date: Fri, 5 May 2006 00:37:26 -0300 From: Mario Sergio Fujikawa Ferreira To: freebsd-arch@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline User-Agent: Mutt/1.5.11 Cc: Subject: RFC {get,set}socktopt SO_DONTFRAGMENT X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 03:38:13 -0000 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I would like to propose a new socket option: SO_DONTFRAGMENT on the lines of IP_DONTFRAG. I was trying to tell a socket that it should not fragment the packets. However, I found out that I could only do it if I had a "struct socket". If I had a "struct socket" I could set INP_DONTFRAG which would solve all my problems. Unfortunaly, I only had a file descriptor fd from a int fd = socket(...); invocation. it is a shame that there is no way to tell a socket fd that it should not fragment packets on userland (it is possible on kernel space). That is why I wrote this little modification: 1) Added SO_DONTFRAGMENT option to src/sys/sys/socket.h 2) Added SO_DONTFRAGMENT handling to src/sys/kern/uipc_socket.c. Actually, it sets either (struct inpcb *)->inp_flags &= INP_DONTFRAG; or (struct inpcb *)->inp_flags |= ~INP_DONTFRAG; I would like to know if the code is correct and what do you think about this approach. I do think this should be handled by {get,set}sockopt(2) instead of a ioctl(2) because it is specific to sockets. Moreover, I think this is a very useful option. For instance, I want to add this to net-im/libjingle to emulate the behavior of both windows and linux. The patch is attached. It can also be found at http://people.freebsd.org/~lioux/patch-sockopt-dontfragment Regards, -- Mario S F Ferreira - DF - Brazil - "I guess this is a signature." feature, n: a documented bug | bug, n: an undocumented feature --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-sockopt-dontfragment --- /usr/src/sys/sys/socket.h.orig Thu May 4 12:56:39 2006 +++ /usr/src/sys/sys/socket.h Fri May 5 00:14:41 2006 @@ -118,6 +118,7 @@ #define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ #define SO_BINTIME 0x2000 /* timestamp received dgram traffic */ #endif +#define SO_DONTFRAGMENT 0x4000 /* don't fragment packet */ /* * Additional options, not kept in so_options. --- /usr/src/sys/kern/uipc_socket.c.orig Thu May 4 13:00:50 2006 +++ /usr/src/sys/kern/uipc_socket.c Fri May 5 00:11:39 2006 @@ -1553,6 +1553,7 @@ #ifdef MAC struct mac extmac; #endif + struct inpcb *inp = sotoinpcb(so); error = 0; if (sopt->sopt_level != SOL_SOCKET) { @@ -1594,6 +1595,7 @@ case SO_TIMESTAMP: case SO_BINTIME: case SO_NOSIGPIPE: + case SO_DONTFRAGMENT: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); if (error) @@ -1603,6 +1605,23 @@ so->so_options |= sopt->sopt_name; else so->so_options &= ~sopt->sopt_name; + + switch (sopt->sopt_name) { + +#define OPTSET(bit) do { \ + INP_LOCK(inp); \ + if (optval) \ + inp->inp_flags |= bit; \ + else \ + inp->inp_flags &= ~bit; \ + INP_UNLOCK(inp); \ +} while (0) + + case SO_DONTFRAGMENT: + OPTSET(INP_DONTFRAG); + break; + } + SOCK_UNLOCK(so); break; --VbJkn9YxBvnuCH5J-- From owner-freebsd-arch@FreeBSD.ORG Fri May 5 09:06:46 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1622A16A400; Fri, 5 May 2006 09:06:46 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3538B43D5E; Fri, 5 May 2006 09:06:44 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.4/8.13.3) with ESMTP id k4596h23056931; Fri, 5 May 2006 13:06:43 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Fri, 5 May 2006 13:06:43 +0400 (MSD) From: Maxim Konovalov To: Mario Sergio Fujikawa Ferreira In-Reply-To: <20060505033749.76815.qmail@exxodus.fedaykin.here> Message-ID: <20060505125901.H56755@mp2.macomnet.net> References: <20060505033749.76815.qmail@exxodus.fedaykin.here> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-arch@freebsd.org Subject: Re: RFC {get,set}socktopt SO_DONTFRAGMENT X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 09:06:46 -0000 Hello, On Fri, 5 May 2006, 00:37-0300, Mario Sergio Fujikawa Ferreira wrote: > Hi, > > I would like to propose a new socket option: SO_DONTFRAGMENT > on the lines of IP_DONTFRAG. [...] According to ip(4) and rev. 1.247 ip_output.c commit log IP_DONTFRAG should work for IP and UPD. I'm not sure we need to invent new setsockopt() option just for TCP. Perhaps extending IP_DONTFRAG for TCP is better idea. Anyhow, ask Andre. -- Maxim Konovalov From owner-freebsd-arch@FreeBSD.ORG Fri May 5 18:30:39 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52CCC16A402; Fri, 5 May 2006 18:30:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6A1343D46; Fri, 5 May 2006 18:30:38 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id E7D1646D1A; Fri, 5 May 2006 14:30:37 -0400 (EDT) Date: Fri, 5 May 2006 19:30:37 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Mario Sergio Fujikawa Ferreira In-Reply-To: <20060505033749.76815.qmail@exxodus.fedaykin.here> Message-ID: <20060505192943.Q17611@fledge.watson.org> References: <20060505033749.76815.qmail@exxodus.fedaykin.here> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@FreeBSD.org Subject: Re: RFC {get,set}socktopt SO_DONTFRAGMENT X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 18:30:39 -0000 On Fri, 5 May 2006, Mario Sergio Fujikawa Ferreira wrote: > I would like to propose a new socket option: SO_DONTFRAGMENT on the > lines of IP_DONTFRAG. I'm confused. Why not just use the IP_DONTFRAG socket option? I must be missing something pretty basic here. :-) Robert N M Watson From owner-freebsd-arch@FreeBSD.ORG Sat May 6 03:44:24 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 953B016A400; Sat, 6 May 2006 03:44:24 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mrout1-b.corp.dcn.yahoo.com (mrout1-b.corp.dcn.yahoo.com [216.109.112.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AA0643D45; Sat, 6 May 2006 03:44:24 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (proxy8.corp.yahoo.com [216.145.48.13]) by mrout1-b.corp.dcn.yahoo.com (8.13.6/8.13.4/y.out) with ESMTP id k463iE9g018878; Fri, 5 May 2006 20:44:14 -0700 (PDT) Date: Sat, 06 May 2006 12:44:12 +0900 Message-ID: From: gnn@FreeBSD.org To: Mario Sergio Fujikawa Ferreira In-Reply-To: <20060505033749.76815.qmail@exxodus.fedaykin.here> References: <20060505033749.76815.qmail@exxodus.fedaykin.here> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-apple-darwin8.5.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: freebsd-arch@FreeBSD.org Subject: Re: RFC {get,set}socktopt SO_DONTFRAGMENT X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 May 2006 03:44:24 -0000 At Fri, 5 May 2006 00:37:26 -0300, Mario Sergio Fujikawa Ferreira wrote: > > I would like to propose a new socket option: SO_DONTFRAGMENT > on the lines of IP_DONTFRAG. > > I was trying to tell a socket that it should not fragment > the packets. However, I found out that I could only do it if I had > a "struct socket". If I had a "struct socket" I could set INP_DONTFRAG > which would solve all my problems. > The important question is, "What kind of packets." If you want a sequential packet stream you should use SCTP (www.sctp.org) which has been ported to FreeBSD but is not part of the base system as yet. For packet based streams you should be able to use what is already there. Best, George From owner-freebsd-arch@FreeBSD.ORG Sat May 6 11:21:37 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A7DB16A403 for ; Sat, 6 May 2006 11:21:37 +0000 (UTC) (envelope-from avalonwallace@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17ED643D45 for ; Sat, 6 May 2006 11:21:36 +0000 (GMT) (envelope-from avalonwallace@gmail.com) Received: by py-out-1112.google.com with SMTP id e30so993926pya for ; Sat, 06 May 2006 04:21:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=j7KbTruVa18FYHkMfCFfb8gr2PbvJ5IyReRQc72AACLdSkTIhOucc6NUv9T7jm8mkn3i2kSeNmbN2kMkomBYedfJXu8Pi2He5GusilpmtnSviQ529WEWn+EVwtiiFq/X6Q2WnzXeefL27kFsGy7MxFG4tv8xY9rN4ec9lndDTAI= Received: by 10.35.36.13 with SMTP id o13mr92115pyj; Sat, 06 May 2006 04:21:35 -0700 (PDT) Received: by 10.35.105.6 with HTTP; Sat, 6 May 2006 04:21:35 -0700 (PDT) Message-ID: <3a60de0b0605060421l708d8c06y29006c2c3cd75519@mail.gmail.com> Date: Sat, 6 May 2006 19:21:35 +0800 From: "Wallace William" To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: fakedevice hotplug Demo with sourcecode X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 May 2006 11:21:37 -0000 hello ,everyone . i have write a demo module to demostrate the hotplug of a pci device under freeBSD 5.3 . when kldload the module ,the fakedevice will be "plug "into the pci architechure,when kldunload ,the device will be removed= . pciconf -l ,and devinfo -v will be the tool to show this change : a new device called wallace is added ,this device comes from the info in LINE97 o= f the fakeBSC.c: *dinfo=3D* ((struct pci_devinfo *) device_get_ivars(devlist[6]) ); maybe u need to change the '6' according to ur need . there r 4 file in this package :pci_hotplug_core.c fakeBSD.c pci_hotplug.h and the Makefile . way to RUN: 1 unzip the package 2 make 3 kldload ./fakeBSD.ko 4 pciconf -l ,and devinfo -v to see the change 5 kldunload fakeBSD.ko welcome for ur feedback,next i will do my best to write the driver for rea= l pci device hotplug, as what cardbus has done ////////////////pci_hotplug_core.c////////////////////////////////// /////////////from PCIexample//////////////// #include /* defines used in kernel.h */ #include #include #include #include /* types used in module initialization */ #include /* cdevsw struct */ #include /* uio struct */ #include #include /* structs, prototypes for pci bus stuff */ #include #include #include #include /* For get_pci macros! */ #include //////////////////////////////////// #include #include "pci_hotplug.h" //WB// #define MY_NAME "pci_hotplug" //simplified//WB// #define dbg(fmt, arg...) do { if (debug) printf( fmt , ## arg); } while (0) #define err(format, arg...) printf( format, MY_NAME , ## arg) #define info(format, arg...) printf(format, MY_NAME , ## arg) #define warn(format, arg...) printf(format , MY_NAME, ## arg) /* local variables */ static int debug; ////////////////////////////////////////////////////////////////// static LIST_HEAD(pci_hotplug_slot_list); /* these strings match up with the values in pci_bus_speed */ static char *pci_bus_speed_strings[] =3D { "33 MHz PCI", /* 0x00 */ "66 MHz PCI", /* 0x01 */ "66 MHz PCIX", /* 0x02 */ "100 MHz PCIX", /* 0x03 */ "133 MHz PCIX", /* 0x04 */ NULL, /* 0x05 */ NULL, /* 0x06 */ NULL, /* 0x07 */ NULL, /* 0x08 */ "66 MHz PCIX 266", /* 0x09 */ "100 MHz PCIX 266", /* 0x0a */ "133 MHz PCIX 266", /* 0x0b */ NULL, /* 0x0c */ NULL, /* 0x0d */ NULL, /* 0x0e */ NULL, /* 0x0f */ NULL, /* 0x10 */ "66 MHz PCIX 533", /* 0x11 */ "100 MHz PCIX 533", /* 0x12 */ "133 MHz PCIX 533", /* 0x13 */ "25 GBps PCI-E", /* 0x14 */ }; ///////////////////fakeBSD.c ///////////////////////////////////////////////// ////////change of the header///////////// /////////////from PCIexample//////////////// #include /* defines used in kernel.h */ #include #include #include #include /* types used in module initialization */ #include /* cdevsw struct */ #include /* uio struct */ #include #include /* structs, prototypes for pci bus stuff */ //for TAILQ_FOREACH //#include // #include //1129 #include #include #include #include //1129 sizeof #include /* For get_pci macros! */ #include #include //1129 //////////////////////////////////// #include //for list_head //#include "pci_hotplug.h" put the unrealated functions out //#include "../pci.h" //this is created on compiling.so leave it to makefile //#include "pcib_if.h" //#include "pci_if.h" /* //COMMENT //devinfo struct for devinfo //addtodevice_list for pciconf COPY the NIC device content to the wallace0 fake device */ #define MY_NAME "fakephp" #define dbg(fmt, arg...) do { if (debug) printf( fmt , ## arg); } while (0) #define err(format, arg...) printf( format, MY_NAME , ## arg) #define info(format, arg...) printf(format, MY_NAME , ## arg) #define DRIVER_AUTHOR "Wallace " #define DRIVER_DESC "Fake PCI Hot Plug Controller Driver" /* * This function is called by the kld[un]load(2) system calls to * determine what actions to take when a module is loaded or unloaded. */ /* vars */ static struct pci_devinfo *dinfo; static device_t bus; //refer to pci bus size_t dinfo_size; static int fake_loader(struct module *m, int what, void *arg) { int erro=3D0; device_t *devlist; int count=3D0; int numdevs; devclass_t class1; char * Dtarget=3D"pci",Dname=3D"wallace"; struct devlist *devlist_head; devlist_head =3D &pci_devq; switch (what) { case MOD_LOAD: /* kldload */ printf("Module loaded.\n,with bootverbose=3D%i",bootverbose); //find pci devclass and device if ((class1 =3D devclass_find(Dtarget)) =3D=3D NULL) { printf("unable to get the class"); return ENXIO; } printf("\n//////////////my name is %s////////////\n",devclass_get_name(class1)); // show the nameof the device,or store them into another TAILQ printf("maxunit under class pci is%i\n",devclass_get_maxunit(class1)); //WB does unit =3D=3D count if((bus =3D devclass_get_device(class1,count))!=3DNULL)//WB why not use t= he loop over count? { printf("my device name is %s,my unit is %i, DESC: %s,with number:%i\n", device_get_name(bus),device_get_unit(bus),device_get_desc(bus),pcib_get_= bus(bus)); } //else? return (NULL) dinfo_size=3Dsizeof(struct pci_devinfo); dinfo=3DNULL; //initialized dinfo=3D malloc(dinfo_size, M_DEVBUF, M_WAITOK | M_ZERO); if (dinfo =3D=3D NULL) return (NULL); if (device_get_children(bus, &devlist, &numdevs)=3D=3D0) //get ivar from de0,thus 6 of devlist ,hardcoded ,this need specific platform characteristic , waiting for modification *dinfo=3D* ((struct pci_devinfo *) device_get_ivars(devlist[6]) ); if ((dinfo->cfg.dev =3D device_add_child(bus, "wallace", -1)) =3D= =3D NULL) {//change the name device_printf(device_get_parent(bus), "couldn't attach pci bus\n"); } device_sysctl_init(dinfo->cfg.dev); strncpy ((dinfo->conf.pd_name),device_get_name(dinfo->cfg.dev ),8);//sizeof(device_get_name(dinfo->cfg.dev))); STAILQ_INSERT_TAIL(devlist_head, dinfo, pci_links); pci_numdevs++; pci_generation++; device_set_ivars(dinfo->cfg.dev, dinfo); //show result if (device_get_children(bus, &devlist, &numdevs)=3D=3D0) while (numdevs--){ printf("%i",numdevs); device_print_prettyname(devlist[numdevs]); if (device_get_devclass(devlist[numdevs])!=3DNULL ) printf("devclass=3D%s\n",devclass_get_name(device_get_devclass(devlist[numd= evs]) )); } break; case MOD_UNLOAD: printf("Module unloaded.\n"); //still dinfo point to the fake device i point to . it is static !!!:) if (dinfo->cfg.dev !=3D NULL) { printf("dinfo->cfg.dev exist,deleting it.\n"); device_delete_child(device_get_parent(dinfo->cfg.dev), dinfo->cfg.dev); printf("dinfo->cfg.dev exist,deleted .\n"); }else printf("dinfo->cfg.dev=3DNULL\n"); if (device_get_children(bus, &devlist, &numdevs)=3D=3D0) //demostrating the result while (numdevs--){ printf("%i",numdevs); device_print_prettyname(devlist[numdevs]); if (device_get_devclass(devlist[numdevs])!=3DNULL ) printf("devclass=3D%s\n",devclass_get_name(device_get_devclass(devlist[numd= evs]) )); } printf("freeing(dinfo,M_DEVBUF)\n"); //1 device_sysctl_fini(dinfo->cfg.dev);//WB finish sysctl structure devlist_head =3D &pci_devq; STAILQ_REMOVE(devlist_head, dinfo, pci_devinfo, pci_links); free(dinfo, M_DEVBUF); /* increment the generation count */ //WB inrease or decreas? pci_generation++; /* we're losing one device */ pci_numdevs--; dinfo=3DNULL; //2 printf("freed dinfo,\n"); //WB ,n->,/n //erro=3D0; break; default: printf("Module default.\n"); erro =3D EINVAL; break; } return(erro); } //DEV_MODULE(echo,echo_loader,NULL); //#define DEV_MODULE(name, evh, arg) static moduledata_t fake_mod =3D { "fakeBSD", fake_loader, NULL }; DECLARE_MODULE(fake, fake_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); //////////////////////pci_hotplug.h /////////////////////// #include //WB// #ifndef _PCI_HOTPLUG_H #define _PCI_HOTPLUG_H /* These values come from the PCI Hotplug Spec */ enum pci_bus_speed { PCI_SPEED_33MHz =3D 0x00, PCI_SPEED_66MHz =3D 0x01, PCI_SPEED_66MHz_PCIX =3D 0x02, PCI_SPEED_100MHz_PCIX =3D 0x03, PCI_SPEED_133MHz_PCIX =3D 0x04, PCI_SPEED_66MHz_PCIX_ECC =3D 0x05, PCI_SPEED_100MHz_PCIX_ECC =3D 0x06, PCI_SPEED_133MHz_PCIX_ECC =3D 0x07, PCI_SPEED_66MHz_PCIX_266 =3D 0x09, PCI_SPEED_100MHz_PCIX_266 =3D 0x0a, PCI_SPEED_133MHz_PCIX_266 =3D 0x0b, PCI_SPEED_66MHz_PCIX_533 =3D 0x11, PCI_SPEED_100MHz_PCIX_533 =3D 0x12, PCI_SPEED_133MHz_PCIX_533 =3D 0x13, PCI_SPEED_UNKNOWN =3D 0xff, }; /* These values come from the PCI Express Spec */ enum pcie_link_width { PCIE_LNK_WIDTH_RESRV =3D 0x00, PCIE_LNK_X1 =3D 0x01, PCIE_LNK_X2 =3D 0x02, PCIE_LNK_X4 =3D 0x04, PCIE_LNK_X8 =3D 0x08, PCIE_LNK_X12 =3D 0x0C, PCIE_LNK_X16 =3D 0x10, PCIE_LNK_X32 =3D 0x20, PCIE_LNK_WIDTH_UNKNOWN =3D 0xFF, }; enum pcie_link_speed { PCIE_2PT5GB =3D 0x14, PCIE_LNK_SPEED_UNKNOWN =3D 0xFF, }; struct hotplug_slot; /*//WB// struct hotplug_slot_attribute { struct attribute attr; ssize_t (*show)(struct hotplug_slot *, char *); ssize_t (*store)(struct hotplug_slot *, const char *, size_t); }; //WB// #define to_hotplug_attr(n) container_of(n, struct hotplug_slot_attribute, attr); * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use * @owner: The module owner of this structure * @enable_slot: Called when the user wants to enable a specific pci slot * @disable_slot: Called when the user wants to disable a specific pci slot * @set_attention_status: Called to set the specific slot's attention LED t= o * the specified value * @hardware_test: Called to run a specified hardware test on the specified * slot. * @get_power_status: Called to get the current power status of a slot. * If this field is NULL, the value passed in the struct hotplug_slot_info * will be used when this value is requested by a user. * @get_attention_status: Called to get the current attention status of a slot. * If this field is NULL, the value passed in the struct hotplug_slot_info * will be used when this value is requested by a user. * @get_latch_status: Called to get the current latch status of a slot. * If this field is NULL, the value passed in the struct hotplug_slot_info * will be used when this value is requested by a user. * @get_adapter_status: Called to get see if an adapter is present in the slot or not. * If this field is NULL, the value passed in the struct hotplug_slot_info * will be used when this value is requested by a user. * @get_address: Called to get pci address of a slot. * If this field is NULL, the value passed in the struct hotplug_slot_info * will be used when this value is requested by a user. * @get_max_bus_speed: Called to get the max bus speed for a slot. * If this field is NULL, the value passed in the struct hotplug_slot_info * will be used when this value is requested by a user. * @get_cur_bus_speed: Called to get the current bus speed for a slot. * If this field is NULL, the value passed in the struct hotplug_slot_info * will be used when this value is requested by a user. * * The table of function pointers that is passed to the hotplug pci core by a * hotplug pci driver. These functions are called by the hotplug pci core when * the user wants to do something to a specific slot (query it for information, * set an LED, enable / disable power, etc.) */ //the freebsd WAY of function call back typedef int enable_slot_t (struct hotplug_slot *slot); typedef int disable_slot_t (struct hotplug_slot *slot); typedef int set_attention_status_t (struct hotplug_slot *slot, u_int8_t value); typedef int hardware_test_t (struct hotplug_slot *slot, u_int32_t value); typedef int get_power_status_t (struct hotplug_slot *slot, u_int8_t *value); typedef int get_attention_status_t (struct hotplug_slot *slot, u_int8_t *value); typedef int get_latch_status_t (struct hotplug_slot *slot, u_int8_t *value); typedef int get_adapter_status_t (struct hotplug_slot *slot, u_int8_t *value); typedef int get_address_t (struct hotplug_slot *slot, u_int32_t *value); typedef int get_max_bus_speed_t (struct hotplug_slot *slot, enum pci_bus_speed *value); typedef int get_cur_bus_speed_t (struct hotplug_slot *slot, enum pci_bus_speed *value); struct hotplug_slot_ops { //struct module *owner; enable_slot_t * enable_slot; disable_slot_t *disable_slot; set_attention_status_t *set_attention_status; hardware_test_t *hardware_test; get_power_status_t *get_power_status; get_attention_status_t *get_attention_status; get_latch_status_t *get_latch_status; get_adapter_status_t *get_adapter_status; get_address_t *get_address; get_max_bus_speed_t *get_max_bus_speed; get_cur_bus_speed_t *get_cur_bus_speed; }; /** * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot * @power: if power is enabled or not (1/0) * @attention_status: if the attention light is enabled or not (1/0) * @latch_status: if the latch (if any) is open or closed (1/0) * @adapter_present: if there is a pci board present in the slot or not (1/0) * @address: (domain << 16 | bus << 8 | dev) * * Used to notify the hotplug pci core of the status of a specific slot. */ struct hotplug_slot_info { u_int8_t power_status; u_int8_t attention_status; u_int8_t latch_status; u_int8_t adapter_status; u_int32_t address; enum pci_bus_speed max_bus_speed; enum pci_bus_speed cur_bus_speed; }; /** * struct hotplug_slot - used to register a physical slot with the hotplug pci core * @name: the name of the slot being registered. This string must * be unique amoung slots registered on this system. * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot * @info: pointer to the &struct hotplug_slot_info for the inital values fo= r * this slot. * @private: used by the hotplug pci controller driver to store whatever it * needs. */ typedef void release_t (struct hotplug_slot *slot); struct hotplug_slot { char *name; int unit; struct hotplug_slot_ops *ops; struct hotplug_slot_info *info; release_t * release; void *private; /* Variables below this are for use only by the hotplug pci core. for example :pci_hotplug_slot_list */ struct list_head slot_list; //WB//struct kobject kobj; }; //WB//#define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj) #define LIST_HEAD_INIT(name) { &(name), &(name) } #define LIST_HEAD(name) \ struct list_head name =3D LIST_HEAD_INIT(name) /* list_entry - get the struct for this entry * @ptr: the &struct list_head pointer. * @type: the type of the struct this is embedded in. * @member: the name of the list_struct within the struct. entry2 inorder to differ from the vm one */ #define list_entry2(ptr, type, member) \ ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) /** * list_for_each_safe - iterate over a list safe against removal of list entry * @pos: the &struct list_head to use as a loop counter. * @n: another &struct list_head to use as temporary storage * @head: the head for your list. */ #define list_for_each_safe2(pos, n, head) \ for (pos =3D (head)->next, n =3D pos->next; pos !=3D (head); \ pos =3D n, n =3D pos->next) extern int pci_hp_register (struct hotplug_slot *slot); extern int pci_hp_deregister (struct hotplug_slot *slot); extern int pci_hp_change_slot_info (struct hotplug_slot *slot, struct hotplug_slot_info *info); //WB//extern struct subsystem pci_hotplug_slots_subsys; #endif ///////////////////Makefile///////////////////////////// .PATH: /usr/src/devdrv/ KMOD=3D fakeBSD SRCS=3D fakeBSD.c pci_hotplug_core.c SRCS+=3D device_if.h bus_if.h pci_if.h .include