vhost-user: Refactor the chr_closed_bh

Use vhost_user_save_acked_features to implemente acked features
saving.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Signed-off-by: Guoyi Tu <tugy@chinatelecom.cn>
Message-Id: <6699ee88687b62fb8152fe021e576cd2f468d7ca.1671627406.git.huangy81@chinatelecom.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Hyman Huang(黄勇) 2022-12-21 21:06:39 +08:00 committed by Michael S. Tsirkin
parent 937b7d96e4
commit bebcac052a

View file

@ -260,11 +260,7 @@ static void chr_closed_bh(void *opaque)
s = DO_UPCAST(NetVhostUserState, nc, ncs[0]);
for (i = queues -1; i >= 0; i--) {
s = DO_UPCAST(NetVhostUserState, nc, ncs[i]);
if (s->vhost_net) {
s->acked_features = vhost_net_get_acked_features(s->vhost_net);
}
vhost_user_save_acked_features(ncs[i]);
}
qmp_set_link(name, false, &err);