xref: /openbmc/linux/fs/nfsd/xdr4cb.h (revision 06b332a5)
106b332a5SJ. Bruce Fields #define NFS4_MAXTAGLEN		20
206b332a5SJ. Bruce Fields 
306b332a5SJ. Bruce Fields #define NFS4_enc_cb_null_sz		0
406b332a5SJ. Bruce Fields #define NFS4_dec_cb_null_sz		0
506b332a5SJ. Bruce Fields #define cb_compound_enc_hdr_sz		4
606b332a5SJ. Bruce Fields #define cb_compound_dec_hdr_sz		(3 + (NFS4_MAXTAGLEN >> 2))
706b332a5SJ. Bruce Fields #define sessionid_sz			(NFS4_MAX_SESSIONID_LEN >> 2)
806b332a5SJ. Bruce Fields #define cb_sequence_enc_sz		(sessionid_sz + 4 +             \
906b332a5SJ. Bruce Fields 					1 /* no referring calls list yet */)
1006b332a5SJ. Bruce Fields #define cb_sequence_dec_sz		(op_dec_sz + sessionid_sz + 4)
1106b332a5SJ. Bruce Fields 
1206b332a5SJ. Bruce Fields #define op_enc_sz			1
1306b332a5SJ. Bruce Fields #define op_dec_sz			2
1406b332a5SJ. Bruce Fields #define enc_nfs4_fh_sz			(1 + (NFS4_FHSIZE >> 2))
1506b332a5SJ. Bruce Fields #define enc_stateid_sz			(NFS4_STATEID_SIZE >> 2)
1606b332a5SJ. Bruce Fields #define NFS4_enc_cb_recall_sz		(cb_compound_enc_hdr_sz +       \
1706b332a5SJ. Bruce Fields 					cb_sequence_enc_sz +            \
1806b332a5SJ. Bruce Fields 					1 + enc_stateid_sz +            \
1906b332a5SJ. Bruce Fields 					enc_nfs4_fh_sz)
2006b332a5SJ. Bruce Fields 
2106b332a5SJ. Bruce Fields #define NFS4_dec_cb_recall_sz		(cb_compound_dec_hdr_sz  +      \
2206b332a5SJ. Bruce Fields 					cb_sequence_dec_sz +            \
2306b332a5SJ. Bruce Fields 					op_dec_sz)
24