netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: raj ravi <mekaviraj@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: NETIF_F_FRAGLIST and NETIF_F_SG difference
Date: Mon, 01 Mar 2010 12:58:41 +0000	[thread overview]
Message-ID: <1267448321.2819.15.camel@localhost> (raw)
In-Reply-To: <de0a9dcb1003010302p2f81aa17ubdbb29bb007d50cf@mail.gmail.com>

On Mon, 2010-03-01 at 16:32 +0530, raj ravi wrote:
> Hi,
> http://lxr.linux.no/#linux+v2.6.33/include/linux/netdevice.h
> In include/linux/netdevice.h I can see two definiton for "Scatter
> Gather IO" namely NETIF_F_FRAGLIST  and NETIF_F_SG
> 
> Please let me know the difference between the two.... if there is no
> difference why two Macros ??
> 
> 
> #define NETIF_F_SG 1 /* Scatter/gather IO. */

This means the device can transmit an skb with extra data attached
through skb_shinfo(skb)->frags.

> #define NETIF_F_IP_CSUM 2 /* Can checksum TCP/UDP over IPv4. */
> #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
> #define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */
> #define NETIF_F_IPV6_CSUM 16 /* Can checksum TCP/UDP over IPV6 */
> #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */
> #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */

This means the device can transmit an skb with extra data attached
through skb->frags.

(I don't know why there are two ways of adding extra data.  The latter
does not seem to be used often.)

Note that these flags really refer only to DMA gather.  There is no need
for a feature flag for DMA scatter, since the driver controls RX buffer
allocation.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2010-03-01 12:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 11:02 NETIF_F_FRAGLIST and NETIF_F_SG difference raj ravi
2010-03-01 12:58 ` Ben Hutchings [this message]
2010-03-02  1:40   ` David Miller
2010-03-02  2:51     ` Ben Hutchings
2010-03-02  3:01       ` David 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=1267448321.2819.15.camel@localhost \
    --to=bhutchings@solarflare.com \
    --cc=mekaviraj@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).