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 E5E8141CB7; Fri, 17 Feb 2023 03:46:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 539F442C76; Fri, 17 Feb 2023 03:46:18 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2108.outbound.protection.outlook.com [40.107.220.108]) by mails.dpdk.org (Postfix) with ESMTP id 8AA504113F for ; Fri, 17 Feb 2023 03:46:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iTe/gEgKtMHBWlQqWtmYhe+fpr5bi5xQqBdjv6noXcGvpRLSWVZ4hePq/FXGfDPY7I12Yr29jVWuVawzEQVqwQr1jbSgYMcsmUERRzfyllLUv12bbj/iPFGQqrsrnKPm0IzmKvWbz1XhSbAWqNBqqkIBvGiBHt99SDxrKIVY3/qsypnS7B+x9NX6dNvP9GmFKsEOKgypetejNkbxUbSRpDN52mWxNHpCIxkwBMMV6AQiEvtJ8cznvfkWIk+fE50S/HTZdGchHLuf8UeB6pkt3gC2WErGUCeiOokWwkHbmYrSEYhg12fYTqIbpDXdC1snCJLBZSBsC4bQ8v9Qezw9Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xuvTX+OIVcMsxNFH2cbPIMoMuWioVh/uxTL8X946T7o=; b=Oa47DMTW4b1bu37o9ZeBcaTuReXn4hIaQsLEgV/KHfgE/ja2FP7lg5JfTQTX7NtFG4mB4QYcXSMfHYK6ykASzoEm+g4Dr1LtsAlXctm8FQ7/VqspTYPLeIdKmGb4dLW/xNJFXtBQjjzQybCNe4thDTU+PWfpVnz4h4PxisyVzCRz2yElgVTuqj1OECWbB+YiONrd3t6n3c20eCZpl8ttnSUckuY76gn4m4xJFT0dLKhAB/Ce6iqtgytby3mK4q6/8K6bmSL1IET750p/fgz5HH8YA17kjWcijBS+NSCGuk4gFSD83WqWEmHpzRpwsju7Ba8imsCflJy+EqGASBdGsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xuvTX+OIVcMsxNFH2cbPIMoMuWioVh/uxTL8X946T7o=; b=kaLOn3k2LWrGSYkY7g4oRm1vgpp05GZcjH261gDg+2NHwV/GBZ4XajaLJVAC+VQMyHzhksudMKx+N/cybnIzRLrq2nlC5SGGirnp9kQolp/2qRccYhJAgyPCNE1qyYmhnRuYRtb5mXO+dsvl2fKba/RBcX3V8ADquMPSUNoQWbY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by BN0PR13MB4567.namprd13.prod.outlook.com (2603:10b6:408:127::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26; Fri, 17 Feb 2023 02:46:13 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7ea4:e421:5dd5:9f4d%5]) with mapi id 15.20.6086.026; Fri, 17 Feb 2023 02:46:13 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH 3/3] net/nfp: get rid of the usage of RTE log macro Date: Fri, 17 Feb 2023 10:45:39 +0800 Message-Id: <20230217024539.16514-4-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20230217024539.16514-1-chaoyong.he@corigine.com> References: <20230217024539.16514-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR04CA0005.apcprd04.prod.outlook.com (2603:1096:4:197::16) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BN0PR13MB4567:EE_ X-MS-Office365-Filtering-Correlation-Id: 7da7d8ae-4de2-4a7d-d2b7-08db10912212 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r4w8J3+JN0s6UZ5CBj955KG7/wxq/dbcFTjAUH9CAMKqLR3bxR7Fh9a/80nCsBHqPnilaGRoAF1XpLDFAizX5eHUqPr3sGIHYPUqrBffnII5PmIsnhH+i4rYjLBo4F37F2UDLH7wLHWUFXr6gM4qbwF8HWrr4KR9sKd4FsWvuMXkmXI8LqyMZhSgRKssClDK4kzbzMF45YxhHYKj0YXrrAFHNw2aOb2aULEujHaucYcyRVH+gKbjiD8I4A+7/skbDgTAgNLNBpGvKQF6a8m8BgTsAPyFuCaVcfz4TegV+1Koa5M6QeXd4u50HCE9i8j2l6Kvie+unHnqwE6AZrXwCF1Eegq7YK9cnB6SBExASQ5UF+0uz/p9FvqG1/JzqEjku3yxCHFHIF4dknxdGq0NR6960GHo6N4iHOSsTzUipkeojhGqeOamwx0IE0zH5pK65zBblRUvn97vpfE6dKGXZz0q5VI2h77cUHl57kwljIRkGPX8kUcunHy7jajceHLZyD4sKbVd/HHQmtN4PJ1gIhIUHIu3plcWPap+xxq1jch3+Ri1xzqOmN3zsOkReO8UBhRJJYmKCqMW7t/+W8dkh57QXc7B2Hiyy4IYlrM8FSLcYF46lU7HDPR8zGm3FxK3t3mYdeK/j1743WDnIgJyfZZpHkcU0P6bnq9fln9DxFkA2yAy8uhYwuBTwHo/RCXp5p04niccKm46UlqWhgDfNml/lN5k+Y47QhyTBCRnD36eUv5/GcfhvDO85IxtiImhzUXaSlLR/neErgIvMgE2Wg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(39840400004)(366004)(396003)(136003)(346002)(451199018)(2616005)(107886003)(66574015)(36756003)(2906002)(86362001)(6916009)(66476007)(38100700002)(44832011)(41300700001)(30864003)(5660300002)(66946007)(38350700002)(66556008)(8676002)(1076003)(6486002)(6512007)(83380400001)(478600001)(4326008)(52116002)(8936002)(26005)(6666004)(186003)(316002)(6506007)(26583001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ekFpNnR1TCtZZWhCN0pOU2xVRHdSVThOOEZxeGdIYWRocEp3bFdLaDR1eVhz?= =?utf-8?B?clN5b09rd0MrQ2VhQ0NNbWtaVFdzRWl4MTh3dVlQbk9TdTVwSm9zMFlzazZZ?= =?utf-8?B?bkdwb2c1S3k1S1FxU2tTdk83djdpOUpWV0d3MlhNa3c1QWM1RlNGQTBGbnFx?= =?utf-8?B?a2w2MUxkdklETjVqZGVWRHpCZFRHSU5XYWV2OHo2Qnl4R25XOU1RQ0tERmpQ?= =?utf-8?B?c2FjbWVRcERQL1pSSXJFRjQ3aVErYks3WDF1TnZLVDYyd29ML2drWTFNOE1j?= =?utf-8?B?UEJFbFJ5ajBRaEU4OTM3b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VGNsbExQdThmbExSUjEy?= =?utf-8?B?cTVwZVRuOW1RY1BkOURiMXBPTUUzNVU4Sk1SS2NRajRZd3dQMmlVMHh3Ulp6?= =?utf-8?B?Z1E9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7da7d8ae-4de2-4a7d-d2b7-08db10912212 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 02:46:13.4925 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dsCjgA/orLgwIUgr2p2leqhYbLQ5nfmmn2Dsj/fWDGEMxpM7spEWcmn1M98aY0Apqkh6e5wo/15mvSEVO5KlYQ/6S/k3QfMKq497pyrPhR4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR13MB4567 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 Replace the usage of RTE_LOG* macro with PMD specific logging. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/flower/nfp_flower.c | 10 ++--- drivers/net/nfp/flower/nfp_flower_ctrl.c | 2 +- drivers/net/nfp/nfp_cpp_bridge.c | 48 ++++++++++------------ drivers/net/nfp/nfp_ethdev.c | 4 +- drivers/net/nfp/nfp_ethdev_vf.c | 4 +- drivers/net/nfp/nfp_rxtx.c | 10 ++--- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 1 + 7 files changed, 38 insertions(+), 41 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index f1424a010d..42014295ab 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -330,7 +330,7 @@ nfp_flower_pf_recv_pkts(void *rx_queue, * DPDK just checks the queue is lower than max queues * enabled. But the queue needs to be configured */ - RTE_LOG_DP(ERR, PMD, "RX Bad queue\n"); + PMD_RX_LOG(ERR, "RX Bad queue"); return 0; } @@ -343,7 +343,7 @@ nfp_flower_pf_recv_pkts(void *rx_queue, while (avail + avail_multiplexed < nb_pkts) { rxb = &rxq->rxbufs[rxq->rd_p]; if (unlikely(rxb == NULL)) { - RTE_LOG_DP(ERR, PMD, "rxb does not exist!\n"); + PMD_RX_LOG(ERR, "rxb does not exist!"); break; } @@ -363,8 +363,8 @@ nfp_flower_pf_recv_pkts(void *rx_queue, */ new_mb = rte_pktmbuf_alloc(rxq->mem_pool); if (unlikely(new_mb == NULL)) { - RTE_LOG_DP(DEBUG, PMD, - "RX mbuf alloc failed port_id=%u queue_id=%d\n", + PMD_RX_LOG(DEBUG, + "RX mbuf alloc failed port_id=%u queue_id=%d", rxq->port_id, rxq->qidx); nfp_net_mbuf_alloc_failed(rxq); break; @@ -391,7 +391,7 @@ nfp_flower_pf_recv_pkts(void *rx_queue, * responsibility of avoiding it. But we have * to give some info about the error */ - RTE_LOG_DP(ERR, PMD, + PMD_RX_LOG(ERR, "mbuf overflow likely due to the RX offset.\n" "\t\tYour mbuf size should have extra space for" " RX offset=%u bytes.\n" diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c index 03a2e2e622..6e7545bc39 100644 --- a/drivers/net/nfp/flower/nfp_flower_ctrl.c +++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c @@ -91,7 +91,7 @@ nfp_flower_ctrl_vnic_recv(void *rx_queue, * responsibility of avoiding it. But we have * to give some info about the error */ - RTE_LOG_DP(ERR, PMD, + PMD_RX_LOG(ERR, "mbuf overflow likely due to the RX offset.\n" "\t\tYour mbuf size should have extra space for" " RX offset=%u bytes.\n" diff --git a/drivers/net/nfp/nfp_cpp_bridge.c b/drivers/net/nfp/nfp_cpp_bridge.c index 4aa36eb581..8e29cfb6d3 100644 --- a/drivers/net/nfp/nfp_cpp_bridge.c +++ b/drivers/net/nfp/nfp_cpp_bridge.c @@ -162,14 +162,14 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp) area = nfp_cpp_area_alloc_with_name(cpp, cpp_id, "nfp.cdev", nfp_offset, curlen); if (area == NULL) { - RTE_LOG(ERR, PMD, "%s: area alloc fail\n", __func__); + PMD_CPP_LOG(ERR, "area alloc fail"); return -EIO; } /* mapping the target */ err = nfp_cpp_area_acquire(area); if (err < 0) { - RTE_LOG(ERR, PMD, "area acquire failed\n"); + PMD_CPP_LOG(ERR, "area acquire failed"); nfp_cpp_area_free(area); return -EIO; } @@ -183,16 +183,16 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp) len, count); err = recv(sockfd, tmpbuf, len, MSG_WAITALL); if (err != (int)len) { - RTE_LOG(ERR, PMD, - "%s: error when receiving, %d of %zu\n", - __func__, err, count); + PMD_CPP_LOG(ERR, + "error when receiving, %d of %zu", + err, count); nfp_cpp_area_release(area); nfp_cpp_area_free(area); return -EIO; } err = nfp_cpp_area_write(area, pos, tmpbuf, len); if (err < 0) { - RTE_LOG(ERR, PMD, "nfp_cpp_area_write error\n"); + PMD_CPP_LOG(ERR, "nfp_cpp_area_write error"); nfp_cpp_area_release(area); nfp_cpp_area_free(area); return -EIO; @@ -262,13 +262,13 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp) area = nfp_cpp_area_alloc_with_name(cpp, cpp_id, "nfp.cdev", nfp_offset, curlen); if (area == NULL) { - RTE_LOG(ERR, PMD, "%s: area alloc failed\n", __func__); + PMD_CPP_LOG(ERR, "area alloc failed"); return -EIO; } err = nfp_cpp_area_acquire(area); if (err < 0) { - RTE_LOG(ERR, PMD, "area acquire failed\n"); + PMD_CPP_LOG(ERR, "area acquire failed"); nfp_cpp_area_free(area); return -EIO; } @@ -280,7 +280,7 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp) err = nfp_cpp_area_read(area, pos, tmpbuf, len); if (err < 0) { - RTE_LOG(ERR, PMD, "nfp_cpp_area_read error\n"); + PMD_CPP_LOG(ERR, "nfp_cpp_area_read error"); nfp_cpp_area_release(area); nfp_cpp_area_free(area); return -EIO; @@ -290,9 +290,9 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp) err = send(sockfd, tmpbuf, len, 0); if (err != (int)len) { - RTE_LOG(ERR, PMD, - "%s: error when sending: %d of %zu\n", - __func__, err, count); + PMD_CPP_LOG(ERR, + "error when sending: %d of %zu", + err, count); nfp_cpp_area_release(area); nfp_cpp_area_free(area); return -EIO; @@ -325,19 +325,19 @@ nfp_cpp_bridge_serve_ioctl(int sockfd, struct nfp_cpp *cpp) /* Reading now the IOCTL command */ err = recv(sockfd, &cmd, 4, 0); if (err != 4) { - RTE_LOG(ERR, PMD, "%s: read error from socket\n", __func__); + PMD_CPP_LOG(ERR, "read error from socket"); return -EIO; } /* Only supporting NFP_IOCTL_CPP_IDENTIFICATION */ if (cmd != NFP_IOCTL_CPP_IDENTIFICATION) { - RTE_LOG(ERR, PMD, "%s: unknown cmd %d\n", __func__, cmd); + PMD_CPP_LOG(ERR, "unknown cmd %d", cmd); return -EINVAL; } err = recv(sockfd, &ident_size, 4, 0); if (err != 4) { - RTE_LOG(ERR, PMD, "%s: read error from socket\n", __func__); + PMD_CPP_LOG(ERR, "read error from socket"); return -EIO; } @@ -347,7 +347,7 @@ nfp_cpp_bridge_serve_ioctl(int sockfd, struct nfp_cpp *cpp) err = send(sockfd, &tmp, 4, 0); if (err != 4) { - RTE_LOG(ERR, PMD, "%s: error writing to socket\n", __func__); + PMD_CPP_LOG(ERR, "error writing to socket"); return -EIO; } @@ -357,7 +357,7 @@ nfp_cpp_bridge_serve_ioctl(int sockfd, struct nfp_cpp *cpp) err = send(sockfd, &tmp, 4, 0); if (err != 4) { - RTE_LOG(ERR, PMD, "%s: error writing to socket\n", __func__); + PMD_CPP_LOG(ERR, "error writing to socket"); return -EIO; } @@ -384,8 +384,7 @@ nfp_cpp_bridge_service_func(void *args) unlink("/tmp/nfp_cpp"); sockfd = socket(AF_UNIX, SOCK_STREAM, 0); if (sockfd < 0) { - RTE_LOG(ERR, PMD, "%s: socket creation error. Service failed\n", - __func__); + PMD_CPP_LOG(ERR, "socket creation error. Service failed"); return -EIO; } @@ -399,16 +398,14 @@ nfp_cpp_bridge_service_func(void *args) ret = bind(sockfd, (const struct sockaddr *)&address, sizeof(struct sockaddr)); if (ret < 0) { - RTE_LOG(ERR, PMD, "%s: bind error (%d). Service failed\n", - __func__, errno); + PMD_CPP_LOG(ERR, "bind error (%d). Service failed", errno); close(sockfd); return ret; } ret = listen(sockfd, 20); if (ret < 0) { - RTE_LOG(ERR, PMD, "%s: listen error(%d). Service failed\n", - __func__, errno); + PMD_CPP_LOG(ERR, "listen error(%d). Service failed", errno); close(sockfd); return ret; } @@ -421,9 +418,8 @@ nfp_cpp_bridge_service_func(void *args) if (errno == EAGAIN || errno == EWOULDBLOCK) continue; - RTE_LOG(ERR, PMD, "%s: accept call error (%d)\n", - __func__, errno); - RTE_LOG(ERR, PMD, "%s: service failed\n", __func__); + PMD_CPP_LOG(ERR, "accept call error (%d)", errno); + PMD_CPP_LOG(ERR, "service failed"); close(sockfd); return -EIO; } diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index f05c50ac88..139f3090aa 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -519,8 +519,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev) /* NFP can not handle DMA addresses requiring more than 40 bits */ if (rte_mem_check_dma_mask(40)) { - RTE_LOG(ERR, PMD, - "device %s can not be used: restricted dma mask to 40 bits!\n", + PMD_INIT_LOG(ERR, + "device %s can not be used: restricted dma mask to 40 bits!", pci_dev->device.name); return -ENODEV; } diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index 07a2e17ef8..cbe5c5c5c8 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -293,8 +293,8 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) /* NFP can not handle DMA addresses requiring more than 40 bits */ if (rte_mem_check_dma_mask(40)) { - RTE_LOG(ERR, PMD, - "device %s can not be used: restricted dma mask to 40 bits!\n", + PMD_INIT_LOG(ERR, + "device %s can not be used: restricted dma mask to 40 bits!", pci_dev->device.name); return -ENODEV; } diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index 79a66b6e44..09cc24741a 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -353,7 +353,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) * DPDK just checks the queue is lower than max queues * enabled. But the queue needs to be configured */ - RTE_LOG_DP(ERR, PMD, "RX Bad queue\n"); + PMD_RX_LOG(ERR, "RX Bad queue"); return avail; } @@ -363,7 +363,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) while (avail < nb_pkts) { rxb = &rxq->rxbufs[rxq->rd_p]; if (unlikely(rxb == NULL)) { - RTE_LOG_DP(ERR, PMD, "rxb does not exist!\n"); + PMD_RX_LOG(ERR, "rxb does not exist!"); break; } @@ -383,8 +383,8 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) */ new_mb = rte_pktmbuf_alloc(rxq->mem_pool); if (unlikely(new_mb == NULL)) { - RTE_LOG_DP(DEBUG, PMD, - "RX mbuf alloc failed port_id=%u queue_id=%u\n", + PMD_RX_LOG(DEBUG, + "RX mbuf alloc failed port_id=%u queue_id=%u", rxq->port_id, (unsigned int)rxq->qidx); nfp_net_mbuf_alloc_failed(rxq); break; @@ -412,7 +412,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) * responsibility of avoiding it. But we have * to give some info about the error */ - RTE_LOG_DP(ERR, PMD, + PMD_RX_LOG(ERR, "mbuf overflow likely due to the RX offset.\n" "\t\tYour mbuf size should have extra space for" " RX offset=%u bytes.\n" diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index d8d1293166..6029bd6c3a 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c @@ -36,6 +36,7 @@ #include "nfp_logs.h" #include "nfp_target.h" #include "nfp6000/nfp6000.h" +#include "../nfp_logs.h" #define NFP_PCIE_BAR(_pf) (0x30000 + ((_pf) & 7) * 0xc0) -- 2.29.3