net/smc: reset cursor update required flag

When an updated rx_cursor_confirmed field was sent to the peer then
reset the cons_curs_upd_req flag. And remove the duplicate reset and
cursor update in smc_tx_consumer_update().

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Karsten Graul 2019-02-12 16:29:50 +01:00 коммит произвёл David S. Miller
Родитель 0ff8409b52
Коммит 4dff63c25e
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -105,8 +105,10 @@ int smc_cdc_msg_send(struct smc_connection *conn,
&conn->local_tx_ctrl, conn); &conn->local_tx_ctrl, conn);
smc_curs_copy(&cfed, &((struct smc_host_cdc_msg *)wr_buf)->cons, conn); smc_curs_copy(&cfed, &((struct smc_host_cdc_msg *)wr_buf)->cons, conn);
rc = smc_wr_tx_send(link, (struct smc_wr_tx_pend_priv *)pend); rc = smc_wr_tx_send(link, (struct smc_wr_tx_pend_priv *)pend);
if (!rc) if (!rc) {
smc_curs_copy(&conn->rx_curs_confirmed, &cfed, conn); smc_curs_copy(&conn->rx_curs_confirmed, &cfed, conn);
conn->local_rx_ctrl.prod_flags.cons_curs_upd_req = 0;
}
return rc; return rc;
} }
@ -194,6 +196,7 @@ int smcd_cdc_msg_send(struct smc_connection *conn)
if (rc) if (rc)
return rc; return rc;
smc_curs_copy(&conn->rx_curs_confirmed, &curs, conn); smc_curs_copy(&conn->rx_curs_confirmed, &curs, conn);
conn->local_rx_ctrl.prod_flags.cons_curs_upd_req = 0;
/* Calculate transmitted data and increment free send buffer space */ /* Calculate transmitted data and increment free send buffer space */
diff = smc_curs_diff(conn->sndbuf_desc->len, &conn->tx_curs_fin, diff = smc_curs_diff(conn->sndbuf_desc->len, &conn->tx_curs_fin,
&conn->tx_curs_sent); &conn->tx_curs_sent);

Просмотреть файл

@ -610,9 +610,6 @@ void smc_tx_consumer_update(struct smc_connection *conn, bool force)
SMC_TX_WORK_DELAY); SMC_TX_WORK_DELAY);
return; return;
} }
smc_curs_copy(&conn->rx_curs_confirmed,
&conn->local_tx_ctrl.cons, conn);
conn->local_rx_ctrl.prod_flags.cons_curs_upd_req = 0;
} }
if (conn->local_rx_ctrl.prod_flags.write_blocked && if (conn->local_rx_ctrl.prod_flags.write_blocked &&
!atomic_read(&conn->bytes_to_rcv)) !atomic_read(&conn->bytes_to_rcv))