summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/handle_lb_qinq.c
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@gmail.com>2023-06-29 10:58:18 +0200
committerLuc Provoost <luc.provoost@gmail.com>2023-06-29 10:58:18 +0200
commit439ab3d170f1a41e127a904bc5cbab1df39104ff (patch)
tree8c0d6dfec6c42a51850365cb26c05ea76c8a5509 /VNFs/DPPD-PROX/handle_lb_qinq.c
parent18dbfb93ed8aa67fc9266fa1a6ab40baaf54872a (diff)
Renaming of defines for clarity
Add the prefix TBASE_FLAG to all defines that are used in the flags field of the tbase structure Signed-off-by: Luc Provoost <luc.provoost@gmail.com> Change-Id: Ic7c6c1ba66fbda5a4a43e9a3bf966710157b5b17
Diffstat (limited to 'VNFs/DPPD-PROX/handle_lb_qinq.c')
-rw-r--r--VNFs/DPPD-PROX/handle_lb_qinq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/VNFs/DPPD-PROX/handle_lb_qinq.c b/VNFs/DPPD-PROX/handle_lb_qinq.c
index a2f1b1fa..9726edda 100644
--- a/VNFs/DPPD-PROX/handle_lb_qinq.c
+++ b/VNFs/DPPD-PROX/handle_lb_qinq.c
@@ -104,9 +104,9 @@ static void init_task_lb_qinq(struct task_base *tbase, struct task_args *targ)
plog_info("\t\ttask_lb_qinq protocols_mask = 0x%x\n", task->protocols_mask);
if (targ->task_init->flag_features & TASK_FEATURE_LUT_QINQ_RSS)
- tbase->flags |= BASE_FLAG_LUT_QINQ_RSS;
+ tbase->flags |= TBASE_FLAG_LUT_QINQ_RSS;
if (targ->task_init->flag_features & TASK_FEATURE_LUT_QINQ_HASH)
- tbase->flags |= BASE_FLAG_LUT_QINQ_HASH;
+ tbase->flags |= TBASE_FLAG_LUT_QINQ_HASH;
plog_info("\t\ttask_lb_qinq flags = 0x%x\n", tbase->flags);
}
@@ -275,7 +275,7 @@ struct cpe_packet {
static inline uint8_t get_worker(struct task_lb_qinq *task, struct cpe_packet *packet)
{
uint8_t worker = 0;
- if (((struct task_base *)task)->flags & BASE_FLAG_LUT_QINQ_HASH) {
+ if (((struct task_base *)task)->flags & TBASE_FLAG_LUT_QINQ_HASH) {
// Load Balance on Hash of combination of cvlan and svlan
uint64_t qinq_net = packet->qd.qinq;
qinq_net = qinq_net & 0xFF0F0000FF0F0000; // Mask Proto and QoS bits
@@ -286,7 +286,7 @@ static inline uint8_t get_worker(struct task_lb_qinq *task, struct cpe_packet *p
worker = rte_hash_crc(&qinq_net,8,0) % task->nb_worker_threads;
}
plogx_dbg("Sending packet svlan=%x, cvlan=%x, pseudo_qinq=%lx to worker %d\n", rte_bswap16(0xFF0F & packet->qp.qinq_hdr.svlan.vlan_tci), rte_bswap16(0xFF0F & packet->qp.qinq_hdr.cvlan.vlan_tci), qinq_net, worker);
- } else if (((struct task_base *)task)->flags & BASE_FLAG_LUT_QINQ_RSS){
+ } else if (((struct task_base *)task)->flags & TBASE_FLAG_LUT_QINQ_RSS){
// Load Balance on rss of combination of cvlan and svlan
uint32_t qinq = (packet->qp.qinq_hdr.cvlan.vlan_tci & 0xFF0F) << 16;
uint32_t rss = toeplitz_hash((uint8_t *)&qinq, 4);