Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/43751/?format=api
http://patches.dpdk.org/api/patches/43751/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180816184750.30843-1-bluca@debian.org/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20180816184750.30843-1-bluca@debian.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20180816184750.30843-1-bluca@debian.org", "date": "2018-08-16T18:47:49", "name": "[1/2] bus/pci: harmonize and document rte_pci_read_config return value", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a814cec863ac513ce87a35e9cfdc257a02674d5b", "submitter": { "id": 823, "url": "http://patches.dpdk.org/api/people/823/?format=api", "name": "Luca Boccassi", "email": "bluca@debian.org" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180816184750.30843-1-bluca@debian.org/mbox/", "series": [ { "id": 1003, "url": "http://patches.dpdk.org/api/series/1003/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1003", "date": "2018-08-16T18:47:49", "name": "[1/2] bus/pci: harmonize and document rte_pci_read_config return value", "version": 1, "mbox": "http://patches.dpdk.org/series/1003/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/43751/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/43751/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E53C14C87;\n\tThu, 16 Aug 2018 20:47:58 +0200 (CEST)", "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68]) by dpdk.org (Postfix) with ESMTP id B49CC4C6F\n\tfor <dev@dpdk.org>; Thu, 16 Aug 2018 20:47:57 +0200 (CEST)", "by mail-wm0-f68.google.com with SMTP id w24-v6so5230896wmc.1\n\tfor <dev@dpdk.org>; Thu, 16 Aug 2018 11:47:57 -0700 (PDT)", "from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556])\n\tby smtp.gmail.com with ESMTPSA id\n\tt4-v6sm67240wrb.45.2018.08.16.11.47.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 16 Aug 2018 11:47:55 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=8jA1rguQNQsWxOIHsHF/vAjDwGqJikL8hM7ycAKTsa4=;\n\tb=Pi7Z+8EC6FAzTLW2ftGuoGVQzqipTzoKDjGG2L6HMtf02Oavlak0scp/qJHaTKU04k\n\tnxuxvlBWF5vNFPNMUKrUSz0YUhFtt8BdofSMbzhfyUdf2VcxrCDyNfDIFaZRX+yyxICY\n\toF4f+diCfiJ/8c2OhxeOAmwFkLdxodxaLT4llIe1FzLcKrCAi3IYiV3rC1/G6R1yxqnW\n\tNb1mymVjjPLo1aaj5OJMEUZoDBufuP6dARqUXVgsLH5geE3osCYKf7fbl1K1j18GVM2G\n\trG2rEWrQYZyN7ZXm/xpe2vAjcDpVQHF/hC/rP1mTzeDMlEpV8sW/a29e8HWVQtwyBQgR\n\tw4xw==", "X-Gm-Message-State": "AOUpUlFQS8hUoSwJIPZ4/OkJHA4DwuyGo1VV03yEKV7ph6WnghJD2ECp\n\trt1yC2kefLDZcQvAxznZPAWYv/DN", "X-Google-Smtp-Source": "AA+uWPxFY/RCSTh9iIMCUNzZumvLpGrirB26epP6Ukemmhms0Q2TpDQ1MZD8ovnqfvnDE6NyNzI7zA==", "X-Received": "by 2002:a1c:2352:: with SMTP id\n\tj79-v6mr16782232wmj.124.1534445277071; \n\tThu, 16 Aug 2018 11:47:57 -0700 (PDT)", "From": "Luca Boccassi <bluca@debian.org>", "To": "dev@dpdk.org", "Cc": "maxime.coquelin@redhat.com, zhihong.wang@intel.com, tiwei.bie@intel.com, \n\tbruce.richardson@intel.com, Luca Boccassi <bluca@debian.org>", "Date": "Thu, 16 Aug 2018 19:47:49 +0100", "Message-Id": "<20180816184750.30843-1-bluca@debian.org>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20180814143035.19640-1-bluca@debian.org>", "References": "<20180814143035.19640-1-bluca@debian.org>", "Subject": "[dpdk-dev] [PATCH 1/2] bus/pci: harmonize and document\n\trte_pci_read_config return value", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "On Linux, rte_pci_read_config on success returns the number of read\nbytes, but on BSD it returns 0.\nDocument the return values, and have BSD behave as Linux does.\n\nAt least one case (bnx2x PMD) treats 0 as an error, so the change\nmakes sense also for that.\n\nSigned-off-by: Luca Boccassi <bluca@debian.org>\n---\n drivers/bus/pci/bsd/pci.c | 4 +++-\n drivers/bus/pci/rte_bus_pci.h | 2 ++\n 2 files changed, 5 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c\nindex 655b34b7e4..175d83cf1b 100644\n--- a/drivers/bus/pci/bsd/pci.c\n+++ b/drivers/bus/pci/bsd/pci.c\n@@ -439,6 +439,8 @@ int rte_pci_read_config(const struct rte_pci_device *dev,\n {\n \tint fd = -1;\n \tint size;\n+\t/* Copy Linux implementation's behaviour */\n+\tconst int return_len = len;\n \tstruct pci_io pi = {\n \t\t.pi_sel = {\n \t\t\t.pc_domain = dev->addr.domain,\n@@ -469,7 +471,7 @@ int rte_pci_read_config(const struct rte_pci_device *dev,\n \t}\n \tclose(fd);\n \n-\treturn 0;\n+\treturn return_len;\n \n error:\n \tif (fd >= 0)\ndiff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h\nindex 0d1955ffe0..df8f64798d 100644\n--- a/drivers/bus/pci/rte_bus_pci.h\n+++ b/drivers/bus/pci/rte_bus_pci.h\n@@ -219,6 +219,8 @@ void rte_pci_unregister(struct rte_pci_driver *driver);\n * The length of the data buffer.\n * @param offset\n * The offset into PCI config space\n+ * @return\n+ * Number of bytes read on success, negative on error.\n */\n int rte_pci_read_config(const struct rte_pci_device *device,\n \t\tvoid *buf, size_t len, off_t offset);\n", "prefixes": [ "1/2" ] }{ "id": 43751, "url": "