aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-config.h
diff options
context:
space:
mode:
authorBenjamin LaHaise <ben.lahaise@neterion.com>2009-08-04 06:21:03 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-05 16:10:43 -0400
commitff67df55f6bde9de5e508bf1f09509c843accd54 (patch)
treef859b2b598762fd914bc3a79e38cf306fadd1894 /drivers/net/vxge/vxge-config.h
parent4403b371888d5947ed08200ee6351441a188a5c7 (diff)
vxge: fix pktgen hangs (don't abuse skb->cb[])
This patch fixes a case in the transmit completion code which was resulting in pktgen hanging at the end of a run. The cause is due to the fact that the ->cb[] area of an skb cannot be used in a network driver's transmit path, as that area belongs to the network protocol. Pktgen hangs, as it sends out the same packet multiple times, and vxge's use of this area of the skb for a temporary list can only add the packet to the temporary list once (while it may be on the queue many times). The fix is to remove this abuse of skb->cb[]. Instead, skb pointers are placed into a temporary stack array, and then free outside of the tx lock. This retains the smp optimization of doing dev_kfree_skb() outside of the tx lock. Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-config.h')
-rw-r--r--drivers/net/vxge/vxge-config.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/vxge/vxge-config.h b/drivers/net/vxge/vxge-config.h
index 224acea771ed..62779a520ca1 100644
--- a/drivers/net/vxge/vxge-config.h
+++ b/drivers/net/vxge/vxge-config.h
@@ -978,7 +978,9 @@ struct __vxge_hw_fifo {
978 void *txdlh, 978 void *txdlh,
979 enum vxge_hw_fifo_tcode t_code, 979 enum vxge_hw_fifo_tcode t_code,
980 void *userdata, 980 void *userdata,
981 void **skb_ptr); 981 struct sk_buff ***skb_ptr,
982 int nr_skb,
983 int *more);
982 984
983 void (*txdl_term)( 985 void (*txdl_term)(
984 void *txdlh, 986 void *txdlh,
@@ -1779,7 +1781,8 @@ struct vxge_hw_fifo_attr {
1779 void *txdlh, 1781 void *txdlh,
1780 enum vxge_hw_fifo_tcode t_code, 1782 enum vxge_hw_fifo_tcode t_code,
1781 void *userdata, 1783 void *userdata,
1782 void **skb_ptr); 1784 struct sk_buff ***skb_ptr,
1785 int nr_skb, int *more);
1783 1786
1784 void (*txdl_term)( 1787 void (*txdl_term)(
1785 void *txdlh, 1788 void *txdlh,