From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 7992B1B4AB for ; Thu, 11 Oct 2018 23:03:00 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2172421F23; Thu, 11 Oct 2018 17:03:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 11 Oct 2018 17:03:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=vacNlBOqcS 8fYQyHnjf85ld3Dfz9zVbtjLYHvrzP2Wc=; b=EN+eWP1ZtYrfTRc233AZK7FAJt MwsZyzn/03ySKQnU5f1apXwNWXrpU3+/hKtxbDXLCKolBH/5UWS3X4VZQNYrHxLj 4LU1Knp/y0nHRyTarV8nGuWOKdcCgFPgodkPTbgz9spvwGrNul833pCewM+e5Qhf CtK7ChBToR0raPDDM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=vacNlBOqcS8fYQyHnjf85ld3Dfz9zVbtjLYHvrzP2Wc=; b=RR+5KEzK h7Y7K/nD5QWqGSf6QEG/1SlJh15+VXNoWzkCIZ4cpwJUao+wUQGfE13gT+II80sZ XoY0bUQ42rWuIMkQI1ER8AZo4bBIjtOmNKnuVZC+sa2uV4zolhnZTIX9xieDcM/J ZcAY0oyVCFfZdiExaKtAWM1hqiP2OtqGygmzZInILQyOsHxQ7LTcyeiSRReGCtoF SElJLkNl/IJPQKItTJ9738a8TUVPqlSnWJuedw++2bFlItYVkQfB0B1311u51PNx ZxbdfByUeRHpT499vRDNMsw7uMPgvMEb/V2mvTRofRD5HkBETBN6tHhD3Bi2ZzZB FLEeIBue6RRx2A== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1B3F9E40E6; Thu, 11 Oct 2018 17:02:59 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, qi.z.zhang@intel.com, ferruh.yigit@intel.com Date: Thu, 11 Oct 2018 23:02:48 +0200 Message-Id: <20181011210251.7705-2-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181011210251.7705-1-thomas@monjalon.net> References: <20180907230958.21402-1-thomas@monjalon.net> <20181011210251.7705-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 1/4] ethdev: rename memzones allocated for DMA 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: , X-List-Received-Date: Thu, 11 Oct 2018 21:03:00 -0000 The helper rte_eth_dma_zone_reserve() is called by PMDs when probing a new port. It creates a new memzone with an unique name. The name of this memzone was using the name of the driver doing the probe. In order to avoid assigning the driver before the end of the probing (next patch), the driver name is removed from these memzone names. The ethdev name (data->name) is not used because it may be too long and may be not set at this stage of probing. Syntax of old name: ___ Syntax of new name: eth_p_q_ Signed-off-by: Thomas Monjalon --- lib/librte_ethdev/rte_ethdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index ef99f7068..ec443def5 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -3441,9 +3441,8 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name, char z_name[RTE_MEMZONE_NAMESIZE]; const struct rte_memzone *mz; - snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d", - dev->device->driver->name, ring_name, - dev->data->port_id, queue_id); + snprintf(z_name, sizeof(z_name), "eth_p%d_q%d_%s", + dev->data->port_id, queue_id, ring_name); mz = rte_memzone_lookup(z_name); if (mz) -- 2.19.0