Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1192657rdb; Fri, 20 Oct 2023 10:55:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETQJa6L2++uAcrqL7U3H8NqJWKL4bwn4kaD86vbi21+7lD7zVub65t7mo9k5M2wm80AKoZ X-Received: by 2002:a17:903:1212:b0:1c8:90bf:4239 with SMTP id l18-20020a170903121200b001c890bf4239mr2788938plh.42.1697824558514; Fri, 20 Oct 2023 10:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697824558; cv=none; d=google.com; s=arc-20160816; b=DRUJCU4oidrNMPW58BIL6QM5WPCddtl6+MGCcNpj78v3jdj52KNsUH27ASs7auJhVq F6aYhyD34ILC9CUP+79eh3qoEd9bfkg2BrMBw3V+zaTyvCG4C2uapQ/fPs7T1zBOj1cL eAUZ2dJUkgRZcNpDCWm7UF7KtAZitb1arOiH4xZj5V3coyRdTlZqk6ND/RsFyOn9i+pL Zg2SfF+sEvMVEVfKEFVWx7bMmyMaC57NtShXbWjnwvq68CQqNEJscxhFO8nN9c+lroP9 AMn/cLkRAIZls9HYG4Fxgcf2l/0AdOxOgd6UAPJGdd+bg0xjxrbrbQvG9P5uspnX4GkY 8FJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BOWLSD2l5bjQv4ZzCCDRm5mQEJBRkMlu+6qGBWgWZKQ=; fh=m7qGrULpotawxbnMf2bc7Lw5Ji/HRcis1zLj2Z2XN24=; b=XRpEVa0xFMXosM3CC+hRRlcY7uNvS0qo8tWHEgooPsE09Sn4a4hMGeLG1rmF/3YtzS gjgZorZn57o3JFtVaW2ZSPslW3QBxneixgRK6Vs+F+ZobvvlasGgp4qoRVEfVCsC7By5 kNuC7uYnR3tcu1MYh/8NOB51LclEmRiRp6Qkq8ouaqvdFL616uL9uibZ82TLfrwsRD1C nP+Dw4CWUbTgitm3kfPrSqNLVoIvFxxz1T15vR/fAaLK6ZhkBIOsEzkTzeMLeF+NkrWm hMmlewRPWD6QXmoDy1F+goRjQr2Ypz3GHCAr2iPS4A44AopfjAmZYbxcfcZ0/pqUtLP9 LEvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GE8f/aJB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id x8-20020a170902ec8800b001c9d37ed06csi2385934plg.389.2023.10.20.10.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 10:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GE8f/aJB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 02E9F8083AA3; Fri, 20 Oct 2023 10:55:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377979AbjJTRzm (ORCPT + 99 others); Fri, 20 Oct 2023 13:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377976AbjJTRzk (ORCPT ); Fri, 20 Oct 2023 13:55:40 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD6ED55; Fri, 20 Oct 2023 10:55:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 954CFC433C7; Fri, 20 Oct 2023 17:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697824538; bh=6utHZ9+NrAIuuZw1d4OnIC9m1KlbuOC3s+8qq8dWbjg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GE8f/aJBsQX15JtYK3XWsfMDwaNMwSWbr31ddKKB7XFNEHWDL17LaNbqM8JZipEYW 9b1WxxIQYYKRQ9lfVKjL7GNKZnbkoAsgud9JeMXsCGdDVTHLNuY93njZCxoa/yJ9Pp S+lD+S2qBZXYmqfpIw933Rl+xBbEssCvOjrwqvTZW1QPGwoU3fP/Z/x8wQYu6wslMK Sez14bJzduxCCrvAKCwnbM0L8aBh6MsE6+fSlUcrtATvqwocGi9sdoyJ6EiMsnXDTh +if3gxc3gonSFzffq4Fj9lfHzRBlCgMZiHjA1UTRPR8yeS0E17uB4YCrjzTdTA4xFO HzmX2VJZLmJTw== Date: Fri, 20 Oct 2023 23:25:27 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: manivannan.sadhasivam@linaro.org, aisheng.dong@nxp.com, bhelgaas@google.com, devicetree@vger.kernel.org, festevam@gmail.com, imx@lists.linux.dev, jdmason@kudzu.us, kernel@pengutronix.de, kishon@kernel.org, kw@linux.com, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lorenzo.pieralisi@arm.com, lpieralisi@kernel.org, maz@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org, tglx@linutronix.de Subject: Re: [PATCH v2 5/5] tools: PCI: Add 'B' option for test doorbell Message-ID: <20231020175527.GD46191@thinkpad> References: <20230911220920.1817033-1-Frank.Li@nxp.com> <20230911220920.1817033-6-Frank.Li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230911220920.1817033-6-Frank.Li@nxp.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 20 Oct 2023 10:55:56 -0700 (PDT) On Mon, Sep 11, 2023 at 06:09:20PM -0400, Frank Li wrote: > Add doorbell test support. > > Signed-off-by: Frank Li > --- > tools/pci/pcitest.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c > index 441b542346354..215d0aa8a09fe 100644 > --- a/tools/pci/pcitest.c > +++ b/tools/pci/pcitest.c > @@ -36,6 +36,7 @@ struct pci_test { > bool copy; > unsigned long size; > bool use_dma; > + bool doorbell; > }; > > static int run_test(struct pci_test *test) > @@ -149,6 +150,15 @@ static int run_test(struct pci_test *test) > fprintf(stdout, "%s\n", result[ret]); > } > > + if (test->doorbell) { > + ret = ioctl(fd, PCITEST_DOORBELL, 0); > + fprintf(stdout, "Push doorbell\t\t"); "Ringing doorbell on the EP". - Mani > + if (ret < 0) > + fprintf(stdout, "TEST FAILED\n"); > + else > + fprintf(stdout, "%s\n", result[ret]); > + } > + > fflush(stdout); > close(fd); > return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */ > @@ -174,7 +184,7 @@ int main(int argc, char **argv) > /* set default endpoint device */ > test->device = "/dev/pci-endpoint-test.0"; > > - while ((c = getopt(argc, argv, "D:b:m:x:i:deIlhrwcs:")) != EOF) > + while ((c = getopt(argc, argv, "D:b:m:x:i:BdeIlhrwcs:")) != EOF) > switch (c) { > case 'D': > test->device = optarg; > @@ -224,6 +234,9 @@ int main(int argc, char **argv) > case 'd': > test->use_dma = true; > continue; > + case 'B': > + test->doorbell = true; > + continue; > case 'h': > default: > usage: > @@ -243,6 +256,7 @@ int main(int argc, char **argv) > "\t-w Write buffer test\n" > "\t-c Copy buffer test\n" > "\t-s Size of buffer {default: 100KB}\n" > + "\t-B Doorbell test\n" > "\t-h Print this help message\n", > argv[0]); > return -EINVAL; > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்