From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A9F2A4328B; Sat, 4 Nov 2023 15:01:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E32F4029B; Sat, 4 Nov 2023 15:01:29 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E01D240282 for ; Sat, 4 Nov 2023 15:01:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699106487; x=1730642487; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=ZBDXQwUwqOTboMF0p/huIzGmwh8ww0KZenh1prmHTK8=; b=hhISUBqjGFN2XU9d8EH3qmMMNzo3ObzVr0iR8WFTKVNJzAF6HWSIQvL3 ib1e3B5VUmxDqaZRjpVoWomkWGFBvLrTCeI2Ih9o1ocQLHd/aCiBklcKu bBErSIZcm9+7pbMMblr2cp+TCQroT3Dy2QbXkDOPm4PYA+6r45q5aflkS Dx0Ibdfxa6/1jWeIGL1CE+Wi1comaQek2vsEmsXddbMRyuDdBNZMVywNT OSMQjXRG2F3vKeRPa7sDKUabt2GxSuB8aHWyQ4Vl9A98gMwviCYQlkOxm mv7LeATaxvQmRkqJ2N1833JtAfgru1Vr0f/kWtsUghCT9MV1azHRjbi57 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="391955517" X-IronPort-AV: E=Sophos;i="6.03,277,1694761200"; d="scan'208";a="391955517" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2023 07:01:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="738368843" X-IronPort-AV: E=Sophos;i="6.03,277,1694761200"; d="scan'208";a="738368843" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 04 Nov 2023 07:01:20 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Sat, 4 Nov 2023 07:01:19 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Sat, 4 Nov 2023 07:01:19 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Sat, 4 Nov 2023 07:01:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k7kh7yVP0j8CmWBHEbc0QPtVaCrNUvu9A+JWIyNTBiKJa684IT8WF/7BOGJDLLVKuIB4USHp9bn62i2V1w2YGvPXmc3uxll6yBQp7704Rs606/YLdQOrfBb6tBGLSMNHGFdYk7gEzSNBhyObmxBqlo7lpXiZy7HEi0gaqNUI9quYUBGaD1XEEUHgHlBv9ZjFZaso4xIuFEFLqE5OMddDDUpYEY7o2rkLyV6Hl/2Uu0o/W5KxbPLOt/qL/CPrQOhX/Xr0MpXGt0yUAZaVzOMFaQiImRKTXYbxbfsLZQwGsWmiVphUT6b6tRL5Kbi9S29PygBdD/1VUskECoKzf+rjyQ== 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=4plwGso9NCVZUd1aIcJSZp5gdu4GpooPLH7aHXyLd50=; b=m28+T9ZkPC3eabHGCSxWrISiHbEWwZclQrKZc0aK/E/1wTjZ61hJ7in0GqxYbewOUM0u9qhAgZjlOddwGQ85jxzpn4WqikOdmSqXFkwLDe4vbvAeM+3uL+RCLFS/95OtYrfPYLBHLSi9T89cMub3ThGopoWy93a4X8/Nt8GPxRASZa598gD4+7gtS9q+RvJhITq0uMsQditKnSLYTOCUwx0FH4PM7HiXhlFF1LE79UCi+Je8Ao2J1Z1YIH31JA9Jr7GZuleGMOA6Invt7pBKBEunDe9wGBPmD2tdB3v+R+6w2uZK77h647rj4JJxTAzexKh1XNfywIBfAVn6boXlNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DS0PR11MB8665.namprd11.prod.outlook.com (2603:10b6:8:1b8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.24; Sat, 4 Nov 2023 14:01:17 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44%6]) with mapi id 15.20.6954.021; Sat, 4 Nov 2023 14:01:17 +0000 Date: Sat, 4 Nov 2023 14:01:12 +0000 From: Bruce Richardson To: Abdullah Sevincer CC: , , , Subject: Re: [PATCH v6 1/2] bus/pci: add function to enable/disable PASID Message-ID: References: <20231103182933.2831662-1-abdullah.sevincer@intel.com> <20231103182933.2831662-2-abdullah.sevincer@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231103182933.2831662-2-abdullah.sevincer@intel.com> X-ClientProxiedBy: DUZPR01CA0333.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b8::27) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS0PR11MB8665:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f47f2ce-862a-4ef3-1f74-08dbdd3e83ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QLVwh5pFKCmYzxh5UNTs94ikpLelSSCWJt+4+KXn0uB4EnsbkWR0ccUnF+IcJ+IjMl7spZmMcd1uS2RKMsGBbTHWbFnaL68Mj5D0e78AZQq4p1xefWwGe9M/m5ROPdj22i6IS5fttMmtryLyEwLXqbeaUEIcl7dImLu0R/DiyrIddMA56vuRppdkStimFD5Jprcv9vR1pH7gdk8t7Zo10Ilyf6S/Q0N1hkjb3o5eZQL6QPiq5KwT4/6cEOv0xMIiv/YE5htYllt8a0tPPk9yfZJNHy3B9t37cAaU/YO+TqWUl6lWztW7Ef+OdJtoUrWTuagmuePaFR/8R5pPMbwqDh+ddwloo3JeCAYTOmYxvBFF29VoGoyoKLVxV3TxAjsLPSOQt5oUSi3JpFJ53ET3srQjoNJVIuKWmyJym29VAt0jdkpMMCnBTYtuhqKjk6RUO1GHTqXUeM2HS7ZDYSAXJzTL8HtNczbXuT7aRfXYchdou4sVvABhYx9Nd7vY59ObWkbjA5L8X4pCfJWesNPM3wk2ObAhisYSPLljk9KjhsZCfpsYjVkYyMKp5oY+sOofMishCHJ9TFty3qzeyqY+N7CJv8ScINhUJx+GUAoj80M= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(376002)(346002)(39860400002)(136003)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(38100700002)(6862004)(4326008)(8936002)(8676002)(44832011)(2906002)(41300700001)(5660300002)(66946007)(6636002)(86362001)(66556008)(66476007)(316002)(478600001)(6486002)(6506007)(6666004)(6512007)(26005)(82960400001)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?jReqHRTJ3bliWF5XuiJdnVRgTaY6ZeDYM6GnHdPcFgZKyjSyQsS8VNp/kRKl?= =?us-ascii?Q?Npw788iZKz+k6DxsXGM4I+WWBBByvEDXDr0rRDibOF9tVs5fAsfrQEl8DXLs?= =?us-ascii?Q?Ra7/+DcHaWf+WHZ8dK049TmHPo9J7keFgYJJbkV0MBAp/ooSYjl9EyEeJL/X?= =?us-ascii?Q?jlmGaEr2OcAnqWCp1iRa0hmSDgTlRjkN73qAQIWPA4M7NNGoSxry/+PVnRvX?= =?us-ascii?Q?F8K15Eg17hgls/cJsOp56ZEh/OLIFa64hotrVWr1rompublmP/Y6mu+Z79Fl?= =?us-ascii?Q?uPI90HeabaFyKCtKMFDXFHvUlwhX209W9xtsbvE5AEN1vYRM9Qqd3lVIFshz?= =?us-ascii?Q?kqLBIHtrq/r75W1x19cdTyhKgUlPsOgFm93US3ZO0KyO8YxYkujoMeovzg8x?= =?us-ascii?Q?M5KHWCeoIWKfsD3oVlZxEdntQz1l+7GKFNoXxl+4WB6Tnm58Glz957ml19v7?= =?us-ascii?Q?U69rCdeGupbK9k75DOMH2iJkrkoN583ctyQ3wEiHwoUSQAFPA/KJOAvjE2an?= =?us-ascii?Q?57U8IggVOmuTTRaoVwGyAAReCxj4WC06hWR5WL9oYruc9CU/Lp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q2jwts6xGDpEMOmr4PYAMlmaWNf2k/z9/Ug47aV?= =?us-ascii?Q?JMCnpq5Mh5j/nUxkCn2UZ07zEonk1M1cy0jCO0Q+d5JlBRqAlcjMzQ53st5U?= =?us-ascii?Q?2g82h72CLAr1jlB8GtFA8/R8nMm9DVyRhc25EJK4BN2RDAFMLM+JC7d2yAv6?= =?us-ascii?Q?UQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0f47f2ce-862a-4ef3-1f74-08dbdd3e83ce X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2023 14:01:17.5621 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dCjW/KRL2ZGBTYKv0T51mdPjJdEy3tSruFrI31nXLB+hr/4zZHhHKLu4uCk13iCmU4sudMZEpKOVxAMTZ21ShHwHeetlLA/kRpeOeB2kODk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8665 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Nov 03, 2023 at 01:29:32PM -0500, Abdullah Sevincer wrote: > This commit implements an internal api to enable and disable PASID for > a device e.g. device driver event/dlb2. > > For kernels when PASID enabled by default it breaks DLB functionality, > hence disabling PASID is required for DLB to function properly. > > PASID capability is not exposed to users hence offset can not be > retrieved by rte_pci_find_ext_capability() api. Therefore, api > implemented in this commit accepts an offset for PASID with an enable > flag which is used to enable/disable PASID. > > Signed-off-by: Abdullah Sevincer > --- > drivers/bus/pci/pci_common.c | 7 +++++++ > drivers/bus/pci/rte_bus_pci.h | 13 +++++++++++++ > drivers/bus/pci/version.map | 1 + > lib/pci/rte_pci.h | 4 ++++ > 4 files changed, 25 insertions(+) > > diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c > index 921d957bf6..5aac2406f1 100644 > --- a/drivers/bus/pci/pci_common.c > +++ b/drivers/bus/pci/pci_common.c > @@ -938,6 +938,13 @@ rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable) > return 0; > } > > +int > +rte_pci_pasid_ena_dis(const struct rte_pci_device *dev, off_t offset, bool enable) While I realise we are now at v6 of this patchset, and the name was suggested on v4, seeing it implemented I'm afraid I think rte_pci_pasid_ena_dis is not a great name! I also agree that the pasid_set name was a bit misleading too, leaving us with a naming problem. I have two suggestions: * if we want to keep one function - "rte_pci_pasid_set_state", which makes it clear we are not setting the pasid, but the pasid state. * separate this explicitly into rte_pci_pasid_enable() and rte_pci_pasid_disable() functions. This is the cleanest solution but it doesn't align with some of the other functions in pci lib which set the state. Jerin, any further thoughts? and sorry for late feedback. /Bruce