From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751394AbdK3WhQ (ORCPT ); Thu, 30 Nov 2017 17:37:16 -0500 Received: from ale.deltatee.com ([207.54.116.67]:50228 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbdK3WhP (ORCPT ); Thu, 30 Nov 2017 17:37:15 -0500 To: Serge Semin , jdmason@kudzu.us, dave.jiang@intel.com, Allen.Hubbe@emc.com, Shyam-sundar.S-k@amd.com, Xiangliang.Yu@amd.com Cc: Sergey.Semin@t-platforms.ru, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org References: <20171130214300.21298-1-fancer.lancer@gmail.com> <20171130214300.21298-2-fancer.lancer@gmail.com> From: Logan Gunthorpe Message-ID: <5f9198e4-24d4-88f5-89d2-d36c5afa76ef@deltatee.com> Date: Thu, 30 Nov 2017 15:37:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171130214300.21298-2-fancer.lancer@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Sergey.Semin@t-platforms.ru, Xiangliang.Yu@amd.com, Shyam-sundar.S-k@amd.com, Allen.Hubbe@emc.com, dave.jiang@intel.com, jdmason@kudzu.us, fancer.lancer@gmail.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH 02/08] NTB: ntb_test: Add ntb_tool port tests X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/11/17 02:42 PM, Serge Semin wrote: > +function find_pidx() > +{ > + PORT=$1 > + PPATH=$2 > + > + for ((i = 0; i < 64; i++)); do > + PEER_DIR="$PPATH/peer$i" > + > + check_file ${PEER_DIR} || break > + > + PEER_PORT=$(read_file "${PEER_DIR}/port") > + if [[ ${PORT} -eq $PEER_PORT ]]; then > + echo $i > + return 0 > + fi > + done > + > + return 1 > +} Actually, per my earlier comments on other messages. I think it would be best if each of the patches in this series also included the relevant changes to ntb_tool. Then just ditch the ntb_tool patch. For example, this patch would include adding the "port" file to ntb_tool and the relevant test to ntb_test. Otherwise, when the ntb_tool patch is committed, the ntb_test breaks and then is fixed in subsequent patches. In an ideal world, this would be avoided in case we ever want to do a bisect involving ntb_test. Logan