#include "ip6_addr.h"
#include "flow_iter.h"
#include "parse_utils.h"
+#include "prox_compat.h"
struct rte_mbuf;
struct lcore_cfg;
#define TASK_ARG_DO_NOT_SET_SRC_MAC 0x200
#define TASK_ARG_DO_NOT_SET_DST_MAC 0x400
#define TASK_ARG_HW_SRC_MAC 0x800
+#define TASK_ARG_L3 0x1000
+
+#define PROX_MODE_LEN 32
enum protocols {IPV4, ARP, IPV6};
};
enum task_mode {NOT_SET, MASTER, QINQ_DECAP4, QINQ_DECAP6,
- QINQ_ENCAP4, QINQ_ENCAP6, GRE_DECAP, GRE_ENCAP,CGNAT,
+ QINQ_ENCAP4, QINQ_ENCAP6, GRE_DECAP, GRE_ENCAP,CGNAT, ESP_ENC, ESP_DEC, QOS, POLICE
};
struct task_args;
struct task_init {
enum task_mode mode;
- char mode_str[32];
- char sub_mode_str[32];
+ char mode_str[PROX_MODE_LEN];
+ char sub_mode_str[PROX_MODE_LEN];
void (*early_init)(struct task_args *targ);
void (*init)(struct task_base *tbase, struct task_args *targ);
int (*handle)(struct task_base *tbase, struct rte_mbuf **mbufs, const uint16_t n_pkts);
size_t size;
uint16_t flag_req_data; /* flags from prox_shared.h */
uint64_t flag_features;
- uint32_t mbuf_size;
LIST_ENTRY(task_init) entries;
};
}
enum police_action {
- ACT_GREEN = e_RTE_METER_GREEN,
- ACT_YELLOW = e_RTE_METER_YELLOW,
- ACT_RED = e_RTE_METER_RED,
+ ACT_GREEN = RTE_COLOR_GREEN,
+ ACT_YELLOW = RTE_COLOR_YELLOW,
+ ACT_RED = RTE_COLOR_RED,
ACT_DROP = 3,
ACT_INVALID = 4
};
struct lcore_cfg *lconf;
uint32_t nb_mbuf;
uint32_t mbuf_size;
- uint8_t mbuf_size_set_explicitely;
uint32_t nb_cache_mbuf;
uint8_t nb_slave_threads;
uint8_t nb_worker_threads;
uint8_t nb_rxports;
uint32_t byte_offset;
uint32_t gateway_ipv4;
- uint32_t number_gen_ip;
uint32_t local_ipv4;
+ uint32_t remote_ipv4;
+ uint32_t arp_timeout;
+ uint32_t arp_update_time;
struct ipv6_addr local_ipv6; /* For IPv6 Tunnel, it's the local tunnel endpoint address */
struct rte_ring *rx_rings[MAX_RINGS_PER_TASK];
struct rte_ring *tx_rings[MAX_RINGS_PER_TASK];
+ struct rte_ring *ctrl_plane_ring;
uint32_t tot_n_txrings_inited;
struct ether_addr edaddr;
struct ether_addr esaddr;
uint32_t bucket_size;
uint32_t lat_enabled;
uint32_t pkt_size;
- uint8_t pkt_inline[ETHER_MAX_LEN];
+ uint8_t pkt_inline[MAX_PKT_SIZE];
uint32_t probability;
char nat_table[256];
uint32_t use_src;
struct rte_hash *private_ip_port_hash;
struct rte_hash *private_ip_hash;
struct private_ip_info *private_ip_info;
+ struct rte_ring **ctrl_rx_rings;
+ struct rte_ring **ctrl_tx_rings;
+ int n_ctrl_rings;
+ uint irq_debug;
+ struct task_base *tmaster;
+ char sub_mode_str[PROX_MODE_LEN];
+ uint32_t igmp_address;
};
/* Return the first port that is reachable through the task. If the
struct task_base *init_task_struct(struct task_args *targ);
struct task_init *to_task_init(const char *mode_str, const char *sub_mode_str);
void tasks_list(void);
+int task_is_master(struct task_args *targ);
void reg_task(struct task_init* t);