net/bnxt: create aggregation rings when needed
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 14 May 2021 01:46:21 +0000 (18:46 -0700)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 12 Oct 2021 20:35:13 +0000 (22:35 +0200)
commit657c2a7f1dd45c62bcb5a4f0e0861c998040387d
tree512e18196f05e2d31dd2563f5f510e5817b4c061
parentc8834a3663b7ff3269a1b4e6a2772999dd485760
net/bnxt: create aggregation rings when needed

Aggregation rings are needed when PMD needs to support jumbo frames, LRO.
Currently we are creating the aggregation rings whether jumbo frames or
LRO has been enabled or disabled. This causes unnecessary allocation of
mbufs needing larger mbuf pool which is not used at all.

This patch modifies the code to create aggregation rings only when
needed.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_ring.c
drivers/net/bnxt/bnxt_rxq.c
drivers/net/bnxt/bnxt_rxq.h
drivers/net/bnxt/bnxt_rxr.c