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.
Unified · Split
| @@ -71,7 +71,7 @@ static unsigned int rpcrdma_max_call_header_size(unsigned int maxsegs) · 70 unmodified lines | |||
| 71 | size = RPCRDMA_HDRLEN_MIN; | 71 | size = RPCRDMA_HDRLEN_MIN; |
| 72 | 72 | ||
| 73 | /* Maximum Read list size */ | 73 | /* Maximum Read list size */ |
| 74 | size = maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32); | 74 | size += maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32); |
| 75 | 75 | ||
| 76 | /* Minimal Read chunk size */ | 76 | /* Minimal Read chunk size */ |
| 77 | size += sizeof(__be32); /* segment count */ | 77 | size += sizeof(__be32); /* segment count */ |
| @@ -94,7 +94,7 @@ static unsigned int rpcrdma_max_reply_header_size(unsigned int maxsegs) · 16 unmodified lines | |||
| 94 | size = RPCRDMA_HDRLEN_MIN; | 94 | size = RPCRDMA_HDRLEN_MIN; |
| 95 | 95 | ||
| 96 | /* Maximum Write list size */ | 96 | /* Maximum Write list size */ |
| 97 | size = sizeof(__be32); /* segment count */ | 97 | size += sizeof(__be32); /* segment count */ |
| 98 | size += maxsegs * rpcrdma_segment_maxsz * sizeof(__be32); | 98 | size += maxsegs * rpcrdma_segment_maxsz * sizeof(__be32); |
| 99 | size += sizeof(__be32); /* list discriminator */ | 99 | size += sizeof(__be32); /* list discriminator */ |
| 100 | 100 | ||