netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: shemminger@osdl.org
Cc: netdev@oss.sgi.com
Subject: [PATCH] Ethernet Bridging: Enable Hardware Checksumming
Date: Wed, 18 May 2005 18:53:29 -0500	[thread overview]
Message-ID: <20050518235329.GA17946@us.ibm.com> (raw)

Currently, locally generated ethernet traffic does not take advantage of
hardware checksum offload when acting as a child device under a bridge
device.  This is because the upper layers do not see the available
features of the child devices only the features of the bridge device
(which is empty).  

There is an easy solution for this (see patch below), include hardware
checksum and scatter gather as features of the bridge device.  In the 
case that the physical ethernet device does not support scatter 
gather or hardware checksum, dev_queue_xmit() will check the
dev->features and do the necessary linearization and calculate the
checksum.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>

--- net/bridge/br_device.c.orig	2005-05-13 11:23:02.552751024 -0500
+++ net/bridge/br_device.c	2005-05-13 11:25:39.155943720 -0500
@@ -101,4 +101,5 @@ void br_dev_setup(struct net_device *dev
 	dev->tx_queue_len = 0;
 	dev->set_mac_address = NULL;
 	dev->priv_flags = IFF_EBRIDGE;
+	dev->features = NETIF_F_HW_CSUM | NETIF_F_SG;
 }

             reply	other threads:[~2005-05-18 23:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18 23:53 Jon Mason [this message]
2005-05-19  0:03 ` [PATCH] Ethernet Bridging: Enable Hardware Checksumming Nivedita Singhvi
2005-05-19  5:00   ` David S. Miller
2005-05-19 15:13     ` Nivedita Singhvi
2005-05-19 20:34       ` Stephen Hemminger
2005-05-19  2:41 ` Herbert Xu
2005-05-19 15:10   ` Nivedita Singhvi
2005-05-19 18:51     ` David S. Miller
2005-05-19 20:43       ` Nivedita Singhvi
2005-05-19 20:33 ` Stephen Hemminger
2005-05-19 21:48   ` David S. Miller
2005-05-19 23:23     ` Jon Mason
2005-05-19 23:36       ` 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=20050518235329.GA17946@us.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.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).