netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: ravinandan.arakali@neterion.com
Cc: jgarzik@pobox.com, netdev@oss.sgi.com,
	raghavendra.koushik@neterion.com, leonid.grossman@neterion.com,
	ananda.raju@neterion.com, rapuru.sriram@neterion.com
Subject: Re: [PATCH 2.6.12-rc4] IPv4/IPv6: UDP Large Send Offload feature
Date: Thu, 26 May 2005 16:37:38 -0700 (PDT)	[thread overview]
Message-ID: <20050526.163738.69020927.davem@davemloft.net> (raw)
In-Reply-To: <20050526232006.60E6365005@linux.site>

From: ravinandan.arakali@neterion.com
Date: Thu, 26 May 2005 16:20:06 -0700 (PDT)

> Attached below is a kernel patch to provide UDP LSO(Large Send Offload) 
> feature.

Interesting patch, thanks a lot.  Some quick review:

1) I think you can use skb_shinfo(skb)->tso_size, and UDP packet
   with this non-zero will never be sent unless the driver
   indicates the capability.

2) I think NETIF_F_USO is a nicer name and consistent with
   the existing NETIF_F_TSO macro name.  Please change it.

3) Make NETIF_F_USO require both NETIF_F_SG and checksumming
   capability.  Check this at device registry, and ethtool operation
   time, so that you need not verify it during packet send.

For #3, it should be a simple change to net/core/dev.c and
net/core/ethtool.c, for example see this test we have in
net/core/dev.c:register_netdevice()

	/* TSO requires that SG is present as well. */
	if ((dev->features & NETIF_F_TSO) &&
	    !(dev->features & NETIF_F_SG)) {
		printk("%s: Dropping NETIF_F_TSO since no SG feature.\n",
		       dev->name);
		dev->features &= ~NETIF_F_TSO;
	}

Just make the same exact check for NETIF_F_USO.

Similarly, you'll need to add the necessary ethtool machinery
(missing from your patch, but really needed) then do something
similar to net/core/ethtool.c:ethtool_set_tso() for ethtool setting
of NETIF_F_USO.  Probably you'll name this function ethtool_set_uso()
:-)

  reply	other threads:[~2005-05-26 23:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-26 23:20 [PATCH 2.6.12-rc4] IPv4/IPv6: UDP Large Send Offload feature ravinandan.arakali
2005-05-26 23:37 ` David S. Miller [this message]
2005-05-26 23:42 ` David S. Miller
2005-05-27 16:32   ` Ravinandan Arakali
2005-05-27 19:02     ` David S. Miller
2005-06-02 23:18       ` Ravinandan Arakali
2005-06-02 23:22         ` David S. Miller
2005-05-27 15:57 ` Stephen Hemminger
2005-05-27 19:03   ` David S. Miller

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=20050526.163738.69020927.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ananda.raju@neterion.com \
    --cc=jgarzik@pobox.com \
    --cc=leonid.grossman@neterion.com \
    --cc=netdev@oss.sgi.com \
    --cc=raghavendra.koushik@neterion.com \
    --cc=rapuru.sriram@neterion.com \
    --cc=ravinandan.arakali@neterion.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).