aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2023-05-23 11:43:07 +0900
committerJason Wang <jasowang@redhat.com>2023-05-23 15:20:15 +0800
commit743495144208cd1871ce0971ae6c57925141c855 (patch)
tree30a000aec3e3723ea9ed7176ef408814792acce7 /include/net
parente9e5b930691e5995210ca82aa6b9516733c20577 (diff)
downloadqemu-743495144208cd1871ce0971ae6c57925141c855.zip
qemu-743495144208cd1871ce0971ae6c57925141c855.tar.gz
qemu-743495144208cd1871ce0971ae6c57925141c855.tar.bz2
e1000x: Take CRC into consideration for size check
Section 13.7.15 Receive Length Error Count says: > Packets over 1522 bytes are oversized if LongPacketEnable is 0b > (RCTL.LPE). If LongPacketEnable (LPE) is 1b, then an incoming packet > is considered oversized if it exceeds 16384 bytes. > These lengths are based on bytes in the received packet from > <Destination Address> through <CRC>, inclusively. As QEMU processes packets without CRC, the number of bytes for CRC need to be subtracted. This change adds some size definitions to be used to derive the new size thresholds to eth.h. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/eth.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/eth.h b/include/net/eth.h
index e8af574..05f5693 100644
--- a/include/net/eth.h
+++ b/include/net/eth.h
@@ -32,6 +32,8 @@
#define ETH_ALEN 6
#define ETH_HLEN 14
#define ETH_ZLEN 60 /* Min. octets in frame without FCS */
+#define ETH_FCS_LEN 4
+#define ETH_MTU 1500
struct eth_header {
uint8_t h_dest[ETH_ALEN]; /* destination eth addr */