Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp149655rdb; Wed, 20 Dec 2023 08:30:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvXE0qrtwj0fcCCI7jMXLWs36w8Wajmk30D0IyJFh2Vt+BpizxPtK/PTPDMJi/e1IjPa7e X-Received: by 2002:a05:6a21:35c4:b0:194:11d2:a076 with SMTP id ba4-20020a056a2135c400b0019411d2a076mr9478514pzc.118.1703089801014; Wed, 20 Dec 2023 08:30:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703089800; cv=pass; d=google.com; s=arc-20160816; b=PtN24Ds78X/PFIGl2BSYHjDkkR3YyKpEGSPEHBoeXw7INC67/RTajjdsSjaNgWPZ5o REwu2m4AESFrn3Q8hfs8k0R8WVN2qMfG0vTnBZelQLpipaKiJyia0Ta8KGD/jewWtOkc V8I3YmrtlvImFqdAEWyuEzAlRQQCPwNDrU6x0odqNGuG5O4LKWO5FrrsnwPrA5DLlMq/ i+iOU425AN4e9GYpHIBdFwfK6IbElIpdIM9ebnUiRubf4nMGXjLwGpvgwnG1GGCjPibP wUPMvC2/cwfKudjwgy3Q9lZi96L028mbkvLCXWRnJvbmlPHne1yVwzJIrl9BDsX1dY+D UgTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:content-transfer-encoding:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rvPvseM7dgEG7mNeUDnPHQo3HTXHE7gYYkg46vgR5EE=; fh=YSkjxn5C+prHAmqHiYt7W9iYT2gKJxGX6lI4LNnOvns=; b=WxWb73yrYGx25tOantsLS/kSYFvbgNTXFwSXjAHwUO/QcXFIpxPLsEjd2Znq35Bnjk QEFhhPgSTbUrQFwrM2+4Y4SaaPm+4AaTxiNQiyOTOAS2wZ1q9HQgm68UfQWVBSHvgpDe 9e15aFvoIgqwp9t5OLzBHEYGnKPl17sH3uI8G1ZQrXbytj+kWjy1S1V4Hi4lsSLQ8rZz Yh26IXUkszq2zqILITToX1SIIaGrPnjnsz4RCaTXJOtwxkQjViZOMwgWdARvVugURc9O pL58lEVd0ylbUIeDyDizervKUSFNUa4jUuCw0xZTWuSHpvgHbZYmFMVbIacjnaDEf3DY fOfA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=oxy7D9rJ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-7293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bn1-20020a056a02030100b005be3683ec6asi823306pgb.184.2023.12.20.08.30.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 08:30:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=oxy7D9rJ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-7293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C5E99289366 for ; Wed, 20 Dec 2023 16:27:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A95174A996; Wed, 20 Dec 2023 16:24:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="oxy7D9rJ" X-Original-To: linux-kernel@vger.kernel.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060.outbound.protection.outlook.com [40.107.22.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE9374A983; Wed, 20 Dec 2023 16:24:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kMYueK81vruFRKiZT5vEbK0daQ6X3ifFt0tDyw0yPViOznm+mdgAiIOasX7eLCvR/+Uc/bRJXCyV1xYn26nIy5HfDqtQ6ev0wLYbWkHnq8ZnvsqJbpiWOpZEZweh04wU4p45+a00vZ7+3lSu3Lct8KPUAXGoEeGwgjtsp9VEhXD4cLH8NQQwiI1X1oqx/qxBCkrX7TQUrDtVljAtSi/kMAVTXDfUEcqw0TOy65zeafQT6HRC7fnC7GLMgPZNiCIMskqR/ifC09/sfnyE4PkvnExwOfY4k+9Wqpo3a2OKCoassuQ0V0Q86lBAMEcKTv3BMtLUTDksjCGReT7ed12+sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rvPvseM7dgEG7mNeUDnPHQo3HTXHE7gYYkg46vgR5EE=; b=It8kpmWIkKmiHCxUw+hIt6y0FaJdWIMi3PmLSX9gMbsma+OnzZdn5zSGqsZtKXwsgxLcy6F5c2217UrWsyoBDSCIa1FFcmNnfC6S5Qf3yOuNCyTCOZCso/3BjJY9ttMno0KNjrkaXkp9jpAOD5qDUKHlt2CoO3/fOFJhbBzmBVLU7EdNeoWbQujm83M9ByqPbqwTkiNFgkQmjVSGTahQJUIVxc8CgY9nsK0+b5PBEJTXssv0If10TcxTrV/nwkD9QaaR0ryKwqXD8ed7rrFD1B+0BLJO5LOZcuKRjtPZyK+uucqehJ8691UhjOq+TD7/GWKoPMPfE6qQ+BvIlhMrCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rvPvseM7dgEG7mNeUDnPHQo3HTXHE7gYYkg46vgR5EE=; b=oxy7D9rJoyK1rutC2lPCtLD3pPLUrS3dtdu1V1gghj/aCC/Kf09XtwOcc9Eb7OA5dMsZ6cn7myTdeEfFz4eC01IYrUuKAG3uAykO1MSnA/hD8Znb5bzBKYwwYWwMbU5MK3XZyJjZY+g1IExDRKWNet8RGJNxh53w1/tuJgByBDM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU0PR04MB9494.eurprd04.prod.outlook.com (2603:10a6:10:32e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.18; Wed, 20 Dec 2023 16:24:25 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::95f5:5118:258f:ee40]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::95f5:5118:258f:ee40%7]) with mapi id 15.20.7091.034; Wed, 20 Dec 2023 16:24:25 +0000 Date: Wed, 20 Dec 2023 11:24:18 -0500 From: Frank Li To: Manivannan Sadhasivam Cc: allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, imx@lists.linux.dev, jdmason@kudzu.us, kishon@kernel.org, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: Re: [PATCH v2 1/1] PCI: endpoint: pci-epf-vntb: Fix transfer fail when BAR1 is fixed size Message-ID: References: <20231219142403.1223873-1-Frank.Li@nxp.com> <20231220142736.GE3544@thinkpad> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231220142736.GE3544@thinkpad> X-ClientProxiedBy: SN1PR12CA0063.namprd12.prod.outlook.com (2603:10b6:802:20::34) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU0PR04MB9494:EE_ X-MS-Office365-Filtering-Correlation-Id: 92c46b32-d9ae-484e-6fee-08dc01782177 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QHjkBaZQ5nyI9Edlnder5OM92R1B/BoChoI0Rt7rnk+RqSmN7mrkjRaeVyIKJfpNWA8RiB0xyNRClxwfL1V3w0yK3jr8slxDn+8SSzs+RL1AoD9GWvo2xVvgOfA8ieWoPWTUoPq+NKykqGgHOlwpHEO+YWdvl77ttPldB7ecOrAeNuPlCI1/fDtAwu7m4S3+hxhdzW95D+fr+SyuN2Zc1K9OK9QLEubyYKzuyCaia9QPMkIr+hUqmiNbiZgEkbJMeA42m8K3foQU9wMHaAwn/kSwzBlORFCPtN4DWErzMwoXjTR3FpYRjqTW5Uk8YZSDvAiq/beAbbRrkTv4hXvML6IKjnzywWFPc9K1JJQfjIkKBcgekC2MaA6UnIewS+Dwvn2QfAnh5zTb+szPpE8LoPn61oQPes54hfA7tSjABjwgazgdufW22SY1JVOVV8SIY979sn4vCBXeLQwnrjW09euF9S5rbFFcJQVwspRiyOKOF09UYnkkxLNzpdyJzsKM60D7UnfwoNwsbt7nhpwBqe9TvFb9saeT7gdwPAj+oiktVS69UJrcQncQx6401H/nRk8Lf8XYY1yWlmMNzSKYafPz5G635fu6k25NsDYHfz3RQ+USRTxW6JkmZCOWd42n X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(396003)(346002)(376002)(366004)(136003)(39860400002)(230922051799003)(186009)(64100799003)(1800799012)(451199024)(9686003)(86362001)(6512007)(6666004)(6506007)(478600001)(52116002)(26005)(6916009)(316002)(66556008)(66946007)(66476007)(6486002)(83380400001)(38100700002)(2906002)(7416002)(8676002)(5660300002)(4326008)(8936002)(38350700005)(33716001)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dmZZRENpcVRSa1c5Sk0wcmcxb3laV3hqdDFscFVRc1hOaFNiRUQ5aXFUV0th?= =?utf-8?B?SFRNZzUyMVE4RENqQUZOYUIyTTNEQmd0eHA5UFhwVGZkN3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JTZ25Qc2J5ZFk3SXZEcy9jeC81TWpGc2R6TVdxODk4ZlEzSzlFQmJoRkgv?= =?utf-8?B?OFZZd2EvUmFZa1d5eldHMm1SQnhvTlVvcFBuMzVOSEM0TUxQdFRMU3hDSi95?= =?utf-8?B?V2cwUkhwV2h2MVpTNkk2YnR5UjJsL21yWXlvTjlXKzZ0TlZONUdDendEZkFJ?= =?utf-8?B?VmsyUy83YXRmdVpxb2s2NTJ1S0NQd0srWjZZMk51bFVEQjA2c3FIN3NDOER1?= =?utf-8?Q?6Ikc=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92c46b32-d9ae-484e-6fee-08dc01782177 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2023 16:24:25.1248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5dGuqjSEE4FgHc33TdFtlpWrbyNQ6tc5L1fS2RZ4zyZXkHRFUOmXEoFM5hsMkNvNGYnBFeLbWVtlz/B1Pb2Ttg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9494 On Wed, Dec 20, 2023 at 07:57:36PM +0530, Manivannan Sadhasivam wrote: > On Tue, Dec 19, 2023 at 09:24:03AM -0500, Frank Li wrote: > > ntb_netdev transfer is failing when epc controller's BAR1 is fix size, such > > as 64K. Certain controller(like dwc) require memory address must be align > > with the fixed bar size. > > > > For example: > > If BAR1's fix size is 64K, and other size programmable BAR's > > alignment is 4K. > > vntb call pci_epf_alloc_space() get 4K aligned address, like > > 0x104E31000. But root complex actually write to address 0x104E30000 when > > write BAR1. > > > > Adds bar_fixed_size check and sets correct alignment for fixed-size BAR. > > > > Change looks fine by me, but I have a hard time understanding this commit > message. > > The change just checks the size of the doorbell BAR if a fixed size BAR is used > by the controller and uses the fixed size. In the commit message you are talking > about alignment and root complex writing to the BAR which are just confusing. > > Please reword this commit message to make it understandable. Maybe I talk about too much about it. Actually, supposed it should work if use fixed-size bar(64K), which actually only mapped 4k, if RC only use 4k also. "copy from dwc spec" But dwc iATU IATU_LWR_TARGET_ADDR_OFF_INBOUND_0 11-0 LWR_TARGET_HW Forms the LSB's of the Lower Target part of the new address of the translated region. Forms the LSB's of the Lower Target part of the new address of the translated region. The start address must be aligned to a CX_ATU_MIN_REGION_SIZE kB boundary (in address match mode); and to the Bar size boundary (in BAR match mode) so that these bits are always '0'. If the BAR is smaller than the iATU region size, then the iATU target address must align to the iATU region size; otherwise it must align to the BAR size. A write to this location is ignored by the PCIe controller. - Field size depends on log2(CX_ATU_MIN_REGION_SIZE) in address match mode. - Field size depends on log2(BAR_MASK+1) in BAR match mode. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For fixed size bar, BAR_MASK is fixed value. If pass down a 4k aligned address to iATU for 64K fixed sized bar, some address bits will be truncated. Hidden some hardware detail, do you think if it is enough? "ntb_netdev transfer is failing when epc controller's BAR1 is fix size. Adds bar_fixed_size check. If require memory bigger than BAR1's fixed size, return -ENOMEM. If smaller than BAR1's fixed size, use BAR1's fixed size." Frank > > > Signed-off-by: Frank Li > > --- > > > > Notes: > > Change from v1 to v2 > > - Remove unnessary set align when fix_bar_size. > > > > drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c > > index 3f60128560ed0..ec3922f404efe 100644 > > --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c > > +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c > > @@ -550,6 +550,14 @@ static int epf_ntb_db_bar_init(struct epf_ntb *ntb) > > > > barno = ntb->epf_ntb_bar[BAR_DB]; > > > > + if (epc_features->bar_fixed_size[barno]) { > > + if (size > epc_features->bar_fixed_size[barno]) { > > + dev_err(dev, "Fixed BAR%d is too small for doorbell\n", barno); > > + return -EINVAL; > > -ENOMEM? > > - Mani > > > + } > > + size = epc_features->bar_fixed_size[barno]; > > + } > > + > > mw_addr = pci_epf_alloc_space(ntb->epf, size, barno, align, 0); > > if (!mw_addr) { > > dev_err(dev, "Failed to allocate OB address\n"); > > -- > > 2.34.1 > > > > -- > மணிவண்ணன் சதாசிவம்