[dpdk-dev] [PATCH 5/5] sfc: don't use RTE_LOGTYPE_PMD
Ferruh Yigit
ferruh.yigit at intel.com
Wed Feb 27 12:21:14 CET 2019
On 2/26/2019 9:34 PM, Stephen Hemminger wrote:
> The sfc driver was still using RTE_LOGTYPE_PMD which was superseded
> by local logging.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> drivers/net/sfc/sfc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
> index 898603884fa0..2cd7126015fd 100644
> --- a/drivers/net/sfc/sfc.c
> +++ b/drivers/net/sfc/sfc.c
> @@ -1115,12 +1115,12 @@ sfc_register_logtype(const struct rte_pci_addr *pci_addr,
> ++lt_prefix_str_size; /* Reserve space for prefix separator */
> lt_str_size_max = lt_prefix_str_size + PCI_PRI_STR_SIZE + 1;
> } else {
> - return RTE_LOGTYPE_PMD;
> + return sfc_logtype_driver;
> }
>
> lt_str = rte_zmalloc("logtype_str", lt_str_size_max, 0);
> if (lt_str == NULL)
> - return RTE_LOGTYPE_PMD;
> + return sfc_logtype_driver;
>
> strncpy(lt_str, lt_prefix_str, lt_prefix_str_size);
> lt_str[lt_prefix_str_size - 1] = '.';
>
Overall I think it is good idea to remove RTE_LOGTYPE_PMD, but sfc has a few
more usage of it around same manner, as a fallback value if allocating dynamic
one fails.
Andrew,
Can be possible to update this sfc patch to completely eliminate RTE_LOGTYPE_PMD
usage? What do you think?
Thanks,
ferruh
More information about the dev
mailing list