Go to file
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
app hash: add unit test for thash 2015-07-01 23:26:10 +02:00
config cxgbe: add pmd skeleton 2015-06-30 22:46:42 +02:00
doc doc: fix sphinx build warning 2015-07-07 16:31:48 +02:00
drivers ixgbe: check mbuf refcnt when clearing a ring 2015-07-07 16:31:48 +02:00
examples examples/tep_term: fix vhost dependency 2015-06-25 11:32:45 +02:00
lib ethdev: introduce valid port helper 2015-07-02 12:32:12 +02:00
mk mk: print target when reporting build complete 2015-07-02 13:46:19 +02:00
pkg version: 2.0.0 2015-04-03 16:13:45 +02:00
scripts mbuf: add script to convert code to offset macro 2015-06-24 12:01:14 +02:00
tools tools: fix vfio support 2015-03-23 14:29:31 +01:00
.gitignore init DPDK repository 2013-03-07 10:57:42 +01:00
GNUmakefile drivers: create new directory 2015-05-22 15:51:38 +02:00
LICENSE.GPL doc: GPL/LGPL licenses 2013-07-25 14:43:06 +02:00
LICENSE.LGPL doc: fix file format (dos to unix) 2013-09-06 11:43:07 +02:00
MAINTAINERS maintainers: claim EAL of IBM POWER 2015-07-01 23:39:43 +02:00
Makefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00