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 3E45743347; Thu, 16 Nov 2023 18:25:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D556402CD; Thu, 16 Nov 2023 18:25:40 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8CCCA40150 for ; Thu, 16 Nov 2023 18:25:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700155538; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VIUHj0peq92v/Kl6rUkLFXqSycKciZDSJqCRru/yI+o=; b=OKiTV4dT0NbjhJ+NFKe4L5rRE75v90nrOYjAECVca8OHQ9PyyexwzqRUql+yMZRrKCbD05 6bxymX+4wloi5l80J85IRq0l4CSondqUDGnmzNRTY62zadXHwXHLQHbLdgCOiJGSCS7nDE S9ZJuZ4+B+c61zc+ZcNX097HTXLQjQs= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-mqkf18D9P8uvhhx2W2e5sQ-1; Thu, 16 Nov 2023 12:25:36 -0500 X-MC-Unique: mqkf18D9P8uvhhx2W2e5sQ-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2c83269c4ccso9978031fa.0 for ; Thu, 16 Nov 2023 09:25:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700155535; x=1700760335; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VIUHj0peq92v/Kl6rUkLFXqSycKciZDSJqCRru/yI+o=; b=gufKHKrvsJJ3GAS79oFuIQ61I5k+yCQzCeF0q1kM2Cs/KdhWx399PZTcStwKYpJ4Ki UyvPa+YwnkbqELmKTUADJ8/uEE5beK81uZ5/u5BdsNOVL8VoQZY1S9hDWtaAV46bEERp g3gQcS9RMAvkQxNSinOdKK31uZWoe5D6gZH51dqd2nj4goTYft7tOChcOSgdwLZySZDM XqItFP6bKanc5uxgKZehfx80D+JQBVy+gDQdc0VhTwwi/5wu8149kh3kqA3rCtVAx2GW teYDr3R29bHhwrVSMrRHMw/R67ZeQ3Jz2HwXa1TwOR6AMl94+Hc6/KwZJA1BLRmfSYQz 2TkQ== X-Gm-Message-State: AOJu0Yw8z9IDCuoc4vlVNN31TMRVj5ueBPfbHgaM2ry8+fcikW/nbukm IsymtV/eGZsNwyQf2qL0z+tw2pMLPNIfCRAiNa9wbJIkeDYWU0lkcFtUoyzQC77vXE8d4mDtTIJ +UvS3gJudQ4+NYBWe0qo= X-Received: by 2002:a2e:9cd1:0:b0:2c8:3ab2:ecae with SMTP id g17-20020a2e9cd1000000b002c83ab2ecaemr7829105ljj.42.1700155535510; Thu, 16 Nov 2023 09:25:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFthW3ImwzV/Y2h4yTFl3EFCWf2Ldq9+xZ9aO7kWzK3aleYaRJdWCiitEU97kztSyRLKJ4lch2bRZZeseExiyM= X-Received: by 2002:a2e:9cd1:0:b0:2c8:3ab2:ecae with SMTP id g17-20020a2e9cd1000000b002c83ab2ecaemr7829078ljj.42.1700155535201; Thu, 16 Nov 2023 09:25:35 -0800 (PST) MIME-Version: 1.0 References: <20221012175930.7560-1-nicolas.chautru@intel.com> <20221012175930.7560-3-nicolas.chautru@intel.com> In-Reply-To: <20221012175930.7560-3-nicolas.chautru@intel.com> From: David Marchand Date: Thu, 16 Nov 2023 18:25:23 +0100 Message-ID: Subject: Re: [PATCH v12 02/16] baseband/acc100: refactor to segregate common code To: Nicolas Chautru , hernan.vargas@intel.com Cc: dev@dpdk.org, gakhil@marvell.com, maxime.coquelin@redhat.com, trix@redhat.com, bruce.richardson@intel.com, hemant.agrawal@nxp.com, stephen@networkplumber.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello, Looking back in the mailing list archive... On Wed, Oct 12, 2022 at 8:00=E2=80=AFPM Nicolas Chautru wrote: > +/* Helper macro for logging */ > +#define rte_acc_log(level, fmt, ...) \ > + rte_log(RTE_LOG_ ## level, RTE_LOG_NOTICE, fmt "\n", \ > + ##__VA_ARGS__) I noticed that this macro logs messages with a 6 value as logtype, registered under lib.hash (RTE_LOGTYPE_HASH). lib/log/rte_log.h:#define RTE_LOG_NOTICE 6U /**< Normal but significant condition. */ lib/log/rte_log.h:#define RTE_LOGTYPE_HASH 6 /**< Log related to hash table. */ Please fix this. Here is some suggestion: Looking at other RTE_LOG_REGISTER in this driver, both acc and vrb drivers are registered under a same logtype (which is probably not entirely broken, but quite confusing): $ git grep RTE_LOG_REGISTER_DEFAULT drivers/baseband/acc/ drivers/baseband/acc/rte_acc100_pmd.c:RTE_LOG_REGISTER_DEFAULT(acc100_logty= pe, NOTICE); # mapped to pmd.bb.acc drivers/baseband/acc/rte_vrb_pmd.c:RTE_LOG_REGISTER_DEFAULT(vrb_logtype, NOTICE); # mapped to pmd.bb.acc It seems 3 logtypes are used in this code. So this driver can use sub types, like: RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, NOTICE); # mapped to pmd.bb.acc.acc100 RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, NOTICE); # mapped to pmd.bb.acc.v= rb RTE_LOG_REGISTER_SUFFIX(acc_common_logtype, common, NOTICE); # mapped to pmd.bb.acc.common --=20 David Marchand