Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/115944/?format=api
https://patches.dpdk.org/api/patches/115944/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220906022225.17215-1-changpeng.liu@intel.com/", "project": { "id": 1, "url": "https://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": "<20220906022225.17215-1-changpeng.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220906022225.17215-1-changpeng.liu@intel.com", "date": "2022-09-06T02:22:25", "name": "vhost: use try_lock in rte_vhost_vring_call", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "21fc40c75771ab4634f44c33dc12189bd911166f", "submitter": { "id": 565, "url": "https://patches.dpdk.org/api/people/565/?format=api", "name": "Liu, Changpeng", "email": "changpeng.liu@intel.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220906022225.17215-1-changpeng.liu@intel.com/mbox/", "series": [ { "id": 24542, "url": "https://patches.dpdk.org/api/series/24542/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24542", "date": "2022-09-06T02:22:25", "name": "vhost: use try_lock in rte_vhost_vring_call", "version": 1, "mbox": "https://patches.dpdk.org/series/24542/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/115944/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/115944/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 228F5A054A;\n\tTue, 6 Sep 2022 04:22:49 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C62AE400D6;\n\tTue, 6 Sep 2022 04:22:48 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id 05F5540041\n for <dev@dpdk.org>; Tue, 6 Sep 2022 04:22:46 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 05 Sep 2022 19:22:46 -0700", "from waikikibeach52.sh.intel.com ([10.67.111.175])\n by fmsmga008.fm.intel.com with ESMTP; 05 Sep 2022 19:22:45 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1662430967; x=1693966967;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=+MC175JMkeyyKNqVlyzerf/VhCRTb00T53eGcWgygZ0=;\n b=TW2QxgVntpx/tS1rJBK94whNEwlAXA46aiDwiB2BarihlhV1SDGuWTJr\n 5QLby+gmgspt9qIZ6IIY5EKezsYSqHrJABMkVfAUHi0biA8CyObJjab9f\n mtGB88Vba48cx4jmg+4zQJ2deOD4Ums5fdf4vmGYzKpFaXaZFNbU9Biz4\n G/Ixi+2CTUJ87tZoKRaSewIedVvtyt8x+Dfkd4UXXnoYNskhWb0JTHcD0\n s5aAh80S6nSk/7f3asKoHXIShR7QeheBhfP6xB5+klTwPHM5BoUlxEj3D\n PBMlqAQBu5ROCXyWWc+GyeU37/Hz5Q9RHKS5E4CCJEZ/Jg2doFMbZrtl+ Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10461\"; a=\"382780216\"", "E=Sophos;i=\"5.93,292,1654585200\"; d=\"scan'208\";a=\"382780216\"", "E=Sophos;i=\"5.93,292,1654585200\"; d=\"scan'208\";a=\"675479632\"" ], "X-ExtLoop1": "1", "From": "Changpeng Liu <changpeng.liu@intel.com>", "To": "dev@dpdk.org", "Cc": "Changpeng Liu <changpeng.liu@intel.com>,\n Maxime Coquelin <maxime.coquelin@redhat.com>,\n Chenbo Xia <chenbo.xia@intel.com>", "Subject": "[PATCH] vhost: use try_lock in rte_vhost_vring_call", "Date": "Tue, 6 Sep 2022 10:22:25 +0800", "Message-Id": "<20220906022225.17215-1-changpeng.liu@intel.com>", "X-Mailer": "git-send-email 2.21.3", "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": "Note that this function is in data path, so the thread context\nmay not same as socket messages processing context, by using\ntry_lock here, users can have another try in case of VQ's access\nlock is held by `vhost-events` thread.\n\nSigned-off-by: Changpeng Liu <changpeng.liu@intel.com>\n---\n lib/vhost/vhost.c | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex 60cb05a0ff..072d2acb7b 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -1329,7 +1329,11 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)\n \tif (!vq)\n \t\treturn -1;\n \n-\trte_spinlock_lock(&vq->access_lock);\n+\tif (!rte_spinlock_trylock(&vq->access_lock)) {\n+\t\tVHOST_LOG_CONFIG(dev->ifname, DEBUG,\n+\t\t\t\"failed to kick guest, virtqueue busy.\\n\");\n+\t\treturn -1;\n+\t}\n \n \tif (vq_is_packed(dev))\n \t\tvhost_vring_call_packed(dev, vq);\n", "prefixes": [] }{ "id": 115944, "url": "