|
@@ -262,6 +262,18 @@ static bool vhost_vdpa_has_ufo(NetClientState *nc)
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * FIXME: vhost_vdpa doesn't have an API to "set h/w endianness". But it's
|
|
|
|
+ * reasonable to assume that h/w is LE by default, because LE is what
|
|
|
|
+ * virtio 1.0 and later ask for. So, this function just says "yes, the h/w is
|
|
|
|
+ * LE". Otherwise, on a BE machine, higher-level code would mistakely think
|
|
|
|
+ * the h/w is BE and can't support VDPA for a virtio 1.0 client.
|
|
|
|
+ */
|
|
|
|
+static int vhost_vdpa_set_vnet_le(NetClientState *nc, bool enable)
|
|
|
|
+{
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static bool vhost_vdpa_check_peer_type(NetClientState *nc, ObjectClass *oc,
|
|
static bool vhost_vdpa_check_peer_type(NetClientState *nc, ObjectClass *oc,
|
|
Error **errp)
|
|
Error **errp)
|
|
{
|
|
{
|
|
@@ -429,6 +441,7 @@ static NetClientInfo net_vhost_vdpa_info = {
|
|
.cleanup = vhost_vdpa_cleanup,
|
|
.cleanup = vhost_vdpa_cleanup,
|
|
.has_vnet_hdr = vhost_vdpa_has_vnet_hdr,
|
|
.has_vnet_hdr = vhost_vdpa_has_vnet_hdr,
|
|
.has_ufo = vhost_vdpa_has_ufo,
|
|
.has_ufo = vhost_vdpa_has_ufo,
|
|
|
|
+ .set_vnet_le = vhost_vdpa_set_vnet_le,
|
|
.check_peer_type = vhost_vdpa_check_peer_type,
|
|
.check_peer_type = vhost_vdpa_check_peer_type,
|
|
.set_steering_ebpf = vhost_vdpa_set_steering_ebpf,
|
|
.set_steering_ebpf = vhost_vdpa_set_steering_ebpf,
|
|
};
|
|
};
|