MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cleanup_vq_inflight

Function cleanup_vq_inflight

dpdk/lib/vhost/vhost.c:348–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348void
349cleanup_vq_inflight(struct virtio_net *dev, struct vhost_virtqueue *vq)
350{
351 if (!(dev->protocol_features &
352 (1ULL << VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD)))
353 return;
354
355 if (vq_is_packed(dev)) {
356 if (vq->inflight_packed)
357 vq->inflight_packed = NULL;
358 } else {
359 if (vq->inflight_split)
360 vq->inflight_split = NULL;
361 }
362
363 if (vq->resubmit_inflight) {
364 if (vq->resubmit_inflight->resubmit_list) {
365 rte_free(vq->resubmit_inflight->resubmit_list);
366 vq->resubmit_inflight->resubmit_list = NULL;
367 }
368 rte_free(vq->resubmit_inflight);
369 vq->resubmit_inflight = NULL;
370 }
371}
372
373/*
374 * Unmap any memory, close any file descriptors and

Callers 3

cleanup_deviceFunction · 0.85
vhost_user_set_featuresFunction · 0.85

Calls 2

vq_is_packedFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected