List patch comments

GET /api/patches/74683/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/74683/comments/?format=api&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/74683/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 116703, "web_url": "https://patches.dpdk.org/comment/116703/", "msgid": "<MN2PR11MB40634BEED2DB7E7F25DD7B189C720@MN2PR11MB4063.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MN2PR11MB40634BEED2DB7E7F25DD7B189C720@MN2PR11MB4063.namprd11.prod.outlook.com", "date": "2020-07-27T13:46:34", "subject": "Re: [dpdk-dev] [PATCH 1/2] vhost: fix guest notification setting", "submitter": { "id": 1276, "url": "https://patches.dpdk.org/api/people/1276/?format=api", "name": "Chenbo Xia", "email": "chenbo.xia@intel.com" }, "content": "> -----Original Message-----\n> From: Maxime Coquelin <maxime.coquelin@redhat.com>\n> Sent: Thursday, July 23, 2020 9:09 PM\n> To: dev@dpdk.org; matan@mellanox.com; Xia, Chenbo\n> <chenbo.xia@intel.com>; Liu, Yong <yong.liu@intel.com>; Wang, Yinan\n> <yinan.wang@intel.com>\n> Cc: thomas@monjalon.net; Yigit, Ferruh <ferruh.yigit@intel.com>;\n> david.marchand@redhat.com; Maxime Coquelin\n> <maxime.coquelin@redhat.com>\n> Subject: [PATCH 1/2] vhost: fix guest notification setting\n> \n> If rte_vhost_enable_guest_notification is called before the virtqueue is ready,\n> the configuration is lost.\n> \n> This patch fixes this by saving the guest notification enablement value requested\n> by the application, and apply it before the virtqueue is made ready to the\n> application.\n> \n> Fixes: 604052ae5395 (\"net/vhost: support queue update\")\n> \n> Reported-by: Yinan Wang <yinan.wang@intel.com>\n> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n> ---\n> lib/librte_vhost/vhost.c | 24 ++++++++++++++++++++----\n> lib/librte_vhost/vhost.h | 5 +++++\n> lib/librte_vhost/vhost_user.c | 11 ++++++++---\n> 3 files changed, 33 insertions(+), 7 deletions(-)\n> \n> diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index\n> 14b3e253e8..8f20a0818f 100644\n> --- a/lib/librte_vhost/vhost.c\n> +++ b/lib/librte_vhost/vhost.c\n> @@ -534,6 +534,7 @@ init_vring_queue(struct virtio_net *dev, uint32_t\n> vring_idx)\n> \n> \tvq->kickfd = VIRTIO_UNINITIALIZED_EVENTFD;\n> \tvq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;\n> +\tvq->notif_enable = VIRTIO_UNINITIALIZED_NOTIF;\n> \n> \tvhost_user_iotlb_init(dev, vring_idx);\n> \t/* Backends are set to -1 indicating an inactive device. */ @@ -1311,6\n> +1312,23 @@ vhost_enable_notify_packed(struct virtio_net *dev,\n> \treturn 0;\n> }\n> \n> +int\n> +vhost_enable_guest_notification(struct virtio_net *dev,\n> +\t\tstruct vhost_virtqueue *vq, int enable) {\n> +\t/*\n> +\t * If the virtqueue is not ready yet, it will be applied\n> +\t * when it will become ready.\n> +\t */\n> +\tif (!vq->ready)\n> +\t\treturn 0;\n> +\n> +\tif (vq_is_packed(dev))\n> +\t\treturn vhost_enable_notify_packed(dev, vq, enable);\n> +\telse\n> +\t\treturn vhost_enable_notify_split(dev, vq, enable); }\n> +\n> int\n> rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)\n> { @@ -1325,10 +1343,8 @@ rte_vhost_enable_guest_notification(int vid,\n> uint16_t queue_id, int enable)\n> \n> \trte_spinlock_lock(&vq->access_lock);\n> \n> -\tif (vq_is_packed(dev))\n> -\t\tret = vhost_enable_notify_packed(dev, vq, enable);\n> -\telse\n> -\t\tret = vhost_enable_notify_split(dev, vq, enable);\n> +\tvq->notif_enable = enable;\n> +\tret = vhost_enable_guest_notification(dev, vq, enable);\n> \n> \trte_spinlock_unlock(&vq->access_lock);\n> \n> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index\n> 0f7212f888..a29c6638e2 100644\n> --- a/lib/librte_vhost/vhost.h\n> +++ b/lib/librte_vhost/vhost.h\n> @@ -164,6 +164,9 @@ struct vhost_virtqueue {\n> \tint\t\t\tenabled;\n> \tint\t\t\taccess_ok;\n> \tint\t\t\tready;\n> +\tint\t\t\tnotif_enable;\n> +#define VIRTIO_UNINITIALIZED_NOTIF\t(-1)\n> +\n> \trte_spinlock_t\t\taccess_lock;\n> \n> \t/* Used to notify the guest (trigger interrupt) */ @@ -668,6 +671,8 @@\n> void vhost_enable_dequeue_zero_copy(int vid); void\n> vhost_set_builtin_virtio_net(int vid, bool enable); void vhost_enable_extbuf(int\n> vid); void vhost_enable_linearbuf(int vid);\n> +int vhost_enable_guest_notification(struct virtio_net *dev,\n> +\t\tstruct vhost_virtqueue *vq, int enable);\n> \n> struct vhost_device_ops const *vhost_driver_callback_get(const char *path);\n> \n> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index\n> 9ddeae3622..c3c924faec 100644\n> --- a/lib/librte_vhost/vhost_user.c\n> +++ b/lib/librte_vhost/vhost_user.c\n> @@ -235,6 +235,11 @@ vhost_user_notify_queue_state(struct virtio_net *dev,\n> uint16_t index,\n> \t\t\t int enable)\n> {\n> \tstruct rte_vdpa_device *vdpa_dev = dev->vdpa_dev;\n> +\tstruct vhost_virtqueue *vq = dev->virtqueue[index];\n> +\n> +\t/* Configure guest notifications on enable */\n> +\tif (enable && vq->notif_enable != VIRTIO_UNINITIALIZED_NOTIF)\n> +\t\tvhost_enable_guest_notification(dev, vq, vq->notif_enable);\n> \n> \tif (vdpa_dev && vdpa_dev->ops->set_vring_state)\n> \t\tvdpa_dev->ops->set_vring_state(dev->vid, index, enable); @@ -\n> 1640,8 +1645,8 @@ vhost_user_set_vring_call(struct virtio_net **pdev, struct\n> VhostUserMsg *msg,\n> \tvq = dev->virtqueue[file.index];\n> \n> \tif (vq->ready) {\n> -\t\tvhost_user_notify_queue_state(dev, file.index, 0);\n> \t\tvq->ready = 0;\n> +\t\tvhost_user_notify_queue_state(dev, file.index, 0);\n> \t}\n> \n> \tif (vq->callfd >= 0)\n> @@ -1903,8 +1908,8 @@ vhost_user_set_vring_kick(struct virtio_net **pdev,\n> struct VhostUserMsg *msg,\n> \t}\n> \n> \tif (vq->ready) {\n> -\t\tvhost_user_notify_queue_state(dev, file.index, 0);\n> \t\tvq->ready = 0;\n> +\t\tvhost_user_notify_queue_state(dev, file.index, 0);\n> \t}\n> \n> \tif (vq->kickfd >= 0)\n> @@ -2917,8 +2922,8 @@ vhost_user_msg_handler(int vid, int fd)\n> \t\tbool cur_ready = vq_is_ready(dev, vq);\n> \n> \t\tif (cur_ready != (vq && vq->ready)) {\n> -\t\t\tvhost_user_notify_queue_state(dev, i, cur_ready);\n> \t\t\tvq->ready = cur_ready;\n> +\t\t\tvhost_user_notify_queue_state(dev, i, cur_ready);\n> \t\t}\n> \t}\n> \n> --\n> 2.26.2\n\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 081D4A053A;\n\tMon, 27 Jul 2020 15:46:43 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 958AE1BFDD;\n\tMon, 27 Jul 2020 15:46:42 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by dpdk.org (Postfix) with ESMTP id D399A1BFCF\n for <dev@dpdk.org>; Mon, 27 Jul 2020 15:46:40 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Jul 2020 06:46:39 -0700", "from orsmsx601.amr.corp.intel.com ([10.22.229.14])\n by fmsmga002.fm.intel.com with ESMTP; 27 Jul 2020 06:46:39 -0700", "from orsmsx605.amr.corp.intel.com (10.22.229.18) by\n ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.1713.5; Mon, 27 Jul 2020 06:46:39 -0700", "from ORSEDG001.ED.cps.intel.com (10.7.248.4) by\n orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5\n via Frontend Transport; Mon, 27 Jul 2020 06:46:39 -0700", "from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169)\n by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Mon, 27 Jul 2020 06:46:37 -0700", "from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22)\n by MN2PR11MB3662.namprd11.prod.outlook.com (2603:10b6:208:ee::11)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.26; Mon, 27 Jul\n 2020 13:46:35 +0000", "from MN2PR11MB4063.namprd11.prod.outlook.com\n ([fe80::b898:36f5:61cb:42ca]) by MN2PR11MB4063.namprd11.prod.outlook.com\n ([fe80::b898:36f5:61cb:42ca%7]) with mapi id 15.20.3216.033; Mon, 27 Jul 2020\n 13:46:35 +0000" ], "IronPort-SDR": [ "\n pPPMdmf7Eaezz7hg4a0luPyrHVvrFQTNV7x+mSoWjqaCm/2yVgaO3AOdF8mpuYzqgjpeCunYJb\n OpXtSZrPq20w==", "\n q3tAemZ0ETT2iGZ792eP0DnabC0uY/GCzoqDheTDYNCtTyOJJAfr8l0fZ4tAaJRTiFlNUaCCjo\n F/pZU08xzrjg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9694\"; a=\"235875683\"", "E=Sophos;i=\"5.75,402,1589266800\"; d=\"scan'208\";a=\"235875683\"", "E=Sophos;i=\"5.75,402,1589266800\"; d=\"scan'208\";a=\"321805935\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=msG0Bj9LCWMAGPEpb/aEHy75EcQeJ3qOoF06W/tkEt+oPlMRWiuRV9c2C3PDyOvksqzfitBAQX5JRtqa6B8DJe0msyEXCTdwdwnJgUCDDBupfavW2F1qU9Ou3DzEdjqBZTrCZgz+ZArVvbOsaEoLH1LaAhVfGJI1gdQNBLcEpum+heQlKKMCVRuDQFxLTRuBSJE9wS8W+b7qSuLiBprGGRnDbK+stBOQSvMI4Hidm30F1oZ1R/36lLHFv/a5DxR9iCSERefjPz1AI6QH97Pl8nQ4SSpOSOFJFulo3A9B8SbcjqTVx2nS5lZAi010x8/h7d2rFPjN/aI6HqhVMfwO2A==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=Dlqzm4n7Nz959Lu220GBL86YgxTJsOe1ya+EKSlY240=;\n b=N5BqqpH52L3QVDAJDtvSnN8s/1xqYxwAzYOBQD7T0zzT9JqhYZQ1JUYeaHVx29Kn+O1E0OarLN8Z9MvFtxQzxULz/kJUSgRhQ4TwkJYvAz0u3p0A7vH7Woae/MiFgCJAVM+jSRMaTy4mI4Faxzrf++Ji1EsYyqldvsXXxFFFBWl/65pvQr1Qhj0r49meKCh5V6VHx3cDR0CWTi/hHOXpUujztqZbXFtTF06kMBi0SJyS7ZQ+vVGF3Mceyxik585oyD9K9ha5USJ5Ld4WP9MFnfUw3G2Gq4a+ILtdJR4XE5yddML13M4Bks5VRfgUlt/SL7vJB2YIiELdSAGXOjN3LA==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=Dlqzm4n7Nz959Lu220GBL86YgxTJsOe1ya+EKSlY240=;\n b=lGLwivTYZbF5TT+GSkp7wGEFfp8wMlAXylKuiWlSvEm0GOPH4qQPlrQpA+8K8kczPu2oXQXioRlDXcodGji0TBg6ObIqB2iInem9Efy88JvzHBV/wDPhBXFkTbga0vWJ58HGbmwnZRvFmjQiZwfxJOkx+9XpMQ+hIfdpqn6PiAA=", "From": "\"Xia, Chenbo\" <chenbo.xia@intel.com>", "To": "Maxime Coquelin <maxime.coquelin@redhat.com>, \"dev@dpdk.org\"\n <dev@dpdk.org>, \"matan@mellanox.com\" <matan@mellanox.com>, \"Liu, Yong\"\n <yong.liu@intel.com>, \"Wang, Yinan\" <yinan.wang@intel.com>", "CC": "\"thomas@monjalon.net\" <thomas@monjalon.net>, \"Yigit, Ferruh\"\n <ferruh.yigit@intel.com>, \"david.marchand@redhat.com\"\n <david.marchand@redhat.com>", "Thread-Topic": "[PATCH 1/2] vhost: fix guest notification setting", "Thread-Index": "AQHWYPKFu0Vb7SeyC0Of168f2g9NkqkbdpqQ", "Date": "Mon, 27 Jul 2020 13:46:34 +0000", "Message-ID": "\n <MN2PR11MB40634BEED2DB7E7F25DD7B189C720@MN2PR11MB4063.namprd11.prod.outlook.com>", "References": "<20200723130854.322771-1-maxime.coquelin@redhat.com>\n <20200723130854.322771-2-maxime.coquelin@redhat.com>", "In-Reply-To": "<20200723130854.322771-2-maxime.coquelin@redhat.com>", "Accept-Language": "en-US, zh-CN", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "dlp-product": "dlpe-windows", "dlp-reaction": "no-action", "dlp-version": "11.2.0.6", "authentication-results": "redhat.com; dkim=none (message not signed)\n header.d=none;redhat.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.198.147.193]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "2467d71a-1c4c-43b6-d5d5-08d832337a54", "x-ms-traffictypediagnostic": "MN2PR11MB3662:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MN2PR11MB3662003FF21BCF8313FCFE559C720@MN2PR11MB3662.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:1201;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n 57XQXYGvew/7LDKhSzFZGjNOX8i6i6FoU5Wz2dpNwwM0Uop5wNB5a2FDPuhXZHdH6IVQiV27m8oZJ89T0SVh+wAiprTGtkK3k2kE11uiS6ZPaJsHKo6PrRL9WYTvAGvArgtkbQRw5MiPCVgQEWR2wqzKPaLNEoLbD5SQG7W3M8kaafnkG7q1jk8kt7YnSg4AHQj/r9vfBQw4oSQ598j/X/bjFxqJc0knK4Mt9U0pArcgBYOUx0pKmD3Esvff8rh1UuXWSd2Z4zEoEbSQjHTMscPtqzwboiQCXjRB31rDLAr444Vx+NmeMfPzpjBO0Hsa1q4QxjNeprQwXBrmCTOB9Q==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(346002)(366004)(39860400002)(376002)(396003)(136003)(53546011)(52536014)(6506007)(33656002)(110136005)(7696005)(54906003)(86362001)(316002)(186003)(26005)(6636002)(5660300002)(478600001)(71200400001)(2906002)(76116006)(66556008)(66476007)(8936002)(64756008)(66446008)(66946007)(9686003)(4326008)(8676002)(83380400001)(15650500001)(55016002);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n ZYkQGm4sss/g6Ee2xiIEeZxAxEThToYu0cDljXt43e8SIB8zGCok522dyYq5cu21kwRZvOdNwG2LDolB9che+GHb7ZqpwkvdeUFLNFI1hXjmYIMzFcEldB2aft2B4gNjCOlsH/VB1uHm0A+nDnC1APg3diWQmde+RFQSOeo9Z9RO58xj3cqImFbAAaiWUNQ9M1EPt1yJxvLLoVgVUg0fhuoFhy1ig2u9n4fRaNi6t8vYilvqACFFJ5GX6sxZMRXtE3rPp6bsOIolLeOiOEqQsxkLFv/87Gev7p+xZqfrhzd9cc0mbza86YDZhe7MBKsUDDVhNruunPc4zWfwE7dyf5tT8yobbOpOYnDynXA+EMreqgIStPjsDUnsGpOJz3uNVDJfwqF2ICKjCitfC6mvfDMOmRnCvqHbNBRNgtCxwLhPtnQUDpNWcJ25Sd4efpALU+1bhdmG/bYsdYBtKjs6Ar1xa0fpQCmaDu++9PvBBXhHdNfv7m24hCgYpUab3yOF", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "quoted-printable", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "MN2PR11MB4063.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 2467d71a-1c4c-43b6-d5d5-08d832337a54", "X-MS-Exchange-CrossTenant-originalarrivaltime": "27 Jul 2020 13:46:34.9306 (UTC)", "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted", "X-MS-Exchange-CrossTenant-id": "46c98d88-e344-4ed4-8496-4ed7712e255d", "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED", "X-MS-Exchange-CrossTenant-userprincipalname": "\n 7uQ87oFwbaHz7mUB5+pq/D71gtYiQJiXZ3BQW6EYIohQy0WdsgfrFjSOX/A+3D68YNjawxVE/f67CfwblO3GQQ==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR11MB3662", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH 1/2] vhost: fix guest notification setting", "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 <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>" }, "addressed": null } ]