|
|
f95c89 |
From da53b34b995100f84ac925275fe36a252166ec52 Mon Sep 17 00:00:00 2001
|
|
|
f95c89 |
From: Jonathan Toppins <jtoppins@redhat.com>
|
|
|
f95c89 |
Date: Wed, 2 Oct 2019 18:22:47 -0400
|
|
|
f95c89 |
Subject: [PATCH 32/96] [netdrv] bnxt_en: Add page_pool_destroy() during RX
|
|
|
f95c89 |
ring cleanup
|
|
|
f95c89 |
|
|
|
f95c89 |
Message-id: <a78187e9efd36d2b924eccd83bd157cea3d448cd.1570027456.git.jtoppins@redhat.com>
|
|
|
f95c89 |
Patchwork-id: 276448
|
|
|
f95c89 |
O-Subject: [RHEL-8.2 PATCH 25/78] bnxt_en: Add page_pool_destroy() during RX ring cleanup.
|
|
|
f95c89 |
Bugzilla: 1724766
|
|
|
f95c89 |
RH-Acked-by: John Linville <linville@redhat.com>
|
|
|
f95c89 |
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
|
|
f95c89 |
|
|
|
f95c89 |
Add page_pool_destroy() in bnxt_free_rx_rings() during normal RX ring
|
|
|
f95c89 |
cleanup, as Ilias has informed us that the following commit has been
|
|
|
f95c89 |
merged:
|
|
|
f95c89 |
|
|
|
f95c89 |
1da4bbeffe41 ("net: core: page_pool: add user refcnt and reintroduce page_pool_destroy")
|
|
|
f95c89 |
|
|
|
f95c89 |
The special error handling code to call page_pool_free() can now be
|
|
|
f95c89 |
removed. bnxt_free_rx_rings() will always be called during normal
|
|
|
f95c89 |
shutdown or any error paths.
|
|
|
f95c89 |
|
|
|
f95c89 |
Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support")
|
|
|
f95c89 |
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
|
|
|
f95c89 |
Cc: Andy Gospodarek <gospo@broadcom.com>
|
|
|
f95c89 |
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
|
|
|
f95c89 |
Acked-by: Andy Gospodarek <gospo@broadcom.com>
|
|
|
f95c89 |
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
f95c89 |
(cherry picked from commit 12479f627f7c2017e6fcd50b56c2537592674c50)
|
|
|
f95c89 |
Bugzilla: 1724766
|
|
|
f95c89 |
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23809532
|
|
|
f95c89 |
Tested: build, boot, basic ping
|
|
|
f95c89 |
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
|
|
|
f95c89 |
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
|
|
|
f95c89 |
---
|
|
|
f95c89 |
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++------
|
|
|
f95c89 |
1 file changed, 2 insertions(+), 6 deletions(-)
|
|
|
f95c89 |
|
|
|
f95c89 |
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt.c
|
|
|
f95c89 |
===================================================================
|
|
|
f95c89 |
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt.c 2020-02-06 16:23:14.547523827 +0100
|
|
|
f95c89 |
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt.c 2020-02-06 16:23:14.697522450 +0100
|
|
|
f95c89 |
@@ -2503,6 +2503,7 @@
|
|
|
f95c89 |
if (xdp_rxq_info_is_reg(&rxr->xdp_rxq))
|
|
|
f95c89 |
xdp_rxq_info_unreg(&rxr->xdp_rxq);
|
|
|
f95c89 |
|
|
|
f95c89 |
+ page_pool_destroy(rxr->page_pool);
|
|
|
f95c89 |
rxr->page_pool = NULL;
|
|
|
f95c89 |
|
|
|
f95c89 |
kfree(rxr->rx_tpa);
|
|
|
f95c89 |
@@ -2563,19 +2564,14 @@
|
|
|
f95c89 |
return rc;
|
|
|
f95c89 |
|
|
|
f95c89 |
rc = xdp_rxq_info_reg(&rxr->xdp_rxq, bp->dev, i);
|
|
|
f95c89 |
- if (rc < 0) {
|
|
|
f95c89 |
- page_pool_free(rxr->page_pool);
|
|
|
f95c89 |
- rxr->page_pool = NULL;
|
|
|
f95c89 |
+ if (rc < 0)
|
|
|
f95c89 |
return rc;
|
|
|
f95c89 |
- }
|
|
|
f95c89 |
|
|
|
f95c89 |
rc = xdp_rxq_info_reg_mem_model(&rxr->xdp_rxq,
|
|
|
f95c89 |
MEM_TYPE_PAGE_POOL,
|
|
|
f95c89 |
rxr->page_pool);
|
|
|
f95c89 |
if (rc) {
|
|
|
f95c89 |
xdp_rxq_info_unreg(&rxr->xdp_rxq);
|
|
|
f95c89 |
- page_pool_free(rxr->page_pool);
|
|
|
f95c89 |
- rxr->page_pool = NULL;
|
|
|
f95c89 |
return rc;
|
|
|
f95c89 |
}
|
|
|
f95c89 |
|