From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F27CCA04E1; Tue, 22 Sep 2020 10:55:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C53131DB58; Tue, 22 Sep 2020 10:51:05 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id BF6BE1D72C for ; Tue, 22 Sep 2020 10:50:20 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.150]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 6574620055 for ; Tue, 22 Sep 2020 08:50:20 +0000 (UTC) Received: from us4-mdac16-60.at1.mdlocal (unknown [10.110.50.153]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 64ED0800A3 for ; Tue, 22 Sep 2020 08:50:20 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.7]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 07F4D100052 for ; Tue, 22 Sep 2020 08:50:20 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id C623F4C005C for ; Tue, 22 Sep 2020 08:50:19 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 22 Sep 2020 09:50:10 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 22 Sep 2020 09:50:10 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 08M8oAJx004716 for ; Tue, 22 Sep 2020 09:50:10 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 9EBAC1613AB for ; Tue, 22 Sep 2020 09:50:10 +0100 (BST) From: Andrew Rybchenko To: Date: Tue, 22 Sep 2020 09:49:24 +0100 Message-ID: <1600764594-14752-31-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600764594-14752-1-git-send-email-arybchenko@solarflare.com> References: <1600764594-14752-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25674.003 X-TM-AS-Result: No-0.867700-8.000000-10 X-TMASE-MatchedRID: iMP5BsV0NcoiEWtcrbQQlEf49ONH0RaSBf+1hl/qv/DHkH7uosEn7B/w Qv0T9e3mz0kHebusWqGyQOuU1hqbv+RoqMyIkdDynTjUyTU65ulp4xorO9dSmWMunwKby/AXsoG mWO8qx858bO6hWfRWzo9CL1e45ag4zXWIf3OSX0QovbifIQL7GmcCy3wC35zdmyiLZetSf8mfop 0ytGwvXiq2rl3dzGQ1uoO1PSUJM6lASigVN4OZkgCkj/7wKCYJO7dj8m2zdaVzm0dfDrW6Eq7on eo0T/4qELa5eCSuB0pTqWJJLcTiJe54i82JhSZVUvknYkr0ubEjoqQAvYDmRwy1ivD0G5PCpKZI 9GApJky6jC8l0hZCbkMMprcbiest X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.867700-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25674.003 X-MDID: 1600764620-3Fj8zfftxcL5 Subject: [dpdk-dev] [PATCH 30/60] common/sfc_efx/base: free Rx queue structure in generic code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Rx queue structure is allocated in generic code, but was freed in NIC family specific callbacks. Move free to generic function makes NIC family specific callbacks shorter and reduces code duplication. Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/ef10_rx.c | 3 --- drivers/common/sfc_efx/base/efx_rx.c | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/common/sfc_efx/base/ef10_rx.c b/drivers/common/sfc_efx/base/ef10_rx.c index 7004ab2aca..58152be768 100644 --- a/drivers/common/sfc_efx/base/ef10_rx.c +++ b/drivers/common/sfc_efx/base/ef10_rx.c @@ -1015,13 +1015,10 @@ ef10_rx_qcreate( ef10_rx_qdestroy( __in efx_rxq_t *erp) { - efx_nic_t *enp = erp->er_enp; efx_evq_t *eep = erp->er_eep; unsigned int label = erp->er_label; ef10_ev_rxlabel_fini(eep, label); - - EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_rxq_t), erp); } void diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c index a361112849..d208c2292e 100644 --- a/drivers/common/sfc_efx/base/efx_rx.c +++ b/drivers/common/sfc_efx/base/efx_rx.c @@ -981,6 +981,9 @@ efx_rx_qdestroy( --enp->en_rx_qcount; erxop->erxo_qdestroy(erp); + + /* Free the RXQ object */ + EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_rxq_t), erp); } __checkReturn efx_rc_t @@ -1706,9 +1709,6 @@ siena_rx_qdestroy( EFX_BAR_TBL_WRITEO(enp, FR_AZ_RX_DESC_PTR_TBL, erp->er_index, &oword, B_TRUE); - - /* Free the RXQ object */ - EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_rxq_t), erp); } static void -- 2.17.1