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 minor compilation issue on recent gcc compilers
[samplevnf.git]
/
VNFs
/
DPPD-PROX
/
handle_genl4.c
diff --git
a/VNFs/DPPD-PROX/handle_genl4.c
b/VNFs/DPPD-PROX/handle_genl4.c
index
4c62c64
..
49fde3f
100644
(file)
--- a/
VNFs/DPPD-PROX/handle_genl4.c
+++ b/
VNFs/DPPD-PROX/handle_genl4.c
@@
-439,9
+439,9
@@
static int handle_gen_scheduled(struct task_gen_server *task)
}
else {
}
else {
-
struct ether_hdr *eth = rte_pktmbuf_mtod(mbuf, struct
ether_hdr *);
-
struct ipv4_hdr *ip = (struct
ipv4_hdr*)(eth + 1);
-
struct tcp_hdr *tcp = (struct
tcp_hdr*)(ip + 1);
+
prox_rte_ether_hdr *eth = rte_pktmbuf_mtod(mbuf, prox_rte_
ether_hdr *);
+
prox_rte_ipv4_hdr *ip = (prox_rte_
ipv4_hdr*)(eth + 1);
+
prox_rte_tcp_hdr *tcp = (prox_rte_
tcp_hdr*)(ip + 1);
task->out_saved = 0;
task->cancelled = 1;
task->out_saved = 0;
task->cancelled = 1;
@@
-732,8
+732,8
@@
static int lua_to_stream_cfg(struct lua_State *L, enum lua_place from, const cha
const uint64_t hz = rte_get_tsc_hz();
const uint64_t hz = rte_get_tsc_hz();
- ret->tt_cfg[PEER_CLIENT] = token_time_cfg_create(up, hz, ETHER_MAX_LEN + 20);
- ret->tt_cfg[PEER_SERVER] = token_time_cfg_create(dn, hz, ETHER_MAX_LEN + 20);
+ ret->tt_cfg[PEER_CLIENT] = token_time_cfg_create(up, hz,
PROX_RTE_
ETHER_MAX_LEN + 20);
+ ret->tt_cfg[PEER_SERVER] = token_time_cfg_create(dn, hz,
PROX_RTE_
ETHER_MAX_LEN + 20);
if (!strcmp(proto, "tcp")) {
ret->proto = IPPROTO_TCP;
if (!strcmp(proto, "tcp")) {
ret->proto = IPPROTO_TCP;
@@
-845,7
+845,7
@@
static void init_task_gen(struct task_base *tbase, struct task_args *targ)
static char name[] = "server_mempool";
name[0]++;
task->mempool = rte_mempool_create(name,
static char name[] = "server_mempool";
name[0]++;
task->mempool = rte_mempool_create(name,
- 4*1024 - 1, MBUF_SIZE,
+ 4*1024 - 1,
TX_
MBUF_SIZE,
targ->nb_cache_mbuf,
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init, NULL,
targ->nb_cache_mbuf,
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init, NULL,
@@
-946,7
+946,7
@@
static void init_task_gen(struct task_base *tbase, struct task_args *targ)
struct token_time_cfg tt_cfg = {
.bpp = targ->rate_bps,
.period = rte_get_tsc_hz(),
struct token_time_cfg tt_cfg = {
.bpp = targ->rate_bps,
.period = rte_get_tsc_hz(),
- .bytes_max = n_descriptors * (ETHER_MIN_LEN + 20),
+ .bytes_max = n_descriptors * (
PROX_RTE_
ETHER_MIN_LEN + 20),
};
token_time_init(&task->token_time, &tt_cfg);
};
token_time_init(&task->token_time, &tt_cfg);
@@
-959,7
+959,7
@@
static void init_task_gen_client(struct task_base *tbase, struct task_args *targ
const uint32_t socket = rte_lcore_to_socket_id(targ->lconf->id);
name[0]++;
task->mempool = rte_mempool_create(name,
const uint32_t socket = rte_lcore_to_socket_id(targ->lconf->id);
name[0]++;
task->mempool = rte_mempool_create(name,
- 4*1024 - 1, MBUF_SIZE,
+ 4*1024 - 1,
TX_
MBUF_SIZE,
targ->nb_cache_mbuf,
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init, NULL,
targ->nb_cache_mbuf,
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init, NULL,
@@
-1025,7
+1025,7
@@
static void init_task_gen_client(struct task_base *tbase, struct task_args *targ
task->heap = heap_create(targ->n_concur_conn, socket);
task->seed = rte_rdtsc();
task->heap = heap_create(targ->n_concur_conn, socket);
task->seed = rte_rdtsc();
- /* task->token_time.bytes_max = MAX_PKT_BURST * (ETHER_MAX_LEN + 20); */
+ /* task->token_time.bytes_max = MAX_PKT_BURST * (
PROX_RTE_
ETHER_MAX_LEN + 20); */
/* To avoid overflowing the tx descriptors, the token bucket
size needs to be limited. The descriptors are filled most
/* To avoid overflowing the tx descriptors, the token bucket
size needs to be limited. The descriptors are filled most
@@
-1037,7
+1037,7
@@
static void init_task_gen_client(struct task_base *tbase, struct task_args *targ
struct token_time_cfg tt_cfg = {
.bpp = targ->rate_bps,
.period = rte_get_tsc_hz(),
struct token_time_cfg tt_cfg = {
.bpp = targ->rate_bps,
.period = rte_get_tsc_hz(),
- .bytes_max = prox_port_cfg[targ->tx_port_queue[0].port].n_txd * (ETHER_MIN_LEN + 20),
+ .bytes_max = prox_port_cfg[targ->tx_port_queue[0].port].n_txd * (
PROX_RTE_
ETHER_MIN_LEN + 20),
};
token_time_init(&task->token_time, &tt_cfg);
};
token_time_init(&task->token_time, &tt_cfg);
@@
-1118,7
+1118,6
@@
static struct task_init task_init_gen1 = {
.stop = stop_task_gen_server,
.flag_features = TASK_FEATURE_ZERO_RX,
.size = sizeof(struct task_gen_server),
.stop = stop_task_gen_server,
.flag_features = TASK_FEATURE_ZERO_RX,
.size = sizeof(struct task_gen_server),
- .mbuf_size = 2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM,
};
static struct task_init task_init_gen2 = {
};
static struct task_init task_init_gen2 = {
@@
-1129,7
+1128,6
@@
static struct task_init task_init_gen2 = {
.stop = stop_task_gen_client,
.flag_features = TASK_FEATURE_ZERO_RX,
.size = sizeof(struct task_gen_client),
.stop = stop_task_gen_client,
.flag_features = TASK_FEATURE_ZERO_RX,
.size = sizeof(struct task_gen_client),
- .mbuf_size = 2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM,
};
__attribute__((constructor)) static void reg_task_gen(void)
};
__attribute__((constructor)) static void reg_task_gen(void)