From patchwork Sun Feb 12 16:14:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 123730 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 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 From patchwork Sun Feb 12 16:14:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 123731 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41E9E41C7B; Sun, 12 Feb 2023 17:15:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 976F342D0B; Sun, 12 Feb 2023 17:15:01 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id B07B440ED8 for ; Sun, 12 Feb 2023 17:14:59 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id h4so3427111pll.9 for ; Sun, 12 Feb 2023 08:14:59 -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=nSCxumgihpw6PLAmO7FLecywJNidh15F9ftRQbiV9CE=; b=Ze3Bm08v0HUhIsMs3G39KoBtvj97kgvbg9MUAW6o2BAV/yiBhwOWuWtHzgXlnVlgl9 skn4YujSfT3SZrKS/lbGBZH2i1z//Mbom5KhCaGwRuOo7MCR2dtTK0868i8pPP1EscAE 1O7jr/fPY1MjJtfTu//zRS9hmZb/0Yn9I+IyhHvy7Vl3NNTZj9fxHrDvJaQxev3oE40l KTbDaKCmDSDGYTO7QNSBQNHM0cp+kHwlLpIsi1jOcmDqdRXkuujRXsgTv5cQoRTrLEDO 1D05L+OOxuwJf1du7P7YOnve0rBy4EiUKf1RWfZ5rYM3ekKTw1MmK7hLVIzF86dbGGRJ BYCg== 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=nSCxumgihpw6PLAmO7FLecywJNidh15F9ftRQbiV9CE=; b=Ig2lJ2XTFR4Ucm8WVpNiHDauOd9lq8cFGen8IyLAy1f1ifw8Ap7hiXgb7hYT0NFdIQ nhQo8XaS07NaZ5IU6L0zBdEqWzevD2zADUo8ya4E8/hhl4HX1nWOiHJP+nS+rRRstH9c sxsA1muf240Ku2SXmJV2auOZWAvmhQynDHiX5tSxNJ/269GHJwqtdBvZyZSb+A/7riPh XycUNXab5P7oqkMVd5lYcXXXbNmqaScAJjW19Dr3n211/MWXNqt9nPeEOkotcKvTIIYe SBBCVDeAUvEQfFWc5+JDe0jZiyCJcLGwNXVlRF40M2eLbm5shGWiImPB4UzRXeKBVtMY BDrQ== X-Gm-Message-State: AO0yUKVfaj3gRWkcx2/lCgT47gTzQT6tJtZaAHQUx8c+2gQfCgqSjvaW 41YpqgfZ5iifJtbXlSPfyNl4Zr4iTM08o045Dv0= X-Google-Smtp-Source: AK7set/t+KI8+nCBtMnFKDJo7k+KNpoAUZw6k740wBLW6HwfYD8Hw+ffPF+IEWbpvm2lirIt6xNFmA== X-Received: by 2002:a17:90b:17cf:b0:22c:305b:9503 with SMTP id me15-20020a17090b17cf00b0022c305b9503mr23567667pjb.41.1676218498630; Sun, 12 Feb 2023 08:14:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 08:14:58 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , sergio.gonzalez.monroy@intel.com, Reshma Pattan , Declan Doherty , Neil Horman , Richardson Bruce Subject: [PATCH 2/5] reorder: use a dynamic logtype Date: Sun, 12 Feb 2023 08:14:51 -0800 Message-Id: <20230212161454.836493-3-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 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 Libraries should not be reusing RTE_LOGTYPE_USER1 instead of doing proper logtype registration. Fixes: b70b56032bff ("reorder: new library") Cc: sergio.gonzalez.monroy@intel.com Signed-off-by: Stephen Hemminger --- lib/reorder/rte_reorder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c index 385ee479da42..37bf132946b7 100644 --- a/lib/reorder/rte_reorder.c +++ b/lib/reorder/rte_reorder.c @@ -15,6 +15,9 @@ #include "rte_reorder.h" +RTE_LOG_REGISTER_DEFAULT(reorder_logtype, INFO); +#define RTE_LOGTYPE_REORDER reorder_logtype + TAILQ_HEAD(rte_reorder_list, rte_tailq_entry); static struct rte_tailq_elem rte_reorder_tailq = { @@ -26,9 +29,6 @@ EAL_REGISTER_TAILQ(rte_reorder_tailq) #define RTE_REORDER_PREFIX "RO_" #define RTE_REORDER_NAMESIZE 32 -/* Macros for printing using RTE_LOG */ -#define RTE_LOGTYPE_REORDER RTE_LOGTYPE_USER1 - #define RTE_REORDER_SEQN_DYNFIELD_NAME "rte_reorder_seqn_dynfield" int rte_reorder_seqn_dynfield_offset = -1; From patchwork Sun Feb 12 16:14:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 123732 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EF4741C7B; Sun, 12 Feb 2023 17:15:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DE1F42D10; Sun, 12 Feb 2023 17:15:02 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id 9E63542C4D for ; Sun, 12 Feb 2023 17:15:00 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id e10-20020a17090a630a00b0022bedd66e6dso14695505pjj.1 for ; Sun, 12 Feb 2023 08:15:00 -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=R9wIe9qMWy4gg4mMTnDLAbpI5lNgUox8Qod56/q4hzk=; b=2lA/mXxLzNYZpDeA6MEZxYLocszfVr1JrCcks01ruwhNaSWePh7CubFxtXd0TDULfr kGPsQrKKRT9fU/tgrjVUG1fhHOLGx2vILUb5VXTQMkw0ww58Uvtc4iL5XqGjdT9c9YVl TEdxaoR4ICcqbGqoyoDrR9zlrCd4SpyC+Ybm6nfAfli1RQ4g0hC5ox3JAuF5PWS057LT /f7SlQZTzTQVhgIQtQV4hkR1JO8da9lBX29/NQxs1Szre7rASEjvCPl00/RCMzAW26g/ mWtVASwLcyIiCGCXKkg7633MypQw/nS++Td+GEwEevtXxQlrT43B1jqnBg9AvrEk9+Ju If6g== 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=R9wIe9qMWy4gg4mMTnDLAbpI5lNgUox8Qod56/q4hzk=; b=2X3TFO5w27HV3+o0/vkLxgEN98L7wa7KvZlE3m+N0C3he4zjEpOH/vMpsjP4/j76VR Uo8JCxM0h1eZNRknxegVOYL8BtKCBH8x7kClXOvdAjbNlKFjJqNEkOmyg5d3t9EaMWle 9WmAPb6mNUlYx7Qhf9lR442B3IIj0xM4B+B4O7Z1VdfJMIUAl9uOlmQxWdkppwOJW/tH kMsoXJxXji13fiLwIwQDR/hVkr63pF0RKDWPwhKpUcXwS/dFHu+EUPrS40jeYQaJbXgt lgDLdJvNVxhwYe1rit+zJDYuwh4ua5QnuVF4Pzxaxt1waQj65l6129jofqhOfHE1MUo9 Ngdw== X-Gm-Message-State: AO0yUKVNim0huK45sn3K772R+HYNS6MqXSs5ZBEeE6/mo4e5AfjhNV9F wX8z+PO5xZSCp0tWpHNvQXbda0ao6oW/9eWsil4= X-Google-Smtp-Source: AK7set8GDciJ3bzxJM7ayarjWZXgw6LhhGIY+q+Ks2qXV+ceTu9gUFouMr1jnu94cb5pscCzNMp6YA== X-Received: by 2002:a17:90b:3ec3:b0:233:f354:e7df with SMTP id rm3-20020a17090b3ec300b00233f354e7dfmr1372699pjb.18.1676218499557; Sun, 12 Feb 2023 08:14:59 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 08:14:59 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , reshma.pattan@intel.com, Remy Horton , Harry van Haaren Subject: [PATCH 3/5] latencystats: use dynamic logtype Date: Sun, 12 Feb 2023 08:14:52 -0800 Message-Id: <20230212161454.836493-4-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 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 Libraries should not reuse RTE_LOGTYPE_USER1 for their logging. Instead they should register their own type. Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats") Cc: reshma.pattan@intel.com Signed-off-by: Stephen Hemminger --- lib/latencystats/rte_latencystats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c index 8985a377db4e..f3c1746cca00 100644 --- a/lib/latencystats/rte_latencystats.c +++ b/lib/latencystats/rte_latencystats.c @@ -26,7 +26,8 @@ latencystat_cycles_per_ns(void) } /* Macros for printing using RTE_LOG */ -#define RTE_LOGTYPE_LATENCY_STATS RTE_LOGTYPE_USER1 +RTE_LOG_REGISTER_DEFAULT(latencystat_logtype, INFO); +#define RTE_LOGTYPE_LATENCY_STATS latencystat_logtype static uint64_t timestamp_dynflag; static int timestamp_dynfield_offset = -1; From patchwork Sun Feb 12 16:14:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 123733 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7219741C7B; Sun, 12 Feb 2023 17:15:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CFF242D13; Sun, 12 Feb 2023 17:15:06 +0100 (CET) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 7AC6F42C54 for ; Sun, 12 Feb 2023 17:15:01 +0100 (CET) Received: by mail-pl1-f171.google.com with SMTP id b5so11264168plz.5 for ; Sun, 12 Feb 2023 08:15:01 -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=0XJ+g0kD2Qe+7BJbKO63/uCY6D20Y6WQZhAQwgT+Y2U=; b=eII66MefFlLIqh58zDth/TOhsKHd1mfCvOz8kThiOapakEwZN0vNyj1hOFE9iEHRyP Benl3CR0QoWMdnJ6Bm/vcP3B3klxjjMWDCWtp2PT22a83gOenxF23BsgGDr1TLDiHtZT f1bbn0MjLYMV5SNGOSMRSV9GPNcekR3ohprvQia4EhA9mSTRCq78mLqpqElFaZUOI5jM 87q/j8Qr0TTtEM/+Mg6nN4pudX7d2jz9AMkVzT7NmBo1RBoHp35DkgNNskMq8MPmGF2s fU4lTzZYx6ROumxyW0FX6M0EJXfxh/5WNV79zjQI/tz49fkxvEhAde0RUVo6HF9fu20r 4IDw== 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=0XJ+g0kD2Qe+7BJbKO63/uCY6D20Y6WQZhAQwgT+Y2U=; b=yqRvpO1DD1qsoJHtM9AFzWxmySgOe601ZEewizh/lNWKQgaArEGaivxKRAwNkVeZJ3 pDS7Fk1bzQVtL86fTqWKcWcgI+6WuGkn08HaYOot5LpmlDa3vAKhCzLB0twG0wYfyyMk b2Yr1yKZzIyPb+8rSCLnKKSrBKlfxYElrXHTIX9YsZX2mw5zpUEiAr/KmfAlAQduKI69 sS1sDJWvI2VTNHksPFnZCFyqy5t/bnbzeSL3x8pHmlgJWL7FJrDfb3ZRpxpmxwoX69TO uKGyn4zegR0UGvJ8U4AM8jwTXx3KDxavH7yVe6RzgyxtUIL4OsVfmz7qsFdKMRabTEte U3HQ== X-Gm-Message-State: AO0yUKWTfSyCKYnldNtZ2Xfrv/pm2MTB6znrYN6z1oSzUr3PN5+x7B9f yRgad2rv0YgA5/lQfF5efX2OPpQw9HJMOOSQXbk= X-Google-Smtp-Source: AK7set+98a8+SylExUzwQvRSlNbv8W4CQxZBMkX7WYiGvRZUU8FcsbtzRMpiIeoYoDqy+BbPtVUGGA== X-Received: by 2002:a17:90b:388b:b0:233:e0d5:a2ab with SMTP id mu11-20020a17090b388b00b00233e0d5a2abmr2978458pjb.34.1676218500472; Sun, 12 Feb 2023 08:15:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 08:15:00 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chenbo Xia , Maxime Coquelin Subject: [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Date: Sun, 12 Feb 2023 08:14:53 -0800 Message-Id: <20230212161454.836493-5-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 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 Fix instances of USER1 logtype in fdset and crypto sections. Acked-by: Chenbo Xia Reviewed-by: Maxime Coquelin Signed-off-by: Stephen Hemminger --- lib/vhost/fd_man.c | 4 ++-- lib/vhost/vhost_crypto.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/vhost/fd_man.c b/lib/vhost/fd_man.c index 1876fada3354..46037d02784e 100644 --- a/lib/vhost/fd_man.c +++ b/lib/vhost/fd_man.c @@ -10,8 +10,8 @@ #include "fd_man.h" - -#define RTE_LOGTYPE_VHOST_FDMAN RTE_LOGTYPE_USER1 +RTE_LOG_REGISTER_SUFFIX(vhost_fdset_logtype, fdset, INFO); +#define RTE_LOGTYPE_VHOST_FDMAN vhost_fdset_logtype #define FDPOLLERR (POLLERR | POLLHUP | POLLNVAL) diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c index f02bf865c349..ad420ea012d0 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -16,6 +17,9 @@ #define IV_OFFSET (sizeof(struct rte_crypto_op) + \ sizeof(struct rte_crypto_sym_op)) +RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); +#define RTE_LOGTYPE_VHOST_CRYPTO vhost_crypto_logtype + #ifdef RTE_LIBRTE_VHOST_DEBUG #define VC_LOG_ERR(fmt, args...) \ RTE_LOG(ERR, USER1, "[%s] %s() line %u: " fmt "\n", \ From patchwork Sun Feb 12 16:14:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 123734 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0FB9141C7B; Sun, 12 Feb 2023 17:15:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5ADC42D20; Sun, 12 Feb 2023 17:15:07 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id AA70F42D13 for ; Sun, 12 Feb 2023 17:15:02 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id r8so11287732pls.2 for ; Sun, 12 Feb 2023 08:15:02 -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=XQmC9K3TeXMgFqeLevvNO7XT0CzfA3gO5d2+9bnbNsc=; b=1+SGm0khrYMWem55UUCbmfbGvYqvfDdu0VECFBGTosBWtERKDlQ986FnHU4Xed5e+4 oUgUdTBlezITDgbrkVUc6THKvFzVxq4mCGuA7okSBERp1CoB/cGWWKxKLUZGIxR79226 l1KNU3Q3KHPK/XW4vbUYFAm5gCgBEWqi1PgzhHyGVqCtrTLQF6yJQBdG+jGqMmK3aIE+ ilxWGFxd+IkFuc8OytAEtxAcat0S4MIb4Fa6QX3NrB+SQX9MqP1j/BfKgDpuW9tJkI58 QFcyAJFqHwUl69Ngeay81IBwxhYvJF7ku1XsLxXfAlEYvmoOdeize0K2pAKAbSSnnN+M enGQ== 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=XQmC9K3TeXMgFqeLevvNO7XT0CzfA3gO5d2+9bnbNsc=; b=Luwmx7tT4JNFJ/qn07A20HfNEGhZcG46QiGin1PkHwQ2rGEhRi4eiwlpkbY/00w5a6 55wlfeZbnYYLypexKehHMTDDU4myeYEVfdwOBrJPBP9SuyPr0s0Kn80JHCBSHpsGGITW 6htDgPXC2MUTQdsExO7gUCpG/tGUaD8KLZecZhCjVSbp3Qz1W4oPFGYyVHqCuX1d42Ht IVdmO7MSmrxSE1KTvvF6X/XTdosLcPxMv6aQRkYPkbqjl1sKfC9OVpmcOHRJqX46YhND iypxTl1GuxBjFK1X1EddGAyT2KaeYZXKkdP9W+tiS1JLQNEwptgSOOC4wqXVCqUcJBGY 7mMg== X-Gm-Message-State: AO0yUKXdcxqhNYkPl+j9JuexYQJwN6NUbIWYn8l/Z2p2q/528WI9A1He vtDS4N8/9slbia9JxcnBAbtM7zYEyD/XShWkUiw= X-Google-Smtp-Source: AK7set+IJjp14ItMWcwZRY+0uKWnu3S78jOWIrJaEvCUMqF3ZU6KZSJKm4dukTfl69nmqow7Adg7WQ== X-Received: by 2002:a17:90b:4f8d:b0:230:f1c0:3f4d with SMTP id qe13-20020a17090b4f8d00b00230f1c03f4dmr21807177pjb.6.1676218501677; Sun, 12 Feb 2023 08:15:01 -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.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 08:15:01 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , kai.ji@intel.com, Pablo de Lara , Arkadiusz Kusztal Subject: [PATCH 5/5] ipsec: fix usage of RTE_LOGTYPE_USER1 Date: Sun, 12 Feb 2023 08:14:54 -0800 Message-Id: <20230212161454.836493-6-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 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 There already is a logtype in this driver, use it! Fixes: b35848bc01f6 ("crypto/ipsec_mb: add multi-process IPC request handler") Cc: kai.ji@intel.com Signed-off-by: Stephen Hemminger --- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c index 3e52f9567401..e9eb0d15b794 100644 --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c @@ -7,6 +7,7 @@ #include #include +#include #include "ipsec_mb_private.h" @@ -125,7 +126,7 @@ ipsec_mb_secondary_qp_op(int dev_id, int qp_id, qp_req_msg.num_fds = 0; ret = rte_mp_request_sync(&qp_req_msg, &qp_resp, &ts); if (ret) { - RTE_LOG(ERR, USER1, "Create MR request to primary process failed."); + IPSEC_MB_LOG(ERR, "Create MR request to primary process failed."); return -1; } qp_resp_msg = &qp_resp.msgs[0];