From: Bernard Iremonger Date: Fri, 3 Jul 2015 14:03:59 +0000 (+0100) Subject: i40e: check Rx queue parameter when resetting X-Git-Tag: spdx-start~8689 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ee9e8228960d2625859e9092825b30dcb0808b2;p=dpdk.git i40e: check Rx queue parameter when resetting There is a segmentation fault if rxq is NULL. Signed-off-by: Bernard Iremonger Acked-by: Helin Zhang --- diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 2ced0812e2..be0d9a0bec 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -2886,6 +2886,11 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq) unsigned i; uint16_t len; + if (!rxq) { + PMD_DRV_LOG(DEBUG, "Pointer to rxq is NULL"); + return; + } + #ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC if (check_rx_burst_bulk_alloc_preconditions(rxq) == 0) len = (uint16_t)(rxq->nb_rx_desc + RTE_PMD_I40E_RX_MAX_BURST);