kernel_optimize_test/net/smc
Ursula Braun b8649efad8 net/smc: fix sender_free computation
In some scenarios a separate consumer cursor update is necessary.
The decision is made in smc_tx_consumer_cursor_update(). The
sender_free computation could be wrong:

The rx confirmed cursor is always smaller than or equal to the
rx producer cursor. The parameters in the smc_curs_diff() call
have to be exchanged, otherwise sender_free might even be negative.

And if more data arrives local_rx_ctrl.prod might be updated, enabling
a cursor difference between local_rx_ctrl.prod and rx confirmed cursor
larger than the RMB size. This case is not covered by smc_curs_diff().
Thus function smc_curs_diff_large() is introduced here.

If a recvmsg() is processed in parallel, local_tx_ctrl.cons might
change during smc_cdc_msg_send. Make sure rx_curs_confirmed is updated
with the actually sent local_tx_ctrl.cons value.

Fixes: e82f2e31f5 ("net/smc: optimize consumer cursor updates")
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-04 09:11:19 -08:00
..
af_smc.c net/smc: recvmsg and splice_read should return 0 after shutdown 2019-02-01 14:45:45 -08:00
Kconfig
Makefile
smc_cdc.c net/smc: fix sender_free computation 2019-02-04 09:11:19 -08:00
smc_cdc.h net/smc: fix sender_free computation 2019-02-04 09:11:19 -08:00
smc_clc.c net/smc: fix another sizeof to int comparison 2019-02-01 14:45:44 -08:00
smc_clc.h net/smc: short wait for late smc_clc_wait_msg 2018-11-23 17:20:32 -08:00
smc_close.c net/smc: enable fallback for connection abort in state INIT 2018-09-18 20:11:43 -07:00
smc_close.h
smc_core.c net/smc: prevent races between smc_lgr_terminate() and smc_conn_free() 2019-02-01 14:45:44 -08:00
smc_core.h net/smc: preallocated memory for rdma work requests 2019-02-04 09:11:19 -08:00
smc_diag.c
smc_ib.c net/smc: use device link provided in qp_context 2019-02-01 14:45:45 -08:00
smc_ib.h
smc_ism.c net/smc: add SMC-D shutdown signal 2018-11-21 16:14:56 -08:00
smc_ism.h net/smc: add SMC-D shutdown signal 2018-11-21 16:14:56 -08:00
smc_llc.c net/smc: preallocated memory for rdma work requests 2019-02-04 09:11:19 -08:00
smc_llc.h net/smc: add infrastructure to send delete rkey messages 2018-11-23 17:20:32 -08:00
smc_pnet.c net/smc: allow 16 byte pnetids in netlink policy 2019-02-01 14:45:44 -08:00
smc_pnet.h
smc_rx.c
smc_rx.h
smc_tx.c net/smc: fix sender_free computation 2019-02-04 09:11:19 -08:00
smc_tx.h
smc_wr.c net/smc: preallocated memory for rdma work requests 2019-02-04 09:11:19 -08:00
smc_wr.h net/smc: preallocated memory for rdma work requests 2019-02-04 09:11:19 -08:00
smc.h net/smc: fix TCP fallback socket release 2018-12-18 22:02:51 -08:00