From: Ben Pfaff Date: Mon, 14 Jul 2008 20:54:27 +0000 (-0700) Subject: packets: Distinguish max Ethernet length with and without VLAN header. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=841ae147670f4bea8f5a875ef5f24620f0a17c02;p=openvswitch packets: Distinguish max Ethernet length with and without VLAN header. --- diff --git a/include/packets.h b/include/packets.h index fac8f414..5d4eb560 100644 --- a/include/packets.h +++ b/include/packets.h @@ -99,8 +99,10 @@ static inline void eth_addr_random(uint8_t ea[ETH_ADDR_LEN]) #define ETH_HEADER_LEN 14 #define ETH_PAYLOAD_MIN 46 +#define ETH_PAYLOAD_MAX 1500 #define ETH_TOTAL_MIN (ETH_HEADER_LEN + ETH_PAYLOAD_MIN) -#define ETH_TOTAL_MAX (ETH_HEADER_LEN + VLAN_HEADER_LEN + 1500) +#define ETH_TOTAL_MAX (ETH_HEADER_LEN + ETH_PAYLOAD_MAX) +#define ETH_VLAN_TOTAL_MAX (ETH_HEADER_LEN + VLAN_HEADER_LEN + ETH_PAYLOAD_MAX) struct eth_header { uint8_t eth_dst[ETH_ADDR_LEN]; uint8_t eth_src[ETH_ADDR_LEN];