On Fri, Jan 5, 2018 at 2:58 PM, Andy Gospodarek <a...@greyhouse.net> wrote:

> @@ -5705,7 +5748,13 @@ static void bnxt_enable_napi(struct bnxt *bp)
>         int i;
>
>         for (i = 0; i < bp->cp_nr_rings; i++) {
> +               struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring;
>                 bp->bnapi[i]->in_reset = false;
> +
> +               if (!(bp->bnapi[i]->flags & BNXT_NAPI_FLAG_XDP)) {

This actually won't work.  The XDP rings are the rings always with RX
rings because we need to be able to retransmit an XDP packet from the
RX ring to the "paired" TX ring under the same NAPI.

if (bp->bnapi[i]->rx_ring)

is the better way to check.  Because MQPRIO, XDP, and ethtool channels
settings can all create TX rings without RX rings.  If the rx_ring
pointer is NULL, there is no RX ring present for this CMPL ring and we
can skip.

> +                       INIT_WORK(&cpr->dim.work, bnxt_dim_work);
> +                       cpr->dim.mode = NET_DIM_CQ_PERIOD_MODE_START_FROM_EQE;
> +               }
>                 napi_enable(&bp->bnapi[i]->napi);
>         }
>  }

Reply via email to