From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DBDCFA0526; Tue, 21 Jul 2020 13:29:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D33F1BFF9; Tue, 21 Jul 2020 13:29:44 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id F11D71BFE7 for ; Tue, 21 Jul 2020 13:29:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595330981; 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=Bu1tdThe0XYNtz6+mrkMzHWRZXq0LfEKA60vNjLxCF8=; b=gFtnItlBQuv+Ats0dWCUjWD+aAo1PGV8vfuCzOLY1k4z4uz/QQDslay0FQo8aWvhJVmi2u NOxv/OTGYEJcoAvZkueX1msWJNk5wvD4h/1ANX2J+1RFnMLQsDAWeYYPYvnGWigTXN7BN1 g0z6yjdSopWZgcVojXBaffr3w2pPwDg= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-481-USeI0XXTOY-du2A13tnCig-1; Tue, 21 Jul 2020 07:29:39 -0400 X-MC-Unique: USeI0XXTOY-du2A13tnCig-1 Received: by mail-vk1-f200.google.com with SMTP id b128so8160838vka.17 for ; Tue, 21 Jul 2020 04:29:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Bu1tdThe0XYNtz6+mrkMzHWRZXq0LfEKA60vNjLxCF8=; b=ldwMEAi6pM3kv2kqHGg3sxPYmhFDHSw/TD1QJrbhsN0QpjRG7nVvWWluTxy3CjDe9J QWwCG9REWfi/FSqaOHwLpxA+74i/kqSWuEt4La3P9z+btPNpJMz7jt/Fc98arTWhws2c 8TAaUUij2hbR6Xn826Twfpbiu5Fv0v6B1VbDE2/hdaY8qfy0pjpKtZStqkI0vjUj7vcI lYeX89t/ppe+t/9Yd6FWCEAF0eXOxOSdjBfEZwWuhM5XrZlN8dgZsNgdvYwY0V868SJx 3THjqJf0EOT8Z+ZhrTacrD+1jguqTBwuBoU9EJSenasoJHcOhMhKWrWSt7+hpWbI9ekv 9VXw== X-Gm-Message-State: AOAM5339zTtQ0hsQYCbGHQmzaid+HPNKJ0zsep7QrmbHIKSeJD1fo8DS 69Qk+P3AuGgjkX2Hzg1VEu0Gkd3zeUF0gE531oh09ILAB/Wkui3P53cuToa/T/wxWHbRzOA78+8 TH63eqT1+/X1hZbaazYc= X-Received: by 2002:ab0:316:: with SMTP id 22mr20077950uat.41.1595330979141; Tue, 21 Jul 2020 04:29:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSr+NskxSvmgcgGN9OM2aR2Wi+BK0knLsXabwS+GNRHGvXwIee5Z/ERibw/Mp9Bc0vps1o7mn5fMQZKUwTwlY= X-Received: by 2002:ab0:316:: with SMTP id 22mr20077911uat.41.1595330978149; Tue, 21 Jul 2020 04:29:38 -0700 (PDT) MIME-Version: 1.0 References: <20200610171728.89-2-parav@mellanox.com> <20200717134924.922390-3-parav@mellanox.com> <2791231.CMBUAsGlKG@thomas> In-Reply-To: From: David Marchand Date: Tue, 21 Jul 2020 13:29:27 +0200 Message-ID: To: Parav Pandit Cc: Ori Kam , Thomas Monjalon , Ferruh Yigit , dev , Gaetan Rivet , Raslan Darawsheh , Matan Azrad , Joyce Kong X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v7 2/9] eal: introduce RTE common initialization level X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jul 21, 2020 at 1:19 PM Parav Pandit wrote: > > This way, net/mlx5 and vdpa/mlx5 will pass their id_map to the mlx5 > > pci driver whether it is registered to the pci bus or not yet. > > And here pci_id_table will not be const *. > Is that ok? This is already the case in the current patch. I see nothing wrong with it. The pci code expects this pointer to be const and will it treat it as such. On the other hand, you may remove the pci table exported by the common driver as it is useless. pmdinfogen only parses the .o and extracts the table symbol, so it won't load other mlx drivers to generate the .pmd.c file. I.e. with current patch, $ ./usertools/dpdk-pmdinfo.py ./build/drivers/librte_bus_mlx5_pci.so PMD NAME: mlx5_bus_pci > > Basically mlx5_pci_bus, mlx5_net and mlx5_vdpa will be called with same > priority RTE_PRIO_LAST. > driver id table and drv_flags dynamically updated as PMDs register. > > Should we have another API after rte_pci_register() to indicate that > some field of the driver are updated, instead of just silently updating > it in a PMD? All of this happens in constructor context, this is a really early stage used to resolve code dependencies. No big init should happen there. We can document this use of the existing API but I don't see which API to add. -- David Marchand