From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20061.outbound.protection.outlook.com [40.107.2.61]) by dpdk.org (Postfix) with ESMTP id DFB81199B6 for ; Fri, 6 Oct 2017 07:00:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JRvlDcGVFQu85aZKfT46nKiJbf+fTfmw3BdJ9XrftpE=; b=Ux2WcrU4eD0PvyOGH6uw/b8j/yFcfX5yL00NI70rPypXKxmBAOFr8/7nLodfYljUqwlw0ocZb7QKvo4u3gHKbaRe+RNZLQzViKi4Ddvx91k2XIxaXNMHEnHM0fajq60KOVe7yb2fJ07RSI4p+laD8DJII3w18xYVNW2wyRVkOVg= Received: from yongseok-MBP.local (73.222.116.174) by AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 6 Oct 2017 05:00:16 +0000 Date: Thu, 5 Oct 2017 21:59:58 -0700 From: Yongseok Koh To: Nelio Laranjeiro Cc: dev@dpdk.org, adrien.mazarguil@6wind.com, ferruh.yigit@intel.com Message-ID: <20171006045956.GF19330@yongseok-MBP.local> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Originating-IP: [73.222.116.174] X-ClientProxiedBy: MWHPR12CA0063.namprd12.prod.outlook.com (2603:10b6:300:103::25) To AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac51f6f8-5a0c-4aeb-5ad5-08d50c772328 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:AM5PR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 3:I88CVxwWWu2Nk2gKuO0vEgRoGKTM9x6LsJfDrpc3KRrH80TCqjYjB5JBrLVF/Gj3JCv0vDN2LNpKxV9tekp5Wfr83lcsiU56HQcmYC863sxdxddMTFTEkVIANqU+6FfHVvWAGKEzafzb09irfl6CFlsP8IEZUsHG6YKi5/VKpNMVosjrm5N59a64iO7ltHnOFUG4airEWHPBr/xEXHI+MyCCoZBpJFlTv7bE9RcWgvyXrdcMGKnXapjPi96+ZcPt; 25:rV3dsvi1Z+vdEWZOp1svUIDTAGN7bLp910i0EZgpvVmbhdMoOYMmeqRwqVmjkYBZdZL8rQcAZ0AMndtkfij+ROseRbNzCU9UssBYK6jvc0Czd1TahIPuCV9ThDocqoPEtYF1myPKiXg8epKwb49Hb6jgZt2FmkML8eiPoRX2Cudarylzwk5Aj5a/Lik9AhaHl7aHD7E/wQtvdGDc3TRPmnJcQGk5hazHcGZEHIzC8rdP9GD5w+05L6TjPcwpgWKUPJc0nMu9u2uuommoRigZRTJ7+9hSDMH/X+I9SshGdJ/RxYxnV6nh25nt8rdzAfUjBPLhbPBGr4qsUHNotfcNvw==; 31:XySCEwdcuGMD2y62VVW4BNzsYC/lPed//tO/eUKiuI9SaGrrhR//+Drcg7d0boXFwFQorA2XN1sNz9xkIgPyjMoYBPU5RnSgfmzFZjOvF5jNkTLG3ZUj50pnOaWqwzJmxJQe4+NfioYvJdvxR4rMf/qe3+XV6xmXSnfBw7EhHp6l2Kd+ZSX5J3ej4Fcdg8zJ/rlEEFzinQNX967LxlgP+rnn28roHmeTubfmGNQ12e0= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2036: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 20:qmxltAeqB12sasGuBIk767jznEz7URi2lNjuVLRT2CPSy4SUg0rUSJF7Q9fIfeKpj9UZAJ85q07afLCPU7YMvz+RuFakUiNbw5qU+SsRvSbnIDDEAG1p51cR2Ev+midd8/RbnYRH4j2DPeE2S9tohd2OT/yOmeaNXiclP9v+tyiH077+v1U8lOTHW8VJnG0EPjDn4VS6eSFAKfsQzWMobmYlIGR+dwYIvaWIc+bF4AxP1BHeccEW+B9IODgpDNm/4lv4ZUPq9bRfbfwO57mL0PiAi+ZQ9crJ4bkwNqOjWtphewMrxh+kbsq3upm/0H1Kb7Kgxhr36EKb9UK+STX9Z+y8z+C3alNhYDH50DpU/HLM8K4J+BTEKZ9HiX+jSjFu9epAQrwGWaehMH/S2uHsPeEqvOahwZIGi2j731ubIkaO0fVEf7HDJ/wCwlDMioyQP0MOJd4E85Rq2Z7fSBaHMFAf/413+KL8MDU9wNEEAZyKnPXO4taPNuG6nDmkYEAU; 4:bg8anN5QRyC9O3E7uSuZ0Vo6B02M13T13Vq9vUhREXUrfVCRdIeZuPru83KIzG5QSWkaD2Wf3TsxTuAx19IYwj3RZQVUpZSZScyUys8WhhBHeFkjpYDRGpTjJr6FqQUpJjw2BWUIHh2gPGqNAVIQF1vhbeo0SrJIS9we6sWlwmYhWVRnO+ihf0Z+CDA41/ifnPYgPeALy4FW6gs5Qp3sF29nY4pzwlJGVlnSi2pN6LrmTLkzykJaIuPclMDklrbJ X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0501MB2036; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0501MB2036; X-Forefront-PRVS: 0452022BE1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(189002)(24454002)(199003)(83506001)(6916009)(25786009)(50466002)(305945005)(2950100002)(53936002)(1076002)(33656002)(50986999)(58126008)(16526018)(54356999)(9686003)(101416001)(5660300001)(105586002)(76176999)(47776003)(66066001)(6666003)(7736002)(6506006)(97736004)(55016002)(229853002)(81166006)(81156014)(8676002)(2906002)(6116002)(3846002)(68736007)(6246003)(23756003)(316002)(2870700001)(8936002)(86362001)(189998001)(106356001)(478600001)(98436002)(4326008)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2036; H:yongseok-MBP.local; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1; AM5PR0501MB2036; 23:jl67EAbpWe2W8cz0yBBGVREkWvs7qo5xjTvn6?= =?iso-8859-1?Q?pqd/oksgEgHTdmEj3YGII6GFBST4GijpPP3Rt2c3fZarr1f1o872JJIvcQ?= =?iso-8859-1?Q?nxTEy7e6DesgqKdUthEgBuHv0/N4V3reIAHeXTmbNciERNiMQhjTyGtiyZ?= =?iso-8859-1?Q?N/ARcWdRKSiyGyaAPSC5bWr3uPKC1oWuDsxQfNl8Z6rdJS71UJ4Npu1Vpf?= =?iso-8859-1?Q?DdbVMCX2pwd3q9njWWRUuM0/BFtmd5379skDCKWtJUSQecip/h6GkpLJQ3?= =?iso-8859-1?Q?WDcAEKMQkf8oZjUON3swdxpHL5a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dxi?= =?iso-8859-1?Q?gJ3QGN26zC4QDR+viLqE+xnNY0WLHIZF5e5TNDkCQsd1ASeBulTfYVSjxs?= =?iso-8859-1?Q?SaCLf8Guu8sShhQGJ5v?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 6:wFGH+BA61/qCYznG+kpWhTXKEMwtcaw7cSftyLzJB469T/qwEFH0ic8v2N05u6IIVYRNXo4l8bJyjIMV/fQTzOFWb4xnjgcGIIkDrITzJDkBH0ZRDL045dgU3yosNG9B8CdRyqkzEiZMlrejoLan13zj8LGqV2bjqQx9HyaNOLCEoxpOI1Gh/sCQcqjpAwHCZv1TFu+hMzdHkMpLh8VICz0Ii/rxnrDfw6V3P1b3ZP6SIXRuFBqqzW3AqZgGmGXcdxGZdFU59gf4ROVxyS3TQFHmSFcpP2coSCkdptTcDeDdApZeZik8t8IDeni6g/WgEszHs3b/u84+cjDtnXPe9A==; 5:pHu4rmBsorb+B2E4XVTuwg1mMfjAWe4LapqnBj28uC8cuUuuLcaoNQHHvKft+9nQ9+1gHDD+DYYHBFZG7uPlhGf9H20FgqzR4h9U8G4tMn9llAUxqrWgZ6DzGiRQkagyloW0k6elQDa3ScOf4LDpwQ==; 24:m+RyLxOIzqCGgME1IVTKcSjeE43vMrPehY2+NJ0tV06Yq+Eei7MZESLxPDK0XK9o3/K/CHyvqlXd/QcYWMdaunTbbQUxlsIVU0hdQ0Dfxms=; 7:+XbRf150gjGI2ixXR8PXve/Q2OfcuXdwjCpeaWQvBTc0kd/5xk1Gf+1O7shnu25/ul3QG7KesuWutyg0SkeXHuLa6P/EQfHdifaF8ziQmYr/+CjaAIXRwI+3yAghe2rsqBkFHpVlZj57z18mEW/jz6QL6qVa1k6iYIgOd7w5u2c80GmPcPnml1Hk8mxViiH839MA2NM36RrNL9czMdN0PJZ4HaGbMMES6Rjf5SQPFC4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2017 05:00:16.2031 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2036 Subject: Re: [dpdk-dev] [PATCH v2 15/30] net/mlx5: add Hash Rx queue object 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: Fri, 06 Oct 2017 05:00:19 -0000 On Thu, Oct 05, 2017 at 02:49:47PM +0200, Nelio Laranjeiro wrote: [...] > +struct mlx5_hrxq* > +mlx5_priv_hrxq_get(struct priv *priv, uint8_t *rss_key, uint8_t rss_key_len, > + uint64_t hash_fields, uint16_t queues[], uint16_t queues_n) > +{ > + struct mlx5_hrxq *hrxq; > + > + LIST_FOREACH(hrxq, &priv->hrxqs, next) { > + struct mlx5_ind_table_ibv *ind_tbl; > + > + if (hrxq->rss_key_len != rss_key_len) > + continue; > + if (memcmp(hrxq->rss_key, rss_key, rss_key_len)) > + continue; > + if (hrxq->hash_fields != hash_fields) > + continue; > + ind_tbl = mlx5_priv_ind_table_ibv_get(priv, queues, queues_n); > + if (!ind_tbl) > + continue; > + if (ind_tbl != hrxq->ind_table) { > + mlx5_priv_ind_table_ibv_release(priv, ind_tbl); As one hrxq can have only one ind_tbl, it looks unnecessary to increment refcnt of ind_tbl. As long as a hrxq exist, its ind_tbl can't be destroyed. So, it's safe. How about moving up this _release() outside of this if-clause and remove _release() in _hrxq_release()? However, it is logically flawless, so Acked-by: Yongseok Koh   Thanks