diff options
Diffstat (limited to 'VNFs/DPPD-PROX/bng_pkts.h')
-rw-r--r-- | VNFs/DPPD-PROX/bng_pkts.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/VNFs/DPPD-PROX/bng_pkts.h b/VNFs/DPPD-PROX/bng_pkts.h index 82e6199c..85114a0c 100644 --- a/VNFs/DPPD-PROX/bng_pkts.h +++ b/VNFs/DPPD-PROX/bng_pkts.h @@ -22,6 +22,7 @@ #include <rte_udp.h> #include <rte_byteorder.h> +#include "prox_compat.h" #include "gre.h" #include "mpls.h" #include "qinq.h" @@ -32,41 +33,41 @@ struct cpe_pkt { #ifdef USE_QINQ struct qinq_hdr qinq_hdr; #else - struct ether_hdr ether_hdr; + prox_rte_ether_hdr ether_hdr; #endif - struct ipv4_hdr ipv4_hdr; - struct udp_hdr udp_hdr; -} __attribute__((packed)); + prox_rte_ipv4_hdr ipv4_hdr; + prox_rte_udp_hdr udp_hdr; +} __attribute__((packed)) __attribute__((__aligned__(2))); struct cpe_packet_arp { struct qinq_hdr qinq_hdr; struct my_arp_t arp; -} __attribute__((packed)); +} __attribute__((packed)) __attribute__((__aligned__(2))); /* Struct used for setting all the values a packet going to the core netwerk. Payload may follow after the headers, but no need to touch that. */ struct core_net_pkt_m { - struct ether_hdr ether_hdr; + prox_rte_ether_hdr ether_hdr; #ifdef MPLS_ROUTING union { struct mpls_hdr mpls; uint32_t mpls_bytes; }; #endif - struct ipv4_hdr tunnel_ip_hdr; + prox_rte_ipv4_hdr tunnel_ip_hdr; struct gre_hdr gre_hdr; - struct ipv4_hdr ip_hdr; - struct udp_hdr udp_hdr; -} __attribute__((packed)); + prox_rte_ipv4_hdr ip_hdr; + prox_rte_udp_hdr udp_hdr; +} __attribute__((packed)) __attribute__((__aligned__(2))); struct core_net_pkt { - struct ether_hdr ether_hdr; - struct ipv4_hdr tunnel_ip_hdr; + prox_rte_ether_hdr ether_hdr; + prox_rte_ipv4_hdr tunnel_ip_hdr; struct gre_hdr gre_hdr; - struct ipv4_hdr ip_hdr; - struct udp_hdr udp_hdr; -} __attribute__((packed)); + prox_rte_ipv4_hdr ip_hdr; + prox_rte_udp_hdr udp_hdr; +} __attribute__((packed)) __attribute__((__aligned__(2))); #define UPSTREAM_DELTA ((uint32_t)(sizeof(struct core_net_pkt) - sizeof(struct cpe_pkt))) #define DOWNSTREAM_DELTA ((uint32_t)(sizeof(struct core_net_pkt_m) - sizeof(struct cpe_pkt))) @@ -74,7 +75,7 @@ struct core_net_pkt { struct cpe_pkt_delta { uint8_t encap[DOWNSTREAM_DELTA]; struct cpe_pkt pkt; -} __attribute__((packed)); +} __attribute__((packed)) __attribute__((__aligned__(2))); static inline void extract_key_cpe(struct rte_mbuf *mbuf, uint64_t* key) { @@ -86,7 +87,7 @@ static inline void extract_key_cpe(struct rte_mbuf *mbuf, uint64_t* key) #endif } -static inline void key_core(struct gre_hdr* gre, __attribute__((unused)) struct ipv4_hdr* ip, uint64_t* key) +static inline void key_core(struct gre_hdr* gre, __attribute__((unused)) prox_rte_ipv4_hdr* ip, uint64_t* key) { struct cpe_key *cpe_key = (struct cpe_key*)key; |