fa.netbsd.tech.net
[Top] [All Lists]

Re: PR/39203 CVS commit: src/sys/net

Subject: Re: PR/39203 CVS commit: src/sys/net
From: Quentin Garnier <cube@xxxxxxxxxxx>
Date: Fri, 25 Jul 2008 19:11:59 UTC
Newsgroups: fa.netbsd.tech.net
On Fri, Jul 25, 2008 at 09:01:29PM +0200, Martin Husemann wrote:
> On Fri, Jul 25, 2008 at 07:23:23PM +0200, Quentin Garnier wrote:
> > The NIC might have simply truncated it.  I'm pretty sure I've seen it
> > happen in that context, without specific notification to the driver.
> [..]
> > My initial implementation was smarter because it let the NIC driver
> > confirm it is able and willing to receive such frames.
> 
> Wouldn't it bet better to have the driver detect this (if possible) and
> not pass the frame to ether_input at all? If the hardware does not tell
> the driver, it should still know the maximum size and do this check
> better.

How can the driver tell if a frame was truncated or not, if the hardware
doesn't indicate it?  I'm pretty sure I saw it with sip(4), but it might
have been another.

> I don't see how the ethertype relates to this check - if at all the vlan
> or jumbo frame capabilities of the NIC should count.

It relates because the check is about whether or not the system *should*
have received such a packet, not whether or not it was able to (rather
obviously it was able to receive it).

That said, I'm all in favour of dropping the check completely.

-- 
Quentin Garnier - cube@xxxxxxxxxxx - cube@xxxxxxxxxx
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
<Prev in Thread] Current Thread [Next in Thread>