Date: Wed, 20 Jun 2001 17:41:49 -0400 From: Bosko Milekic <bmilekic@technokratis.com> To: Alfred Perlstein <bright@sneakerz.org> Cc: Bosko Milekic <bmilekic@FreeBSD.org>, 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> In-Reply-To: <20010620162727.K4543@sneakerz.org>; from bright@sneakerz.org on Wed, Jun 20, 2001 at 04:27:27PM -0500 References: <200106201948.f5KJmbG47979@freefall.freebsd.org> <20010620162727.K4543@sneakerz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010620174149.A36453>