From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id EDA961B577 for ; Wed, 11 Jul 2018 23:46:06 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id c4-v6so6929280wrs.12 for ; Wed, 11 Jul 2018 14:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kpfBSKje8c/FYe7ayV3bSEGwOsUxRBndJ+eoNQTWAXU=; b=s32XxxEkvnVuJWU4spxLjwouBrrTvxrEEkfSERrBH/zyaBkVPIw+Ypw7eb9es+YMsC eywQYSsoLDQqhGusoTt04VFOJEvUBkOX7EqR8EqZZ+PhWfgx71vHHnHPlFQDeamz0NqA YLDPRpTEakZ+nZi9sXQU8aQ6R9qyWNkBaKJ9efi5ZPkrGLo/Hat5hrmiHIdPYj4XeUOK a/O2Qjg8sb1sQk+QfVi6bfuH1rGGl4GLofriVdC8Sw84ADb4nwqbg8IUp12rQQJsBeE4 eSU8D1HsP1+XaN3Adj066/knBYw7qP0hwT5vcN6uIrI4K0Py5x7gg1qTyMSKRjocL6cx uomA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kpfBSKje8c/FYe7ayV3bSEGwOsUxRBndJ+eoNQTWAXU=; b=pr4LyXmeC/m4bqs/f7/Olek6Nn+kVhPh1qgN8sfQtrBGY3NOH4XxqRlgstWnXYqaZY +r7vE/YB2TvnXaOg3hwiykxZwzNItRF7OAV2MZmBkvhtz08M8jJGR7Gp5XZJix7cb2Rt hw03RMnRyPFKdCVgXsNyKQ+Km5M3s8/fQWyLioTjrQKu/JE/99LHb0vgz872f7aEaOX6 /eqnQMQ1LrYG6YxQR4I7diGdSQxzV68FLPTVb+MGLPzsQ8JiXpFfhLdJ9151R7Dhum0q /Q8E2etUTFOv0IaPQD7ygQG7XmyTY8zEZbGLZdkvZ6a7guI6NGAgByALFZgoCC7Nl3Gf LAPQ== X-Gm-Message-State: AOUpUlEXXKXT8lHaWT/WN9zqXl8W7qYHW4m1bjldHYQDy/nUE8k1VeuP H8XgzGNzAHuSQ05P3dy7lr/D/eJy X-Google-Smtp-Source: AAOMgpfsYdFHBiNk4iY9Rc8ilMeCR2g6+q1Il6rHQL2T7qpJoY/r81dv8nid8LOGL0kiRID048iQ/Q== X-Received: by 2002:adf:9bc9:: with SMTP id e9-v6mr235358wrc.240.1531345566291; Wed, 11 Jul 2018 14:46:06 -0700 (PDT) Received: from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id h5-v6sm10550936wrr.19.2018.07.11.14.46.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 14:46:05 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 11 Jul 2018 23:45:13 +0200 Message-Id: <7ccaf59d98f0b34ace54dac17a68a3a62ad2e6b7.1531345404.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v11 23/25] bus/pci: process declarative PCI devargs 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: , X-List-Received-Date: Wed, 11 Jul 2018 21:46:07 -0000 Introduce the facility to process future PCI parameters. Once the matching between PCI devices and devargs has been done, it is possible to process each devargs. New parameters would have the PCI device handle to work with when parsing the device (bus specific) parameters. Signed-off-by: Gaetan Rivet --- drivers/bus/pci/pci_common.c | 3 +++ drivers/bus/pci/pci_params.c | 10 ++++++++++ drivers/bus/pci/private.h | 13 +++++++++++++ 3 files changed, 26 insertions(+) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 5b7854490..15a3cf3ae 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -249,6 +249,9 @@ pci_probe_all_drivers(struct rte_pci_device *dev) if (dev->driver != NULL) return 0; + if (rte_pci_devargs_process(dev) < 0) + return -1; + FOREACH_DRIVER_ON_PCIBUS(dr) { rc = rte_pci_probe_one_driver(dr, dev); if (rc < 0) diff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c index a09af3b1c..f34bf3da9 100644 --- a/drivers/bus/pci/pci_params.c +++ b/drivers/bus/pci/pci_params.c @@ -127,3 +127,13 @@ rte_pci_devargs_prepare(struct rte_devargs *devargs) rte_kvargs_free(kvargs); return ret; } + +int +rte_pci_devargs_process(struct rte_pci_device *pdev) +{ + /* For the moment, no PCI param + * needs to be processed. + */ + (void) pdev; + return 0; +} diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h index 9beb24c6a..06dc85e85 100644 --- a/drivers/bus/pci/private.h +++ b/drivers/bus/pci/private.h @@ -207,4 +207,17 @@ rte_pci_dev_iterate(const void *start, int rte_pci_devargs_prepare(struct rte_devargs *da); +/* + * Process the device devargs, if any. + * + * @param pdev + * PCI device + * + * @return + * 0 on success. + * <0 on error. + */ +int +rte_pci_devargs_process(struct rte_pci_device *pdev); + #endif /* _PCI_PRIVATE_H_ */ -- 2.18.0