]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDS/IB: 4KB receive buffers get posted by mistake on 16KB frag connections. v4.1.12-102.0.20170529_2200 v4.1.12-102.0.20170530_1300
authorVenkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Mon, 8 May 2017 11:23:13 +0000 (04:23 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 30 May 2017 06:38:52 +0000 (23:38 -0700)
commit26989ee6268bd3724e53e0d393698dc7bd3dceb9
tree288323ce45da982ff4b0aaf6005d43c84d5d7965
parentdc8aac8d95e5e4a2dbc2781d83ad3a7f89778a10
RDS/IB: 4KB receive buffers get posted by mistake on 16KB frag connections.

When connections are at 4KB fragments and then it moves to 16KB frags
(for example during uek2 to uek4 upgrade) we see 4KB buffers getting
posted on 16KB connections. This is happening because the 4KB buffers
(buffers from previous connection before the move to 16KB) are getting
added back to the current connection's (16KB) cache.

We will fix this by doing the following.

1) When the recv buffers get freed/released after either the application
   is done reading it or the socket gets closed (process dies, etc.)
   and RDS/IB decides to add that buffer back into the current cache,
   make sure the frag size matches with that of the current connection.

2) When recv completion reports IB_WC_LOC_LEN_ERR, mark the connection state
   as "buffers need to be rebuilt during reconnection". And at the time of
   reconnect rebuild the cache even though the "frag size of the connection"
   has not changed.

Orabug: 25920916

Reviewed-by: Rama Nichanamatlu <rama.nichanamatlu@oracle.com>
Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
net/rds/ib.h
net/rds/ib_recv.c