From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tom Tucker <tom@opengridcomputing.com>
Cc: Neil Brown <neilb@suse.de>, Tom Talpey <Thomas.Talpey@netapp.com>,
Linux NFS Mailing List <nfs@lists.sourceforge.net>,
Peter Leckie <pleckie@melbourne.sgi.com>,
Greg Banks <gnb@sgi.com>
Subject: Re: [RFC, PATCH 4/15] knfsd: map null socket to SOCK_STREAM in svc_max_payload
Date: Fri, 18 May 2007 14:28:50 -0400 [thread overview]
Message-ID: <20070518182850.GA4843@fieldses.org> (raw)
In-Reply-To: <1179510307.23385.117.camel@trinity.ogc.int>
On Fri, May 18, 2007 at 12:45:07PM -0500, Tom Tucker wrote:
>
> The svc_max_payload function looks into the sk_sock structure to determine
> what the reported max payload should be. For RDMA, there is no socket. This
> change effectively maps a NULL sk_sock to SOCK_STREAM.
>
> Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
> ---
>
> net/sunrpc/svc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
> index 9fec17d..b343db8 100644
> --- a/net/sunrpc/svc.c
> +++ b/net/sunrpc/svc.c
> @@ -1024,7 +1024,7 @@ u32 svc_max_payload(const struct svc_rqs
> {
> int max = RPCSVC_MAXPAYLOAD_TCP;
>
> - if (rqstp->rq_sock->sk_sock->type == SOCK_DGRAM)
> + if (rqstp->rq_sock->sk_sock && rqstp->rq_sock->sk_sock->type == SOCK_DGRAM)
> max = RPCSVC_MAXPAYLOAD_UDP;
> if (rqstp->rq_server->sv_max_payload < max)
> max = rqstp->rq_server->sv_max_payload;
Don't you want to use Greg's sko_max_payload() (or whatever it ends up
being) for this?
--b.
-------------------------------------------------------------------------
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-18 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 17:45 [RFC, PATCH 4/15] knfsd: map null socket to SOCK_STREAM in svc_max_payload Tom Tucker
2007-05-18 18:28 ` J. Bruce Fields [this message]
2007-05-18 18:40 ` Tom Tucker
2007-05-18 18:48 ` J. Bruce Fields
2007-05-18 18:50 ` Tom Tucker
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=20070518182850.GA4843@fieldses.org \
--to=bfields@fieldses.org \
--cc=Thomas.Talpey@netapp.com \
--cc=gnb@sgi.com \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
--cc=pleckie@melbourne.sgi.com \
--cc=tom@opengridcomputing.com \
/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