X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_dp.h;h=4bed137806115b16f1cd93357cc77c7f80445032;hb=b59d4d5502dcb1b57be81eb21b5e8bcb80de49e7;hp=47487d1f1f40afee3aec26b34945f6126b1f88a7;hpb=714f508eafce893b9131cd5e51d914077ab94867;p=dpdk.git diff --git a/drivers/net/sfc/sfc_dp.h b/drivers/net/sfc/sfc_dp.h index 47487d1f1f..4bed137806 100644 --- a/drivers/net/sfc/sfc_dp.h +++ b/drivers/net/sfc/sfc_dp.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * - * Copyright(c) 2019-2020 Xilinx, Inc. + * Copyright(c) 2019-2021 Xilinx, Inc. * Copyright(c) 2017-2019 Solarflare Communications Inc. * * This software was jointly developed between OKTET Labs (under contract @@ -51,6 +51,11 @@ void sfc_dp_queue_init(struct sfc_dp_queue *dpq, uint16_t port_id, uint16_t queue_id, const struct rte_pci_addr *pci_addr); +/* Maximum datapath log level to be included in build. */ +#ifndef SFC_DP_LOG_LEVEL +#define SFC_DP_LOG_LEVEL RTE_LOG_NOTICE +#endif + /* * Helper macro to define datapath logging macros and have uniform * logging. @@ -60,6 +65,8 @@ void sfc_dp_queue_init(struct sfc_dp_queue *dpq, const struct sfc_dp_queue *_dpq = (dpq); \ const struct rte_pci_addr *_addr = &(_dpq)->pci_addr; \ \ + if (RTE_LOG_ ## level > SFC_DP_LOG_LEVEL) \ + break; \ SFC_GENERIC_LOG(level, \ RTE_FMT("%s " PCI_PRI_FMT \ " #%" PRIu16 ".%" PRIu16 ": " \