[rds-devel] [PATCH ofed-1.2.c] RDS/IB: Relax the header consistency
check on fragment reassembly
Olaf Kirch
olaf.kirch at oracle.com
Thu Nov 15 07:23:31 PST 2007
From: Olaf Kirch <olaf.kirch at oracle.com>
RDS/IB: Relax the header consistency check on fragment reassembly
When reassembling a fragmented message, the RDS/IB code compares
the fragment headers using memcmp. This is overly strict, and
produces occasional connection drops, because the h_ack field may
differ from fragment to fragment.
Signed-off-by: Olaf Kirch <olaf.kirch at oracle.com>
---
net/rds/ib_recv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: build-5/net/rds/ib_recv.c
===================================================================
--- build-5.orig/net/rds/ib_recv.c
+++ build-5/net/rds/ib_recv.c
@@ -713,7 +713,12 @@ static void rds_ib_process_recv(struct r
ic->i_recv_data_rem, hdr->h_flags);
} else {
hdr = &ibinc->ii_inc.i_hdr;
- if (memcmp(hdr, &hdr_buf, sizeof(*hdr))) {
+ /* We can't just use memcmp here; fragments of a
+ * single message may carry different ACKs */
+ if (hdr->h_sequence != hdr_buf.h_sequence
+ || hdr->h_len != hdr_buf.h_len
+ || hdr->h_sport != hdr_buf.h_sport
+ || hdr->h_dport != hdr_buf.h_dport) {
rds_ib_conn_error(conn,
"fragment header mismatch; forcing reconnect\n");
return;
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir at lst.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
More information about the rds-devel
mailing list