netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
	Nicholas Nunley <nicholasx.d.nunley@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH 13/18] igb: move gso_segs into buffer_info structure
Date: Wed, 17 Feb 2010 03:04:37 -0800	[thread overview]
Message-ID: <20100217110436.17723.11162.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100217105953.17723.36633.stgit@localhost.localdomain>

From: Nick Nunley <nicholasx.d.nunley@intel.com>

This change moves gso_segs into the buffer_info structure to avoid
a possible cache line miss in clean_tx_irq.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/igb.h      |    1 +
 drivers/net/igb/igb_main.c |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h
index 8f07bc0..7854b66 100644
--- a/drivers/net/igb/igb.h
+++ b/drivers/net/igb/igb.h
@@ -141,6 +141,7 @@ struct igb_buffer {
 			u16 length;
 			u16 next_to_watch;
 			u16 mapped_as_page;
+			u16 gso_segs;
 		};
 		/* RX */
 		struct {
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index a1fe581..91c123f 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3641,6 +3641,7 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb,
 	}
 
 	tx_ring->buffer_info[i].skb = skb;
+	tx_ring->buffer_info[i].gso_segs = skb_shinfo(skb)->gso_segs ?: 1;
 	tx_ring->buffer_info[first].next_to_watch = i;
 
 	return ++count;
@@ -5032,7 +5033,7 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
 			if (skb) {
 				unsigned int segs, bytecount;
 				/* gso_segs is currently only valid for tcp */
-				segs = skb_shinfo(skb)->gso_segs ?: 1;
+				segs = buffer_info->gso_segs;
 				/* multiply data chunks by size of headers */
 				bytecount = ((segs - 1) * skb_headlen(skb)) +
 					    skb->len;


  parent reply	other threads:[~2010-02-17 11:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 11:00 [net-next-2.6 PATCH 01/18] igb: remove unecessary q_vector declarations and remove itr_shift Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 02/18] igb: add support for wake-on-link Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 03/18] igb: Report link status in ethtool when interface is down Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 04/18] igb: ignore EEPROM APME check when shutting down serdes link Jeff Kirsher
2010-02-17 11:01 ` [net-next-2.6 PATCH 05/18] igb: Power down link when interface is down Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 06/18] igb: call pci_save_state after pci_restore_state Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 07/18] igb: Allocate rings seperately instead of as a block Jeff Kirsher
2010-02-17 11:02 ` [net-next-2.6 PATCH 08/18] igb: remove adaptive IFS from driver Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 09/18] igb: cap interrupts at 20K per queue when in itr mode 3 Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 10/18] igb: only support SRRCTL_DROP_EN when using multiple queues Jeff Kirsher
2010-02-17 11:03 ` [net-next-2.6 PATCH 11/18] igb: only read phy specific stats if in internal phy mode Jeff Kirsher
2010-02-17 11:04 ` [net-next-2.6 PATCH 12/18] igb: inline igb_maybe_stop_tx Jeff Kirsher
2010-02-17 11:04 ` Jeff Kirsher [this message]
2010-02-17 11:04 ` [net-next-2.6 PATCH 14/18] igb: minor type cleanups Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 15/18] igb: remove unused vmolr value Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 16/18] igb: use igb_free_q_vectors to cleanup failure in igb_alloc_q_vectors Jeff Kirsher
2010-02-17 11:05 ` [net-next-2.6 PATCH 17/18] igb: change descriptor control thresholds Jeff Kirsher
2010-02-17 11:06 ` [net-next-2.6 PATCH 18/18] igb: update tx DMA mapping error handling Jeff Kirsher
2010-02-17 21:51 ` [net-next-2.6 PATCH 01/18] igb: remove unecessary q_vector declarations and remove itr_shift 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=20100217110436.17723.11162.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicholasx.d.nunley@intel.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).