Commit 35dcf7ec authored by Karsten Graul's avatar Karsten Graul Committed by David S. Miller

net/smc: remember PNETID of IB device for later device matching

The PNETID is needed to find an alternate link for a link group.
Save the PNETID of the link that is used to create the link group for
later device matching.
Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Reviewed-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d5500667
...@@ -413,6 +413,8 @@ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini) ...@@ -413,6 +413,8 @@ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini)
lgr->role = smc->listen_smc ? SMC_SERV : SMC_CLNT; lgr->role = smc->listen_smc ? SMC_SERV : SMC_CLNT;
memcpy(lgr->peer_systemid, ini->ib_lcl->id_for_peer, memcpy(lgr->peer_systemid, ini->ib_lcl->id_for_peer,
SMC_SYSTEMID_LEN); SMC_SYSTEMID_LEN);
memcpy(lgr->pnet_id, ini->ib_dev->pnetid[ini->ib_port - 1],
SMC_MAX_PNETID_LEN);
smc_llc_lgr_init(lgr, smc); smc_llc_lgr_init(lgr, smc);
link_idx = SMC_SINGLE_LINK; link_idx = SMC_SINGLE_LINK;
......
...@@ -244,6 +244,8 @@ struct smc_link_group { ...@@ -244,6 +244,8 @@ struct smc_link_group {
u8 next_link_id; u8 next_link_id;
enum smc_lgr_type type; enum smc_lgr_type type;
/* redundancy state */ /* redundancy state */
u8 pnet_id[SMC_MAX_PNETID_LEN + 1];
/* pnet id of this lgr */
struct list_head llc_event_q; struct list_head llc_event_q;
/* queue for llc events */ /* queue for llc events */
spinlock_t llc_event_q_lock; spinlock_t llc_event_q_lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment