net/bnxt: allocate Rx/Tx and completion rings
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 15 Jun 2016 21:23:15 +0000 (14:23 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Mon, 20 Jun 2016 15:21:52 +0000 (17:21 +0200)
commit2bb1d5db4358b6634bce3e1edaafdcab537db1d7
tree91f780e1498df536faeb4aa5ce036fa9435f8ea7
parent2eb53b134aae1301c1f90e345c00a94c2c13cabb
net/bnxt: allocate Rx/Tx and completion rings

Perform allocation and free()ing of ring and information structures
for the TX, RX, and completion rings. The previous patches had
so far provided top level stubs and generic ring support, while this
patch does the real allocation and freeing of the memory specific to
each different type of generic ring.

For example bnxt_init_tx_ring_struct() or bnxt_init_rx_ring_struct() is
now allocating memory based on the socked_id being provided.

bnxt_tx_queue_setup_op() or bnxt_rx_queue_setup_op() have gone through
some reformatting to perform a graceful cleanup in case memory
allocation fails.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
drivers/net/bnxt/bnxt_cpr.c
drivers/net/bnxt/bnxt_cpr.h
drivers/net/bnxt/bnxt_ring.c
drivers/net/bnxt/bnxt_ring.h
drivers/net/bnxt/bnxt_rxq.c
drivers/net/bnxt/bnxt_rxr.c
drivers/net/bnxt/bnxt_rxr.h
drivers/net/bnxt/bnxt_txq.c
drivers/net/bnxt/bnxt_txr.c
drivers/net/bnxt/bnxt_txr.h