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 04C00A059A; Sun, 19 Apr 2020 03:35:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B0CEC1D40E; Sun, 19 Apr 2020 03:35:32 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 9BD0A1C205 for ; Sun, 19 Apr 2020 03:35:31 +0200 (CEST) IronPort-SDR: aKINwD/eFHFBNz07VXS99fUQCSSf6kXNV6mKPIKXH6YPqiQ8dgN+U9+99np7hDTcEXIG37+hZX T75xnQRKHKNQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2020 18:35:30 -0700 IronPort-SDR: 4S0cl3NUCEJClL45VjP2Q0qrrWYTjUB2UmRX+HDN5Qg8xuYvOM+dnPimblHzuN7u7Z4OwSvPoK 44GrNNx0unSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,401,1580803200"; d="scan'208";a="456014772" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 18 Apr 2020 18:35:29 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 18 Apr 2020 18:35:29 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 18 Apr 2020 18:35:29 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.146]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.191]) with mapi id 14.03.0439.000; Sun, 19 Apr 2020 09:35:27 +0800 From: "Liu, Yong" To: Maxime Coquelin , "Ye, Xiaolong" CC: "Wang, Zhihong" , "dev@dpdk.org" , "Ding, Xuan" Thread-Topic: [PATCH] net/virtio: fix crash when device reconnecting Thread-Index: AQHWEhyTclpe89ykXEKgR6QgDJjjHqh5Q2iAgACHcWCAAyGTgIACu5NQ Date: Sun, 19 Apr 2020 01:35:27 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6353CA6F@SHSMSX103.ccr.corp.intel.com> References: <20200414125555.86601-1-yong.liu@intel.com> <20200415072417.GB33551@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E635351F0@SHSMSX103.ccr.corp.intel.com> <898c34d3-f6fc-9695-3e7e-26221726a741@redhat.com> In-Reply-To: <898c34d3-f6fc-9695-3e7e-26221726a741@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] 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" Sorry for missed this question. The purpose of change function is to skip= device initialization which is not needed in configuration stage. When features not matched, can just do feature negotiation in configuration= stage and do related actions when virtio device start. Regards, Marvin > -----Original Message----- > From: Maxime Coquelin > Sent: Friday, April 17, 2020 11:18 PM > To: Liu, Yong ; Ye, Xiaolong > Cc: Wang, Zhihong ; dev@dpdk.org; Ding, Xuan > > Subject: Re: [PATCH] net/virtio: fix crash when device reconnecting >=20 > Hi Marvin, >=20 > On 4/15/20 9:30 AM, Liu, Yong wrote: > >> @@ -2120,7 +2119,7 @@ virtio_dev_configure(struct rte_eth_dev *dev) > >> > >> /* if request features changed, reinit the device */ > >> if (req_features !=3D hw->req_guest_features) { > >> - ret =3D virtio_init_device(dev, req_features); > >> + ret =3D virtio_negotiate_features(hw, req_features); > > Why do we need to change virtio_init_device to virtio_negotiate_feature= s > > here? >=20 >=20 > You missed to reply to that question from Xiaolong. >=20 > Regards, > Maxime