From 0e51437be874b6831e95639f4c1ad6b0133c2a28 Mon Sep 17 00:00:00 2001 From: Vishwesh M Rudramuni Date: Tue, 6 Jun 2017 04:11:25 +0530 Subject: [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 --- common/VIL/pipeline_loadb/pipeline_loadb.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'common/VIL/pipeline_loadb') 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, }, }; -- cgit 1.2.3-korg