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.od...@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?