From b79386b012e371e83c2db8e42a72208bea560081 Mon Sep 17 00:00:00 2001 From: Geert Custers Date: Fri, 20 Sep 2024 12:00:38 +0200 Subject: [PATCH] main: include NIC name in version output --- include/eth_rxtx_opts.h | 2 ++ src/main.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/eth_rxtx_opts.h b/include/eth_rxtx_opts.h index 4b60bcd..99430c2 100644 --- a/include/eth_rxtx_opts.h +++ b/include/eth_rxtx_opts.h @@ -41,8 +41,10 @@ struct AF_XDP_OPTS { #ifdef NIC_AF_XDP using NIC_OPTS = AF_XDP_OPTS; + constexpr auto NIC_NAME = "AF_XDP"; #elif NIC_I40E using NIC_OPTS = I40E_OPTS; + constexpr auto NIC_NAME = "I40E"; #endif using NICType = EthRxTx; diff --git a/src/main.cpp b/src/main.cpp index 75f77e8..17924ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -233,7 +233,7 @@ std::optional InitConfigFromArgs(int argc, char** argv) { } if (version.was_set()) { - std::cout << fmt::format("sanicdns {}", SANICDNS_VERSION) << std::endl; + std::cout << fmt::format("sanicdns {}, built for NIC type: {}", SANICDNS_VERSION, NIC_NAME) << std::endl; return std::nullopt; }