summaryrefslogtreecommitdiffstats
path: root/common/VIL/pipeline_loadb
diff options
context:
space:
mode:
authorVishwesh M Rudramuni <vishwesh.m.rudramuni@intel.com>2017-06-06 04:11:25 +0530
committerVishwesh M Rudramuni <vishwesh.m.rudramuni@intel.com>2017-07-14 06:08:28 +0530
commit0e51437be874b6831e95639f4c1ad6b0133c2a28 (patch)
tree20be5dcfe1a25b1c3f67e3845032e7796a29ac2d /common/VIL/pipeline_loadb
parent82416b375a275837689cddfd1782d82996fecaca (diff)
[l2l3 stack] implements new arp state machine & arp buffering
JIRA: SAMPLEVNF-23 This patch implements ~New arp state machine implementing new states like INCOMPLETE, COMPLETE, PROBE, STALE. ~removing unwanted code in arpicmp pipeline ~Implementing arp buffering, when arp is unresolved. ~Integratig the new changes with vCGNAPT ~Integrating the new changes with vACL ~Integrating the new changes with vFW. Change-Id: If467ec035bc8de58463ea50d9e603a97f168c1a2 Signed-off-by: Vishwesh M Rudramuni <vishwesh.m.rudramuni@intel.com>
Diffstat (limited to 'common/VIL/pipeline_loadb')
-rw-r--r--common/VIL/pipeline_loadb/pipeline_loadb.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/common/VIL/pipeline_loadb/pipeline_loadb.c b/common/VIL/pipeline_loadb/pipeline_loadb.c
index fdcc17ae..cd49ca5b 100644
--- a/common/VIL/pipeline_loadb/pipeline_loadb.c
+++ b/common/VIL/pipeline_loadb/pipeline_loadb.c
@@ -318,7 +318,7 @@ cmd_arp_req_parsed(void *parsed_result,
key.filler2 = 0;
key.filler3 = 0;
- struct arp_entry_data *arp_data = retrieve_arp_entry(key);
+ struct arp_entry_data *arp_data = retrieve_arp_entry(key, STATIC_ARP);
if (arp_data) {
if (ARPICMP_DEBUG)
@@ -399,22 +399,24 @@ struct cmd_arp_ls_result {
cmdline_fixed_string_t p_string;
uint32_t p;
cmdline_fixed_string_t arp_string;
+ uint32_t ip_type;
};
static void
-cmd_arp_ls_parsed(__rte_unused void *parsed_result,
+cmd_arp_ls_parsed(void *parsed_result,
__rte_unused struct cmdline *cl, __rte_unused void *data)
{
- printf("\nARP table ...\n");
- printf("-------------\n");
- print_arp_table();
+ struct cmd_arp_ls_result *params = parsed_result;
- printf
- ("............................................................\n");
-
- printf("\nND IPv6 table:\n");
- printf("--------------\n");
- print_nd_table();
+ if (!params->ip_type) {
+ printf("\nARP table ...\n");
+ printf("-------------\n");
+ print_arp_table();
+ } else {
+ printf("\nND IPv6 table:\n");
+ printf("--------------\n");
+ print_nd_table();
+ }
}
static cmdline_parse_token_string_t cmd_arp_ls_p_string =
@@ -428,6 +430,9 @@ static cmdline_parse_token_string_t cmd_arp_ls_arp_string =
TOKEN_STRING_INITIALIZER(struct cmd_arp_ls_result, arp_string,
"arpls");
+static cmdline_parse_token_num_t cmd_arp_ls_ip_type =
+TOKEN_NUM_INITIALIZER(struct cmd_arp_ls_result, ip_type, UINT32);
+
static cmdline_parse_inst_t cmd_arp_ls = {
.f = cmd_arp_ls_parsed,
.data = NULL,
@@ -436,6 +441,7 @@ static cmdline_parse_inst_t cmd_arp_ls = {
(void *)&cmd_arp_ls_p_string,
(void *)&cmd_arp_ls_p,
(void *)&cmd_arp_ls_arp_string,
+ (void *)&cmd_arp_ls_ip_type,
NULL,
},
};