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 <[email protected]> > Sent: Friday, April 17, 2020 11:18 PM > To: Liu, Yong <[email protected]>; Ye, Xiaolong <[email protected]> > Cc: Wang, Zhihong <[email protected]>; [email protected]; Ding, Xuan > <[email protected]> > Subject: Re: [PATCH] net/virtio: fix crash when device reconnecting > > Hi Marvin, > > 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 != hw->req_guest_features) { > >> - ret = virtio_init_device(dev, req_features); > >> + ret = virtio_negotiate_features(hw, req_features); > > Why do we need to change virtio_init_device to virtio_negotiate_features > > here? > > > You missed to reply to that question from Xiaolong. > > Regards, > Maxime

