summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-10-05 13:06:36 +0200
committerDave Barach <openvpp@barachs.net>2018-10-05 13:32:55 +0000
commit2d24cd027275905f308f75bf45d0f9d163f2235b (patch)
treece1e987dde01d8f8a5e5b0fa766d7bcb136bc544 /src/plugins
parent98afc711c517ee860a2259ae18d496abd3416ba6 (diff)
NAT: convert remaining clib_warning to nat_log_*
Change-Id: Ie999ab852cc3775ec90820624d97be746d2590a4 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/nat/nat64.c10
-rw-r--r--src/plugins/nat/nat66.c8
-rw-r--r--src/plugins/nat/nat_ipfix_logging.c38
-rwxr-xr-xsrc/plugins/nat/nat_reass.c4
4 files changed, 30 insertions, 30 deletions
diff --git a/src/plugins/nat/nat64.c b/src/plugins/nat/nat64.c
index 1954893ff8c..8396bd1b76b 100644
--- a/src/plugins/nat/nat64.c
+++ b/src/plugins/nat/nat64.c
@@ -264,7 +264,7 @@ nat64_set_hash (u32 bib_buckets, u32 bib_memory_size, u32 st_buckets,
{
if (nat64_db_init (db, bib_buckets, bib_memory_size, st_buckets,
st_memory_size, nat64_free_out_addr_and_port))
- clib_warning ("NAT64 DB init failed");
+ nat_log_err ("NAT64 DB init failed");
}
/* *INDENT-ON* */
}
@@ -556,7 +556,7 @@ nat64_free_out_addr_and_port (struct nat64_db_s *db, ip4_address_t * addr,
foreach_snat_protocol
#undef _
default:
- clib_warning ("unknown protocol");
+ nat_log_notice ("unknown protocol");
return;
}
break;
@@ -1052,7 +1052,7 @@ nat64_compose_ip6 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index)
ip6->as_u32[3] = ip4->as_u32;
break;
default:
- clib_warning ("invalid prefix length");
+ nat_log_notice ("invalid prefix length");
break;
}
}
@@ -1125,7 +1125,7 @@ nat64_extract_ip4 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index)
ip4->as_u32 = ip6->as_u32[3];
break;
default:
- clib_warning ("invalid prefix length");
+ nat_log_notice ("invalid prefix length");
break;
}
}
@@ -1206,7 +1206,7 @@ nat64_expire_walk_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
case NAT64_CLEANER_RESCHEDULE:
break;
default:
- clib_warning ("unknown event %u", event_type);
+ nat_log_notice ("unknown event %u", event_type);
break;
}
diff --git a/src/plugins/nat/nat66.c b/src/plugins/nat/nat66.c
index 6257c990400..729674171d7 100644
--- a/src/plugins/nat/nat66.c
+++ b/src/plugins/nat/nat66.c
@@ -178,7 +178,7 @@ nat66_static_mapping_add_del (ip6_address_t * l_addr, ip6_address_t * e_addr,
kv.key[2] = sm_key.as_u64[2];
kv.value = sm - nm->sm;
if (clib_bihash_add_del_24_8 (&nm->sm_l, &kv, 1))
- clib_warning ("nat66-static-map-by-local add key failed");
+ nat_log_warn ("nat66-static-map-by-local add key failed");
sm_key.addr.as_u64[0] = e_addr->as_u64[0];
sm_key.addr.as_u64[1] = e_addr->as_u64[1];
sm_key.fib_index = 0;
@@ -186,7 +186,7 @@ nat66_static_mapping_add_del (ip6_address_t * l_addr, ip6_address_t * e_addr,
kv.key[1] = sm_key.as_u64[1];
kv.key[2] = sm_key.as_u64[2];
if (clib_bihash_add_del_24_8 (&nm->sm_e, &kv, 1))
- clib_warning ("nat66-static-map-by-external add key failed");
+ nat_log_warn ("nat66-static-map-by-external add key failed");
vlib_validate_combined_counter (&nm->session_counters, kv.value);
vlib_zero_combined_counter (&nm->session_counters, kv.value);
@@ -198,7 +198,7 @@ nat66_static_mapping_add_del (ip6_address_t * l_addr, ip6_address_t * e_addr,
kv.value = sm - nm->sm;
if (clib_bihash_add_del_24_8 (&nm->sm_l, &kv, 0))
- clib_warning ("nat66-static-map-by-local delete key failed");
+ nat_log_warn ("nat66-static-map-by-local delete key failed");
sm_key.addr.as_u64[0] = e_addr->as_u64[0];
sm_key.addr.as_u64[1] = e_addr->as_u64[1];
sm_key.fib_index = 0;
@@ -206,7 +206,7 @@ nat66_static_mapping_add_del (ip6_address_t * l_addr, ip6_address_t * e_addr,
kv.key[1] = sm_key.as_u64[1];
kv.key[2] = sm_key.as_u64[2];
if (clib_bihash_add_del_24_8 (&nm->sm_e, &kv, 0))
- clib_warning ("nat66-static-map-by-external delete key failed");
+ nat_log_warn ("nat66-static-map-by-external delete key failed");
fib_table_unlock (sm->fib_index, FIB_PROTOCOL_IP6,
FIB_SOURCE_PLUGIN_HI);
pool_put (nm->sm, sm);
diff --git a/src/plugins/nat/nat_ipfix_logging.c b/src/plugins/nat/nat_ipfix_logging.c
index d863d0cc674..b2c167096aa 100644
--- a/src/plugins/nat/nat_ipfix_logging.c
+++ b/src/plugins/nat/nat_ipfix_logging.c
@@ -640,7 +640,7 @@ snat_ipfix_logging_nat44_ses (u8 nat_event, u32 src_ip, u32 nat_src_ip,
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -741,7 +741,7 @@ snat_ipfix_logging_addr_exhausted (u32 pool_id, int do_flush)
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -828,7 +828,7 @@ snat_ipfix_logging_max_entries_per_usr (u32 limit, u32 src_ip, int do_flush)
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -921,7 +921,7 @@ nat_ipfix_logging_max_ses (u32 limit, int do_flush)
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -1011,7 +1011,7 @@ nat_ipfix_logging_max_bib (u32 limit, int do_flush)
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -1101,7 +1101,7 @@ nat_ipfix_logging_max_frag_ip4 (u32 limit, u32 src, int do_flush)
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -1194,7 +1194,7 @@ nat_ipfix_logging_max_frag_ip6 (u32 limit, ip6_address_t * src, int do_flush)
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -1287,7 +1287,7 @@ nat_ipfix_logging_nat64_bibe (u8 nat_event, ip6_address_t * src_ip,
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -1391,7 +1391,7 @@ nat_ipfix_logging_nat64_ses (u8 nat_event, ip6_address_t * src_ip,
if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
{
- clib_warning ("can't allocate buffer for NAT IPFIX event");
+ nat_log_err ("can't allocate buffer for NAT IPFIX event");
return;
}
@@ -1942,7 +1942,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
}
@@ -1954,7 +1954,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -1964,7 +1964,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -1974,7 +1974,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -1984,7 +1984,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -1994,7 +1994,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -2004,7 +2004,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -2014,7 +2014,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -2024,7 +2024,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
@@ -2036,7 +2036,7 @@ snat_ipfix_logging_enable_disable (int enable, u32 domain_id, u16 src_port)
rv = vnet_flow_report_add_del (frm, &a, NULL);
if (rv)
{
- clib_warning ("vnet_flow_report_add_del returned %d", rv);
+ nat_log_warn ("vnet_flow_report_add_del returned %d", rv);
return -1;
}
}
diff --git a/src/plugins/nat/nat_reass.c b/src/plugins/nat/nat_reass.c
index 1a5aeebdf7c..1185e1bb4af 100755
--- a/src/plugins/nat/nat_reass.c
+++ b/src/plugins/nat/nat_reass.c
@@ -272,7 +272,7 @@ nat_ip4_reass_find_or_create (ip4_address_t src, ip4_address_t dst,
{
clib_dlist_addhead (srm->ip4_reass_lru_list_pool,
srm->ip4_reass_head_index, oldest_index);
- clib_warning ("no free resassembly slot");
+ nat_log_warn ("no free resassembly slot");
reass = 0;
goto unlock;
}
@@ -481,7 +481,7 @@ nat_ip6_reass_find_or_create (ip6_address_t src, ip6_address_t dst,
{
clib_dlist_addhead (srm->ip6_reass_lru_list_pool,
srm->ip6_reass_head_index, oldest_index);
- clib_warning ("no free resassembly slot");
+ nat_log_warn ("no free resassembly slot");
reass = 0;
goto unlock;
}