From: Eric Dumazet <eric.dumazet@gmail.com>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: David Miller <davem@davemloft.net>, Tejun Heo <tj@kernel.org>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH] datagram: Extend the datagram queue MSG_PEEK-ing
Date: Fri, 10 Feb 2012 15:41:42 +0100 [thread overview]
Message-ID: <1328884902.2443.29.camel@edumazet-laptop> (raw)
In-Reply-To: <4F352182.6060601@parallels.com>
Le vendredi 10 février 2012 à 17:54 +0400, Pavel Emelyanov a écrit :
> We're working on the checkpoint-restore project. To checkpoint a unix socket
> we need to read its skb queue. Analogous task for TCP sockets Tejun proposed
> to solve with parasite + recvmsg + MSG_PEEK. That's nice, but doesn't work
> for unix sockets, because for them MSG_PEEK always peeks a single skb from the
> head of the queue.
>
> I propose to extend the MSG_PEEK functionality with two more flags that peek
> either next not picked skb in queue or pick the last picked one. The latter
> ability is required to make it possible to re-read a message if MSG_TRUNC
> was reported on it.
>
> These two flags can be used for unix stream sockets, since making the MSG_PEEK
> just report all data that fits the buffer length is bad -- we may have scms
> in queue thus turning stream socket into dgram one.
>
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
>
> ---
Nice !
So this CR stuff assumes an application wont use itself MSG_PEEK /
MORE / AGAIN ?
(skb->peeked can only be set, never unset)
next prev parent reply other threads:[~2012-02-10 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 13:54 [PATCH] datagram: Extend the datagram queue MSG_PEEK-ing Pavel Emelyanov
2012-02-10 14:41 ` Eric Dumazet [this message]
2012-02-10 14:52 ` Pavel Emelyanov
2012-02-15 20:52 ` David Miller
2012-02-20 12:17 ` Pavel Emelyanov
2012-02-21 5:01 ` David Miller
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=1328884902.2443.29.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tj@kernel.org \
--cc=xemul@parallels.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