#include <rte_esp.h>
#include <rte_tcp.h>
#include <rte_udp.h>
+#include <rte_vxlan.h>
#include <rte_cryptodev.h>
#include <rte_cryptodev_pmd.h>
struct lb_data {
uint32_t out[RTE_TABLE_ACTION_LB_TABLE_SIZE];
-} __attribute__((__packed__));
+} __rte_packed;
static int
lb_apply(struct lb_data *data,
struct mtr_trtcm_data {
struct rte_meter_trtcm trtcm;
uint64_t stats[RTE_COLORS];
-} __attribute__((__packed__));
+} __rte_packed;
#define MTR_TRTCM_DATA_METER_PROFILE_ID_GET(data) \
(((data)->stats[RTE_COLOR_GREEN] & 0xF8LLU) >> 3)
struct tm_data {
uint32_t queue_id;
uint32_t reserved;
-} __attribute__((__packed__));
+} __rte_packed;
static int
tm_apply_check(struct rte_table_action_tm_params *p,
struct encap_ether_data {
struct rte_ether_hdr ether;
-} __attribute__((__packed__));
+};
#define VLAN(pcp, dei, vid) \
((uint16_t)((((uint64_t)(pcp)) & 0x7LLU) << 13) | \
struct encap_vlan_data {
struct rte_ether_hdr ether;
struct rte_vlan_hdr vlan;
-} __attribute__((__packed__));
+};
struct encap_qinq_data {
struct rte_ether_hdr ether;
struct rte_vlan_hdr svlan;
struct rte_vlan_hdr cvlan;
-} __attribute__((__packed__));
+};
#define ETHER_TYPE_MPLS_UNICAST 0x8847
struct rte_ether_hdr ether;
uint32_t mpls[RTE_TABLE_ACTION_MPLS_LABELS_MAX];
uint32_t mpls_count;
-} __attribute__((__packed__));
+} __rte_packed __rte_aligned(2);
#define PPP_PROTOCOL_IP 0x0021
uint16_t session_id;
uint16_t length;
uint16_t protocol;
-} __attribute__((__packed__));
+};
struct encap_pppoe_data {
struct rte_ether_hdr ether;
struct pppoe_ppp_hdr pppoe_ppp;
-} __attribute__((__packed__));
+};
#define IP_PROTO_UDP 17
struct rte_ipv4_hdr ipv4;
struct rte_udp_hdr udp;
struct rte_vxlan_hdr vxlan;
-} __attribute__((__packed__));
+} __rte_packed __rte_aligned(2);
struct encap_vxlan_ipv4_vlan_data {
struct rte_ether_hdr ether;
struct rte_ipv4_hdr ipv4;
struct rte_udp_hdr udp;
struct rte_vxlan_hdr vxlan;
-} __attribute__((__packed__));
+} __rte_packed __rte_aligned(2);
struct encap_vxlan_ipv6_data {
struct rte_ether_hdr ether;
struct rte_ipv6_hdr ipv6;
struct rte_udp_hdr udp;
struct rte_vxlan_hdr vxlan;
-} __attribute__((__packed__));
+} __rte_packed __rte_aligned(2);
struct encap_vxlan_ipv6_vlan_data {
struct rte_ether_hdr ether;
struct rte_ipv6_hdr ipv6;
struct rte_udp_hdr udp;
struct rte_vxlan_hdr vxlan;
-} __attribute__((__packed__));
+} __rte_packed __rte_aligned(2);
struct encap_qinq_pppoe_data {
struct rte_ether_hdr ether;
struct rte_vlan_hdr svlan;
struct rte_vlan_hdr cvlan;
struct pppoe_ppp_hdr pppoe_ppp;
-} __attribute__((__packed__));
+} __rte_packed __rte_aligned(2);
static size_t
encap_data_size(struct rte_table_action_encap_config *encap)
d->cvlan.vlan_tci = rte_htons(VLAN(p->qinq.cvlan.pcp,
p->qinq.cvlan.dei,
p->qinq.cvlan.vid));
- d->cvlan.eth_proto = rte_htons(ETHER_TYPE_PPPOE_SESSION);
+ d->cvlan.eth_proto = rte_htons(RTE_ETHER_TYPE_PPPOE_SESSION);
/* PPPoE and PPP*/
d->pppoe_ppp.ver_type_code = rte_htons(0x1100);
/* Ethernet */
rte_ether_addr_copy(&p->pppoe.ether.da, &d->ether.d_addr);
rte_ether_addr_copy(&p->pppoe.ether.sa, &d->ether.s_addr);
- d->ether.ether_type = rte_htons(ETHER_TYPE_PPPOE_SESSION);
+ d->ether.ether_type = rte_htons(RTE_ETHER_TYPE_PPPOE_SESSION);
/* PPPoE and PPP*/
d->pppoe_ppp.ver_type_code = rte_htons(0x1100);
struct nat_ipv4_data {
uint32_t addr;
uint16_t port;
-} __attribute__((__packed__));
+} __rte_packed;
struct nat_ipv6_data {
uint8_t addr[16];
uint16_t port;
-} __attribute__((__packed__));
+} __rte_packed;
static size_t
nat_data_size(struct rte_table_action_nat_config *nat __rte_unused,
struct ttl_data {
uint32_t n_packets;
-} __attribute__((__packed__));
+} __rte_packed;
#define TTL_INIT(data, decrement) \
((data)->n_packets = (decrement) ? 1 : 0)
struct stats_data {
uint64_t n_packets;
uint64_t n_bytes;
-} __attribute__((__packed__));
+} __rte_packed;
static int
stats_apply(struct stats_data *data,
*/
struct time_data {
uint64_t time;
-} __attribute__((__packed__));
+} __rte_packed;
static int
time_apply(struct time_data *data,
/** Private data size to store cipher iv / aad. */
uint8_t iv_aad_data[32];
-} __attribute__((__packed__));
+} __rte_packed;
static int
sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg)
*/
struct tag_data {
uint32_t tag;
-} __attribute__((__packed__));
+} __rte_packed;
static int
tag_apply(struct tag_data *data,
*/
struct decap_data {
uint16_t n;
-} __attribute__((__packed__));
+} __rte_packed;
static int
decap_apply(struct decap_data *data,