summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_ism.h
diff options
context:
space:
mode:
authorWen Gu <guwen@linux.alibaba.com>2024-04-28 14:07:33 +0800
committerPaolo Abeni <pabeni@redhat.com>2024-04-30 13:24:48 +0200
commitc8df2d449f645f90a67aaa05a617e6e86c3f1c5e (patch)
tree5a5acdfe31a5332bffcf8bcd1d8c5762f7a0c1d9 /net/smc/smc_ism.h
parentd1d8d0b6c7c68b0665456831fa779174ebd78f90 (diff)
downloadlinux-c8df2d449f645f90a67aaa05a617e6e86c3f1c5e.tar.gz
linux-c8df2d449f645f90a67aaa05a617e6e86c3f1c5e.tar.bz2
linux-c8df2d449f645f90a67aaa05a617e6e86c3f1c5e.zip
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 <guwen@linux.alibaba.com> Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com> Reviewed-and-tested-by: Jan Karcher <jaka@linux.ibm.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/smc/smc_ism.h')
-rw-r--r--net/smc/smc_ism.h5
1 files changed, 5 insertions, 0 deletions
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