From owner-cvs-all Wed Jun 20 14:41: 2 2001 Delivered-To: cvs-all@freebsd.org Received: from technokratis.com (modemcable052.174-202-24.mtl.mc.videotron.ca [24.202.174.52]) by hub.freebsd.org (Postfix) with ESMTP id 063BD37B407; Wed, 20 Jun 2001 14:40:55 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by technokratis.com (8.11.3/8.11.3) id f5KLfnw36476; Wed, 20 Jun 2001 17:41:49 -0400 (EDT) (envelope-from bmilekic) Date: Wed, 20 Jun 2001 17:41:49 -0400 From: Bosko Milekic To: Alfred Perlstein Cc: Bosko Milekic , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/lge if_lge.c src/sys/dev/nge if_nge.c src/sys/dev/vx if_vx.c src/sys/kern uipc_mbuf.c src/sys/pci if_dc.c if_rl.c if_sf.c if_sis.c if_sk.c if_vr.c if_wb.c Message-ID: <20010620174149.A36453@technokratis.com> References: <200106201948.f5KJmbG47979@freefall.freebsd.org> <20010620162727.K4543@sneakerz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010620162727.K4543@sneakerz.org>; from bright@sneakerz.org on Wed, Jun 20, 2001 at 04:27:27PM -0500 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jun 20, 2001 at 04:27:27PM -0500, Alfred Perlstein wrote: > > Log: > > Change m_devget()'s outdated and unused `offset' argument to actually mean > > something: offset into the first mbuf of the target chain before copying > > the source data over. > > > > Make drivers using m_devget() with a first argument "data - ETHER_ALIGN" > > to use the offset argument to pass ETHER_ALIGN in. The way it was previously > > done is potentially dangerous if the source data was at the top of a page > > and the offset caused the previous page to be copied (if the > > previous page has not yet been appropriately mapped). > > > > The old `offset' argument in m_devget() is not used anywhere (it's always > > 0) and dates back to ~1995 (and earlier?) when support for ethernet trailers > > existed. With that support gone, it was merely collecting dust. > > > > Tested on alpha by: jlemon > > Partially submitted by: jlemon > > Reviewed by: jlemon > > MFC after: 3 weeks > > This should not be MFC'd if it causes a functional change with > m_devget. If you feel it must be MFC'd then please leave m_devget > as is and introduce a function such as m_devget2() if it interprets > args differently and can return different data. > > People need to be able to depend on kernel APIs not changing between > minor releases for two major reasons, people basing products on > FreeBSD and people releasing drivers, source or binary for FreeBSD. Argh! *Nobody* is going to be using that offset. It's wrong and it's from the pre-1995 era. All people may do is pass 0 to it anyway, in which the behavior won't change from the previous. But if it makes you feel so much better to have a broken function sit around -STABLE then fine, I just won't MFC it at all. And I'm not going to bother doing it later when someone complains that `offset' is not working as they expect it to. > thank you, > -Alfred Regards, -- Bosko Milekic bmilekic@technokratis.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message