From c8df2d449f645f90a67aaa05a617e6e86c3f1c5e Mon Sep 17 00:00:00 2001 From: Wen Gu Date: Sun, 28 Apr 2024 14:07:33 +0800 Subject: net/smc: ignore loopback-ism when dumping SMC-D devices Since loopback-ism is not a PCI device, the PCI information fed back by smc_nl_handle_smcd_dev() does not apply to loopback-ism. So currently ignore loopback-ism when dumping SMC-D devices. The netlink function of loopback-ism will be refactored when SMC netlink interface is updated. Link: https://lore.kernel.org/r/caab067b-f5c3-490f-9259-262624c236b4@linux.ibm.com/ Signed-off-by: Wen Gu Reviewed-by: Wenjia Zhang Reviewed-and-tested-by: Jan Karcher Signed-off-by: Paolo Abeni --- net/smc/smc_ism.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net/smc/smc_ism.h') diff --git a/net/smc/smc_ism.h b/net/smc/smc_ism.h index 165cd013404b..322973527c61 100644 --- a/net/smc/smc_ism.h +++ b/net/smc/smc_ism.h @@ -84,4 +84,9 @@ static inline bool smc_ism_is_emulated(struct smcd_dev *smcd) return __smc_ism_is_emulated(chid); } +static inline bool smc_ism_is_loopback(struct smcd_dev *smcd) +{ + return (smcd->ops->get_chid(smcd) == 0xFFFF); +} + #endif -- cgit v1.2.3-70-g09d2