qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vmxnet3: add stub for encapsulation offload


From: Thomas Huth
Subject: Re: [PATCH] vmxnet3: add stub for encapsulation offload
Date: Fri, 5 Aug 2022 16:57:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

On 07/08/2021 00.23, Alexander Bulekov wrote:
Encapsulation offload (offload mode 1) is a valid mode present in the
kernel that isn't implemented in QEMU, yet.

https://lore.kernel.org/lkml/20200528015426.8285-4-doshir@vmware.com/

Add a stub for this mode, to avoid the guest-triggerable assertion.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/517
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
---
  hw/net/vmxnet3.c | 5 +++++
  hw/net/vmxnet3.h | 1 +
  2 files changed, 6 insertions(+)

diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 41f796a247..62e11d0e3e 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -443,6 +443,11 @@ vmxnet3_setup_tx_offloads(VMXNET3State *s)
          net_tx_pkt_build_vheader(s->tx_pkt, false, false, 0);
          break;
+ case VMXNET3_OM_ENCAP:
+        VMW_PKPRN("Encapsulation offload requested, but not available\n");
+        return false;
+        break;

I think I'd also remove the break, anyway:

Reviewed-by: Thomas Huth <thuth@redhat.com>

Jason, could you maybe also pick this up for QEMU 7.1, so we can close issue 517 ?

      case VMXNET3_OM_CSUM:
          net_tx_pkt_build_vheader(s->tx_pkt, false, true, 0);
          VMW_PKPRN("L4 CSO requested\n");
diff --git a/hw/net/vmxnet3.h b/hw/net/vmxnet3.h
index 5b3b76ba7a..36a17b82aa 100644
--- a/hw/net/vmxnet3.h
+++ b/hw/net/vmxnet3.h
@@ -273,6 +273,7 @@ struct Vmxnet3_TxDesc {
/* TxDesc.OM values */
  #define VMXNET3_OM_NONE        0
+#define VMXNET3_OM_ENCAP       1
  #define VMXNET3_OM_CSUM        2
  #define VMXNET3_OM_TSO        3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]