| 2260 | } |
| 2261 | |
| 2262 | static int |
| 2263 | vhost_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 | |
| 2286 | static int |
| 2287 | vhost_user_set_log_base(struct virtio_net **pdev, |
nothing calls this directly
no test coverage detected