Skip to content

Commit ca4e2a8

Browse files
committed
Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging
# -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEIV1G9IJGaJ7HfzVi7wSWWzmNYhEFAmfX5/cACgkQ7wSWWzmN # YhFRHQgArp4daHmnfc4r8TNel7fBjeSTpfDGwQcUJbcljKK2ABtylcESAEg6tsAw # aBzaZ2PwoTQfDV2s//g/d2uzd3BWH0Iu3qimsyBtx7Um7D4h7NsGB+gTB/7IhcK8 # 1LjMHqDnaeS6fzJ93/umTXuyQLzA3tIFkJBzvxVseLrmv6uBPmAy+PDNe/uZ2jeF # 2H20jNt/HMc1Yf7sE7NKTBkX+OxuIFkpOGcBtVxiPK1//Wmhw+v+zlQOFjUC+6CD # LxiBB0Q0tD7ekfbuF6x2SOnuzLDHgpMzgoGqLIYzeQhBX9TdHLM0LtEHHaMyW1pj # 7mGPSY4avVSM1sePgtmNJ5Y5r/xTRA== # =e7Sc # -----END PGP SIGNATURE----- # gpg: Signature made Mon 17 Mar 2025 05:14:31 EDT # gpg: using RSA key 215D46F48246689EC77F3562EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <[email protected]>" [full] # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * tag 'net-pull-request' of https://github.com/jasowang/qemu: vdpa: Allow vDPA to work on big-endian machine Signed-off-by: Stefan Hajnoczi <[email protected]>
2 parents aa90f11 + b027f55 commit ca4e2a8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

net/vhost-vdpa.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,18 @@ static bool vhost_vdpa_has_ufo(NetClientState *nc)
262262

263263
}
264264

265+
/*
266+
* FIXME: vhost_vdpa doesn't have an API to "set h/w endianness". But it's
267+
* reasonable to assume that h/w is LE by default, because LE is what
268+
* virtio 1.0 and later ask for. So, this function just says "yes, the h/w is
269+
* LE". Otherwise, on a BE machine, higher-level code would mistakely think
270+
* the h/w is BE and can't support VDPA for a virtio 1.0 client.
271+
*/
272+
static int vhost_vdpa_set_vnet_le(NetClientState *nc, bool enable)
273+
{
274+
return 0;
275+
}
276+
265277
static bool vhost_vdpa_check_peer_type(NetClientState *nc, ObjectClass *oc,
266278
Error **errp)
267279
{
@@ -429,6 +441,7 @@ static NetClientInfo net_vhost_vdpa_info = {
429441
.cleanup = vhost_vdpa_cleanup,
430442
.has_vnet_hdr = vhost_vdpa_has_vnet_hdr,
431443
.has_ufo = vhost_vdpa_has_ufo,
444+
.set_vnet_le = vhost_vdpa_set_vnet_le,
432445
.check_peer_type = vhost_vdpa_check_peer_type,
433446
.set_steering_ebpf = vhost_vdpa_set_steering_ebpf,
434447
};

0 commit comments

Comments
 (0)