From: Neil Brown <neilb@suse.de>
To: Jeff Layton <jlayton@redhat.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
akpm@linux-foundation.org, nfs@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RPC: add wrapper for svc_reserve to account for checksum
Date: Wed, 2 May 2007 07:54:57 +1000 [thread overview]
Message-ID: <17975.46897.298001.690089@notabene.brown> (raw)
In-Reply-To: message from Jeff Layton on Tuesday May 1
On Tuesday May 1, jlayton@redhat.com wrote:
>
> Resending patch with a proper signed-off-by line. Also cc'ing Andrew:
Thanks, but it isn't much good to Andrew without a changelog entry,
though probably it should just go in as
rpc--add-wrapper-for-svc_reserve-to-account-for-checksum-fix
Acked-by: NeilBrown <neilb@suse.de>
(If it doesn't appear in the next -mm, I'll send it all nicely
formated and changeloged).
NeilBrown
>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
>
> diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
> index 9114f11..ed7cbf1 100644
> --- a/include/linux/sunrpc/svc.h
> +++ b/include/linux/sunrpc/svc.h
> @@ -399,10 +399,9 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t);
> /*
> * When we want to reduce the size of the reserved space in the response
> * buffer, we need to take into account the size of any checksum data that
> - * may be at the end of the packet. For now, just use a hardcoded value
> - * for each possible authflavor. This will need to be updated when new
> - * encryption types or algorithms are added, or we'll have to come up with
> - * a way to reasonably calculate this on the fly (maybe via a new auth_op).
> + * may be at the end of the packet. This is difficult to determine exactly
> + * for all cases without actually generating the checksum, so we just use a
> + * static value.
> */
> static inline void
> svc_reserve_auth(struct svc_rqst *rqstp, int space)
> @@ -411,7 +410,7 @@ svc_reserve_auth(struct svc_rqst *rqstp, int space)
>
> switch(rqstp->rq_authop->flavour) {
> case RPC_AUTH_GSS:
> - added_space = 56; /* determined empirically */
> + added_space = RPC_MAX_AUTH_SIZE;
> }
> return svc_reserve(rqstp, space + added_space);
> }
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-05-01 21:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-21 13:15 [PATCH] RPC: add wrapper for svc_reserve to account for checksum Jeff Layton
2007-05-01 2:14 ` Neil Brown
2007-05-01 3:33 ` J. Bruce Fields
2007-05-02 0:34 ` J. Bruce Fields
2007-05-01 17:01 ` Jeff Layton
2007-05-01 17:11 ` Jeff Layton
2007-05-01 21:54 ` Neil Brown [this message]
2007-05-02 19:36 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17975.46897.298001.690089@notabene.brown \
--to=neilb@suse.de \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox