summaryrefslogtreecommitdiffstats
path: root/VNFs/vCGNAPT
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-05-31 12:56:50 +0000
committerDeepak S <deepak.s@linux.intel.com>2017-06-01 04:05:36 +0000
commit10745be7adb099f559ba1b00b8d97fda59f75d62 (patch)
treef8c26c055971d05eb25ecda6001e1177c2bd12e9 /VNFs/vCGNAPT
parent71918b6858fbaf5745fe088403e4c9851af66046 (diff)
[SAMPLEVNF] Adding support to handle more than 16 ports
This patch extends num_ports vnf can handle ports > 16 . This include changes in the memory allocatiion and size of different paramters Change-Id: Id8907327023ba863ad107bb874cfb60bd38daee5 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'VNFs/vCGNAPT')
-rw-r--r--VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c13
-rw-r--r--VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.h2
2 files changed, 12 insertions, 3 deletions
diff --git a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
index a7f10dbd..2da8b5e4 100644
--- a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
+++ b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
@@ -101,7 +101,8 @@ struct rte_ct_cnxn_tracker *cgnat_cnxn_tracker;
/***** Common Port Allocation declarations *****/
struct rte_ring *port_alloc_ring[MAX_CGNAPT_SETS] = { NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL };
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL};
const char *napt_port_alloc_ring_name[MAX_CGNAPT_SETS] = {
"NAPT_PORT_ALLOC_0 ",
"NAPT_PORT_ALLOC_1 ",
@@ -110,7 +111,15 @@ const char *napt_port_alloc_ring_name[MAX_CGNAPT_SETS] = {
"NAPT_PORT_ALLOC_4 ",
"NAPT_PORT_ALLOC_5 ",
"NAPT_PORT_ALLOC_6 ",
- "NAPT_PORT_ALLOC_7 "
+ "NAPT_PORT_ALLOC_7 ",
+ "NAPT_PORT_ALLOC_8 ",
+ "NAPT_PORT_ALLOC_9 ",
+ "NAPT_PORT_ALLOC_10 ",
+ "NAPT_PORT_ALLOC_11 ",
+ "NAPT_PORT_ALLOC_12 ",
+ "NAPT_PORT_ALLOC_13 ",
+ "NAPT_PORT_ALLOC_14 ",
+ "NAPT_PORT_ALLOC_16 "
};
int vnf_set_count = -1;
diff --git a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.h b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.h
index c9b81fa8..94f19f1e 100644
--- a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.h
+++ b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.h
@@ -560,7 +560,7 @@ struct pub_ip_range {
int create_napt_common_table(uint32_t nFlows);
struct rte_mempool *napt_port_pool;
-#define MAX_CGNAPT_SETS 8
+#define MAX_CGNAPT_SETS 16
/**
* A structure defining a bulk port allocation element.