Commit 947541f3 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

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: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f5375305
...@@ -352,10 +352,7 @@ static int smc_clnt_conf_first_link(struct smc_sock *smc) ...@@ -352,10 +352,7 @@ static int smc_clnt_conf_first_link(struct smc_sock *smc)
return SMC_CLC_DECL_INTERR; return SMC_CLC_DECL_INTERR;
/* send CONFIRM LINK response over RoCE fabric */ /* send CONFIRM LINK response over RoCE fabric */
rc = smc_llc_send_confirm_link(link, rc = smc_llc_send_confirm_link(link, SMC_LLC_RESP);
link->smcibdev->mac[link->ibport - 1],
&link->smcibdev->gid[link->ibport - 1],
SMC_LLC_RESP);
if (rc < 0) if (rc < 0)
return SMC_CLC_DECL_TCL; return SMC_CLC_DECL_TCL;
...@@ -951,10 +948,7 @@ static int smc_serv_conf_first_link(struct smc_sock *smc) ...@@ -951,10 +948,7 @@ static int smc_serv_conf_first_link(struct smc_sock *smc)
return SMC_CLC_DECL_INTERR; return SMC_CLC_DECL_INTERR;
/* send CONFIRM LINK request to client over the RoCE fabric */ /* send CONFIRM LINK request to client over the RoCE fabric */
rc = smc_llc_send_confirm_link(link, rc = smc_llc_send_confirm_link(link, SMC_LLC_REQ);
link->smcibdev->mac[link->ibport - 1],
&link->smcibdev->gid[link->ibport - 1],
SMC_LLC_REQ);
if (rc < 0) if (rc < 0)
return SMC_CLC_DECL_TCL; return SMC_CLC_DECL_TCL;
......
...@@ -182,8 +182,7 @@ static int smc_llc_add_pending_send(struct smc_link *link, ...@@ -182,8 +182,7 @@ static int smc_llc_add_pending_send(struct smc_link *link,
} }
/* high-level API to send LLC confirm link */ /* high-level API to send LLC confirm link */
int smc_llc_send_confirm_link(struct smc_link *link, u8 mac[], int smc_llc_send_confirm_link(struct smc_link *link,
union ib_gid *gid,
enum smc_llc_reqresp reqresp) enum smc_llc_reqresp reqresp)
{ {
struct smc_link_group *lgr = smc_get_lgr(link); 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,8 +201,10 @@ int smc_llc_send_confirm_link(struct smc_link *link, u8 mac[],
confllc->hd.flags |= SMC_LLC_FLAG_NO_RMBE_EYEC; confllc->hd.flags |= SMC_LLC_FLAG_NO_RMBE_EYEC;
if (reqresp == SMC_LLC_RESP) if (reqresp == SMC_LLC_RESP)
confllc->hd.flags |= SMC_LLC_FLAG_RESP; confllc->hd.flags |= SMC_LLC_FLAG_RESP;
memcpy(confllc->sender_mac, mac, ETH_ALEN); memcpy(confllc->sender_mac, link->smcibdev->mac[link->ibport - 1],
memcpy(confllc->sender_gid, gid, SMC_GID_SIZE); ETH_ALEN);
memcpy(confllc->sender_gid, &link->smcibdev->gid[link->ibport - 1],
SMC_GID_SIZE);
hton24(confllc->sender_qp_num, link->roce_qp->qp_num); hton24(confllc->sender_qp_num, link->roce_qp->qp_num);
confllc->link_num = link->link_id; confllc->link_num = link->link_id;
memcpy(confllc->link_uid, lgr->id, SMC_LGR_ID_SIZE); memcpy(confllc->link_uid, lgr->id, SMC_LGR_ID_SIZE);
......
...@@ -36,7 +36,7 @@ enum smc_llc_msg_type { ...@@ -36,7 +36,7 @@ enum smc_llc_msg_type {
}; };
/* transmit */ /* transmit */
int smc_llc_send_confirm_link(struct smc_link *lnk, u8 mac[], union ib_gid *gid, int smc_llc_send_confirm_link(struct smc_link *lnk,
enum smc_llc_reqresp reqresp); enum smc_llc_reqresp reqresp);
int smc_llc_send_add_link(struct smc_link *link, u8 mac[], union ib_gid *gid, int smc_llc_send_add_link(struct smc_link *link, u8 mac[], union ib_gid *gid,
enum smc_llc_reqresp reqresp); enum smc_llc_reqresp reqresp);
......
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