Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
hw/net: ftgmac100: Drop the small packet check in the receive path
Now that we have implemented unified short frames padding in the
QEMU networking codes, the small packet check logic in the receive
path is no longer needed.

Suggested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
  • Loading branch information
lbmeng authored and jasowang committed Jul 7, 2023
1 parent 0fe0efc commit 71e11da
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions hw/net/ftgmac100.c
Expand Up @@ -968,14 +968,6 @@ static ssize_t ftgmac100_receive(NetClientState *nc, const uint8_t *buf,
return -1;
}

/* TODO : Pad to minimum Ethernet frame length */
/* handle small packets. */
if (size < 10) {
qemu_log_mask(LOG_GUEST_ERROR, "%s: dropped frame of %zd bytes\n",
__func__, size);
return size;
}

if (!ftgmac100_filter(s, buf, size)) {
return size;
}
Expand Down

0 comments on commit 71e11da

Please sign in to comment.