From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7616941C7B; Sun, 12 Feb 2023 17:15:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 843E942BC9; Sun, 12 Feb 2023 17:15:00 +0100 (CET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id 99AF5400D7 for ; Sun, 12 Feb 2023 17:14:58 +0100 (CET) Received: by mail-pj1-f45.google.com with SMTP id z14-20020a17090abd8e00b00233bb9d6bdcso4850754pjr.4 for ; Sun, 12 Feb 2023 08:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FhY2/8JKip9jE5AnJD2e45pWIw7FlQwNHfxGqa7xcIY=; b=Nct18wagQP4pOypgZmJFu2al6bAsRKyilksxZuEaiwX/kGCG+ZT3HSUVgnhEWOKgT2 jyLUfWTIlpLB45AQBp0wLJqeiXrGVoUaIorNTSH7zjmA8rPtUUyhbqnqN04ca7zIOHqf tsTZx5XnkigIBQXrduZDZ6HWX6WDNz+r1AJMP6rOB4A3CI17FFudz2o9qsMWlPyzJW4B NDHGFHDZsWy7bFI9LvxUUU8hUrzbiDExYKUMTuxacsjiuxxP7VSniI5fNqv5ruMT9M35 p+yRP39gc/4EnqASz34jutukKfoJfEjCuptmzw0sJcM3Kcw+RnMYEtcZwaIszu89+qJ7 mo+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FhY2/8JKip9jE5AnJD2e45pWIw7FlQwNHfxGqa7xcIY=; b=lNUhQ/4gO5v6bijHBvLn+fy7vOKLx/b+4G+iis5xQLN1lfL7yayA1TK/v+IOYBZrs1 u6sK5QqSJMFO4Mbs9DRTLD2pMBsJ/kyIG8VHLWfNthuafw0VcAYtsVS8jyYgNySQ5Ws7 3DCqEYdGz5yVgqU8LfPLDlEBDOlTqybHuEyM5WyljzxYSmTilyLoEnXlshtWvyj65JK1 q5jEZ9OIZso2iA2HM/hC5yQF9Q1lFWx35meBu2CYpOjZgCs0HvTMzO52xZ6o72FomGpa WbFthMuVsDYbnOvUXnbTawiKaVWuOaA9UP+6Th7EayP0l/gU4CIELCxr8n4u5DBa9jz+ LfGg== X-Gm-Message-State: AO0yUKXj+bpDiDPlmDypbIbM1UAsmXMVJgZ2+5WSTp5zQ2vIhw7QaeXr O+9UGtYREZ+9G705KJBAmQDJ8Ole+zAVpjTyPKY= X-Google-Smtp-Source: AK7set9AgbwIuhgZxY+1tZ9tS2D5SIujHlyZtpc8leSqBJYI5tm1ozl4ViD13o4Vk+Qmvp3/VV+vFQ== X-Received: by 2002:a17:90b:2287:b0:233:95c1:b5f3 with SMTP id kx7-20020a17090b228700b0023395c1b5f3mr7990397pjb.17.1676218497572; Sun, 12 Feb 2023 08:14:57 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id a14-20020a17090abe0e00b002308e6e645bsm2709817pjs.49.2023.02.12.08.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 08:14:57 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev , Anatoly Burakov , Thomas Monjalon Subject: [PATCH 1/5] ip_frag: use a dynamic logtype Date: Sun, 12 Feb 2023 08:14:50 -0800 Message-Id: <20230212161454.836493-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230212161454.836493-1-stephen@networkplumber.org> References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230212161454.836493-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org DPDK libraries should not be reusing RTE_LOGTYPE_USER1 in lieu of doing proper logtype registration. Acked-by: Konstantin Ananyev Fixes: 416707812c03 ("ip_frag: refactor reassembly code into a proper library") Signed-off-by: Stephen Hemminger --- 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_REGISTER_DEFAULT(ipfrag_logtype, INFO); + #include "ip_frag_common.h" #define IP_FRAG_HASH_FNUM 2 -- 2.39.1