From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0077.outbound.protection.outlook.com [104.47.40.77]) by dpdk.org (Postfix) with ESMTP id 8A8D61B1AA for ; Thu, 21 Sep 2017 14:48:57 +0200 (CEST) Received: from BN3PR03CA0085.namprd03.prod.outlook.com (10.167.1.173) by MWHPR03MB2702.namprd03.prod.outlook.com (10.168.207.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 21 Sep 2017 12:48:56 +0000 Received: from BY2FFO11FD010.protection.gbl (2a01:111:f400:7c0c::100) by BN3PR03CA0085.outlook.office365.com (2a01:111:e400:7a4d::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Thu, 21 Sep 2017 12:48:56 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD010.mail.protection.outlook.com (10.1.14.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Thu, 21 Sep 2017 12:48:55 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8LCmqcG025636; Thu, 21 Sep 2017 05:48:53 -0700 To: Ferruh Yigit CC: , References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170909112132.13936-26-shreyansh.jain@nxp.com> <5b28593b-5d6c-f77a-80a2-9e8332820b8e@intel.com> From: Shreyansh Jain Message-ID: <0c4268d8-04e0-4e68-d7e9-8b639e3154d2@nxp.com> Date: Thu, 21 Sep 2017 18:29:49 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <5b28593b-5d6c-f77a-80a2-9e8332820b8e@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131504717358852588; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7966004)(336005)(346002)(39860400002)(376002)(39380400002)(2980300002)(1110001)(1109001)(3190300001)(339900001)(189002)(24454002)(377454003)(199003)(50986999)(54356999)(305945005)(76176999)(6246003)(53936002)(2950100002)(6916009)(6666003)(356003)(2906002)(189998001)(230700001)(33646002)(104016004)(65826007)(5660300001)(23676002)(105606002)(106466001)(68736007)(77096006)(8656003)(83506001)(498600001)(31686004)(53546010)(50466002)(85426001)(36756003)(65956001)(65806001)(97736004)(47776003)(64126003)(58126008)(31696002)(54906003)(229853002)(8676002)(316002)(81156014)(8936002)(86362001)(4326008)(93886005)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2702; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD010; 1:Of52bpZKM3WGZ/fZEWNpfaxsoxhdSjzw96nA/1fnSbv+TCcaGrld6+7t2J1bfqr5Y7GY6ONh4neuOzve619yKToSqGTLgpOZUSv7w1tXxAjMjV/OVNIb+McD6+KY/dcK X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 072f8b1f-6fde-49d1-5eec-08d500ef1eda X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR03MB2702; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 3:eH204fo82mLdqN3D5aUkwg17oBXM0jACUmEOX/8oRCs7a80XV9AI6fr/wzSSuaMxJ9VCObu9pAszkyB024F1HCdu6ru6KXuD4xZbRLdi8g6bd/08kPrQxqpoAJ9eR0N8pmsAQ8cwEZ/4ZkpEXHlzke2eBCvABpDnE6+vCvoIziZsNX9gbiK2XATYnIRDNn766WU1JGtzcHSyOSPSouM/FxqucoVgs2KNGF30OHcsVS647yeDdUck9nCo+NM68cUWe1ZXR8lkQ0n4x2IDLISdgcyecpzwK31iyV6Poxjyd910qU3pLEE6xPXM3JkS8GkfkuV8IcExhj9ewYA9J0oyQJUnSDwbpoenIt17zgoEIik=; 25:ZwTT3bQZn/hoHyNT8JDSNPvqSZAElwoQBsg9mlt2gDYX+qtIhNiLMaFSrKWfBxdnTIDPn9dUTokThOfuSOfCD03wQd+PgExYpGPmPD9p8BYv2l9JYh1SB6pv1nHRopUNjm+j4qcAIACb/qDjjli/ZnR4FPuX0wsjQ+j8lPGkBDihgY7v0cBEcB9Av8NzCF8D2RBq/NaD7KxNDvWwHa28rLWwJsR5aHrcQ+p+mjNFlqyKVBAMccqcWRC3yM+QqYLHj+7eFGlGOCxFsfU1BazzMlNyfqwPlJ3gB6fFPva9cq9t6Ot7xubrQ3qfTOQAWmP6MUWz2HRGFbfzgv2Kw25Hag== X-MS-TrafficTypeDiagnostic: MWHPR03MB2702: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 31:Sq7XVuWzqQCTnNerlKyYCaNUNGvu+RsDkVrXPo7nw4So93sglOLA56C2bBfBjLf3tpZqzHkun8iLZFi+z14nR/xPUrE0E3LzVSdK6lcev95uyoQFfcctBfvyfyCYYeIs2p5Cp2DPSrt/jc1uEUqMNQS4Ef+WBAtQPp/qy9XDdNc8zL0QMKaIOxZ2Ir6jJXr7PA0hUGG1XteP+vPIc9J9sXDHAI92JEn1NHzHiqWOHts=; 4:ssthxhnfeLRTVuxHxWvZIETB1Sv6aa9StoNgggTx90jn6dB8J6FMM/ZuUsuopTst5rVVENDKHMaFWaPUErgY2a5jKdkPgaOfd2Vyw7nZaENdVZ9bE9Kl2M3zJZw1oFITS8epgpYh9sEJ9cZFSLD+bx1VrSbhajJzI7gu9rzFK66GE8kuNqpELoU9V37N35hNAWa6Ld3FiXP95g6TRS7n9WZ4kE0gNE4GOtr9AJVv8I0bAlUPSDWDvoodS7QTF5/LfdEt0n9MIocDhgXprhoMHzx2lFe6WIuSOUu75FdLlpA= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123556025)(20161123563025)(20161123561025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2702; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2702; X-Forefront-PRVS: 04371797A5 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjAzTUIyNzAyOzIzOldhQkFLZW9ENWNuNW0vUDB4TldYVFkwYTRx?= =?utf-8?B?dXFWalp3UWhzdzlDL294YU03WjcyUWo0WlB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XAs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 12:48:55.5732 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2702 Subject: Re: [dpdk-dev] [PATCH v4 25/41] net/dpaa: add support for Tx and Rx queue setup 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, 21 Sep 2017 12:48:58 -0000 Hello Ferruh, Apologies for delay in response for these, I am already working to get the next version based on your comments. Meanwhile, some comments inline... On Monday 18 September 2017 08:25 PM, Ferruh Yigit wrote: > On 9/9/2017 12:21 PM, Shreyansh Jain wrote: >> Signed-off-by: Hemant Agrawal >> Signed-off-by: Shreyansh Jain > > <...> > >> + for (loop = 0; loop < num_cores; loop++) { >> + ret = dpaa_tx_queue_init(&dpaa_intf->tx_queues[loop], >> + fman_intf); >> + if (ret) >> + return ret; >> + dpaa_intf->tx_queues[loop].dpaa_intf = dpaa_intf; >> + } >> + dpaa_intf->nb_tx_queues = num_cores; > > Is number of the tx_queues always same as core count? Number of cores decides the max number of queues that we support. It is our internal design to use this as maximum number of available tx queue. With the above variable, we are only limiting what we will copy in the dev_info->max_tx_queues to be reported to application from eth_dev_info. Application would still continue to use its own Tx queue ids. But yes, we don't yet support limiting the number of queues to a user count, if less than number of cores. > >> + >> + DPAA_PMD_DEBUG("All frame queues created"); >> + >> + /* reset bpool list, initialize bpool dynamically */ >> + list_for_each_entry_safe(bp, tmp_bp, &cfg->fman_if->bpool_list, node) { >> + list_del(&bp->node); >> + rte_free(bp); > > Why freeing them during initialization ? Just in case if there is anything still in the list. This is possible in case where multiple devie > >> + } >> + >> + /* Populate ethdev structure */ >> eth_dev->dev_ops = &dpaa_devops; >> + eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; >> + eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all; >> + >> + /* Allocate memory for storing MAC addresses */ >> + eth_dev->data->mac_addrs = rte_zmalloc("mac_addr", >> + ETHER_ADDR_LEN * DPAA_MAX_MAC_FILTER, 0); >> + if (eth_dev->data->mac_addrs == NULL) { >> + DPAA_PMD_ERR("Failed to allocate %d bytes needed to " >> + "store MAC addresses", >> + ETHER_ADDR_LEN * DPAA_MAX_MAC_FILTER); > > free dpaa_intf->rx_queues, tx_queues ? yes, certainly an issue. I will fix it. > >> + return -ENOMEM; >> + } >> + >> + /* copy the primary mac address */ >> + memcpy(eth_dev->data->mac_addrs[0].addr_bytes, >> + fman_intf->mac_addr.addr_bytes, >> + ETHER_ADDR_LEN); > > Instead can use ether_addr_copy() instead. :) Yes, I can. > > <...> >