DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Subject: Re: [PATCH v6 1/5] ip_frag: use a dynamic logtype
Date: Tue, 21 Feb 2023 11:41:02 +0100	[thread overview]
Message-ID: <CAJFAV8xNr0TnV36OcVekXyxivWxxkgn-zBy7BLrB1aU8H9K8kg@mail.gmail.com> (raw)
In-Reply-To: <20230220185001.50714-2-stephen@networkplumber.org>

On Mon, Feb 20, 2023 at 7:50 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> DPDK libraries should not be reusing RTE_LOGTYPE_USER1 in
> lieu of doing proper logtype registration.
>
> Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
> Fixes: 416707812c03 ("ip_frag: refactor reassembly code into a proper library")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  lib/ip_frag/ip_frag_common.h     | 5 ++++-
>  lib/ip_frag/rte_ip_frag_common.c | 2 ++
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h
> index 9c0dbdeb6eb9..95f1689d476d 100644
> --- a/lib/ip_frag/ip_frag_common.h
> +++ b/lib/ip_frag/ip_frag_common.h
> @@ -8,9 +8,12 @@
>  #include "rte_ip_frag.h"
>  #include "ip_reassembly.h"
>
> +extern int ipfrag_logtype;
> +#define RTE_LOGTYPE_IPFRAG     ipfrag_logtype
> +
>  /* logging macros. */
>  #ifdef RTE_LIBRTE_IP_FRAG_DEBUG
> -#define        IP_FRAG_LOG(lvl, fmt, args...)  RTE_LOG(lvl, USER1, fmt, ##args)
> +#define        IP_FRAG_LOG(lvl, fmt, args...)  RTE_LOG(lvl, IPFRAG, fmt, ##args)
>  #else
>  #define        IP_FRAG_LOG(lvl, fmt, args...)  do {} while(0)
>  #endif /* IP_FRAG_DEBUG */
> diff --git a/lib/ip_frag/rte_ip_frag_common.c b/lib/ip_frag/rte_ip_frag_common.c
> index c1de2e81b6d0..e4af8d23ad10 100644
> --- a/lib/ip_frag/rte_ip_frag_common.c
> +++ b/lib/ip_frag/rte_ip_frag_common.c
> @@ -7,6 +7,8 @@
>
>  #include <rte_log.h>
>
> +RTE_LOG_REGISTER_DEFAULT(ipfrag_logtype, INFO);
> +
>  #include "ip_frag_common.h"
>
>  #define        IP_FRAG_HASH_FNUM       2

There are still some parts using USER1 in this library:

lib/ip_frag/rte_ip_frag_common.c:               RTE_LOG(ERR, USER1,
"%s: invalid input parameter\n", __func__);
lib/ip_frag/rte_ip_frag_common.c:               RTE_LOG(ERR, USER1,
lib/ip_frag/rte_ip_frag_common.c:       RTE_LOG(INFO, USER1, "%s:
allocated of %zu bytes at socket %d\n",

-- 
David Marchand


  reply	other threads:[~2023-02-21 10:41 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  4:48 [PATCH 0/5] Fix use of RTE_LOGTYPE_USER1 in libraries Stephen Hemminger
2023-02-08  4:48 ` [PATCH 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-08 23:52   ` Konstantin Ananyev
2023-02-08  4:48 ` [PATCH 2/5] reorder: " Stephen Hemminger
2023-02-08  4:48 ` [PATCH 3/5] latencystats: use " Stephen Hemminger
2023-02-08  4:48 ` [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-09  7:19   ` Xia, Chenbo
2023-02-08  4:48 ` [PATCH 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-10  0:22 ` [PATCH v3 0/5] Replace use of RTE_LOGTYPE_USER1 in library Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 2/5] reorder: " Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 3/5] latencystats: use " Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-10  9:58     ` Maxime Coquelin
2023-02-10  0:22   ` [PATCH v3 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-10 17:15 ` [PATCH v4 0/5] Replace use of RTE_LOGTYPE_USER1 in library Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 2/5] reorder: " Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 3/5] latencystats: use " Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-12 16:14 ` [PATCH 0/5] Replace us of RTE_LOGTYPE_USER1 in libraries Stephen Hemminger
2023-02-12 16:14   ` [PATCH 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-12 16:14   ` [PATCH 2/5] reorder: " Stephen Hemminger
2023-02-12 16:14   ` [PATCH 3/5] latencystats: use " Stephen Hemminger
2023-02-12 16:14   ` [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-12 16:14   ` [PATCH 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-20 18:49 ` [PATCH v6 0/5] Replace use of RTE_LOGTYPE_USER1 in libraries Stephen Hemminger
2023-02-20 18:49   ` [PATCH v6 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-21 10:41     ` David Marchand [this message]
2023-02-20 18:49   ` [PATCH v6 2/5] reorder: " Stephen Hemminger
2023-02-20 18:49   ` [PATCH v6 3/5] latencystats: use " Stephen Hemminger
2023-02-20 18:50   ` [PATCH v6 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-21 10:39     ` David Marchand
2023-02-20 18:50   ` [PATCH v6 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-21 10:42   ` [PATCH v6 0/5] Replace use of RTE_LOGTYPE_USER1 in libraries David Marchand
2023-02-21 18:46     ` Stephen Hemminger
2023-08-14 16:31 ` [PATCH v8 0/6] Convert " Stephen Hemminger
2023-08-14 16:31   ` [PATCH v8 1/6] ip_frag: use a dynamic logtype Stephen Hemminger
2023-12-01  8:10     ` David Marchand
2023-12-01 12:16       ` Konstantin Ananyev
2023-12-01 13:11         ` David Marchand
2023-08-14 16:31   ` [PATCH v8 2/6] reorder: " Stephen Hemminger
2023-08-16  8:29     ` [EXT] " Volodymyr Fialko
2023-08-14 16:31   ` [PATCH v8 3/6] latencystats: use " Stephen Hemminger
2023-08-14 16:31   ` [PATCH v8 4/6] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-08-14 16:31   ` [PATCH v8 5/6] ipsec: fix usage " Stephen Hemminger
2023-08-14 16:31   ` [PATCH v8 6/6] power: use a dynamic logtype for guest channel Stephen Hemminger
2023-08-14 17:41   ` [PATCH v8 0/6] Convert use of RTE_LOGTYPE_USER1 in libraries Morten Brørup
2023-12-04 12:25   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJFAV8xNr0TnV36OcVekXyxivWxxkgn-zBy7BLrB1aU8H9K8kg@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).