Code Review
/
samplevnf.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Rework of statistics reporting
[samplevnf.git]
/
VNFs
/
DPPD-PROX
/
handle_qinq_decap6.c
diff --git
a/VNFs/DPPD-PROX/handle_qinq_decap6.c
b/VNFs/DPPD-PROX/handle_qinq_decap6.c
index
d876c73
..
d26f312
100644
(file)
--- a/
VNFs/DPPD-PROX/handle_qinq_decap6.c
+++ b/
VNFs/DPPD-PROX/handle_qinq_decap6.c
@@
-37,6
+37,7
@@
#include "log.h"
#include "quit.h"
#include "prox_shared.h"
#include "log.h"
#include "quit.h"
#include "prox_shared.h"
+#include "prox_compat.h"
/* Packets must all be IPv6, always store QinQ tags for lookup (not configurable) */
struct task_qinq_decap6 {
/* Packets must all be IPv6, always store QinQ tags for lookup (not configurable) */
struct task_qinq_decap6 {
@@
-44,7
+45,7
@@
struct task_qinq_decap6 {
struct rte_table_hash *cpe_table;
uint16_t *user_table;
uint32_t bucket_index;
struct rte_table_hash *cpe_table;
uint16_t *user_table;
uint32_t bucket_index;
-
struct ether_addr
edaddr;
+
prox_rte_ether_addr
edaddr;
struct rte_lpm6 *rte_lpm6;
void* period_data; /* used if using dual stack*/
void (*period_func)(void* data);
struct rte_lpm6 *rte_lpm6;
void* period_data; /* used if using dual stack*/
void (*period_func)(void* data);
@@
-102,7
+103,7
@@
static void early_init(struct task_args *targ)
static inline uint8_t handle_qinq_decap6(struct task_qinq_decap6 *task, struct rte_mbuf *mbuf)
{
struct qinq_hdr *pqinq = rte_pktmbuf_mtod(mbuf, struct qinq_hdr *);
static inline uint8_t handle_qinq_decap6(struct task_qinq_decap6 *task, struct rte_mbuf *mbuf)
{
struct qinq_hdr *pqinq = rte_pktmbuf_mtod(mbuf, struct qinq_hdr *);
-
struct ipv6_hdr *pip6 = (struct
ipv6_hdr *)(pqinq + 1);
+
prox_rte_ipv6_hdr *pip6 = (prox_rte_
ipv6_hdr *)(pqinq + 1);
uint16_t svlan = pqinq->svlan.vlan_tci & 0xFF0F;
uint16_t cvlan = pqinq->cvlan.vlan_tci & 0xFF0F;
uint16_t svlan = pqinq->svlan.vlan_tci & 0xFF0F;
uint16_t cvlan = pqinq->cvlan.vlan_tci & 0xFF0F;
@@
-116,19
+117,18
@@
static inline uint8_t handle_qinq_decap6(struct task_qinq_decap6 *task, struct r
int key_found = 0;
void* entry_in_hash = NULL;
int key_found = 0;
void* entry_in_hash = NULL;
- int ret = rte_table_hash_ext_dosig_ops.
- f_add(task->cpe_table, pip6->src_addr, &entry, &key_found, &entry_in_hash);
+ int ret = prox_rte_table_add(task->cpe_table, pip6->src_addr, &entry, &key_found, &entry_in_hash);
if (unlikely(ret)) {
plogx_err("Failed to add key " IPv6_BYTES_FMT "\n", IPv6_BYTES(pip6->src_addr));
return OUT_DISCARD;
}
if (unlikely(ret)) {
plogx_err("Failed to add key " IPv6_BYTES_FMT "\n", IPv6_BYTES(pip6->src_addr));
return OUT_DISCARD;
}
- pqinq = (struct qinq_hdr *)rte_pktmbuf_adj(mbuf, 2 * sizeof(
struct
vlan_hdr));
+ pqinq = (struct qinq_hdr *)rte_pktmbuf_adj(mbuf, 2 * sizeof(
prox_rte_
vlan_hdr));
PROX_ASSERT(pqinq);
pqinq->ether_type = ETYPE_IPv6;
// Dest MAC addresses
PROX_ASSERT(pqinq);
pqinq->ether_type = ETYPE_IPv6;
// Dest MAC addresses
- ether_addr_copy(&task->edaddr, &pqinq->d_addr);
+
prox_rte_
ether_addr_copy(&task->edaddr, &pqinq->d_addr);
return 0;
}
return 0;
}
@@
-170,7
+170,7
@@
void update_arp_entries6(void* data)
if (entries[i]->tsc < cur_tsc) {
int key_found = 0;
void* entry = 0;
if (entries[i]->tsc < cur_tsc) {
int key_found = 0;
void* entry = 0;
-
rte_table_hash_ext_dosig_ops.f
_delete(task->cpe_table, key[i], &key_found, entry);
+
prox_rte_table
_delete(task->cpe_table, key[i], &key_found, entry);
}
}
}
}