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

Function vhost_user_set_vring_err

dpdk/lib/vhost/vhost_user.c:1854–1870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1852}
1853
1854static int vhost_user_set_vring_err(struct virtio_net **pdev,
1855 struct vhu_msg_context *ctx,
1856 int main_fd __rte_unused)
1857{
1858 struct virtio_net *dev = *pdev;
1859 int expected_fds;
1860
1861 expected_fds = (ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK) ? 0 : 1;
1862 if (validate_msg_fds(dev, ctx, expected_fds) != 0)
1863 return RTE_VHOST_MSG_RESULT_ERR;
1864
1865 if (!(ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK))
1866 close(ctx->fds[0]);
1867 VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented\n");
1868
1869 return RTE_VHOST_MSG_RESULT_OK;
1870}
1871
1872static int
1873resubmit_desc_compare(const void *a, const void *b)

Callers

nothing calls this directly

Calls 2

validate_msg_fdsFunction · 0.85
closeFunction · 0.50

Tested by

no test coverage detected