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 EC0FE41C12; Mon, 6 Feb 2023 15:29:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B180427E9; Mon, 6 Feb 2023 15:29:11 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 562CE40FAE for ; Mon, 6 Feb 2023 15:29:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675693748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=K/oPOw1Zjtt/F4FY3n5f8TD8ZsNkKYjITu6WYfGx+pk=; b=Dm3E08wP+EqEvUc26j5mTgUIaI5SbOYpGi1rJTwsBA11sdieH+3N+4Bgdhq549kk5wx6nU 1eIRp3GIx8MtjFtTPb+9I9blHWh5EydtDFA4o0AYnef6cokxUsKjc6/AarBv5Eu1TLlW6R daC77PHkbdFjWwtfaPf0ZNC49M7J1/E= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-27-8JZbUKE-MZGGYAv2bz3pMw-1; Mon, 06 Feb 2023 09:29:07 -0500 X-MC-Unique: 8JZbUKE-MZGGYAv2bz3pMw-1 Received: by mail-pj1-f71.google.com with SMTP id h1-20020a17090a470100b0022646263abfso4730390pjg.6 for ; Mon, 06 Feb 2023 06:29:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K/oPOw1Zjtt/F4FY3n5f8TD8ZsNkKYjITu6WYfGx+pk=; b=KEJrT0pHNlT72gXEc7+52XYbm9Abb8Xbw3jb5z/qZUpZIs4nQChbvWM0i6xbihiJTt kHJybj6US2roBxNLSc1g8b7S8YTLMY3wBKBPGxQl6JRhyI1oaPSvnOIrVzpBxCa86m3f h3O6WxgkR/ULm+1zKMJuyxt1EZ6scxNIhl2hY5o1f1vLozmp9/jpU+Z4KEdIwul5MTw4 1PPKViIL8EC/dei9ghuFyRwIJ4QaUc6VyYvu1n4bybT8EqWNe4k142aV4uSPnjFDAgGq EifJIYpbgE2gZ+H8prC3rVCqz4F+9nRimltsR78JnfuZtBNpSCF5+PWIAmfwyGnLLtFF PtiA== X-Gm-Message-State: AO0yUKVUScP7SrSecPFVQ8hRQz5O/4mQGczPXJRa8nS/J+9pqVlldOay a0jH7CUtuVcqlLb5P58zWD66Tq2oQK3NZ7tJ7U9NCDSRN8mD1GcNloXFF5GDbczLvKvUr02rWGx 24f8bISZSsrpVIdVHyvU= X-Received: by 2002:a17:90a:9f91:b0:230:b57f:5229 with SMTP id o17-20020a17090a9f9100b00230b57f5229mr855545pjp.68.1675693746285; Mon, 06 Feb 2023 06:29:06 -0800 (PST) X-Google-Smtp-Source: AK7set8IIsG+Tb56SECedXijR/Old9xd476ndsBVJwbNcUwgopt/cTulOFGH04QYIZADQ9kaHvWDGM42o54GySaEtis= X-Received: by 2002:a17:90a:9f91:b0:230:b57f:5229 with SMTP id o17-20020a17090a9f9100b00230b57f5229mr855541pjp.68.1675693745907; Mon, 06 Feb 2023 06:29:05 -0800 (PST) MIME-Version: 1.0 References: <20230125103809.1250080-1-tduszynski@marvell.com> <20230205183832.842668-1-tduszynski@marvell.com> In-Reply-To: <20230205183832.842668-1-tduszynski@marvell.com> From: David Marchand Date: Mon, 6 Feb 2023 15:28:54 +0100 Message-ID: Subject: Re: [PATCH v2] bus: add platform bus To: Tomasz Duszynski Cc: dev@dpdk.org, Thomas Monjalon , chenbo.xia@intel.com, jerinj@marvell.com, stephen@networkplumber.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Sun, Feb 5, 2023 at 7:39 PM Tomasz Duszynski wrote: > > Platform bus is a software bus under Linux that manages devices which > generally do not have built-in discovery mechanisms. Linux normally > learns about platform devices directly from device-tree during > boot-up phase. > > Up to this point, whenever some userspace app needed control over > platform device or a range of thereof some sort of driver being > a mixture of vdev/rawdev was required. > > In order to simplify this task, provide an auto-probe > experience and separate bus logic from the driver itself, > add platform bus support. > > Currently devices backed up by vfio-platform kernel driver > are supported. > > Signed-off-by: Tomasz Duszynski > --- > v2: > - take a step back and do not add eal changes that simplify parsing > sysfs string. That should be moved to a more generic library and > submitted separately. > - compile code conditionally based on VFIO_PRESENT I must be missing something, but in the form proposed in v2, this won't work, see below. [snip] > diff --git a/drivers/bus/platform/platform.c b/drivers/bus/platform/platform.c > new file mode 100644 > index 0000000000..9f06327b77 > --- /dev/null > +++ b/drivers/bus/platform/platform.c > @@ -0,0 +1,632 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(C) 2023 Marvell. > + */ > + > +#ifdef VFIO_PRESENT > + VFIO_PRESENT is defined in rte_vfio.h and nothing else defines it. So the rest of this file is a noop. What did I miss? So either you need to include first, or we could move the VFIO_PRESENT detection stuff from this EAL header, to meson. I did not look further into this patch, since this added code is probably not tested (since not compiled). -- David Marchand