From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by dpdk.org (Postfix) with ESMTP id F242F5F3B for ; Thu, 10 May 2018 22:18:06 +0200 (CEST) Received: by mail-pg0-f66.google.com with SMTP id w3-v6so1423840pgv.12 for ; Thu, 10 May 2018 13:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1S3bCDy8o/z0PxEnvWpJZgqsmpH8Yw+qIMqQKqVy8Do=; b=Ltn6CHcZWO8IVHBdyIK7T1Ac8z8lVi80K1NNjUkLtcwI4d+PrkLjPhs49/kwcwNEuz r7oJJ1v7zPTE0b5d/bd8JULTbHyztc/Vyo5wpCz78RfoiExoF18CEtzpueC3qEg4/Ko5 KTSu6S5k6fFh+k6iihbCl5+Nb0tallFgqCS2wQMaDifNfhop44Eup/tdwLJGPA6P9Z2Y AmD3jrTgt1130lnqBgTf1LHEx7qdBuWkPInlUgLntmweffEKq0MS7xVfW6YWqRKOyNPb qgvHFgfMtAHnxXd4B9YaaFTVjtF+tmk/tnIGsIU1LuapCk4qrIXcpXw3+/QlzrQQVk0A EEbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1S3bCDy8o/z0PxEnvWpJZgqsmpH8Yw+qIMqQKqVy8Do=; b=IqrR2R8w0L00mcAPVcFIqRuUcSb2reV2P3/SZgIQcFbh96GEUyy/RT265y0+3VIY+X 1y6YmGT8Cw6PZ7hAOF7ICZOcwJZErhElfYYtjw1UyqeXy88lUg94BbFFL36uCybR9Vci EF+2UGZ3sHiCiB2f5GwxGj7WMfe0DGinoxYs9ja8iWiUrveD0HgaxAlgjDEFQyWKSKbI Ifg2tFY9Ib5dHbdlxKWNg9K306CcKm3seUG7OjrO5nanXK0VMLBL8jZxYe0kGuSsbF25 v+/oueIzIBrGbYJnBKiXsSejct8LlPhFY5Aj7mv3r5cbfkZIQ5CcSAEuJTy7zsmVSNpr ggdw== X-Gm-Message-State: ALKqPwe0fLlraakVwcR6n1l0Cy9mmX5hHxn9u5hI40GkJjKO5hLkf0B3 Bed7uBuPcEKrDk9elRpkWjwKmQ== X-Google-Smtp-Source: AB8JxZonlc30wBjNJoAffkx8DrHIGQiAhLMXEpApWTxRbLdV4lXNtS/Jo4V63UKoGwpVug9gGLxg+w== X-Received: by 2002:a65:40c9:: with SMTP id u9-v6mr2227027pgp.222.1525983486016; Thu, 10 May 2018 13:18:06 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id v23-v6sm3062225pfe.166.2018.05.10.13.18.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 13:18:05 -0700 (PDT) Date: Thu, 10 May 2018 13:18:03 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180510131803.0a691171@xeon-e3> In-Reply-To: <20180509094337.26112-6-thomas@monjalon.net> References: <20180509094337.26112-1-thomas@monjalon.net> <20180509094337.26112-6-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 05/11] ethdev: add probing finish function X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 20:18:07 -0000 On Wed, 9 May 2018 11:43:31 +0200 Thomas Monjalon wrote: > A new hook function is added and called inside the PMDs at the end > of the device probing: > - in primary process, after allocating, init and config > - in secondary process, after attaching and local init > > This new function is almost empty for now. > It will be used later to add some post-initialization processing. > > For the PMDs calling the helpers rte_eth_dev_create() or > rte_eth_dev_pci_generic_probe(), the hook rte_eth_dev_probing_finish() > is called from here, and not in the PMD itself. > > Note that the helper rte_eth_dev_create() could be used more, > especially for vdevs, avoiding some code duplication in PMDs. > > Cc: stable@dpdk.org > > Signed-off-by: Thomas Monjalon > --- > drivers/net/af_packet/rte_eth_af_packet.c | 2 ++ > drivers/net/ark/ark_ethdev.c | 2 ++ > drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++ > drivers/net/cxgbe/cxgbe_ethdev.c | 1 + > drivers/net/cxgbe/cxgbe_main.c | 5 +++++ > drivers/net/cxgbe/cxgbevf_ethdev.c | 1 + > drivers/net/cxgbe/cxgbevf_main.c | 5 +++++ > drivers/net/dpaa/dpaa_ethdev.c | 5 ++++- > drivers/net/dpaa2/dpaa2_ethdev.c | 4 +++- > drivers/net/failsafe/failsafe.c | 2 ++ > drivers/net/kni/rte_eth_kni.c | 2 ++ > drivers/net/mlx4/mlx4.c | 1 + > drivers/net/mlx5/mlx5.c | 2 ++ > drivers/net/mvpp2/mrvl_ethdev.c | 1 + > drivers/net/nfp/nfp_net.c | 2 ++ > drivers/net/null/rte_eth_null.c | 2 ++ > drivers/net/octeontx/octeontx_ethdev.c | 3 +++ > drivers/net/pcap/rte_eth_pcap.c | 2 ++ > drivers/net/ring/rte_eth_ring.c | 1 + > drivers/net/softnic/rte_eth_softnic.c | 3 +++ > drivers/net/szedata2/rte_eth_szedata2.c | 2 ++ > drivers/net/tap/rte_eth_tap.c | 2 ++ > drivers/net/vhost/rte_eth_vhost.c | 2 ++ > drivers/net/virtio/virtio_user_ethdev.c | 3 +++ > lib/librte_ethdev/rte_ethdev.c | 9 +++++++++ > lib/librte_ethdev/rte_ethdev_driver.h | 10 ++++++++++ > lib/librte_ethdev/rte_ethdev_pci.h | 2 ++ > lib/librte_ethdev/rte_ethdev_version.map | 1 + > test/test/virtual_pmd.c | 2 ++ > 29 files changed, 79 insertions(+), 2 deletions(-) Rather than changing so many drivers would it be possible to put the finish in bus layer? For virtual devices could be handle by vdev_probe_all_drivers.