qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 04/40] igb: Include the second VLAN tag in the buffer


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 04/40] igb: Include the second VLAN tag in the buffer
Date: Fri, 14 Apr 2023 16:35:30 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

On 14/4/23 16:32, Philippe Mathieu-Daudé wrote:
On 14/4/23 16:28, Philippe Mathieu-Daudé wrote:
On 14/4/23 13:37, Akihiko Odaki wrote:
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
  hw/net/igb_core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index 55de212447..f725ab97ae 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -1590,7 +1590,7 @@ static ssize_t
  igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt,
                       bool has_vnet, bool *external_tx)
  {
-    static const int maximum_ethernet_hdr_len = (ETH_HLEN + 4);
+    static const int maximum_ethernet_hdr_len = (ETH_HLEN + 8);

Aren't VLAN tags 16-bit wide? Could you convert this magic value
to some verbose-but-obvious definitions?

Digging a bit more, is this struct vlan_header?

And now I see in patch #08 "igb: Always copy ethernet header":

  +typedef struct L2Header {
  +    struct eth_header eth;
  +    struct vlan_header vlan[2];
  +} L2Header;

Maybe add it first, and use sizeof(L2Header) here directly?



reply via email to

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