From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, sridharr@google.com
Subject: Re: [PATCH v2] xmit_compl_seq: information to reclaim vmsplice buffers
Date: Tue, 21 Sep 2010 23:47:04 +0200 [thread overview]
Message-ID: <1285105624.6378.24.camel@edumazet-laptop> (raw)
In-Reply-To: <1285105131.6378.19.camel@edumazet-laptop>
Le mardi 21 septembre 2010 à 23:39 +0200, Eric Dumazet a écrit :
> > + * Copy the first unacked seq into the receive msg control part.
> > + */
> > +static inline void tcp_sock_xmit_compl_seq(struct msghdr *msg,
> > + struct sock *sk)
> > +{
> > + if (sock_flag(sk, SOCK_XMIT_COMPL_SEQ)) {
> > + struct tcp_sock *tp = tcp_sk(sk);
> > + if (msg->msg_controllen >= sizeof(tp->snd_una)) {
and this check is not necessary or correct ?
to put_cmsg() an u32, you need CMSG_LEN(4) bytes
> > + put_cmsg(msg, SOL_SOCKET, SCM_XMIT_COMPL_SEQ,
> > + sizeof(tp->snd_una), &tp->snd_una);
> > + }
> > + }
> > +}
->
if (sock_flag(sk, SOCK_XMIT_COMPL_SEQ))
put_cmsg(msg, SOL_SOCKET, SCM_XMIT_COMPL_SEQ,
sizeof(u32), &snd_una);
prev parent reply other threads:[~2010-09-21 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 18:57 [PATCH v2] xmit_compl_seq: information to reclaim vmsplice buffers Tom Herbert
2010-09-21 20:15 ` Rick Jones
2010-09-21 21:38 ` Eric Dumazet
2010-09-21 21:47 ` Eric Dumazet [this message]
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=1285105624.6378.24.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sridharr@google.com \
--cc=therbert@google.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