From owner-freebsd-arch Tue Feb 6 18:18:20 2001 Delivered-To: freebsd-arch@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id E3C2437B401; Tue, 6 Feb 2001 18:17:59 -0800 (PST) Received: by relay.butya.kz (Postfix, from userid 1000) id 40E6B29059; Wed, 7 Feb 2001 08:17:54 +0600 (ALMT) Received: from localhost (localhost [127.0.0.1]) by relay.butya.kz (Postfix) with ESMTP id 312C628698; Wed, 7 Feb 2001 08:17:54 +0600 (ALMT) Date: Wed, 7 Feb 2001 08:17:53 +0600 (ALMT) From: Boris Popov To: Alfred Perlstein Cc: freebsd-arch@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: CFR: Sequential mbuf read/write extensions In-Reply-To: <20010206105846.Q26076@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 6 Feb 2001, Alfred Perlstein wrote: > Looks really cool, I can't get to http://www.butya.kz/~bp/mbuf/, > but from the examples it looks very useful. Sorry, server was brought down and I wasn't notified :(. It should be ok now. > I was wondering if you planned or already had an API for reading/writing > from/into host/network byte order? Not that it's needed, but would > be nice to have. Also any chance we'll get manpages that describe > these functions/macros? Yes, the header file contains macros which supports not only host to network (big-endian) byte order conversion, but also to the little-endian byte order. And of course, there will be a manpage(s) if this is going to become a part of kernel API. > On other idea is to give each op a 'count' parameter, your examples > seem to show various functions being called several times in a row, > maybe they would help optimize certain codepaths? Yes, there is a mb_{get|put}_mem() functions which allow reading/writing of big memory regions (including user space). So, if protocol is well designed and layout of the packet can be described as structure, it is possible to fill it in the normal memory and copy the mbuf chain in single operation. > > Not that any of these suggestions are really required, I just wanted > to give you some feedback. :) Thanks :) -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message