From patchwork Sun May 3 16:26:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renata Saiakhova X-Patchwork-Id: 69718 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30300A04B2; Mon, 4 May 2020 19:27:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C87AC1D55B; Mon, 4 May 2020 19:26:53 +0200 (CEST) Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-eopbgr120138.outbound.protection.outlook.com [40.107.12.138]) by dpdk.org (Postfix) with ESMTP id 239111D447 for ; Sun, 3 May 2020 18:26:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UKoEm8WDvthOaHCVtOX5scDj/ZeHG9YvcMjikAmjhtND8i6LGUMpResZF9SDgWi74BSI3ZuASqkAgjjjnAnraeIRlDfF/diyNmux+cTwkQcYdxI0b1Mgt5UhVzSR0bl4pFbnlKSjOc+c+A72hViHmgX96WzLjMa8i70U6tdhGWiK7BBHLWjriH71TrNS+VJs56L1E5qVcTGFVYyBt5es9hpdonovWWc8uHn8Ej9hsUKKmTFrmWLD7duxRPsCLKwTtIGp1WhRPl9KEOK7iGBCSp8wgffIBVraUibA5MrGbOnKMFRUTeoXEmbsfa4A5kfA6XdUjAyhAlEo22LLC8UXmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sqj7u8H1a+0fSdmzaup1at2MwyovdyPOlVPg60yojYU=; b=lTvJH5zZT++jwvoXE13s2fHHib1WjL9Nh9JuF7NfFsdJ7ZBYZg4jXluYW41nVwlNdEr6jT9NOR8e26fiPPpyZ2jv4mXfTCQCQxcYYQttj3n1Ch/qRV3VolzY6za0tbTcblCY1fradHnW9FM10oPM/8qj4SbqSIkxIyzSi03Fceo2B2LeuWMncGeqs3xqj5syLJa8UhuMTHU0uigfaX5Shqj9nuuVDY1hf7BEDKPGH9mPySDlqtLGeVxGXsUwAJIJJa1qpUaSu7gP4pUlRkgrSHZIdy9Ibt7W93dJEOyrPz4dscR74iWOykmyE4jh/9irkerC0YNjUqEMAOqFe2oJqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ekinops.com; dmarc=pass action=none header.from=ekinops.com; dkim=pass header.d=ekinops.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ekinops.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sqj7u8H1a+0fSdmzaup1at2MwyovdyPOlVPg60yojYU=; b=VpwFmQZzSTG9NU2nGTGcIQbXLZ7TahupnU+VDAtflA8oJt7rNSZpYbP2wQhq60vSJ9bLGtU9vZVjiSAt9fP9UZa2LPE2N/p+Cpie6NuI86tui++WperHPcW+Zgm450nIEzM+vyt0j0ScUpyenng1VfpHGe9DXRa/Dm3NEBbpbIk= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=ekinops.com; Received: from MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM (52.134.49.19) by MRXP264MB0566.FRAP264.PROD.OUTLOOK.COM (52.134.47.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Sun, 3 May 2020 16:26:48 +0000 Received: from MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM ([fe80::41a7:e761:6112:5c08]) by MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM ([fe80::41a7:e761:6112:5c08%7]) with mapi id 15.20.2958.029; Sun, 3 May 2020 16:26:48 +0000 From: Renata Saiakhova To: dev@dpdk.org Date: Sun, 3 May 2020 18:26:35 +0200 Message-Id: <20200503162636.5233-2-Renata.Saiakhova@ekinops.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200503162636.5233-1-Renata.Saiakhova@ekinops.com> References: <20200503162636.5233-1-Renata.Saiakhova@ekinops.com> X-ClientProxiedBy: AM0PR06CA0087.eurprd06.prod.outlook.com (2603:10a6:208:fa::28) To MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:22::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from renataOAB.oneaccess.intra (91.183.184.98) by AM0PR06CA0087.eurprd06.prod.outlook.com (2603:10a6:208:fa::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Sun, 3 May 2020 16:26:47 +0000 X-Mailer: git-send-email 2.17.2 X-Originating-IP: [91.183.184.98] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c532b06-d1d3-4eaf-d96a-08d7ef7ec6cd X-MS-TrafficTypeDiagnostic: MRXP264MB0566: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 0392679D18 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CBZ6L8XsF2wJBn5F4KvHV4qir9tBxfzsWSjzdCylHXGaH+DOmpYlLPye5r5C6QrEe8Aah0/HnD9nYiiV2rCGvaiwmnIIWvN7yuKDM09rFIueam+1RzUmXNpHckAQhapPMBEGtiaPD/yvV16Fc/uVNlTaZndwfNpLHM8lZUoJqxmX/obM4SEkIyMJ0CScRM8HW5cU+4nf+mk8Aw6OIIV+JiEiOCb6xUVtiMq9BHqzONk5kksmselTmViWedCmKpHqQ53lnXYarTIJqRTBNpYPwX3RaD+gWnNvC11BAiwLXXtCXMWFaCRGjLPWAO4hqNl8hLiqkJndftDQElSsGmQjMHrmyJHlXrqiSnpXH+ltfmT50j7qKhNQUlpcfR3qwvINsAYY4e4z4kHDlpYabQgq7aINnkWYJhMi4X7/kkjj+NTjFjuW8DLUKxS2InyX4G0e X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(366004)(376002)(346002)(39830400003)(6506007)(5660300002)(6916009)(8676002)(8936002)(478600001)(86362001)(1076003)(16526019)(66476007)(66946007)(66556008)(2906002)(186003)(26005)(6666004)(52116002)(956004)(2616005)(36756003)(6486002)(6512007)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 9i+3KeQpWeVYLebUTA3X1VCRbcnNMOkdXWZ6TkXwYM65ZKUVNpUByMYChWT3ti2zcg426rPSOwKedxFVJfHDFink3dMr2WnHDw4YuVHIkQFFIAd+TiamrLXYnXoaVPrvxaZdX/NKuXz9h2jVIV/e8cxSqzSTDOPDUUF5mXsNLbt+Va+Lpn6n3IShrFYilN0w5p85phVY2rmnxgLRLPc4bTRsiFejyPOyRE/0Nt6ijWqskvkNVy7bD9jn6IlJBkIPJVuofF1MXmBQllNOlwf/HLmBqNNoG5py48BqTibHHyIju1ggw5zayYfoamW04poZ12rbbCKQR7v1rXq4KOvx3qXNZ86jQJMGEijPPFyLJP0qITL9cc16U4bYwwjGDXRSHOq32BC+lmJ8j31NjcQKx/iFWo8XkGmvKq+uopt/ywDC46Gig/eAoumCah7JtbXVxHULO1JVS+Kv1gSUZDXu/OtXbw+37oSBpFNgSIVoA/g9nBddOIOYQfMpFXl8L0b3KcGDd0tX0BIPIvRhfopUGd6/eU4qikTzsKF9i4dy390r/w3C7wZ2wj3qb/wnCB+He8NEh5YdjbmDRuNNnBLv99G/Q7YsCo47xzvWwzCnyGJjK4h2kKwDlsOnPZeS5/FWsSmq18P9fRcWuNlUeahR9zaLHagIVnmGXff/keuV9fkWq/a0b5Ccpd0VuyQhwS8nO0LBJgV8mQBXp5iXpPSVt7zH87aF7cd3zLskM5tEuUqrUGrDssAjwfv+YNm6Y7/2qvJRtrbBdyiBRlz7HiWd5KBY0mcAwCQrQ41yTSaJ/0U= X-OriginatorOrg: ekinops.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c532b06-d1d3-4eaf-d96a-08d7ef7ec6cd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2020 16:26:47.7680 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f57b78a6-c654-4771-a72f-837275f46179 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3NPrSBhyKgwInJsg/R/bnV8z7x1kzyPDLpOx2Rdn+svb0mUrhRYhdRfApdlwGsrrf0w2Cp7jm9RrdiSMCYp5uqbyYT3R6vHOQxQn71xcl3Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MRXP264MB0566 X-Mailman-Approved-At: Mon, 04 May 2020 19:26:43 +0200 Subject: [dpdk-dev] [PATCH 1/2] librte_ethdev: Introduce a function to release HW rings 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" Free previously allocated memzone for HW rings Signed-off-by: Renata Saiakhova --- lib/librte_ethdev/rte_ethdev.c | 23 +++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_driver.h | 14 ++++++++++++++ lib/librte_ethdev/rte_ethdev_version.map | 1 + 3 files changed, 38 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 72aed59a5..c6d27e1aa 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -4206,6 +4206,29 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name, RTE_MEMZONE_IOVA_CONTIG, align); } +int +rte_eth_dma_zone_free(const struct rte_eth_dev *dev, const char *ring_name, + uint16_t queue_id) +{ + char z_name[RTE_MEMZONE_NAMESIZE]; + const struct rte_memzone *mz; + int rc = 0; + + snprintf(z_name, sizeof(z_name), "eth_p%d_q%d_%s", + dev->data->port_id, queue_id, ring_name); + if (rc >= RTE_MEMZONE_NAMESIZE) { + RTE_ETHDEV_LOG(ERR, "ring name too long\n"); + rte_errno = ENAMETOOLONG; + return NULL; + } + + mz = rte_memzone_lookup(z_name); + if (mz) + rc = rte_memzone_free(mz); + + return rc; +} + int rte_eth_dev_create(struct rte_device *device, const char *name, size_t priv_data_size, diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h index 99d4cd6cd..2769a185b 100644 --- a/lib/librte_ethdev/rte_ethdev_driver.h +++ b/lib/librte_ethdev/rte_ethdev_driver.h @@ -180,6 +180,20 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id, size_t size, unsigned align, int socket_id); +/** + * Free previously allocated memzone for HW rings. + * + * @param eth_dev + * The *eth_dev* pointer is the address of the *rte_eth_dev* structure + * @param name + * The name of the memory zone + * @param queue_id + * The index of the queue to add to name + * @param size + */ +int rte_eth_dma_zone_free(const struct rte_eth_dev *dev, const char *ring_name, + uint16_t queue_id); + /** * @internal * Atomically set the link status for the specific device. diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map index 715505604..5d3c209bc 100644 --- a/lib/librte_ethdev/rte_ethdev_version.map +++ b/lib/librte_ethdev/rte_ethdev_version.map @@ -82,6 +82,7 @@ DPDK_20.0 { rte_eth_dev_vlan_filter; rte_eth_devices; rte_eth_dma_zone_reserve; + rte_eth_dma_zone_free; rte_eth_find_next; rte_eth_find_next_owned_by; rte_eth_iterator_cleanup; From patchwork Sun May 3 16:26:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renata Saiakhova X-Patchwork-Id: 69717 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88174A04B2; Mon, 4 May 2020 19:27:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 893D21D552; Mon, 4 May 2020 19:26:52 +0200 (CEST) Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-eopbgr120138.outbound.protection.outlook.com [40.107.12.138]) by dpdk.org (Postfix) with ESMTP id 2FEFF1D453 for ; Sun, 3 May 2020 18:26:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ibw8MabnDkuFK7KbnAUr+hEUZHgFNKWAI9y85TQ9/QwIRGaPjKMW+702epRD4KX+K0jt8V7FUP9HIa2aUZPYt2mSKawATqcGRiu4FLHGROszTdrvQH9syr+8mxFAO8eth4h01rvJGLuPYf6Sgms+i/X5/pQo5OiQ9WkCO8GZD0q8kkNkNgd1l6Rqk/xGbZOldMXvAtGm0xUZmu6UBu3URykQOMtgxWxyLq5252afi0Xbs+/42JSS65OiHuLzAQtOyp6n6HBCHTe1c8HZKknd0K94gOINUuFcBQkfFKrvktO/qy5Be2uVhOMV5CHGEuGiK/b0wsqRsMlXvYhgC44I9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bUaG3ovqzbCHJemXuqYuJkwYhFQAvHyE5Ix9UlK8ldI=; b=eXDy+S2/ELSjaf6FvYcgM2zaX+b2meKxrTjO/9v2Rd8Z0OqJ9DW5O7CwOY9B8L7ogDlr2cnWpUs7lr0quErJbw2OwcsyWut3bjVAlcTHQvzODbU+NAJyXu/aekPdKKFRYWDFsqR+WI9mtNlI91SDm02rakbuBAKpihHPZGBtDcfSQLwUnRsJDA17A/nTJpQjLk0QvAnTXUaClf5GiALSvu2f42MBzvqzLB4oOGIyvYL04+MBeQdSmomrvNcnyFJYOMNtizBgE/rxegfMwfKmEk0lEdb/QOWAMwck1JNVM1q8A2lfXzlBfiXVhf4Jmx/bhjBFzWnNivQnbMsDA7ooZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ekinops.com; dmarc=pass action=none header.from=ekinops.com; dkim=pass header.d=ekinops.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ekinops.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bUaG3ovqzbCHJemXuqYuJkwYhFQAvHyE5Ix9UlK8ldI=; b=LaVt7Dpdosuj2updY8ElrFKK8+Vuyt/P/SOTmbw7ACn1SETA9rPnJxV3Xtg3bCfdhSkxaG3W6Es/CV2zJcKFu5XMLwRsFGWKuct9Q/KMxd5iP/G9niuXEXkVsg6jom5PDOVYK5aRLX9t+P5X3L3ioJJfSNM4P2cA4M9dW925+qY= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=ekinops.com; Received: from MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM (52.134.49.19) by MRXP264MB0566.FRAP264.PROD.OUTLOOK.COM (52.134.47.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Sun, 3 May 2020 16:26:48 +0000 Received: from MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM ([fe80::41a7:e761:6112:5c08]) by MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM ([fe80::41a7:e761:6112:5c08%7]) with mapi id 15.20.2958.029; Sun, 3 May 2020 16:26:48 +0000 From: Renata Saiakhova To: dev@dpdk.org Date: Sun, 3 May 2020 18:26:36 +0200 Message-Id: <20200503162636.5233-3-Renata.Saiakhova@ekinops.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200503162636.5233-1-Renata.Saiakhova@ekinops.com> References: <20200503162636.5233-1-Renata.Saiakhova@ekinops.com> X-ClientProxiedBy: AM0PR06CA0087.eurprd06.prod.outlook.com (2603:10a6:208:fa::28) To MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:22::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from renataOAB.oneaccess.intra (91.183.184.98) by AM0PR06CA0087.eurprd06.prod.outlook.com (2603:10a6:208:fa::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Sun, 3 May 2020 16:26:47 +0000 X-Mailer: git-send-email 2.17.2 X-Originating-IP: [91.183.184.98] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb2b4cbd-f18c-4e9a-53aa-08d7ef7ec709 X-MS-TrafficTypeDiagnostic: MRXP264MB0566: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:843; X-Forefront-PRVS: 0392679D18 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tArtYK8iH45zaFHmDZPjbW/0ljuGQw9GiylAaPcIgA544aFvuyWDIXdZL+K3l42moyEqwxcOIzqBzjfFv59hxPpWfQN02ri+l8FauMgHr6D6n4kyggc5oq+3Bm6ACU6+4+3joaTCNPkip4UDQwqa46HaUeZTIs4keGuZQ1NjqbTAl62Al3xpo00D9/+/fez1gujBr7gN+1Hyfw7P3bxiKAa7qWRPpOgAc6XqyXi/8NuQK9fPLyW54LtjQpU2KpKjuCy08t8PBVItTvX90Kj7xDnn3ueWr8OppAoskBD4MCqNhzOnfV52uYs11Hf16XoodOFljHcSumAperucpCaTcjOKAR40L4+j1qyWrHMOXZv90zh8/tbnJ7RV+dgm2dkTvYBO1Wp2emr7x8Hr/jXQ4qCnshLAxG6peCi319wDINrKBJzkD9NFLzroQqY4Nwgu X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MRXP264MB0325.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(136003)(396003)(366004)(376002)(346002)(39830400003)(6506007)(5660300002)(6916009)(8676002)(8936002)(478600001)(86362001)(1076003)(16526019)(66476007)(66946007)(66556008)(2906002)(186003)(26005)(6666004)(52116002)(956004)(2616005)(36756003)(6486002)(6512007)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 9L9wBNBttIq6MpBKvq1ZUxFApasFS0bi4JIarE5wFPvqnPbF3YPYwhO+r5a7FbLdoG68Ig4jfiWqktqvYtmjd1l16xLnkT6RuoBdRWIA+mfugY6BScpg4ItA6g03zynK9T17kVpm1DZvKG5eMzXEaDAibRVNKiPa16TjNWK4DVv4w5IIPZh5718LmOSNJBK9BFIqNoBsSL2GPzxTVNW9AJQnuSfjQN+crD9hdY2Nj/FARVXmTy3BRdKccIa7gNEr0DFs001MTllSSv//gZxJceRoNvrMpIxl+XGlV5rOJrUuhVLXtwr2XyjjxeG5UNEw8oxW2Ga8A7aObcoxlD2acTZCvXhCihzzIsqClKRqyGP1VE7tByDQWvR165+2cVBIqlZs6zDKr5Ydge/o5cs2aiic4Sa+VEwm7BOTX4BK18iBLYgx9jp2KYVayMw2qx5S3fAvN0MgkV5gHGIX0254vlAcVgJKeiFBLZMEsyWYlZO4peUiDNhJjzJeF4RUovGYhsScPlthmYGstdsUcWc+et1iIESv3uk3SXpceppVJi+gTeDmY0seqVEygKswGMH+/UfqtfN3LOssnpiTFFqAuIIIccxcnjN5Hy7Wx1u8hyzARfeVuvJLB3l050dy1GNBpvKG1A5vRfwlBA0G/IEFS55BQh7DIZ2KK9RHyMFEMXbDRS5mmE/DBF6bvSMv622hGbRsAk79oE07bs25CvUkaMPJ4sHwem1XZ8BwUi8Mpf7f0FM/6odNSsFu04biv/CX+zmJEozDhNuQjF9zuAEKYuJn20Fow0K+ISSbr1vTQGU= X-OriginatorOrg: ekinops.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb2b4cbd-f18c-4e9a-53aa-08d7ef7ec709 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2020 16:26:48.1488 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f57b78a6-c654-4771-a72f-837275f46179 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OBVOY7kCD+8aAfsNwW3ZjOuMC9qX9i512vNOLxTuc+PfBrosk1d/Ps9C9ytoqhDYR+5e4VJ8NU3RhyaP1NgUpuhIdPV2sI67wIWf+Ltvw78= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MRXP264MB0566 X-Mailman-Approved-At: Mon, 04 May 2020 19:26:43 +0200 Subject: [dpdk-dev] [PATCH 2/2] drivers/net: Fix in e1000 and ixgbe HW rings memory overlap 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" Delete memzones for HW rings in igb and ixgbe while freeing queues Signed-off-by: Renata Saiakhova --- drivers/net/e1000/igb_rxtx.c | 2 ++ drivers/net/ixgbe/ixgbe_rxtx.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index 684fa4ad8..fe80c0f0d 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -1884,12 +1884,14 @@ igb_dev_free_queues(struct rte_eth_dev *dev) for (i = 0; i < dev->data->nb_rx_queues; i++) { eth_igb_rx_queue_release(dev->data->rx_queues[i]); dev->data->rx_queues[i] = NULL; + rte_eth_dma_zone_free(dev, "rx_ring", i); } dev->data->nb_rx_queues = 0; for (i = 0; i < dev->data->nb_tx_queues; i++) { eth_igb_tx_queue_release(dev->data->tx_queues[i]); dev->data->tx_queues[i] = NULL; + rte_eth_dma_zone_free(dev, "tx_ring", i); } dev->data->nb_tx_queues = 0; } diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 2e20e18c7..977ecf513 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -3368,12 +3368,14 @@ ixgbe_dev_free_queues(struct rte_eth_dev *dev) for (i = 0; i < dev->data->nb_rx_queues; i++) { ixgbe_dev_rx_queue_release(dev->data->rx_queues[i]); dev->data->rx_queues[i] = NULL; + rte_eth_dma_zone_free(dev, "rx_ring", i); } dev->data->nb_rx_queues = 0; for (i = 0; i < dev->data->nb_tx_queues; i++) { ixgbe_dev_tx_queue_release(dev->data->tx_queues[i]); dev->data->tx_queues[i] = NULL; + rte_eth_dma_zone_free(dev, "tx_ring", i); } dev->data->nb_tx_queues = 0; }