numam-dpdk/drivers/net
Bruce Richardson b35d0d80f0 ixgbe: check mbuf refcnt when clearing a ring
The function to clear the TX ring when a port was being closed, e.g. on
exit in testpmd, was not checking the mbuf refcnt before freeing it.
Since the function in the vector driver to clear the ring after TX does
not set the pointer to NULL post-free, this caused crashes if mbuf
debugging was turned on.

To reproduce the issue, ensure the follow config variables are set:
RTE_IXGBE_INC_VECTOR
RTE_LIBRTE_MBUF_DEBUG
Then compile up and run testpmd using 10G ports with the vector driver.
Start traffic and let some flow through, then type "stop" and "quit" at
the testpmd prompt, and crash will occur. Output below:

	testpmd> quit
	Stopping port 0...done
	Stopping port 1...PANIC in rte_mbuf_sanity_check():
	bad ref cnt
	[New Thread 0x7fffabfff700 (LWP 145312)]
	[New Thread 0x7fffb47fe700 (LWP 145311)]
	[New Thread 0x7fffb4fff700 (LWP 145310)]
	[New Thread 0x7ffff6cd5700 (LWP 145309)]
	18: [/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/app/testpmd(_start+0x29)
	<....snip for brevity...>
	Program received signal SIGABRT, Aborted.
	0x00007ffff7120a98 in raise () from /lib64/libc.so.6

A similar error occurs when clearing the RX ring, which is also fixed by
this patch.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2015-07-07 16:31:48 +02:00
..
af_packet af_packet: move to drivers/net/ 2015-05-22 15:51:38 +02:00
bonding bonding: initialize backpointer from pci device to driver 2015-06-29 12:13:37 +02:00
cxgbe cxgbe: fix build with icc 2015-07-01 23:09:54 +02:00
e1000 e1000: add multicast MAC address filtering 2015-06-12 15:55:38 +02:00
enic drivers: explicit initialization of pci drivers 2015-06-12 11:10:10 +02:00
fm10k fm10k: support Xen domain0 2015-07-01 12:39:20 +02:00
i40e drivers: explicit initialization of pci drivers 2015-06-12 11:10:10 +02:00
ixgbe ixgbe: check mbuf refcnt when clearing a ring 2015-07-07 16:31:48 +02:00
mlx4 mlx4: disable multicast echo on PF device 2015-07-01 11:30:11 +02:00
null null: remove useless memset 2015-06-04 10:46:45 +02:00
pcap drivers: fix whitespace 2015-06-12 11:10:10 +02:00
ring ring: fix return of new port id on creation 2015-06-22 17:33:23 +02:00
virtio virtio: fix crash if CQ is not negotiated 2015-06-12 14:50:06 +02:00
vmxnet3 drivers: explicit initialization of pci drivers 2015-06-12 11:10:10 +02:00
xenvirt xenvirt: move drivers/net/ 2015-05-22 16:06:23 +02:00
Makefile cxgbe: add pmd skeleton 2015-06-30 22:46:42 +02:00