netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: leonid.grossman@neterion.com
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] Super TSO
Date: Thu, 19 May 2005 17:55:42 -0700 (PDT)	[thread overview]
Message-ID: <20050519.175542.07642115.davem@davemloft.net> (raw)
In-Reply-To: <200505200036.j4K0aVVG008391@guinness.s2io.com>

From: "Leonid Grossman" <leonid.grossman@neterion.com>
Date: Thu, 19 May 2005 17:36:25 -0700

> > > One likely scenario where this feature is desirable is a 
> > system with 
> > > highly fragmented memory.
> > > In this case, the number of physical fragments per TSO 
> > frame could be 
> > > always so high that it will be cheaper (on a given 
> > platform) to copy 
> > > the frame than to DMA it.
> > 
> > We always chop up the user data into individual system pages 
> > when we build TSO frames, so I can't see how any kind of 
> > memory fragmentation could be an issue.
> 
> This is exactly what I wanted to hear :-)
> If the TSO implementation guarantees that the payload comes (for the most
> part) 
> in physically continuous pages, then the number of fragments 
> will never get out of whack, and my argument indeed becomes invalid.

You misunderstand me.  The TCP segmenter splits the incoming
user data into page size'd chunks.  So a 64K packet uses
64K / PAGE_SIZE individual pages.

The only thing the driver author needs to be aware of wrt. this
is to never wake up the TX netif queue until at least
"MAX_SKB_FRAGS + 1" transmit descriptors are available.

You'll see that every driver setting NETIF_F_SG implements
this test.

> Sure. On the other hand, the TCP code is unaware of the copy vs. DMA
> costs on a particular NIC (well, this is actually more specific to a
> system than to a NIC).  But I guess as long as both the packet size
> and the number of fragments will not get very big at the same time,
> A NIC will be OK.

They can and will be as large as "MAX_SKB_FRAGS + 1".

  reply	other threads:[~2005-05-20  0:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18  2:24 [PATCH] Super TSO David S. Miller
2005-05-18 13:43 ` Andi Kleen
2005-05-18 19:57   ` David S. Miller
2005-05-20  0:15 ` Leonid Grossman
2005-05-20  0:21   ` David S. Miller
2005-05-20  0:36     ` Leonid Grossman
2005-05-20  0:55       ` David S. Miller [this message]
2005-05-20  1:25         ` Leonid Grossman
2005-05-20  1:28           ` David S. Miller
2005-05-20  0:45   ` Rick Jones

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=20050519.175542.07642115.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=leonid.grossman@neterion.com \
    --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).