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

Function vhost_user_set_protocol_features

dpdk/lib/vhost/vhost_user.c:2262–2284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2260}
2261
2262static int
2263vhost_user_set_protocol_features(struct virtio_net **pdev,
2264 struct vhu_msg_context *ctx,
2265 int main_fd __rte_unused)
2266{
2267 struct virtio_net *dev = *pdev;
2268 uint64_t protocol_features = ctx->msg.payload.u64;
2269 uint64_t backend_protocol_features = 0;
2270
2271 rte_vhost_driver_get_protocol_features(dev->ifname,
2272 &backend_protocol_features);
2273 if (protocol_features & ~backend_protocol_features) {
2274 VHOST_LOG_CONFIG(dev->ifname, ERR, "received invalid protocol features.\n");
2275 return RTE_VHOST_MSG_RESULT_ERR;
2276 }
2277
2278 dev->protocol_features = protocol_features;
2279 VHOST_LOG_CONFIG(dev->ifname, INFO,
2280 "negotiated Vhost-user protocol features: 0x%" PRIx64 "\n",
2281 dev->protocol_features);
2282
2283 return RTE_VHOST_MSG_RESULT_OK;
2284}
2285
2286static int
2287vhost_user_set_log_base(struct virtio_net **pdev,

Callers

nothing calls this directly

Tested by

no test coverage detected