]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Separate bnxt_{rx|tx}_ring_info structs from bnxt_napi struct.
authorMichael Chan <mchan@broadcom.com>
Sun, 3 Jan 2016 04:44:59 +0000 (23:44 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:44 +0000 (17:36 -0700)
commit72c202775f5e17f6aa0b1d657cf77147d71451a0
treec03996dae493cf0529c346338ff40b3d5adf4d01
parent8cca68cb98d24f9ec1bb10020e64430568fda21b
bnxt_en: Separate bnxt_{rx|tx}_ring_info structs from bnxt_napi struct.

Orabug: 23221795

Currently, an rx and a tx ring are always paired with a completion ring.
We want to restructure it so that it is possible to have a dedicated
completion ring for tx or rx only.

The bnxt hardware uses a completion ring for rx and tx events.  The driver
has to process the completion ring entries sequentially for the rx and tx
events.  Using a dedicated completion ring for rx only or tx only has these
benefits:

1. A burst of rx packets can cause delay in processing tx events if the
completion ring is shared.  If tx queue is stopped by BQL, this can cause
delay in re-starting the tx queue.

2. A completion ring is sized according to the rx and tx ring size rounded
up to the nearest power of 2.  When the completion ring is shared, it is
sized by adding the rx and tx ring sizes and then rounded to the next power
of 2, often with a lot of wasted space.

3. Using dedicated completion ring, we can adjust the tx and rx coalescing
parameters independently for rx and tx.

The first step is to separate the rx and tx ring structures from the
bnxt_napi struct.

In this patch, an rx ring and a tx ring will point to the same bnxt_napi
struct to share the same completion ring.  No change in ring assignment
and mapping yet.

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