Thread (4 messages) 4 messages, 4 authors, 2016-02-10

Re: [PATCH] virtio: fix crashes in virtio stats functions

From: Bruce Richardson <hidden>
Date: 2016-02-10 14:23:34

On Thu, Dec 24, 2015 at 11:48:41AM +0800, Yuanhan Liu wrote:
On Wed, Dec 23, 2015 at 09:45:19AM +0000, Bernard Iremonger wrote:
quoted
This initialisation of nb_rx_queues and nb_tx_queues has been removed
from eth_virtio_dev_init.

The nb_rx_queues and nb_tx_queues were being initialised in eth_virtio_dev_init
before the tx_queues and rx_queues arrays were allocated.

The arrays are allocated when the ethdev port is configured and the
nb_tx_queues and nb_rx_queues are initialised.

If any of the following functions were called before the ethdev
port was configured there was a segmentation fault because
rx_queues and tx_queues were NULL:

rte_eth_stats_get
rte_eth_stats_reset
rte_eth_xstats_get
rte_eth_xstats_reset

Fixes: 823ad647950a ("virtio: support multiple queues")
Signed-off-by: Bernard Iremonger <redacted>
Acked-by: Yuanhan Liu <redacted>

Thanks.

	--yliu
Applied to dpdk-next-net/rel_16_04

/Bruce
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help