From a32ce02917df296833fe7e000f027650164c6eed Mon Sep 17 00:00:00 2001 From: lizhipeng Date: Mon, 19 May 2025 08:44:23 +0000 Subject: [PATCH] add supoort for mellanox nic which name start with "p1*" fixes: https://github.com/deepseek-ai/3FS/issues/263 Signed-off-by: lizhipeng --- src/common/net/Listener.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/net/Listener.cc b/src/common/net/Listener.cc index 34aab70..5deae20 100644 --- a/src/common/net/Listener.cc +++ b/src/common/net/Listener.cc @@ -33,11 +33,11 @@ namespace hf3fs::net { static bool checkNicType(std::string_view nic, Address::Type type) { switch (type) { case Address::TCP: - return nic.starts_with("en") || nic.starts_with("eth") || nic.starts_with("bond") || nic.starts_with("xgbe"); + return nic.starts_with("en") || nic.starts_with("eth") || nic.starts_with("bond") || nic.starts_with("xgbe") || nic.starts_with("p1"); case Address::IPoIB: return nic.starts_with("ib"); case Address::RDMA: - return nic.starts_with("en") || nic.starts_with("eth") || nic.starts_with("bond") || nic.starts_with("xgbe"); + return nic.starts_with("en") || nic.starts_with("eth") || nic.starts_with("bond") || nic.starts_with("xgbe") || nic.starts_with("p1"); case Address::LOCAL: return nic.starts_with("lo"); default: