summaryrefslogtreecommitdiffstats
path: root/common/VIL
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 /common/VIL
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 'common/VIL')
-rw-r--r--common/VIL/l2l3_stack/lib_arp.c50
-rw-r--r--common/VIL/l2l3_stack/lib_arp.h4
-rw-r--r--common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.c48
-rw-r--r--common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.h4
4 files changed, 101 insertions, 5 deletions
diff --git a/common/VIL/l2l3_stack/lib_arp.c b/common/VIL/l2l3_stack/lib_arp.c
index 042dd39c..0162f820 100644
--- a/common/VIL/l2l3_stack/lib_arp.c
+++ b/common/VIL/l2l3_stack/lib_arp.c
@@ -57,7 +57,7 @@
#define is_multicast_ipv4_addr(ipv4_addr) \
(((rte_be_to_cpu_32((ipv4_addr)) >> 24) & 0x000000FF) == 0xE0)
-extern uint8_t prv_in_port_a[16];
+extern uint8_t prv_in_port_a[PIPELINE_MAX_PORT_IN];
extern uint32_t timer_lcore;
uint32_t arp_timeout = ARP_TIMER_EXPIRY;
@@ -216,6 +216,38 @@ struct lib_nd_route_table_entry lib_nd_route_table[MAX_ND_RT_ENTRY] = {
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 0,
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} },
{{0, 0, 0, 0, 0, 0,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 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
{0, 0, 0, 0}
};
diff --git a/common/VIL/l2l3_stack/lib_arp.h b/common/VIL/l2l3_stack/lib_arp.h
index 33875679..e2d38419 100644
--- a/common/VIL/l2l3_stack/lib_arp.h
+++ b/common/VIL/l2l3_stack/lib_arp.h
@@ -27,8 +27,8 @@
#define ARP_TIMER_EXPIRY 1800 /**< in Seconds, TIMER for ARP Expiry */
#define TIMER_MILLISECOND 1
#define RTE_LOGTYPE_LIBARP RTE_LOGTYPE_USER1
-#define MAX_ND_RT_ENTRY 16
-#define MAX_ARP_RT_ENTRY 16
+#define MAX_ND_RT_ENTRY 32
+#define MAX_ARP_RT_ENTRY 32
/**
* A structure for Route table entries of IPv4
diff --git a/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.c b/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.c
index 7238bd1d..4ec544db 100644
--- a/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.c
+++ b/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.c
@@ -198,6 +198,38 @@ struct lib_nd_route_table_entry lib_nd_route_table[MAX_ND_RT_ENTRY] = {
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 0,
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} },
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 0,
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} },
+ {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 0,
+ {0, 0, 0, 0, 0, 0,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
};
diff --git a/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.h b/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.h
index 2c7fce2e..cfbbe617 100644
--- a/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.h
+++ b/common/VIL/pipeline_arpicmp/pipeline_arpicmp_be.h
@@ -61,8 +61,8 @@ struct ether_addr *get_link_hw_addr(uint8_t out_port);
#endif
-#define MAX_ARP_RT_ENTRY 16
-#define MAX_ND_RT_ENTRY 16
+#define MAX_ARP_RT_ENTRY 32
+#define MAX_ND_RT_ENTRY 32
#define ND_IPV6_ADDR_SIZE 16 /* 16 Byte of IPv6 Address */