Code Review
/
samplevnf.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix toeplitz initialization key and rss key len for mlx4
[samplevnf.git]
/
VNFs
/
DPPD-PROX
/
task_init.h
diff --git
a/VNFs/DPPD-PROX/task_init.h
b/VNFs/DPPD-PROX/task_init.h
index
745a742
..
82a5825
100644
(file)
--- a/
VNFs/DPPD-PROX/task_init.h
+++ b/
VNFs/DPPD-PROX/task_init.h
@@
-1,5
+1,5
@@
/*
/*
-// Copyright (c) 2010-20
17
Intel Corporation
+// Copyright (c) 2010-20
20
Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@
-22,11
+22,13
@@
#include <rte_common.h>
#include <rte_sched.h>
#include <rte_ether.h>
#include <rte_common.h>
#include <rte_sched.h>
#include <rte_ether.h>
+#include "prox_compat.h"
#include "task_base.h"
#include "prox_globals.h"
#include "ip6_addr.h"
#include "flow_iter.h"
#include "parse_utils.h"
#include "task_base.h"
#include "prox_globals.h"
#include "ip6_addr.h"
#include "flow_iter.h"
#include "parse_utils.h"
+#include "prox_compat.h"
struct rte_mbuf;
struct lcore_cfg;
struct rte_mbuf;
struct lcore_cfg;
@@
-47,6
+49,8
@@
struct lcore_cfg;
#define TASK_ARG_DO_NOT_SET_DST_MAC 0x400
#define TASK_ARG_HW_SRC_MAC 0x800
#define TASK_ARG_L3 0x1000
#define TASK_ARG_DO_NOT_SET_DST_MAC 0x400
#define TASK_ARG_HW_SRC_MAC 0x800
#define TASK_ARG_L3 0x1000
+#define TASK_ARG_NDP 0x2000
+#define TASK_ARG_SEND_NA_AT_STARTUP 0x4000
#define PROX_MODE_LEN 32
#define PROX_MODE_LEN 32
@@
-59,7
+63,7
@@
struct qos_cfg {
};
enum task_mode {NOT_SET, MASTER, QINQ_DECAP4, QINQ_DECAP6,
};
enum task_mode {NOT_SET, MASTER, QINQ_DECAP4, QINQ_DECAP6,
- QINQ_ENCAP4, QINQ_ENCAP6, GRE_DECAP, GRE_ENCAP,CGNAT, ESP_ENC, ESP_DEC,
+ QINQ_ENCAP4, QINQ_ENCAP6, GRE_DECAP, GRE_ENCAP,CGNAT, ESP_ENC, ESP_DEC,
QOS, POLICE
};
struct task_args;
};
struct task_args;
@@
-80,7
+84,6
@@
struct task_init {
size_t size;
uint16_t flag_req_data; /* flags from prox_shared.h */
uint64_t flag_features;
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;
};
LIST_ENTRY(task_init) entries;
};
@@
-90,13
+93,21
@@
static int task_init_flag_set(struct task_init *task_init, uint64_t flag)
}
enum police_action {
}
enum police_action {
- ACT_GREEN =
e_RTE_METE
R_GREEN,
- ACT_YELLOW =
e_RTE_METE
R_YELLOW,
- ACT_RED =
e_RTE_METE
R_RED,
+ ACT_GREEN =
RTE_COLO
R_GREEN,
+ ACT_YELLOW =
RTE_COLO
R_YELLOW,
+ ACT_RED =
RTE_COLO
R_RED,
ACT_DROP = 3,
ACT_INVALID = 4
};
ACT_DROP = 3,
ACT_INVALID = 4
};
+struct range {
+ uint32_t min;
+ uint32_t value;
+ uint32_t max;
+ uint32_t offset;
+ uint8_t range_len;
+};
+
/* Configuration for task that is only used during startup. */
struct task_args {
struct task_base *tbase;
/* Configuration for task that is only used during startup. */
struct task_args {
struct task_base *tbase;
@@
-106,7
+117,6
@@
struct task_args {
struct lcore_cfg *lconf;
uint32_t nb_mbuf;
uint32_t mbuf_size;
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;
uint32_t nb_cache_mbuf;
uint8_t nb_slave_threads;
uint8_t nb_worker_threads;
@@
-126,16
+136,23
@@
struct task_args {
uint8_t tot_rxrings;
uint8_t nb_rxports;
uint32_t byte_offset;
uint8_t tot_rxrings;
uint8_t nb_rxports;
uint32_t byte_offset;
+ uint32_t ipv6_router;
uint32_t gateway_ipv4;
uint32_t local_ipv4;
uint32_t remote_ipv4;
uint32_t gateway_ipv4;
uint32_t local_ipv4;
uint32_t remote_ipv4;
+ uint32_t local_prefix;
+ uint32_t reachable_timeout;
+ uint32_t arp_ndp_retransmit_timeout;
struct ipv6_addr local_ipv6; /* For IPv6 Tunnel, it's the local tunnel endpoint address */
struct ipv6_addr local_ipv6; /* For IPv6 Tunnel, it's the local tunnel endpoint address */
+ struct ipv6_addr global_ipv6;
+ struct ipv6_addr gateway_ipv6;
+ struct ipv6_addr router_prefix;
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 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;
+
prox_rte_
ether_addr edaddr;
+
prox_rte_
ether_addr esaddr;
struct port_queue tx_port_queue[PROX_MAX_PORTS];
struct port_queue rx_port_queue[PROX_MAX_PORTS];
/* Used to set up actual task at initialization time. */
struct port_queue tx_port_queue[PROX_MAX_PORTS];
struct port_queue rx_port_queue[PROX_MAX_PORTS];
/* Used to set up actual task at initialization time. */
@@
-182,8
+199,10
@@
struct task_args {
/* gen related*/
uint64_t rate_bps;
uint32_t n_rand_str;
/* gen related*/
uint64_t rate_bps;
uint32_t n_rand_str;
-
char rand_str[64][64]
;
+
uint32_t n_ranges
;
uint32_t rand_offset[64];
uint32_t rand_offset[64];
+ char rand_str[64][64];
+ struct range range[64];
char pcap_file[256];
uint32_t accur_pos;
uint32_t sig_pos;
char pcap_file[256];
uint32_t accur_pos;
uint32_t sig_pos;
@@
-194,8
+213,10
@@
struct task_args {
uint32_t bucket_size;
uint32_t lat_enabled;
uint32_t pkt_size;
uint32_t bucket_size;
uint32_t lat_enabled;
uint32_t pkt_size;
- uint8_t pkt_inline[ETHER_MAX_LEN];
- uint32_t probability;
+ uint8_t pkt_inline[MAX_PKT_SIZE];
+ uint32_t probability_no_drop;
+ uint32_t probability_duplicate;
+ uint32_t probability_delay;
char nat_table[256];
uint32_t use_src;
char route_table[256];
char nat_table[256];
uint32_t use_src;
char route_table[256];
@@
-229,8
+250,16
@@
struct task_args {
struct rte_ring **ctrl_rx_rings;
struct rte_ring **ctrl_tx_rings;
int n_ctrl_rings;
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];
struct task_base *tmaster;
char sub_mode_str[PROX_MODE_LEN];
+ uint32_t igmp_address;
+ uint32_t imix_nb_pkts;
+ uint32_t imix_pkt_sizes[MAX_IMIX_PKTS];
+ uint32_t multiplier;
+ uint32_t mirror_size;
+ uint32_t store_max;
+ uint32_t loss_buffer_size;
};
/* Return the first port that is reachable through the task. If the
};
/* Return the first port that is reachable through the task. If the