netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rask Ingemann Lambertsen <rask@sygehus.dk>
To: Netdev <netdev@oss.sgi.com>
Subject: Re: [PATCH] [2.4] forcedeth network driver
Date: Tue, 27 Jan 2004 14:30:14 +0100	[thread overview]
Message-ID: <20040127143011.A1314@sygehus.dk> (raw)
In-Reply-To: <4012D3C6.1050805@pobox.com>; from jgarzik@pobox.com on Sat, Jan 24, 2004 at 03:21:26PM -0500

On Sat, Jan 24, 2004 at 03:21:26PM -0500, Jeff Garzik wrote:
> Manfred Spraul wrote:
> > Jeff wrote:
> 
> >>> +        /*
> >>> +         * the packet is for us - immediately tear down the pci 
> >>> mapping, and
> >>> +         * prefetch the first cacheline of the packet.
> >>> +         */
> >>> +        pci_unmap_single(np->pci_dev, np->rx_dma[i],
> >>> +                np->rx_skbuff[i]->len,
> >>> +                PCI_DMA_FROMDEVICE);
> >>> +        prefetch(np->rx_skbuff[i]->data);
> >>
> >>
> >> is this just guessing?  or has this actually shown some value?
> >>
> >> I would prefer not to put stuff like this in unless it shows a 
> >> measureable CPU usage or cache miss impact.
> >>  
> >>
> > Just guessing - it shouldn't hurt. CPU usage won't be important until 
> > nForce supports GigE. Should I remove it for now?
> 
> I would rather remove it.  "premature optimization" and all that. 
> Otherwise this guess will be cut-n-pasted into other drivers, I 
> guarantee, all without any verification of the guess... :)

There was a thread about using prefetch() on netdev or linux-net.
The idea is to have the Ethernet header prefetched by the time
eth_type_trans() needs it.

> >> bug #2:  need a minimum bound for the MTU as well
> >>  
> >>
> > What is the minimum MTU? I remember a flamewar lkml about 200 byte MTU 
> > for noisy radio links.
> 
> Usually the ethernet standard 60 is fine.

Minimum MTU != minimum frame length. An MTU of 0 should work fine. It is
just not very useful in most cases to send just the Ethernet header but
no payload.

-- 
Regards,
Rask Ingemann Lambertsen

  parent reply	other threads:[~2004-01-27 13:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4012BF44.9@colorfullife.com>
2004-01-24 20:21 ` [PATCH] [2.4] forcedeth network driver Jeff Garzik
2004-01-24 21:55   ` Carl-Daniel Hailfinger
2004-01-24 23:57     ` Jeff Garzik
2004-01-24 22:05   ` Vojtech Pavlik
2004-01-24 22:33     ` Carl-Daniel Hailfinger
2004-01-24 22:46       ` Vojtech Pavlik
2004-01-24 23:11         ` Paul Mackerras
2004-01-27 13:30   ` Rask Ingemann Lambertsen [this message]
2004-02-05  0:52 Carl-Daniel Hailfinger
2004-02-05  9:45 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-01-24 17:11 Carl-Daniel Hailfinger
2004-01-24 17:58 ` Jeff Garzik
2004-01-24 21:24   ` Carl-Daniel Hailfinger
2004-01-25  0:01     ` Jeff Garzik
2004-01-24 18:59 ` Francois Romieu
2004-01-24 19:02   ` Manfred Spraul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040127143011.A1314@sygehus.dk \
    --to=rask@sygehus.dk \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).