From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 9CB7A1BF27 for ; Thu, 5 Jul 2018 13:49:29 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id v25-v6so10657666wmc.0 for ; Thu, 05 Jul 2018 04:49:29 -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=uv7z1Mr347u/ygBQGoLbDnLzDT+LcjW1FMIwY124+Qg=; b=sQGJ3nA3cT7hlI4/beF+z2fvWwvy2RHGI2BB0EWv9nhIaoLKep1rxX4FIfBSgSciGy WSETLk7OzJOYi71sfn5gZ9Pb1AL4SlY7Xul8DwcxxYbwJGaaUerw0mkPvYVQgNf+81An iYwV73K+3x0Yfc+7f/QKGSk9f+lzaHNWG7ov60XepjZjxlSosWkLKEGgI/noutQgq8PM k09bMh/7jTrAek4D5Fbh59Dy5eVpBO1Yr5C7WUz5em+g1B6dQXkPLIniwHpkuw2MfMp8 yU1xzdElFTtgyOT4lvY5XppL+HNCcRQOPgELacY7DVvVdocYqThqEYzZUCxR/Lgqo/0A K6Wg== 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=uv7z1Mr347u/ygBQGoLbDnLzDT+LcjW1FMIwY124+Qg=; b=CTnZPpE5PMI4f9rV+FBu7cv7OL76Cfd7NjlkLT/Inj2TOZHFGYm4rljr15HYUJwhk6 Oz9IBgpYy3MCEv8Hr6lrNKf7JEm85LFxqBDSCz9hQjqRkLUe3NmoH3HUSKkQbXN+oumV OWLgW8izoxzJVX6dQQjzKSXQmGMexOiQ6G3h/aWZCKQtbDfpGJFi2H0lBcXiCN4P1Rpg tJV2yGe1emDd2mt1vRZS/p/WjLAvoOQ3AxuF4TJA1lnWkx1qcgb0ixsWG3FivZzEBAeQ VIAbz9g62kMtQbl3VEJLT1haqr3X+nDAfikImwqB91O5UwKqeeG/5FcSUsvb/baWgEkx 2L+g== X-Gm-Message-State: APt69E01xM0C9jX05K1HCPzbFmHkNQ2iTLM4qsQAaS6X4vTXD+3voc30 X5joAlodBsidRlWT5h/gdgKZ4OqR X-Google-Smtp-Source: AAOMgpfRlrLEyzjyzXNIR+d1tvwH/XSnz5L/Zr7mU/K/Y4LK/ndTqD8gcxOM8jL6z8m1VyLRmdiI/w== X-Received: by 2002:a1c:ad42:: with SMTP id w63-v6mr4193094wme.100.1530791368957; Thu, 05 Jul 2018 04:49:28 -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 o42-v6sm15809183wrc.50.2018.07.05.04.49.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 04:49:28 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 5 Jul 2018 13:48:32 +0200 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v10 25/27] 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: Thu, 05 Jul 2018 11:49:29 -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 56bb653fc..effa73606 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 *da) 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