netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Kirch <olaf.kirch@oracle.com>
To: nfs@lists.sourceforge.net
Cc: NeilBrown <neilb@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [NFS] [PATCH 001 of 3] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying
Date: Mon, 5 Mar 2007 19:59:55 +0100	[thread overview]
Message-ID: <200703051959.56914.olaf.kirch@oracle.com> (raw)
In-Reply-To: <1070302042825.5760@suse.de>


Hi Neil,

here's another minor comment:

On Friday 02 March 2007 05:28, NeilBrown wrote:
> +static inline void svc_udp_get_dest_address(struct svc_rqst *rqstp,
> +					    struct cmsghdr *cmh)
>  {
>  	switch (rqstp->rq_sock->sk_sk->sk_family) {
>  	case AF_INET: {
> +		struct in_pktinfo *pki = CMSG_DATA(cmh);
> +		rqstp->rq_daddr.addr.s_addr = pki->ipi_spec_dst.s_addr;
>  		break;
> +		}
...

The daddr that is extracted here will only ever be used to build
another PKTINFO cmsg when sending the reply. So it would be
much easier to just store the raw control message in the svc_rqst,
without looking at its contents, and send it out along with the reply,
unchanged.

Olaf
-- 
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
okir@lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax

  parent reply	other threads:[~2007-03-05 19:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02  4:28 [PATCH 000 of 3] knfsd: Resolve IPv6 related link error NeilBrown
2007-03-02  4:28 ` [PATCH 001 of 3] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying NeilBrown
2007-03-05 18:53   ` Olaf Kirch
2007-03-05 23:47     ` [NFS] " Neil Brown
2007-03-05 18:59   ` Olaf Kirch [this message]
2007-03-05 21:09     ` Neil Brown
2007-03-02  4:28 ` [PATCH 002 of 3] knfsd: Avoid checksum checks when collecting metadata for a UDP packet NeilBrown
2007-03-02  4:28 ` [PATCH 003 of 3] knfsd: Remove CONFIG_IPV6 ifdefs from sunrpc server code NeilBrown

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=200703051959.56914.olaf.kirch@oracle.com \
    --to=olaf.kirch@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).