[dpdk-dev] [PATCH 06/17] vhost: introduce API to fetch negotiated features
yuanhan.liu at linux.intel.com
Thu Mar 16 08:35:16 CET 2017
On Tue, Mar 14, 2017 at 12:02:59PM +0100, Maxime Coquelin wrote:
> >+rte_vhost_get_negotiated_features(int vid)
> >+ struct virtio_net *dev;
> >+ dev = get_device(vid);
> >+ if (!dev)
> >+ return -1;
> >+ return dev->features;
> Are we sure the negotiation is done when we can get the device?
Yes. However, one thing worth noting is that the features may change
after the new_device() callback. Notablely, when live migration starts
/ends, the VHOST_F_LOG_ALL will be set/cleared, respectively.
>From that point of view, we need a new callback, something like
features_changed(), or live_migration_starts()? Or a better name?
More information about the dev