From ddc992866f13373e3fd63fd70d9a4452e0d17d69 Mon Sep 17 00:00:00 2001 From: Guvenc Gulce Date: Tue, 1 Dec 2020 20:20:39 +0100 Subject: net/smc: Add link counters for IB device ports Add link counters to the structure of the smc ib device, one counter per ib port. Increase/decrease the counters as needed in the corresponding routines. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski --- net/smc/smc_ib.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/smc/smc_ib.h') diff --git a/net/smc/smc_ib.h b/net/smc/smc_ib.h index 2ce481187dd0..3b85360a473b 100644 --- a/net/smc/smc_ib.h +++ b/net/smc/smc_ib.h @@ -53,6 +53,8 @@ struct smc_ib_device { /* ib-device infos for smc */ atomic_t lnk_cnt; /* number of links on ibdev */ wait_queue_head_t lnks_deleted; /* wait 4 removal of all links*/ struct mutex mutex; /* protect dev setup+cleanup */ + atomic_t lnk_cnt_by_port[SMC_MAX_PORTS]; + /* number of links per port */ }; struct smc_buf_desc; -- cgit