summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_ib.h
diff options
context:
space:
mode:
authorGuvenc Gulce <guvenc@linux.ibm.com>2020-12-01 20:20:40 +0100
committerJakub Kicinski <kuba@kernel.org>2020-12-01 17:56:12 -0800
commit3d453f53c786ac4f1c97022f4bc0e9d7613a05c3 (patch)
tree1e09ea9a98afc639fd62b67f4c411c655c755366 /net/smc/smc_ib.h
parentddc992866f13373e3fd63fd70d9a4452e0d17d69 (diff)
downloadlinux-3d453f53c786ac4f1c97022f4bc0e9d7613a05c3.tar.gz
linux-3d453f53c786ac4f1c97022f4bc0e9d7613a05c3.tar.bz2
linux-3d453f53c786ac4f1c97022f4bc0e9d7613a05c3.zip
net/smc: Add diagnostic information to smc ib-device
During smc ib-device creation, add network device ifindex to smc ib-device structure. Register for netdevice changes and update ib-device accordingly. This is needed for diagnostic purposes. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/smc/smc_ib.h')
-rw-r--r--net/smc/smc_ib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/smc_ib.h b/net/smc/smc_ib.h
index 3b85360a473b..ab37da341fa8 100644
--- a/net/smc/smc_ib.h
+++ b/net/smc/smc_ib.h
@@ -55,11 +55,13 @@ struct smc_ib_device { /* ib-device infos for smc */
struct mutex mutex; /* protect dev setup+cleanup */
atomic_t lnk_cnt_by_port[SMC_MAX_PORTS];
/* number of links per port */
+ int ndev_ifidx[SMC_MAX_PORTS]; /* ndev if indexes */
};
struct smc_buf_desc;
struct smc_link;
+void smc_ib_ndev_change(struct net_device *ndev, unsigned long event);
int smc_ib_register_client(void) __init;
void smc_ib_unregister_client(void);
bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport);