From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m172-177.vip.163.com (m172-177.vip.163.com [123.58.177.172]) by dpdk.org (Postfix) with ESMTP id DEF135F1F for ; Thu, 6 Dec 2018 10:45:02 +0100 (CET) Received: from gfree.wind$vip.163.com ( [61.135.172.68] ) by ajax-webmail-wmsvr2 (Coremail) ; Thu, 6 Dec 2018 17:44:56 +0800 (CST) X-Originating-IP: [61.135.172.68] Date: Thu, 6 Dec 2018 17:44:56 +0800 (CST) From: "Gao Feng" To: "Burakov, Anatoly" Cc: "dev@dpdk.org" , "Gao Feng" , anatoly.burakov@intel.com X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20160420(83524.8626) Copyright (c) 2002-2018 www.mailtech.cn 163vip In-Reply-To: <0bd99be2-07e2-da13-23bb-9774ed470f90@intel.com> References: <1544057251-17351-1-git-send-email-gfree.wind@vip.163.com> <0bd99be2-07e2-da13-23bb-9774ed470f90@intel.com> MIME-Version: 1.0 Message-ID: <7a174fb7.12d674.16782e7eafa.Coremail.gfree.wind@vip.163.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: rGZ4CgDn75+Z7whcFWy+Ag--.3896W X-CM-SenderInfo: 5jiuvvgozl0vg6yl1hqrwthudrp/1tbiHhgVs1UCq1nmcgACsT X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] eal: fix unlock in rte_eal_memzone_init 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, 06 Dec 2018 09:45:03 -0000 QXQgMjAxOC0xMi0wNiAxNzowOToyMywgIkJ1cmFrb3YsIEFuYXRvbHkiIDxhbmF0b2x5LmJ1cm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LXRvIGRldkBkcGRrLm9yZyBwYXRjaF94eHh4Ii4KQXMgYSByZXN1bHQsIGl0IGdlbmVyYXRlZCBh bm90aGVyIHdyb25nIHJlcGx5IGFuZCBlbWFpbCB0aHJlYWQuCgoKSSBkb24ndCBrbm93IGlmIGkg bmVlZCB0byBzZW5kIHYyIHBhdGNoIHRvIGNvcnJlY3QgaXQgdGhlbj8KSXRzIHVybCBpcyBodHRw czovL3d3dy5tYWlsLWFyY2hpdmUuY29tL2RldkBkcGRrLm9yZy9tc2cxMTk5MjUuaHRtbC4KCgpC ZXN0IFJlZ2FyZHMKRmVuZwoKCj4KPi0tIAo+VGhhbmtzLAo+QW5hdG9seQo= >From rahul.lakkireddy@chelsio.com Thu Dec 6 11:15:11 2018 Return-Path: Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id 8E6B63257; Thu, 6 Dec 2018 11:15:11 +0100 (CET) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id wB6AF69D011469; Thu, 6 Dec 2018 02:15:07 -0800 From: Rahul Lakkireddy To: dev@dpdk.org Cc: indranil@chelsio.com, nirranjan@chelsio.com, stable@dpdk.org Date: Thu, 6 Dec 2018 15:43:20 +0530 Message-Id: <1544091200-16039-1-git-send-email-rahul.lakkireddy@chelsio.com> X-Mailer: git-send-email 2.5.3 Subject: [dpdk-dev] [PATCH] net/cxgbe: fix control queue mbuf pool naming convention 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, 06 Dec 2018 10:15:12 -0000 When multiple Chelsio adapters are present, the current naming convention of using underlying physical port number of the adapter creates conflicts when allocating control queue mbuf pool for multiple adapters and hence results in allocation failure. Fix by using port_id from rte_eth_dev_data, instead of physical port number. Fixes: 3a3aaabc7c77 ("net/cxgbe: add control queue to communicate filter requests") Cc: stable@dpdk.org Signed-off-by: Rahul Lakkireddy --- drivers/net/cxgbe/cxgbe_main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index ec080e5d3..0368db509 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -122,6 +122,7 @@ int setup_sge_ctrl_txq(struct adapter *adapter) int err = 0, i = 0; for_each_port(adapter, i) { + struct port_info *pi = adap2pinfo(adapter, i); char name[RTE_ETH_NAME_MAX_LEN]; struct sge_ctrl_txq *q = &s->ctrlq[i]; @@ -135,16 +136,19 @@ int setup_sge_ctrl_txq(struct adapter *adapter) err); goto out; } - snprintf(name, sizeof(name), "cxgbe_ctrl_pool_%d", i); + snprintf(name, sizeof(name), "%s_ctrl_pool_%d", + pi->eth_dev->device->driver->name, + pi->eth_dev->data->port_id); q->mb_pool = rte_pktmbuf_pool_create(name, s->ctrlq[i].q.size, RTE_CACHE_LINE_SIZE, RTE_MBUF_PRIV_ALIGN, RTE_MBUF_DEFAULT_BUF_SIZE, SOCKET_ID_ANY); if (!q->mb_pool) { - dev_err(adapter, "Can't create ctrl pool for port: %d", - i); - err = -ENOMEM; + err = -rte_errno; + dev_err(adapter, + "Can't create ctrl pool for port %d. Err: %d\n", + pi->eth_dev->data->port_id, err); goto out; } } -- 2.18.0