[CRIU] [PATCH 00/12] Support for packet's msg_name in receive queue of promiscous DGRAM sockets

Pavel Emelyanov xemul at virtuozzo.com
Fri Apr 29 08:35:40 PDT 2016


On 04/29/2016 06:13 PM, Andrew Vagin wrote:
> https://travis-ci.org/criupatchwork/criu/builds/126673004

  CC       arch/x86/crtools.o
In file included from /home/travis/build/criupatchwork/criu/criu/include/timerfd.h:7:0,
                 from /home/travis/build/criupatchwork/criu/criu/include/restorer.h:19,
                 from arch/x86/crtools.c:16:
/home/travis/build/criupatchwork/criu/criu/include/files.h:196:12: error: conflicting types for ‘find_unused_fd’
 extern int find_unused_fd(void);
            ^
/home/travis/build/criupatchwork/criu/criu/include/files.h:149:28: note: previous definition of ‘find_unused_fd’ was here
 static inline unsigned int find_unused_fd(struct list_head *head, int hint_fd)

Cc Stas :)

> On Fri, Apr 29, 2016 at 05:34:52PM +0300, Kirill Tkhai wrote:
>> DGRAM packet, received using recvmsg, have msghdr populated:
>>
>> recvmsg(int sockfd, struct msghdr *msg, int flags)
>>
>> struct msghdr {
>> 	void		*msg_name;
>> 	int		msg_namelen;
>> 	...
>> };
>>
>> msg_name and msg_namelen contain the name of the sender of packet,
>> which it's bound to.
>>
>> Currently, we do not support this. We restore the whole queue with
>> the only sender (the receiver is peer for it, but there may be several
>> senders), or with empty sender.
>>
>> This series add a support for "promiscous" receive queues and restore
>> them correct.
>>
>> To do that, we determine sockets, which queue has several senders, and
>> senders, who are involved it there. Sender's fds are sent to receives,
>> and receivers restore their queues it correct order and with correct
>> msg_names.
>>
>> This patchset should have a sequel, which introduces "ghost sockets",
>> that are not supported there. Their packets are restored as having
>> noname senders now.
>>
>> ---
>>
>> Kirill Tkhai (12):
>>       unix: Link all sockets in unix_sockets list
>>       unix: Add find_unix_sk_by_name()
>>       unix: Add sender_ino of packets and socket
>>       sk-queue: Allow to dump a skb sender
>>       unix: Dump DGRAM packets and sockets senders
>>       unix: Fixup queuer of promiscuous DGRAM receivers
>>       unix: Resolve senders of packets in receive queue of DGRAM socket
>>       files: Add file_desc_ops::receive method
>>       files: Add get_unused_fd() helper
>>       unix: Send senders fds of packets in receive queue to receiver
>>       sk-queue: Allow to use several file descriptors to restore a queue
>>       unix: Add a method for choosing sender of packet in promiscous DGRAM queue
>>
>>
>>  criu/cr-restore.c       |    2 
>>  criu/files.c            |  102 +++++++++++++++
>>  criu/include/files.h    |   12 ++
>>  criu/include/image.h    |    2 
>>  criu/include/pstree.h   |    1 
>>  criu/include/sk-queue.h |   15 ++
>>  criu/sk-queue.c         |  146 ++++++++++++++++++++-
>>  criu/sk-unix.c          |  322 ++++++++++++++++++++++++++++++++++++++++++++---
>>  images/sk-packet.proto  |    1 
>>  images/sk-unix.proto    |    2 
>>  10 files changed, 567 insertions(+), 38 deletions(-)
>>
>> --
>> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
>> _______________________________________________
>> CRIU mailing list
>> CRIU at openvz.org
>> https://lists.openvz.org/mailman/listinfo/criu
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> .
> 



More information about the CRIU mailing list