netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, ezequiel.garcia@free-electrons.com,
	netdev@vger.kernel.org, thomas.petazzoni@free-electrons.com,
	gregory.clement@free-electrons.com, simon.guinot@sequanux.org,
	tawfik@marvell.com, alior@marvell.com
Subject: Re: [PATCH 0/3] mvneta: software TSO implementation
Date: Fri, 11 Apr 2014 08:30:21 +0200	[thread overview]
Message-ID: <20140411063021.GH30855@1wt.eu> (raw)
In-Reply-To: <20140411.022006.1718259701974368498.davem@davemloft.net>

On Fri, Apr 11, 2014 at 02:20:06AM -0400, David Miller wrote:
> From: Willy Tarreau <w@1wt.eu>
> Date: Fri, 11 Apr 2014 07:48:47 +0200
> 
> > I also tried to find how to do this for mv643xx_eth a few years ago
> > based on other drivers (eg: tilegx) and failed to find anything
> > common. At this level, we're really playing with the NIC's descriptors,
> > and many of them have different capabilities (eg: HW checksums for all
> > frames, VLAN or none, etc...). I don't really see how this could be
> > factorized, and since many NICs do support TSO, I'm not convinced by
> > the effort.
> 
> I wanted to hook this into the NIU driver as well, which also lacks
> TSO support.
> 
> The descriptor and checksum part is chip specific, but the segmentation
> of the buffer segments, calculating the number of necessary descriptors,
> etc. absolutely is not.

Agreed.

> Please work on finding a suitable abstraction, it's possible.

Do you think for example that having an xmit_tso() function which would
iterate over all segments and call something like :
   ->build_hdr()
   ->build_data()
   ->unroll_all()

would be sufficient ?

I fear that relying on function pointers in the inner loop can
significantly offset the CPU savings, but it could be attempted.

I think that the fact you want to do it for NIU is a good opportunity
to try to do it the right way in the most generic mode, but we'll
surely need your help on this!

Willy

  reply	other threads:[~2014-04-11  6:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 22:57 [PATCH 0/3] mvneta: software TSO implementation Ezequiel Garcia
2014-04-10 22:58 ` [PATCH 1/3] net: mvneta: Factorize feature setting Ezequiel Garcia
2014-04-10 22:58 ` [PATCH 2/3] net: mvneta: Clean mvneta_tx() sk_buff handling Ezequiel Garcia
2014-04-10 22:58 ` [PATCH 3/3] net: mvneta: Introduce a software TSO implementation Ezequiel Garcia
2014-04-10 23:16   ` Eric Dumazet
2014-05-05 14:47   ` Ezequiel Garcia
2014-05-07  6:04     ` Willy Tarreau
2014-05-21  2:11     ` Ben Hutchings
2014-05-22 17:47       ` Ezequiel Garcia
2014-04-11  0:51 ` [PATCH 0/3] mvneta: " David Miller
2014-04-11  1:02   ` Eric Dumazet
2014-04-11  5:48     ` Willy Tarreau
2014-04-11  6:20       ` David Miller
2014-04-11  6:30         ` Willy Tarreau [this message]
2014-04-11 16:58           ` David Miller
2014-04-11 19:08       ` Ezequiel Garcia
2014-04-11 19:43         ` Willy Tarreau

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=20140411063021.GH30855@1wt.eu \
    --to=w@1wt.eu \
    --cc=alior@marvell.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=netdev@vger.kernel.org \
    --cc=simon.guinot@sequanux.org \
    --cc=tawfik@marvell.com \
    --cc=thomas.petazzoni@free-electrons.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).