diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2018-07-25 10:35:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-26 01:25:53 -0400 |
commit | 947541f36c561b5e0ca639ffc450a8c5221de467 (patch) | |
tree | 87b62251830aedd630b9fcb32c340849886616a6 /net/smc | |
parent | f53753058488295344e7fcdba3da4c33a49b70ac (diff) |
net/smc: fewer parameters for smc_llc_send_confirm_link()
Link confirmation will always be sent across the new link being
confirmed. This allows to shrink the parameter list.
No functional change.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r-- | net/smc/af_smc.c | 10 | ||||
-rw-r--r-- | net/smc/smc_llc.c | 9 | ||||
-rw-r--r-- | net/smc/smc_llc.h | 2 |
3 files changed, 8 insertions, 13 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 7fc810ec31c5..7883f70f7c6d 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c | |||
@@ -352,10 +352,7 @@ static int smc_clnt_conf_first_link(struct smc_sock *smc) | |||
352 | return SMC_CLC_DECL_INTERR; | 352 | return SMC_CLC_DECL_INTERR; |
353 | 353 | ||
354 | /* send CONFIRM LINK response over RoCE fabric */ | 354 | /* send CONFIRM LINK response over RoCE fabric */ |
355 | rc = smc_llc_send_confirm_link(link, | 355 | rc = smc_llc_send_confirm_link(link, SMC_LLC_RESP); |
356 | link->smcibdev->mac[link->ibport - 1], | ||
357 | &link->smcibdev->gid[link->ibport - 1], | ||
358 | SMC_LLC_RESP); | ||
359 | if (rc < 0) | 356 | if (rc < 0) |
360 | return SMC_CLC_DECL_TCL; | 357 | return SMC_CLC_DECL_TCL; |
361 | 358 | ||
@@ -951,10 +948,7 @@ static int smc_serv_conf_first_link(struct smc_sock *smc) | |||
951 | return SMC_CLC_DECL_INTERR; | 948 | return SMC_CLC_DECL_INTERR; |
952 | 949 | ||
953 | /* send CONFIRM LINK request to client over the RoCE fabric */ | 950 | /* send CONFIRM LINK request to client over the RoCE fabric */ |
954 | rc = smc_llc_send_confirm_link(link, | 951 | rc = smc_llc_send_confirm_link(link, SMC_LLC_REQ); |
955 | link->smcibdev->mac[link->ibport - 1], | ||
956 | &link->smcibdev->gid[link->ibport - 1], | ||
957 | SMC_LLC_REQ); | ||
958 | if (rc < 0) | 952 | if (rc < 0) |
959 | return SMC_CLC_DECL_TCL; | 953 | return SMC_CLC_DECL_TCL; |
960 | 954 | ||
diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c index b7944aa1ffc3..f2ba99c2e69a 100644 --- a/net/smc/smc_llc.c +++ b/net/smc/smc_llc.c | |||
@@ -182,8 +182,7 @@ static int smc_llc_add_pending_send(struct smc_link *link, | |||
182 | } | 182 | } |
183 | 183 | ||
184 | /* high-level API to send LLC confirm link */ | 184 | /* high-level API to send LLC confirm link */ |
185 | int smc_llc_send_confirm_link(struct smc_link *link, u8 mac[], | 185 | int smc_llc_send_confirm_link(struct smc_link *link, |
186 | union ib_gid *gid, | ||
187 | enum smc_llc_reqresp reqresp) | 186 | enum smc_llc_reqresp reqresp) |
188 | { | 187 | { |
189 | struct smc_link_group *lgr = smc_get_lgr(link); | 188 | struct smc_link_group *lgr = smc_get_lgr(link); |
@@ -202,8 +201,10 @@ int smc_llc_send_confirm_link(struct smc_link *link, u8 mac[], | |||
202 | confllc->hd.flags |= SMC_LLC_FLAG_NO_RMBE_EYEC; | 201 | confllc->hd.flags |= SMC_LLC_FLAG_NO_RMBE_EYEC; |
203 | if (reqresp == SMC_LLC_RESP) | 202 | if (reqresp == SMC_LLC_RESP) |
204 | confllc->hd.flags |= SMC_LLC_FLAG_RESP; | 203 | confllc->hd.flags |= SMC_LLC_FLAG_RESP; |
205 | memcpy(confllc->sender_mac, mac, ETH_ALEN); | 204 | memcpy(confllc->sender_mac, link->smcibdev->mac[link->ibport - 1], |
206 | memcpy(confllc->sender_gid, gid, SMC_GID_SIZE); | 205 | ETH_ALEN); |
206 | memcpy(confllc->sender_gid, &link->smcibdev->gid[link->ibport - 1], | ||
207 | SMC_GID_SIZE); | ||
207 | hton24(confllc->sender_qp_num, link->roce_qp->qp_num); | 208 | hton24(confllc->sender_qp_num, link->roce_qp->qp_num); |
208 | confllc->link_num = link->link_id; | 209 | confllc->link_num = link->link_id; |
209 | memcpy(confllc->link_uid, lgr->id, SMC_LGR_ID_SIZE); | 210 | memcpy(confllc->link_uid, lgr->id, SMC_LGR_ID_SIZE); |
diff --git a/net/smc/smc_llc.h b/net/smc/smc_llc.h index 65c8645e96a1..9a29fcbbcea8 100644 --- a/net/smc/smc_llc.h +++ b/net/smc/smc_llc.h | |||
@@ -36,7 +36,7 @@ enum smc_llc_msg_type { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* transmit */ | 38 | /* transmit */ |
39 | int smc_llc_send_confirm_link(struct smc_link *lnk, u8 mac[], union ib_gid *gid, | 39 | int smc_llc_send_confirm_link(struct smc_link *lnk, |
40 | enum smc_llc_reqresp reqresp); | 40 | enum smc_llc_reqresp reqresp); |
41 | int smc_llc_send_add_link(struct smc_link *link, u8 mac[], union ib_gid *gid, | 41 | int smc_llc_send_add_link(struct smc_link *link, u8 mac[], union ib_gid *gid, |
42 | enum smc_llc_reqresp reqresp); | 42 | enum smc_llc_reqresp reqresp); |