aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dev_iavf
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-02 18:40:32 +0000
committerOle Tr�an <otroan@employees.org>2023-11-03 09:26:47 +0000
commit6bd6c80f27c708f72aef1d850e48deaef832477e (patch)
treeb1aa3c39f4b25e83d28f213e719d3963242fdb8d /src/plugins/dev_iavf
parent8800f732f868bf54da8adba05e38bd2477895ca5 (diff)
dev: strip debig log function name prefix during compilation
Type: improvement Change-Id: I9b9bb37a0895366b412f042b0e2da5bbdd477325 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dev_iavf')
-rw-r--r--src/plugins/dev_iavf/format.c21
-rw-r--r--src/plugins/dev_iavf/iavf.h6
2 files changed, 3 insertions, 24 deletions
diff --git a/src/plugins/dev_iavf/format.c b/src/plugins/dev_iavf/format.c
index bc84cc3ab2f..9a3dde47ee9 100644
--- a/src/plugins/dev_iavf/format.c
+++ b/src/plugins/dev_iavf/format.c
@@ -110,24 +110,3 @@ format_iavf_port_status (u8 *s, va_list *args)
s = format (s, "disabled");
return s;
}
-
-u8 *
-format_iavf_log (u8 *s, va_list *args)
-{
- vnet_dev_t *dev = va_arg (*args, vnet_dev_t *);
- char *func = va_arg (*args, char *);
-
- if (dev)
- s = format (s, "%U", format_vnet_dev_addr, dev);
- if (dev && func)
- vec_add1 (s, ' ');
- if (func)
- {
- if (strncmp (func, "iavf_", 5) == 0)
- func += 5;
- s = format (s, "%s", func);
- }
- vec_add1 (s, ':');
- vec_add1 (s, ' ');
- return s;
-}
diff --git a/src/plugins/dev_iavf/iavf.h b/src/plugins/dev_iavf/iavf.h
index 7576fa9e048..958a8dcf808 100644
--- a/src/plugins/dev_iavf/iavf.h
+++ b/src/plugins/dev_iavf/iavf.h
@@ -105,7 +105,6 @@ format_function_t format_virtchnl_status;
format_function_t format_iavf_vf_cap_flags;
format_function_t format_iavf_rx_trace;
format_function_t format_iavf_port_status;
-format_function_t format_iavf_log;
/* port.c */
vnet_dev_rv_t iavf_port_init (vlib_main_t *, vnet_dev_port_t *);
@@ -157,8 +156,9 @@ iavf_reg_flush (iavf_device_t *ad)
}
#define log_debug(dev, f, ...) \
- vlib_log (VLIB_LOG_LEVEL_DEBUG, iavf_log.class, "%U" f, format_iavf_log, \
- (dev), __func__, ##__VA_ARGS__)
+ vlib_log (VLIB_LOG_LEVEL_DEBUG, iavf_log.class, "%U" f, \
+ format_vnet_dev_log, (dev), \
+ clib_string_skip_prefix (__func__, "iavf_"), ##__VA_ARGS__)
#define log_info(dev, f, ...) \
vlib_log (VLIB_LOG_LEVEL_INFO, iavf_log.class, "%U: " f, \
format_vnet_dev_addr, (dev), ##__VA_ARGS__)