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 5502E43698; Thu, 7 Dec 2023 11:37:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 424EE42DB2; Thu, 7 Dec 2023 11:37:58 +0100 (CET) Received: from office2.cesnet.cz (office2.cesnet.cz [78.128.248.237]) by mails.dpdk.org (Postfix) with ESMTP id 8B3FD40295 for ; Thu, 7 Dec 2023 11:37:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1701945475; bh=3BA/qMVyD6RxSyWeyLq1o1rXcgGLsSDHNbVOG1Kvd3A=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Fe+g5cntQtehcJsmsNmdsoLFWeUEzMuCYt1kbIBrjElGkLVETxRUIukpKJF0yI45Y j5m8Tb8WnadcbTEY5wcO+cOzDpf3iPDXJdsCp0dCsa9iFvrT5jaBVuVPuu/F8czHfj cqh3ArDwG8P1gcGZ0eHCmY/WVGxkQ6Xpf3q3HSiQ6MPWJe7oJbAJ50yvDXZjLTSCwP hEhvnhCxhd316q3pERQqxBmGqsuqD0z126c8OWkK2YXeZrFMVr8wjXcrKDq4TAZQwC 0yPM9Z5BbrkhFkX6VWQ5DhX1JHlbOkvpx+/762tWLLly1kAXijuwXZSJP+8FDjjHlc UqW4QWDlHcjRQ== Received: from [IPv6:2001:67c:1220:80c:1b:e00e:9e81:ff5f] (unknown [IPv6:2001:67c:1220:80c:1b:e00e:9e81:ff5f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id E3D09118007D; Thu, 7 Dec 2023 11:37:53 +0100 (CET) Message-ID: <6e4607a0765c6ac5d199e49a88b44a896750b59b.camel@cesnet.cz> Subject: Re: [RFT] net/nfb: use dynamic logtype From: Martin Spinler To: Stephen Hemminger , dev@dpdk.org Cc: Rastislav Cernay Date: Thu, 07 Dec 2023 11:37:52 +0100 In-Reply-To: <20231206175326.116375-1-stephen@networkplumber.org> References: <20231206175326.116375-1-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 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 Thanks for patch! There are some issues. On Wed, 2023-12-06 at 09:51 -0800, Stephen Hemminger wrote: >=20 > diff --git a/drivers/net/nfb/nfb_log.h b/drivers/net/nfb/nfb_log.h > new file mode 100644 > index 000000000000..fac66a38d4b3 > --- /dev/null > +++ b/drivers/net/nfb/nfb_log.h > @@ -0,0 +1,13 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + */ > + > +#ifndef _NFB_STATS_H_ > +#define _NFB_STATS_H_ use the _NFB_LOG_H_ guards > + > +extern int nfb_logtype; > + > +#define NFB_LOG(level, fmt, args...) \ > + rte_log(RTE_LOG_ ## level, nfb_logtype, "%s(): " fmt "\n", \ > + __func__, ## args) > + > +#endif /* _NFB_STATS_H_ */ use the _NFB_LOG_H_ guard > diff --git a/drivers/net/nfb/nfb_rx.c b/drivers/net/nfb/nfb_rx.c > index 8a9b232305f2..e39592d04737 100644 > --- a/drivers/net/nfb/nfb_rx.c > +++ b/drivers/net/nfb/nfb_rx.c > =20 > @@ -19,7 +20,7 @@ nfb_eth_rx_queue_start(struct rte_eth_dev *dev, uint16_= t rxq_id) > int ret; > =20 > if (rxq->queue =3D=3D NULL) { > - RTE_LOG(ERR, PMD, "RX NDP queue is NULL!\n"); > + NFP_LOG(ERR, "RX NDP queue is NULL"); typo, should be NFB_LOG instead of NFP_LOG > return -EINVAL; > } > =20 > =20 Also, the nfb_rx.h and nfb_tx.h files use the macro NFB_LOG inside, please add '#include "nfb_log.h"' into them (then the include in nfb_rx.c will be duplicate). Otherwise, all .c sources, which include main nfb.h, don't compile. With these changes, the driver works. Thank you! Martin