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 782B9A00C5; Fri, 8 May 2020 03:54:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 464591DBA8; Fri, 8 May 2020 03:54:12 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9296D1DB7A for ; Fri, 8 May 2020 03:54:10 +0200 (CEST) IronPort-SDR: vm6aatbwhFPJhRVpKAeE1k1Wn45yl7Wa+D0aXuQ9fht7FDyYyUvM09niBv+JJLvyy8iCLCShXG GIGKK6XCLFJA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 18:54:09 -0700 IronPort-SDR: WghyuTHZwqWvHuQuo/CD6UzbNBAOZrDVyOGPgXPY8Lc+tjoFqohcsEiKGNAegM/7KSOBXaX10y ilNp47+MDcNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,366,1583222400"; d="scan'208";a="435515154" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 07 May 2020 18:54:09 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 18:54:08 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 18:54:08 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 7 May 2020 18:54:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMEM4X/FBP445yeF6lf0swJXgRvinIpmqY5AWZHzRyJfxpITvy/jbk5Z5qFaeire7ayn4PxtUEerkeWj9YhviEdLK5YHmGhSmPQvU6JM6K1+tLqpTzS6BA0FX5q38RvCvl1ceqo0gN/DB5sVf1FQ/BH8HqewkofYWU71y7gLBaYkxQv00uCLJMLvfcGD3HQs+8xQ5OKE86ImNIzhbC2Waed56OFWtUfaoExAQNKvvZUksikWCB4HBTHv/StIECmhl0skZy2QQwouMsZUnItK2ivVOHYP4En0QOrpOj1IQNNtQLoRdsa1ebVm1XXvRacHj9FTjMEUcCBEosK7loV91Q== 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=jyBo446uhbLK6w0gGCINPzGlK7dZD6H3qJAptljtSLw=; b=cZsOSAay+hJJ2kL4VHlJTZ10cXil8rF+c7qyXV6Wt/NgHLMjumtxgBXHNNGzKmZLv5wOi8Lvb0Wdh2Pi04i0OvB/QRY2xd0X2g4xGtrgwx3CEiQiPWFat0CqhsALsCYlLSggmxSyrKwpnzpT5S9CeZCzGRETQLGN/IGufFnkOSbSiO+oUS98a/WSF2rWMGoWhUf3fxWiEa/M18GfMPci50KzD4MP7im/zC1cYix9ItBe4mwESvzFtCrv385oQT4FW/RbkOxDi3C8eY5qsR/CWxjCDMzk2n33n16RU/+ONS1YlUi3sTyC7j2iQSt+CEPi8AwpFKtI+Y8tUUpQEuzEqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jyBo446uhbLK6w0gGCINPzGlK7dZD6H3qJAptljtSLw=; b=IR0R0sYH58HEfaSKKkcUxOYPDuNhI3x+TF4igcgZ+JHIUUxMkH+0z6K0CEt6weKb0WsBqvON5ZRSXV4FCyqXdo0vfWZX/ijG6SrOkAJrrm1lfPu250nuMiWMfpd6kEmVjb1czQqYBjo4UgFDcKvjRAPq8dGG9R5kwtyk3LPuXdA= Received: from DM5PR11MB1388.namprd11.prod.outlook.com (2603:10b6:3:12::12) by DM5PR11MB1707.namprd11.prod.outlook.com (2603:10b6:3:14::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Fri, 8 May 2020 01:54:07 +0000 Received: from DM5PR11MB1388.namprd11.prod.outlook.com ([fe80::f9c2:a5b5:322d:6385]) by DM5PR11MB1388.namprd11.prod.outlook.com ([fe80::f9c2:a5b5:322d:6385%9]) with mapi id 15.20.2958.030; Fri, 8 May 2020 01:54:07 +0000 From: "Wang, Yinan" To: Maxime Coquelin , "Liu, Yong" , "Ye, Xiaolong" , "Wang, Zhihong" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] net/virtio: fix crash when device reconnecting Thread-Index: AQHWJHqH4NmuFC1sXUSfV4R2OHWZtqidbhJQ Date: Fri, 8 May 2020 01:54:07 +0000 Message-ID: References: <20200414125555.86601-1-yong.liu@intel.com> <20200506150724.37170-1-yong.liu@intel.com> <7b0d02c5-f109-8143-824f-921ad6898a95@redhat.com> In-Reply-To: <7b0d02c5-f109-8143-824f-921ad6898a95@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d7b01fd7-e109-4c9d-d969-08d7f2f2b1b6 x-ms-traffictypediagnostic: DM5PR11MB1707: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 039735BC4E x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZuVTr/sjiBzt3fe6Lu0wHj0HptPFxTd4EAyZ+YOTLL3hs5uXH3SdEdT7v0s7ePkaMjIABOf8PhAPXrN8qnQyFp7SZJu1a3PXtogwwK5VOB2/GYDZKXMnhl5zWxyH1iefo4Y6Y+b7SfDDkVw/CnsrhJ96GnX5p7AXh35NQdy5MjauVOSukf4F8PjSqibusB2xXgJta7yCVKriSsc6L4OZGy+szmjMgxaJC7KCq8UZO4ZyNaEN5B2vMVrjJ2C9E/lK1g2H6LJ+9oevpZ3bvuttFmM5XaHagWU62tEixWKcovYb5RssKMLb3Hfq7hx5OblQyn3WHnqXeIJsUEbH0CP5NL8Xr03naJP76WDFjkae0z0pkxos4mtm66mmeYYTWst9nyk8jfdiKgL9SQHMqokAHy4XwJIMpzzJTq3dYG8g5QjFlvJuN6uqPG2HqiF5n5GafzU2+JEcAO7loKa9U2HRCt9MJPOg0nOb0OatNngNXT2lRrtY0JVsrNVGKlZo6xIhiCLkT3G1FAqZdA46t10QBg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR11MB1388.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39860400002)(136003)(346002)(396003)(366004)(376002)(33430700001)(33440700001)(66446008)(7696005)(71200400001)(66946007)(26005)(316002)(64756008)(66476007)(66556008)(5660300002)(53546011)(6506007)(4744005)(186003)(110136005)(9686003)(478600001)(2906002)(55016002)(33656002)(52536014)(83320400001)(83280400001)(83310400001)(83290400001)(83300400001)(76116006)(86362001)(6636002)(8936002)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: u7tCPM6BlRJyOxu2pLND9p7/4NUvQ5vxbFoD3PkFa4hBQ9Dp5WK6UuvlPtP1cIwT5szEHqy2wegN9eXCX5L9yu4AlvwTywOtWd3Y8VlJKqo8Xt1C0zCvAUZk3Uf1/EtB+pEuozdKwoLzbFvOfV+9oHfa1JZqRm3a5LpJsPWfTogH0pzdLHOAxBCIqJGfa6EHjVEDLyDTFCbdZffa72LQCVFe4QlCIbljLFsoSTzq9RoFSlvvRpDhxCpPs7lYFT2w7Y7J16mqlkIkbJR3q8BwGiTSgFgYoLaZ08O46LrJP+rsGZYfm3AwaYTpIGk0OcymmIzlK7FrRYkKv6yEpVpqK+CU1s2v6gWeuNpMLuzz2WgWMelVEzx3RcpN61vzPTGpMPcd4Ex5x0zZkOGLeUJyVLB9iUtDFYVsfrNY88nmwFSzQ75WWOni54UsKN/abjQ0H7ZTFt1eUdKnrh/pfg4P6j5kp6IAlsmi6gHdkwly8CEOASb+q48NnR2CIh9U7OCrIdi6kMT9oRQ34c7QQ4oNQJYeo5RHdAsx1poebUKFb4KU0SjSQkRV5zt8pJKWQiqrtBWq95wkyBWW6LWc1/uTTdiTcPhnxQkxs2+TR+YslrwmkuTaj4VbUjAPYqQIy/C0usIaVh0mvHBcRYdi/N2lllGLUxA8bxgr3Xywkw5hqqPPXM6DTke/8qpkVvW9644CgFI15cxbYmJvmghedkd8nLadVGsuOK/veB4OF4rQCgKX4gXazz3fPYWuHde1GDYfi5pUyee428x3gQVfbf8jaPyC/09xD0WiMC6DVqF5PBM= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d7b01fd7-e109-4c9d-d969-08d7f2f2b1b6 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2020 01:54:07.2373 (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: hC8OC5HLCjE2I0PbW3NN68eWjHqJkq6ZhekhcP9d6YGgTw9I9ecjsyzimeMGbnQ99B2HdZk76OIQdn7XBNGKvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1707 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/virtio: fix crash when device reconnecting 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" Tested-by: Wang, Yinan > -----Original Message----- > From: dev On Behalf Of Maxime Coquelin > Sent: 2020=1B$BG/=1B(B5=1B$B7n=1B(B7=1B$BF|=1B(B 22:18 > To: Liu, Yong ; Ye, Xiaolong ; > Wang, Zhihong > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] net/virtio: fix crash when device > reconnecting >=20 >=20 >=20 > On 5/6/20 5:07 PM, Marvin Liu wrote: > > When doing virtio device initialization, virtqueues will be reset in > > server mode if ring type is packed. It will cause issue because queues > > have been freed in the beginning of device initialization. > > > > Fix this issue by checking whether device has been initialized before > > reset. If device hasn't been initialized, there's no need to reset > > queues. > > > > Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode") > > > > Signed-off-by: Marvin Liu >=20 > Applied to dpdk-next-virtio/master >=20 > Thanks, > Maxime