summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-02-08 07:50:56 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-03-17 01:08:23 -0700
commitfd0db0ed02a6abce5427e90d1e8522322107d62b (patch)
tree0fa1df643c68e44d7c0a77e67a67d6e72526e57a /drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
parent7d7ce682f8437ff91c964c478b8845ed98a3207d (diff)
downloadlinux-fd0db0ed02a6abce5427e90d1e8522322107d62b.tar.bz2
ixgbe: Place skb on first buffer_info structure to avoid using stack space
Instead of keeping a local copy of the skb on the stack for as long as long as we do it makes sense to instead just place it on the first tx_buffer structure so that we can save space on the stack and avoid unnecessary read/write operations copying the pointer out of the stack and onto the ring later. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index da7da752b6b4..910847a901ef 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -447,7 +447,7 @@ ddp_out:
/**
* ixgbe_fso - ixgbe FCoE Sequence Offload (FSO)
* @tx_ring: tx desc ring
- * @skb: associated skb
+ * @first: first tx_buffer structure containing skb, tx_flags, and protocol
* @tx_flags: tx flags
* @hdr_len: hdr_len to be returned
*
@@ -455,9 +455,11 @@ ddp_out:
*
* Returns : 0 indicates no FSO, > 0 for FSO, < 0 for error
*/
-int ixgbe_fso(struct ixgbe_ring *tx_ring, struct sk_buff *skb,
+int ixgbe_fso(struct ixgbe_ring *tx_ring,
+ struct ixgbe_tx_buffer *first,
u32 tx_flags, u8 *hdr_len)
{
+ struct sk_buff *skb = first->skb;
struct fc_frame_header *fh;
u32 vlan_macip_lens;
u32 fcoe_sof_eof = 0;