Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950AbdLETie (ORCPT ); Tue, 5 Dec 2017 14:38:34 -0500 Received: from ale.deltatee.com ([207.54.116.67]:52548 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbdLETib (ORCPT ); Tue, 5 Dec 2017 14:38:31 -0500 To: Jon Mason , Serge Semin Cc: Dave Jiang , "Hubbe, Allen" , "S-k, Shyam-sundar" , "Yu, Xiangliang" , Gary R Hook , Sergey.Semin@t-platforms.ru, linux-ntb , linux-kernel References: <20171203191736.3399-1-fancer.lancer@gmail.com> <20171203191736.3399-11-fancer.lancer@gmail.com> From: Logan Gunthorpe Message-ID: <3fe534b5-cf62-4e7b-eb33-f19b4274156b@deltatee.com> Date: Tue, 5 Dec 2017 12:38:28 -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: 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, gary.hook@amd.com, Xiangliang.Yu@amd.com, Shyam-sundar.S-k@amd.com, Allen.Hubbe@emc.com, dave.jiang@intel.com, fancer.lancer@gmail.com, jdmason@kudzu.us X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH v2 10/15] NTB: ntb_test: Update ntb_tool DB 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 Content-Length: 1279 Lines: 38 On 05/12/17 11:27 AM, Jon Mason wrote: >> echo "Running db tests on: $(basename $LOC) / $(basename $REM)" >> >> - write_file "c $DB_BITMASK" "$REM/db" >> + DB_VALID_MASK=$(read_file "$LOC/db_valid_mask") >> >> - for ((i=1; i <= 8; i++)); do >> - let DB=$(read_file "$REM/db") || true >> - if [[ "$DB" != "$EXP" ]]; then >> + write_file "c $DB_VALID_MASK" "$REM/db" >> + >> + for ((i = 0; i < 64; i++)); do > > I'm guessing this should be a tunable variable, for those systems with > a different number of doorbells. That's actually the point of this patch. Serge is using db_valid_mask to test all possible doorbells instead of just the first 8. 64 is just the maximum number. Looks like a nice improvement. The only thing that's not clear to me is what this does: > + write_file "c $DB_VALID_MASK" "$REM/db_mask" > + write_file $DB_VALID_MASK "$REM/db_event" > + write_file "s $DB_VALID_MASK" "$REM/db_mask" > + > + write_file "c $DB_VALID_MASK" "$REM/db" It would be good to mention it in the commit message (then, as a rule of thumb, commits that do "A" and "B" should actually be two commits). Especially seeing db_event appears to be new and hasn't been discussed in any commit message. Logan