net/bnxt: add checks for firmware reset
Driver should fail the eth_dev_ops callbacks and accessing
Tx and Rx queues when device is in reset or in error state.
Added missing checks for fw reset in few routines.
Fixes: be14720def
("net/bnxt: support FW reset")
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
parent
20ac796641
commit
aadae082ee
@ -2067,8 +2067,12 @@ static void
|
|||||||
bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
|
bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
|
||||||
struct rte_eth_rxq_info *qinfo)
|
struct rte_eth_rxq_info *qinfo)
|
||||||
{
|
{
|
||||||
|
struct bnxt *bp = dev->data->dev_private;
|
||||||
struct bnxt_rx_queue *rxq;
|
struct bnxt_rx_queue *rxq;
|
||||||
|
|
||||||
|
if (is_bnxt_in_error(bp))
|
||||||
|
return;
|
||||||
|
|
||||||
rxq = dev->data->rx_queues[queue_id];
|
rxq = dev->data->rx_queues[queue_id];
|
||||||
|
|
||||||
qinfo->mp = rxq->mb_pool;
|
qinfo->mp = rxq->mb_pool;
|
||||||
@ -2084,8 +2088,12 @@ static void
|
|||||||
bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
|
bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
|
||||||
struct rte_eth_txq_info *qinfo)
|
struct rte_eth_txq_info *qinfo)
|
||||||
{
|
{
|
||||||
|
struct bnxt *bp = dev->data->dev_private;
|
||||||
struct bnxt_tx_queue *txq;
|
struct bnxt_tx_queue *txq;
|
||||||
|
|
||||||
|
if (is_bnxt_in_error(bp))
|
||||||
|
return;
|
||||||
|
|
||||||
txq = dev->data->tx_queues[queue_id];
|
txq = dev->data->tx_queues[queue_id];
|
||||||
|
|
||||||
qinfo->nb_desc = txq->nb_tx_desc;
|
qinfo->nb_desc = txq->nb_tx_desc;
|
||||||
|
Loading…
Reference in New Issue
Block a user