From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 6D5A2559A for ; Thu, 30 Aug 2018 15:42:46 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id v17-v6so8122077wrr.9 for ; Thu, 30 Aug 2018 06:42:46 -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=ylUx+ghvrvoDPaMDlCnJf/Edx7IHTy261wDIFPUFjyY=; b=wzl37XGh0q09bhbKc/GvKHuyEQgKpYftAU7PpV/78cpApw3ThhtuyWqVNR5SkXKY/N 2Q94qzY/yo0w4bXsESpd5Qx5w2lBmRT/P6XtNC9i6OPJCAbUbnQ0glA711ua5RoL2lex Ot/TmkRAAKPEL13ao47UXgxmivejR7AX0V9tUKk7qodCOYrgLz+Mp6a3HwJ4M3XVos2L eK673sr/iRY1Kd3YEQENjC7d2tHuUXhZL/u2gBrExou7T7CK+KzUQNUzSM+m22ihf9qV ay/1YLlt/1/Zl/9NSqe27g2Uv6QB28/QQDS1cUjHJotVkjID0fPgs5J5bcRO4FjPxaJu 75JQ== 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=ylUx+ghvrvoDPaMDlCnJf/Edx7IHTy261wDIFPUFjyY=; b=ty+pMwJhQIBYsNhq03UNvrEA0cFOLt8u6LDBdDgfPTHwthhxN2wKd1C73ATD8aSql7 RvMUF+6Nkob2rSdwKYZ+S+3vVTmruO/DGzGHqSwBugdQG8I02JbwTeJY17PozwnSI1xB 5NsNXB9gblymqCvQI1aWIzryNTQUIXRdD1V1BILdLRLZedmM7wfpX3CM589aRvbn4mfd X4WFt65DJ8i+F4T6rbb0JP+P0W1enNqMJIvqp8tIBOGrRMz+DJOL3Z80Hig4c8RCQ6KO mD8E9On2l8fqW2yAmRvFM7DuXclucAQsJ4IJxGQ8ndY0iuSyE1UaMfISA6M2BGRV9E3T 5rkg== X-Gm-Message-State: APzg51Cj6L0BIv7ho+Y3K6rEoY3aEmkSiwvuwSB+IgIqrjsdgqkZ6M7v ERCB+chfNRHz42HUlkHY4kChPwlNuAE= X-Google-Smtp-Source: ANB0VdZMuhKplUz+/lO1jLNGdQ6JqvKu6PsiAJSxTicY/pnIS+SMUo0Ltk4uQe6NjOhIYVBiKWW4qw== X-Received: by 2002:adf:ffc7:: with SMTP id x7-v6mr3131470wrs.137.1535636565698; Thu, 30 Aug 2018 06:42:45 -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 w10-v6sm5247731wrp.31.2018.08.30.06.42.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 06:42:44 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 30 Aug 2018 15:42:02 +0200 Message-Id: <1cd54c876b80f441c483a2f43c1c1fba219b9237.1535633784.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v1 11/13] 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, 30 Aug 2018 13:42:46 -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 c7695d108..900cd9090 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -247,6 +247,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