[dpdk-dev] [PATCH v4 1/3] rte: add keep alive functionality
Thomas Monjalon
thomas.monjalon at 6wind.com
Tue Nov 10 15:02:57 CET 2015
Hi,
2015-11-05 11:32, Remy Horton:
> +/**
> + * @param *ptr_timer Triggering timer (unused)
> + * @param *ptr_data Data pointer (keepalive structure)
> + */
> +void rte_keepalive_dispatch_pings(void *ptr_timer, void *ptr_data);
There is no description for this function.
Why ptr_timer is unused?
> +#ifdef KEEPALIVE_DEBUG_MSGS
> +static void
> +print_trace(const char *msg, struct rte_keepalive *keepcfg, int idx_core)
> +{
> + printf("%sLast seen %" PRId64 "ms ago.\n",
> + msg,
> + ((rte_rdtsc() - keepcfg->last_alive[idx_core])*1000)
> + / rte_get_tsc_hz()
> + );
> +}
> +#else
> +static void
> +print_trace(__attribute__((unused)) const char *msg,
> + __attribute__((unused)) struct rte_keepalive *keepcfg,
> + __attribute__((unused)) int idx_core)
> +{
> +}
> +#endif
This function will never be tested and do not use rte_log.
Please remove it and use the logging functions.
More information about the dev
mailing list