From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sessmg22.ericsson.net (sessmg22.ericsson.net [193.180.251.58]) by dpdk.org (Postfix) with ESMTP id 03A4EE5D for ; Fri, 15 Dec 2017 12:29:26 +0100 (CET) X-AuditID: c1b4fb3a-925ff7000000028c-a0-5a33b2164243 Received: from ESESSHC023.ericsson.se (Unknown_Domain [153.88.183.87]) by sessmg22.ericsson.net (Symantec Mail Security) with SMTP id 4C.FF.00652.612B33A5; Fri, 15 Dec 2017 12:29:26 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.87) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 15 Dec 2017 12:29:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.onmicrosoft.com; s=selector1-ericsson-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1ZPc/bPNxEP6WApcj0BX3kCsX4UCqSBIGtEv825kscw=; b=amj9ljRMMpN3pYzSbuo5UYWxyit1akN6Dh3PZ8W8dnr+fT1PtEgCeLbYO/10nCA34OhMN/aU6o0DHasAD9NIJPwT4urGoN0FKoZ+H/XVyCrkRboR2BsP7VT2muts4w8b64GvARHwYVfpazj1oK3rPOftICYUe9XkFEq2BZ6hApI= Received: from VI1PR0702MB3677.eurprd07.prod.outlook.com (52.134.7.139) by DB3PR07MB0556.eurprd07.prod.outlook.com (10.160.45.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.1; Fri, 15 Dec 2017 11:29:24 +0000 Received: from VI1PR0702MB3677.eurprd07.prod.outlook.com ([fe80::b143:3f5c:b695:b2fd]) by VI1PR0702MB3677.eurprd07.prod.outlook.com ([fe80::b143:3f5c:b695:b2fd%13]) with mapi id 15.20.0323.004; Fri, 15 Dec 2017 11:29:22 +0000 From: Patrik Andersson R To: Maxime Coquelin , "dev@dpdk.org" CC: Yuanhan Liu , Jianfeng Tan , =?iso-8859-1?Q?=C1gota_Benyhe?= Thread-Topic: [dpdk-dev] [PATCH v2] virtio_net: kick guest even when virtio queue is full Thread-Index: AQHTbbyN/Upwlk3cIUGpqiH0fX+me6M5ovEAgAkYOlQ= Date: Fri, 15 Dec 2017 11:29:22 +0000 Message-ID: References: <1512464838-17300-1-git-send-email-agota.benyhe@ericsson.com> <1512473433-18170-1-git-send-email-agota.benyhe@ericsson.com>, <0d909636-0757-b028-85b3-5ee9e1d8e637@redhat.com> In-Reply-To: <0d909636-0757-b028-85b3-5ee9e1d8e637@redhat.com> Accept-Language: sv-SE, en-US Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.176.1.94] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR07MB0556; 6:JeZOFIorTmZo5iltBxOC/3To2cQEUDkcH8/hV/8ZJONOvIcnsQo/SKhCtCP4JHxNv8rWf27rh3S80jXhoOAHbAH9l0uKeTLR2hdtPriRD94WbHcHvrUYEBTu2kUyEoiMir5EQkG4DOmWsDg1hjYvBRN5wHrmp03Pdc+3HSg2zH31vvryAciuUnkH2PTDrcXkiAoS92LAPuxXu15UO31rAkq5d6V2w4cI6REjHqzfKQ+Uo3oNzDm57rGsq8D68Mm4L+dAyv6URZg5Bk2uf/zLLRf2zy5rkwhxuTJ5nOmZjUww1tcG6yDQ4GVMGW0GtvZ+QoEVaJshmUOIf/hG7OEgHUsHNRonGe+Eenx9sCHyGzM=; 5:nGEUxucN/TaF+Di8aaLdonM5h2wvJ+pRUnHAAxHFM6TTS5RIQuyfQ101QtgNfFr7TGu83Y2vG0bFonyLs1rfmV3dKMQvd0/uQmKNyw668I3OPyM/IPvWOfpYsjMCGvJ+Hhd7VTfy0VvtnNQeXAfMEcAwoTwVEoGe+kZ4/ksjw/g=; 24:1R77jroGwakwoLYF9mB4Tevs1T+I5Wbp8M9TT40RRH5kq8SC9+Pb2ekLbyODiUYHKKzS95RtPZf7OxvHteQRBF8AvnH9fp9tvEIw7IBnP8Y=; 7:pdVqXZ7EdszAITpki/hOYeCToPglJ4jgvKCcONCx6kRaBkvkKejoX2oVNdXtWGVt3EGWLZivVhy99z6exetKi1ogBT/kV2sFmZosOpPGXXJZLstDjnCk14tCVE1ZOfCGNGE6Qa3c+gnABtL3G/M556s97jG+2JshKlP4+Di6d9+gBV70ISOvK0lCAY6DceMs4xxkE6gfL3FbmiidLUPg/A1X1JvM18QCQ9NyWLiBKv5iyFi4dk8Zz82nVhRnNJO+ x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(346002)(39860400002)(376002)(396003)(366004)(189003)(199004)(24454002)(7736002)(316002)(305945005)(2950100002)(110136005)(54906003)(3660700001)(74316002)(3280700002)(25786009)(7696005)(2900100001)(6436002)(76176011)(9686003)(53936002)(5660300001)(107886003)(59450400001)(99286004)(55016002)(6506007)(53546011)(97736004)(5250100002)(81166006)(8676002)(2501003)(478600001)(3846002)(8936002)(68736007)(6116002)(102836003)(4326008)(14454004)(81156014)(66066001)(86362001)(105586002)(2906002)(33656002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR07MB0556; H:VI1PR0702MB3677.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: 0d59d72f-c1a8-47a5-a54b-08d543af16f7 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153051); SRVR:DB3PR07MB0556; x-ms-traffictypediagnostic: DB3PR07MB0556: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(37575265505322); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231023)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(6072148)(201708071742011); SRVR:DB3PR07MB0556; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DB3PR07MB0556; x-forefront-prvs: 05220145DE received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=patrik.r.andersson@ericsson.com; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0d59d72f-c1a8-47a5-a54b-08d543af16f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2017 11:29:22.5053 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR07MB0556 X-OriginatorOrg: ericsson.com X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTURzHO7t31+twdVw+fkytHESgaKZCMkIywmYPUCrURejQm89N2VXR ijIyy6kh1BA1H6VpahqY+cDN2u2lIWTmi4gV5DIzrCwwH1nb7oL++5zz/Xw5v3M4NCGpFkrp NE0Oo9WoMmWUiKyK640N8OgKUQYtVIWGLSz2CsJKa35SYc9KDGRYUVO/YC+pWGm4LVRMr7+h FI2GOYHi6+AEFU0qRXuSmcy0PEa7MzxRlPrKrCOzx1zzW0fniELUuFGHnGnAoTC4/MVJh0S0 BD9G8NrYRdgCCR5CUNHuawtIXE7A+OycgLcqBTBgqiH4xSyCpYl2oa1CYTnU9TQLbOyGY6Bn +SppkwhchmCifNXJFmzGSphcfkvx0gnoLXrqKMihr9aAbEzi7fD9jom0sRgnwp/GKcSfNoBg xai3l51xODzi5u0FhH3g3ZLZXiCwJ/yofS/gb4ehyfCS4Nkd5j6sC3neBpemLjrYB8bqS+0H AOac4KHFgvggBHQVBoc0JIQHF3boEG3lI9BvFPJ+B4I1bsTh+0HJ/D2HnwGTls8E71ufZeQk 7zcQoDfWO4bzhludbcIKFFj939w8B8K0/jrFsz8035wnqu2P4QrDVTNkAyLbkDvLsKw6JTg4 kNGmJbFsliZQw+R0IeuPMXWvyvuQaTaCQ5hGMhdxS12IUiJU5bEFag4BTcjcxOZI65Y4WVVw mtFmJWhzMxmWQ140KfMUD0eJlRKcosphMhgmm9H+SwW0s7QQtRktB1XqrPT4YzNLsXe5TZTP +ReHpekdx/Wmlg1B0fqjkyH+Ny77DBbHmdW/O6KvxSVIAg6wbKffx+LdSYUoJmPginxxsD9+ a0T8+GiZJcriJdmy8Jxc8y5O3V8ZUR/57YzHWa7bV9PKip/oc2P2nTp0fyLfRRErXT8nran+ 9EtGsqmqXX6EllX9BexJPG0tAwAA X-Mailman-Approved-At: Mon, 18 Dec 2017 16:11:17 +0100 Subject: Re: [dpdk-dev] [PATCH v2] virtio_net: kick guest even when virtio queue is full X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 11:29:27 -0000 Hi Maxime, apologies for the late answer. Yes I would think that it would solve the problem that we had. But there is a slight risk that a driver in a VM (not within our area of=20 influence) was partly responsible for the severity of the fault and=20 that we might again experience some difficulties even with your change. Though the risk is likely to be very low. However, if your patch protects the file descriptors when in use I=20 would consider that a better solution than doing the extra writes on the full queue. I would recommend going with your solution rather than the one suggested by us. Regards, Patrik Fr=E5n: Maxime Coquelin Skickat: den 8 december 2017 17:11 Till: =C1gota Benyhe; dev@dpdk.org Kopia: Patrik Andersson R; Yuanhan Liu; Jianfeng Tan =C4mne: Re: [dpdk-dev] [PATCH v2] virtio_net: kick guest even when virtio q= ueue is full =A0=20 Hi Agota, Patrick, On 12/05/2017 12:30 PM, Agota Benyhe wrote: > From: Patrik Andersson R >=20 > Changing the vring call file descriptor during virtio device enqueue > operation may lead to "kick" on a file descriptor that is closed. As > a consequence the guest might not be notified of new packets in the > enqueue. >=20 > The suggested change will add some extra load on DPDK and on the > guest if the queue is frequently full. Any application using DPDK > should avoid attempting retransmissions when the zero packets are > enqueued. >=20 > To overcome this problem, the kick operation in virtio_dev_merge_rx() > was excluded from the pkt_idx > 0 condition. A similar change was > done in virtio_dev_rx(). >=20 > Signed-off-by: Patrik Andersson R > Signed-off-by: Agota Benyhe > --- >=A0=A0 lib/librte_vhost/virtio_net.c | 23 +++++++++++++---------- >=A0=A0 1 file changed, 13 insertions(+), 10 deletions(-) We are working on a patch that protects enqueue & dequeue paths from vhost-user requests handling. For your case, it would protect call_fd to be changed while vring is being processed by the PMD thread. Do you think that would solve the problem you are facing? Regards, Maxime =