diff options
Diffstat (limited to 'include/linux/sunrpc/svc.h')
-rw-r--r-- | include/linux/sunrpc/svc.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 35fa4d5aadd0..4a7ae8ab6eb8 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -396,4 +396,23 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t); | |||
396 | 396 | ||
397 | #define RPC_MAX_ADDRBUFLEN (63U) | 397 | #define RPC_MAX_ADDRBUFLEN (63U) |
398 | 398 | ||
399 | /* | ||
400 | * When we want to reduce the size of the reserved space in the response | ||
401 | * buffer, we need to take into account the size of any checksum data that | ||
402 | * may be at the end of the packet. This is difficult to determine exactly | ||
403 | * for all cases without actually generating the checksum, so we just use a | ||
404 | * static value. | ||
405 | */ | ||
406 | static inline void | ||
407 | svc_reserve_auth(struct svc_rqst *rqstp, int space) | ||
408 | { | ||
409 | int added_space = 0; | ||
410 | |||
411 | switch(rqstp->rq_authop->flavour) { | ||
412 | case RPC_AUTH_GSS: | ||
413 | added_space = RPC_MAX_AUTH_SIZE; | ||
414 | } | ||
415 | return svc_reserve(rqstp, space + added_space); | ||
416 | } | ||
417 | |||
399 | #endif /* SUNRPC_SVC_H */ | 418 | #endif /* SUNRPC_SVC_H */ |