Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/105738/?format=api
http://patches.dpdk.org/api/patches/105738/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220111134105.1007191-4-bruce.richardson@intel.com/", "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": "<20220111134105.1007191-4-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220111134105.1007191-4-bruce.richardson@intel.com", "date": "2022-01-11T13:41:04", "name": "[v2,3/4] dma/idxd: fix wrap-around in burst capacity calculation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0313908254e2b7f678427f284bbd94305f9d8ba8", "submitter": { "id": 20, "url": "http://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "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/20220111134105.1007191-4-bruce.richardson@intel.com/mbox/", "series": [ { "id": 21125, "url": "http://patches.dpdk.org/api/series/21125/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21125", "date": "2022-01-11T13:41:01", "name": "fixes for dma/idxd", "version": 2, "mbox": "http://patches.dpdk.org/series/21125/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/105738/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/105738/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 69A05A034F;\n\tTue, 11 Jan 2022 14:42:03 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4F46942709;\n\tTue, 11 Jan 2022 14:42:03 +0100 (CET)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id B3D3341143;\n Tue, 11 Jan 2022 14:42:00 +0100 (CET)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jan 2022 05:41:59 -0800", "from silpixa00399126.ir.intel.com ([10.237.223.86])\n by orsmga005.jf.intel.com with ESMTP; 11 Jan 2022 05:41:57 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1641908521; x=1673444521;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=Km6+KRQAQ5Va+gNSXtAiMWR8aiwowM9k/oDsf/gHcaI=;\n b=N6k8qv8zP7T95xSvFFLB64XIqkqUygnAZUkx97AJ0rhJOFLax8iZjVuR\n KpwI/vxTLgBQxiWhzzoEEMr0euHtwTVtp7q2+A7sZyftRpqzNOfZG500v\n cxINCFcla62ySgzKWNhhZiVTj5qGOghmkQpJsJaddfq/GF4Zshb2msuMQ\n tMdxrJRTJ0jlEnm7bONwb1YwFO2wexwJEpWeGUPKV08JDg1CtWDrJ3XiV\n UOfMYAcK8Z1uPaaXu6QAvNQPsUcupTHGswnOu5zi9pbIDcJ7F39g5/1Z3\n 83+2RHu24ZgngNuaabw1GJ/QrVUL9O3EjrQ5Cb1NwwmvcSKo3RqGj37Xx w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10223\"; a=\"223467476\"", "E=Sophos;i=\"5.88,279,1635231600\"; d=\"scan'208\";a=\"223467476\"", "E=Sophos;i=\"5.88,279,1635231600\"; d=\"scan'208\";a=\"690997229\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>, kevin.laatz@intel.com,\n stable@dpdk.org, Sunil Pai G <sunil.pai.g@intel.com>,\n Conor Walsh <conor.walsh@intel.com>,\n Chengwen Feng <fengchengwen@huawei.com>", "Subject": "[PATCH v2 3/4] dma/idxd: fix wrap-around in burst capacity\n calculation", "Date": "Tue, 11 Jan 2022 13:41:04 +0000", "Message-Id": "<20220111134105.1007191-4-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20220111134105.1007191-1-bruce.richardson@intel.com>", "References": "<20211220170514.736732-1-bruce.richardson@intel.com>\n <20220111134105.1007191-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "The burst capacity calculation code assumes that the write and read\n(i.e. ids_returned) values both wrap at the ring-size, but the read\nvalue instead wraps as UINT16_MAX. Therefore, instead of just adding\nring-size to the write value in case the read is greater, we need to\njust always mask the result to ensure a correct, in-range, value.\n\nFixes: 9459de4edc99 (\"dma/idxd: add burst capacity\")\nCc: kevin.laatz@intel.com\nCc: stable@dpdk.org\n\nReported-by: Sunil Pai G <sunil.pai.g@intel.com>\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/dma/idxd/idxd_common.c | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c\nindex 4442d1cbbd..ea6413cc7a 100644\n--- a/drivers/dma/idxd/idxd_common.c\n+++ b/drivers/dma/idxd/idxd_common.c\n@@ -480,10 +480,8 @@ idxd_burst_capacity(const void *dev_private, uint16_t vchan __rte_unused)\n \t\t\tidxd->batch_idx_write + 1 == idxd->batch_idx_read)\n \t\treturn 0;\n \n-\t/* For descriptors, check for wrap-around on write but not read */\n-\tif (idxd->ids_returned > write_idx)\n-\t\twrite_idx += idxd->desc_ring_mask + 1;\n-\tused_space = write_idx - idxd->ids_returned;\n+\t/* Subtract and mask to get in correct range */\n+\tused_space = (write_idx - idxd->ids_returned) & idxd->desc_ring_mask;\n \n \tconst int ret = RTE_MIN((idxd->desc_ring_mask - used_space),\n \t\t\t(idxd->max_batch_size - idxd->batch_size));\n", "prefixes": [ "v2", "3/4" ] }{ "id": 105738, "url": "