X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fnet%2Frte_ether.h;h=bf8a55ba06ca51b9e01724a1764c9a9a48d28834;hb=77dd857d306f6b71eb93935ce1a01197156b5428;hp=2c7da55b6b0577bf385e13157884be4680b8a58a;hpb=daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f;p=dpdk.git diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h index 2c7da55b6b..bf8a55ba06 100644 --- a/lib/net/rte_ether.h +++ b/lib/net/rte_ether.h @@ -18,7 +18,6 @@ extern "C" { #include #include -#include #include #include #include @@ -35,9 +34,10 @@ extern "C" { (RTE_ETHER_MAX_LEN - RTE_ETHER_HDR_LEN - \ RTE_ETHER_CRC_LEN) /**< Ethernet MTU. */ +#define RTE_VLAN_HLEN 4 /**< VLAN (IEEE 802.1Q) header length. */ +/** Maximum VLAN frame length (excluding QinQ), including CRC. */ #define RTE_ETHER_MAX_VLAN_FRAME_LEN \ - (RTE_ETHER_MAX_LEN + 4) - /**< Maximum VLAN frame length, including CRC. */ + (RTE_ETHER_MAX_LEN + RTE_VLAN_HLEN) #define RTE_ETHER_MAX_JUMBO_FRAME_LEN \ 0x3F00 /**< Maximum Jumbo frame length, including CRC. */ @@ -367,7 +367,7 @@ static inline int rte_vlan_insert(struct rte_mbuf **m) return -EINVAL; oh = rte_pktmbuf_mtod(*m, struct rte_ether_hdr *); - nh = (struct rte_ether_hdr *) + nh = (struct rte_ether_hdr *)(void *) rte_pktmbuf_prepend(*m, sizeof(struct rte_vlan_hdr)); if (nh == NULL) return -ENOSPC;