X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_vhost%2Fvhost_user.c;h=d20c8c57ad203f24834421e0de89a8809e19960f;hb=e2a94f9ad3ef949c0df3e63699bd4e381b5003d9;hp=4deceb3e00d6b8b8b08251bb57558f0928f5394e;hpb=cacf8267cc14e84384dbc86f24f6b10e8aedbcbc;p=dpdk.git diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 4deceb3e00..d20c8c57ad 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -341,7 +341,9 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg, dev->features = features; if (dev->features & - ((1 << VIRTIO_NET_F_MRG_RXBUF) | (1ULL << VIRTIO_F_VERSION_1))) { + ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | + (1ULL << VIRTIO_F_VERSION_1) | + (1ULL << VIRTIO_F_RING_PACKED))) { dev->vhost_hlen = sizeof(struct virtio_net_hdr_mrg_rxbuf); } else { dev->vhost_hlen = sizeof(struct virtio_net_hdr); @@ -1941,10 +1943,10 @@ vhost_user_get_vring_base(struct virtio_net **pdev, vq->shadow_used_split = NULL; if (vq->async_pkts_pending) rte_free(vq->async_pkts_pending); - if (vq->async_pending_info) - rte_free(vq->async_pending_info); + if (vq->async_pkts_info) + rte_free(vq->async_pkts_info); vq->async_pkts_pending = NULL; - vq->async_pending_info = NULL; + vq->async_pkts_info = NULL; } rte_free(vq->batch_copy_elems); @@ -1978,9 +1980,9 @@ vhost_user_set_vring_enable(struct virtio_net **pdev, "set queue enable: %d to qp idx: %d\n", enable, index); - if (!enable && dev->virtqueue[index]->async_registered) { + if (enable && dev->virtqueue[index]->async_registered) { if (dev->virtqueue[index]->async_pkts_inflight_n) { - VHOST_LOG_CONFIG(ERR, "failed to disable vring. " + VHOST_LOG_CONFIG(ERR, "failed to enable vring. " "async inflight packets must be completed first\n"); return RTE_VHOST_MSG_RESULT_ERR; }