]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/net/vxge/vxge-main.c
vxge: fix pktgen hangs (don't abuse skb->cb[])
authorBenjamin LaHaise <ben.lahaise@neterion.com>
Tue, 4 Aug 2009 10:21:03 +0000 (10:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Aug 2009 20:10:43 +0000 (13:10 -0700)
commitff67df55f6bde9de5e508bf1f09509c843accd54
treef859b2b598762fd914bc3a79e38cf306fadd1894
parent4403b371888d5947ed08200ee6351441a188a5c7
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>
drivers/net/vxge/vxge-config.h
drivers/net/vxge/vxge-main.c
drivers/net/vxge/vxge-main.h
drivers/net/vxge/vxge-traffic.c
drivers/net/vxge/vxge-traffic.h