Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/97758/?format=api
http://patchwork.dpdk.org/api/patches/97758/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210902053253.3017858-5-feifei.wang2@arm.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20210902053253.3017858-5-feifei.wang2@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210902053253.3017858-5-feifei.wang2@arm.com", "date": "2021-09-02T05:32:52", "name": "[RFC,v1,4/5] lib/bpf: use wait until scheme for Rx/Tx iteration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "92ba181ae630917514e25847e1cbbe733ca51519", "submitter": { "id": 1771, "url": "http://patchwork.dpdk.org/api/people/1771/?format=api", "name": "Feifei Wang", "email": "feifei.wang2@arm.com" }, "delegate": { "id": 24651, "url": "http://patchwork.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210902053253.3017858-5-feifei.wang2@arm.com/mbox/", "series": [ { "id": 18613, "url": "http://patchwork.dpdk.org/api/series/18613/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18613", "date": "2021-09-02T05:32:48", "name": "add new API for wait until scheme", "version": 1, "mbox": "http://patchwork.dpdk.org/series/18613/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/97758/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/97758/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 A1948A0C4D;\n\tThu, 2 Sep 2021 07:33:32 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 993DE41135;\n\tThu, 2 Sep 2021 07:33:16 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 31BDD41134;\n Thu, 2 Sep 2021 07:33:15 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B0EBF1FB;\n Wed, 1 Sep 2021 22:33:14 -0700 (PDT)", "from net-x86-dell-8268.shanghai.arm.com\n (net-x86-dell-8268.shanghai.arm.com [10.169.210.115])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5EAD73F5A1;\n Wed, 1 Sep 2021 22:33:12 -0700 (PDT)" ], "From": "Feifei Wang <feifei.wang2@arm.com>", "To": "Konstantin Ananyev <konstantin.ananyev@intel.com>,\n Ferruh Yigit <ferruh.yigit@intel.com>", "Cc": "dev@dpdk.org, nd@arm.com, Feifei Wang <feifei.wang2@arm.com>,\n stable@dpdk.org, Ruifeng Wang <ruifeng.wang@arm.com>", "Date": "Thu, 2 Sep 2021 13:32:52 +0800", "Message-Id": "<20210902053253.3017858-5-feifei.wang2@arm.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210902053253.3017858-1-feifei.wang2@arm.com>", "References": "<20210902053253.3017858-1-feifei.wang2@arm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [RFC PATCH v1 4/5] lib/bpf: use wait until scheme for\n Rx/Tx iteration", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "First, fix the bug that keyword const of func arg should be after \"*\".\nThis is because const before \"*\" means the value of \"cbi\" should not be\nchanged. But we should monitor that cbi->use changed and then we can\njump out of loop.\n\nSecond, instead of polling for cbi->use to be updated, use\nwait_until_unequal api.\n\nFixes: a93ff62a8938 (\"bpf: introduce basic Rx/Tx filters\")\nCc: konstantin.ananyev@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Feifei Wang <feifei.wang2@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\n---\n lib/bpf/bpf_pkt.c | 11 ++++-------\n 1 file changed, 4 insertions(+), 7 deletions(-)", "diff": "diff --git a/lib/bpf/bpf_pkt.c b/lib/bpf/bpf_pkt.c\nindex 6e8248f0d6..ed63e00219 100644\n--- a/lib/bpf/bpf_pkt.c\n+++ b/lib/bpf/bpf_pkt.c\n@@ -111,9 +111,9 @@ bpf_eth_cbi_unuse(struct bpf_eth_cbi *cbi)\n * Waits till datapath finished using given callback.\n */\n static void\n-bpf_eth_cbi_wait(const struct bpf_eth_cbi *cbi)\n+bpf_eth_cbi_wait(struct bpf_eth_cbi *const cbi)\n {\n-\tuint32_t nuse, puse;\n+\tuint32_t puse;\n \n \t/* make sure all previous loads and stores are completed */\n \trte_smp_mb();\n@@ -122,11 +122,8 @@ bpf_eth_cbi_wait(const struct bpf_eth_cbi *cbi)\n \n \t/* in use, busy wait till current RX/TX iteration is finished */\n \tif ((puse & BPF_ETH_CBI_INUSE) != 0) {\n-\t\tdo {\n-\t\t\trte_pause();\n-\t\t\trte_compiler_barrier();\n-\t\t\tnuse = cbi->use;\n-\t\t} while (nuse == puse);\n+\t\trte_compiler_barrier();\n+\t\trte_wait_until_unequal_32(&cbi->use, puse, __ATOMIC_RELAXED);\n \t}\n }\n \n", "prefixes": [ "RFC", "v1", "4/5" ] }{ "id": 97758, "url": "