summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Iremonger <bernard.iremonger@intel.com>2015-07-03 15:03:59 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-07-19 21:33:58 +0200
commit1ee9e8228960d2625859e9092825b30dcb0808b2 (patch)
tree04856f17cfd09695898f0171b10c39fdc093ae9e
parentde605cb1bc62105d5611fd9667416c2d71be17c7 (diff)
downloaddpdk-1ee9e8228960d2625859e9092825b30dcb0808b2.zip
dpdk-1ee9e8228960d2625859e9092825b30dcb0808b2.tar.gz
dpdk-1ee9e8228960d2625859e9092825b30dcb0808b2.tar.xz
i40e: check Rx queue parameter when resetting
There is a segmentation fault if rxq is NULL. Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
-rw-r--r--drivers/net/i40e/i40e_rxtx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 2ced081..be0d9a0 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);