> On 4/26/24 09:48, Chaoyong He wrote: > > From: Xinying Yu <xinying...@corigine.com> > > > > Add the basic logic of software live migration. > > > > Unset the ring notify area to stop the direct IO datapath if the > > device support, then we can setup the vring relay to help the live > > migration. > > > > Signed-off-by: Xinying Yu <xinying...@corigine.com> > > Reviewed-by: Chaoyong He <chaoyong...@corigine.com> > > Reviewed-by: Long Wu <long...@corigine.com> > > Reviewed-by: Peng Zhang <peng.zh...@corigine.com> > > --- > > drivers/vdpa/nfp/nfp_vdpa.c | 66 > +++++++++++++++++++++++++++++++- > > drivers/vdpa/nfp/nfp_vdpa_core.c | 3 ++ > > drivers/vdpa/nfp/nfp_vdpa_core.h | 4 ++ > > 3 files changed, 71 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c > > b/drivers/vdpa/nfp/nfp_vdpa_core.c > > index 79ecd2b4fc..82a323a6d0 100644 > > --- a/drivers/vdpa/nfp/nfp_vdpa_core.c > > +++ b/drivers/vdpa/nfp/nfp_vdpa_core.c > > @@ -91,8 +91,11 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, > > tx_bar = (uint8_t *)pci_dev->mem_resource[2].addr + tx_bar_off; > > hw->qcp_cfg = tx_bar + NFP_QCP_QUEUE_ADDR_SZ; > > > > + vdpa_hw->sw_lm = true; > > + > > vdpa_hw->features = (1ULL << VIRTIO_F_VERSION_1) | > > (1ULL << VIRTIO_F_IN_ORDER) | > > + (1ULL << VHOST_F_LOG_ALL) | > > (1ULL << VHOST_USER_F_PROTOCOL_FEATURES); > > Is the live-migration works if we stop at patch 5? > If not, I would suggest to enable the feature only at the end of the series. >
The live-migration not work if we stop at patch 5. We will modify just as your advice in the v2 patch, and thanks for your review. > > > > return 0; > > diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.h > > b/drivers/vdpa/nfp/nfp_vdpa_core.h > > index a8e0d6dd70..0f880fc0c6 100644 > > --- a/drivers/vdpa/nfp/nfp_vdpa_core.h > > +++ b/drivers/vdpa/nfp/nfp_vdpa_core.h > > @@ -36,6 +36,10 @@ struct nfp_vdpa_hw { > > uint8_t mac_addr[RTE_ETHER_ADDR_LEN]; > > uint8_t notify_region; > > uint8_t nr_vring; > > + > > + /** Software Live Migration */ > > + bool sw_lm; > > + bool sw_fallback_running; > > }; > > > > int nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw, struct > > rte_pci_device *dev);