From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D24DEA052B; Tue, 28 Jul 2020 21:03:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE90B2B86; Tue, 28 Jul 2020 21:03:37 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130045.outbound.protection.outlook.com [40.107.13.45]) by dpdk.org (Postfix) with ESMTP id 9F399F04 for ; Tue, 28 Jul 2020 21:03:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gkS//wTqAFoGxWDt1BSFXFTZ554RbXHGDMmAeoPRtnKpu5xmfZgd0fJEhTp02VH+Ri2/OU7HIrer2NaKq/6+f2N/WBp3LDaYha4fSc7t+3o6yC1ETFn6jdPthpNPgeWI0+SP+SxKQLodRigjA88h1QvZG+dwREn+ZX/etnxEwBJOx1ETHuGWp+3Eo2g2hj5wihub4ziaIw+TWwo9nLOnd8fjqlc7VhYG3tNIduiR43C8SJiI1A3aMpGgmqJz2RLTalkPT3ErmXhH+30ffKRcE/b6iiqld/OGJ6vJp80Ljp7jgJDPlL+wwD39K37nKdzCVBKRF1yzAc2uFY7RRgELIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ne+IJqgvqSa4CyB9qWo4+rf3HSjrWf2DT2ezmHPud9A=; b=NgHQOJ7DS6184gf2wCQHJe2CqO4qRDu4gq5B8AwZAHu0CAADr7N9uQzplzgaW2Z1fmUqpGfKiW2NmSRA2xF78NsoVCUiHKOBT8VqJUFs+ihYtjKe1OqKdRz4mpnKFM3jAZ2Ob2VMSKo1iOmm7fVxP56C60E+qV/mBMHDBioiwsnHV8M83tVZupCiDrj7t4RBmVF5EVgZjjSmUjTWmTb2CQ6aw7fW6UUgmupfC4sNoapI9tfKNtmb8TXFwsMR4dr62PU6BRTHZzefwyk0oTr4Kd1Hjas4L02/r4+MiCBA5lnqD3LRu4t1pxMa6MkGDrPAKjlA6/BGp4REy83Stzpn9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ne+IJqgvqSa4CyB9qWo4+rf3HSjrWf2DT2ezmHPud9A=; b=iRYyZ/DVwKHbMBC3CxG13gAxMuGbS//XMwKTZYORmZzYmk29V1oSTNvIQcnh+t+CL2y1tpnhr8MMOHQJ15t8j0awyd2s1lfgTPsCwDUkg++njd+4G5UGLGnqoyfzoo7XcHtp35sQhpia9zkrc5GFa0uIVkNt1nGThnNxIvyJK+k= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (2603:10a6:208:f::11) by AM0PR0502MB3811.eurprd05.prod.outlook.com (2603:10a6:208:24::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Tue, 28 Jul 2020 19:03:35 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::c010:7069:920a:3663]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::c010:7069:920a:3663%6]) with mapi id 15.20.3216.034; Tue, 28 Jul 2020 19:03:34 +0000 From: Matan Azrad To: Maxime Coquelin , "dev@dpdk.org" , "chenbo.xia@intel.com" , "yong.liu@intel.com" , "yinan.wang@intel.com" CC: Thomas Monjalon , "ferruh.yigit@intel.com" , "david.marchand@redhat.com" Thread-Topic: [PATCH v2 3/3] net/vhost: fix interrupt mode Thread-Index: AQHWZP8+CGOrgLU9fkaiZGww3ToXqKkdVJ7w Date: Tue, 28 Jul 2020 19:03:34 +0000 Message-ID: References: <20200728165021.216291-1-maxime.coquelin@redhat.com> <20200728165021.216291-4-maxime.coquelin@redhat.com> In-Reply-To: <20200728165021.216291-4-maxime.coquelin@redhat.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [77.126.22.121] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 19c3c70e-4adf-4296-2320-08d83328ed83 x-ms-traffictypediagnostic: AM0PR0502MB3811: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zvPmUTKSvhScidX0ALKdn6fAEK6+17bGyb8uuaLjv5YLQ9Pz3g8dietTSCVFFFsnR6M9SL/2DtUZbthVYDTVJQsy+Np08Ph8VcKEBVpOGs35hJglidrzdce6Z83I86z7NT7EBz1806JSd34jS2gJ4iMuWk7mNQlcyko2joW1cF3XKb/LfGM+efftTnqARIdIRow687wNfHW0nJ4Rv1OhoHTBEoOnZYqk/O/GPRct8KOOAYkyDLrtzhUx4ifJkLXX7RxZX47eu1Y2XYSHilow4ATLe04OGBATL8UANByndyiZWZnbYG865x95w+Dmux8wUifxtN3CgaE/lcT212y8tQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(346002)(366004)(136003)(376002)(39860400002)(316002)(478600001)(110136005)(54906003)(76116006)(7696005)(71200400001)(66446008)(66476007)(66946007)(64756008)(66556008)(26005)(33656002)(186003)(6506007)(55016002)(4744005)(8936002)(2906002)(5660300002)(8676002)(86362001)(4326008)(9686003)(52536014)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: QNot4zmEf2LXBC4caqmZhMqYatxSXsjRW6VHiL+TdzraIA39rwF1zAmbYXGwNwOmLjYFsnaQhvWSnrD+BdZyoRVFgEM95/fOBmNFCleqr31JgQ5+CZFRQvn5xUx0GhSDedU9Qftaeo17h0TvTf/eXPDCx/XIAYiiKefFN3x3q9s1iUdaOz0Vh+8pl2QKRFo8FW8lKPluEIuY8QRUZY7zs/feeyPjYeUeY0ggNV3jg+WaswZcKwtrSLZFYqTsQ+llcvnoA71Uln9/0W8y+3efp+X9QS2MbN7mP/HW4+4Mjgh2Faysv1q1st8ZmDyb4v3OXhqS7Ijpbv6+3KKUK8ycxHsOwfpCAiv5A9fXcewhOgCVlgXO+59anKTnNXvkapOYOg7n/0KPXHlhqZris86Ano60xVTbD+swjZQw36xzN6lJluh7poeXoorQTx41vo/MHkkGYqGlEyX8LbqLXaMYWbHr+AUHW/HwqNecKvt3gzo= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR0502MB4019.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19c3c70e-4adf-4296-2320-08d83328ed83 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2020 19:03:34.8328 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VXvB1fGoBdl+EI2JCn2x53WEsDknXiSViuq4UP9zfh/ZFxScMOxji/VUhcoSSCYzdHirc6BKZ9rHUpyFrpTzBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3811 Subject: Re: [dpdk-dev] [PATCH v2 3/3] net/vhost: fix interrupt mode 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Maxime Coquelin: > At .new_device() time, only the first vring pair is now ready, other vrin= gs are > consfigured later. >=20 > Problem is that when application will setup and enable interrupts, only t= he > first queue pair Rx interrupt will be enabled. >=20 > This patches fixes the issue by setting the number of max interrupts to t= he > number of Rx queues that will be later initialized. Then, as soon as a Rx= vring > is ready, it removes the corresponding uninitialized epoll event, and ins= tall a > new one with the valid FD. Doesn't it race condition to the application decision? App may change the configuration per queue in any time by the app control t= hread. The vhost PMD may change it usynchronically from the vhost control thread i= n the vring state callback. I already mentioned it in other thread on this topic but didn't get reply. > Fixes: 604052ae5395 ("net/vhost: support queue update") >=20 > Signed-off-by: Maxime Coquelin