]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Re-structure ring indexing and mapping.
authorMichael Chan <mchan@broadcom.com>
Sun, 3 Jan 2016 04:45:01 +0000 (23:45 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:45 +0000 (17:36 -0700)
commit5ffa5a0c782b5fd03c09acf2df99a2751521ac91
treed5cdb1130e19072821565bfa1f690335106629fe
parent3cb295c135de58e1cba5c871c1adaa802d69beb8
bnxt_en: Re-structure ring indexing and mapping.

Orabug: 23221795

In order to support dedicated or shared completion rings, the ring
indexing and mapping are re-structured as below:

1. bp->grp_info[] array index is 1:1 with bp->bnapi[] array index and
completion ring index.

2. rx rings 0 to n will be mapped to completion rings 0 to n.

3. If tx and rx rings share completion rings, then tx rings 0 to m will
be mapped to completion rings 0 to m.

4. If tx and rx rings use dedicated completion rings, then tx rings 0 to
m will be mapped to completion rings n + 1 to n + m.

5. Each tx or rx ring will use the corresponding completion ring index
for doorbell mapping and MSIX mapping.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b81a90d3028af92da61a61e2efd231a585180044)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h