X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Fbnxt_rxq.c;h=f7fbb28561e1e462fff2b20646cd4be105f6c83f;hb=c9fb3c62896f;hp=67d9bfe9dd5a9d69176c5f9e0ce7ba52ed7df6d9;hpb=6eda9e550e3d5e70949fb452c70113a326e785df;p=dpdk.git diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 67d9bfe9dd..f7fbb28561 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -206,7 +206,7 @@ out: for (i = 0; i < bp->nr_vnics; i++) { STAILQ_FOREACH(vnic, &bp->ff_pool[i], next) { - vnic->hash_type |= hash_type; + vnic->hash_type = hash_type; /* * Use the supplied key if the key length is @@ -311,6 +311,13 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, struct bnxt_rx_queue *rxq; int rc = 0; + if (queue_idx >= bp->max_rx_rings) { + RTE_LOG(ERR, PMD, + "Cannot create Rx ring %d. Only %d rings available\n", + queue_idx, bp->max_rx_rings); + return -ENOSPC; + } + if (!nb_desc || nb_desc > MAX_RX_DESC_CNT) { RTE_LOG(ERR, PMD, "nb_desc %d is invalid\n", nb_desc); rc = -EINVAL;