History

xprtrdma: fix incorrect header size calculations

Currently the header size calculations are using an assignment operator instead of a += operator when accumulating the header size leading to incorrect sizes. Fix this by using the correct operator.

Colin Ian King committed 6 years ago

Commit 91228841 parent 913fadc1 file · +2 −2Browse files

Unified · Split

net/sunrpc/xprtrdma/rpc_rdma.c+2−2
@@ -71,7 +71,7 @@ static unsigned int rpcrdma_max_call_header_size(unsigned int maxsegs) · 70 unmodified lines
7171 size = RPCRDMA_HDRLEN_MIN;
7272
7373 /* Maximum Read list size */
74− size = maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32);
74+ size += maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32);
7575
7676 /* Minimal Read chunk size */
7777 size += sizeof(__be32); /* segment count */
@@ -94,7 +94,7 @@ static unsigned int rpcrdma_max_reply_header_size(unsigned int maxsegs) · 16 unmodified lines
9494 size = RPCRDMA_HDRLEN_MIN;
9595
9696 /* Maximum Write list size */
97− size = sizeof(__be32); /* segment count */
97+ size += sizeof(__be32); /* segment count */
9898 size += maxsegs * rpcrdma_segment_maxsz * sizeof(__be32);
9999 size += sizeof(__be32); /* list discriminator */
100100

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t