*/
struct rte_ether_addr {
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]; /**< Addr bytes in tx order */
-} __attribute__((__packed__));
+} __attribute__((aligned(2)));
#define RTE_ETHER_LOCAL_ADMIN_ADDR 0x02 /**< Locally assigned Eth. address. */
#define RTE_ETHER_GROUP_ADDR 0x01 /**< Multicast or broadcast Eth. address. */
static inline int rte_is_same_ether_addr(const struct rte_ether_addr *ea1,
const struct rte_ether_addr *ea2)
{
- const unaligned_uint16_t *w1 = (const uint16_t *)ea1;
- const unaligned_uint16_t *w2 = (const uint16_t *)ea2;
+ const uint16_t *w1 = (const uint16_t *)ea1;
+ const uint16_t *w2 = (const uint16_t *)ea2;
return ((w1[0] ^ w2[0]) | (w1[1] ^ w2[1]) | (w1[2] ^ w2[2])) == 0;
}
*/
static inline int rte_is_zero_ether_addr(const struct rte_ether_addr *ea)
{
- const unaligned_uint16_t *w = (const uint16_t *)ea;
+ const uint16_t *w = (const uint16_t *)ea;
return (w[0] | w[1] | w[2]) == 0;
}
*/
static inline int rte_is_broadcast_ether_addr(const struct rte_ether_addr *ea)
{
- const unaligned_uint16_t *ea_words = (const unaligned_uint16_t *)ea;
+ const uint16_t *ea_words = (const uint16_t *)ea;
return (ea_words[0] == 0xFFFF && ea_words[1] == 0xFFFF &&
ea_words[2] == 0xFFFF);
struct rte_ether_addr d_addr; /**< Destination address. */
struct rte_ether_addr s_addr; /**< Source address. */
uint16_t ether_type; /**< Frame type. */
-} __attribute__((__packed__));
+} __attribute__((aligned(2)));
/**
* Ethernet VLAN Header.