LKML Archive on
help / color / mirror / Atom feed
From: Bui Quang Minh <>
To: Eric Dumazet <>,,
Subject: Re: [PATCH v2 1/2] udp: UDP socket send queue repair
Date: Fri, 13 Aug 2021 18:08:28 +0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 8/12/2021 10:51 PM, Eric Dumazet wrote:
> On 8/12/21 3:46 PM, Bui Quang Minh wrote:
>> On 8/11/2021 11:14 PM, Eric Dumazet wrote:
>>> On 8/11/21 5:45 PM, Bui Quang Minh wrote:
>>>> In this patch, I implement UDP_REPAIR sockoption and a new path in
>>>> udp_recvmsg for dumping the corked packet in UDP socket's send queue.
>>>> A userspace program can use recvmsg syscall to get the packet's data and
>>>> the msg_name information of the packet. Currently, other related
>>>> information in inet_cork that are set in cmsg are not dumped.
>>>> While working on this, I was aware of Lese Doru Calin's patch and got some
>>>> ideas from it.
>>> What is the use case for this feature, adding a test in UDP fast path ?
>> This feature is used to help CRIU to dump CORKed UDP packet in send queue. I'm sorry for being not aware of the performance perspective here.
> UDP is not reliable.
> I find a bit strange we add so many lines of code
> for a feature trying very hard to to drop _one_ packet.
> I think a much better changelog would be welcomed.

The reason we want to dump the packet in send queue is to make to state of the 
application consistent. The scenario is that when an application sends UDP 
packets via UDP_CORK socket or with MSG_MORE, CRIU comes and checkpoints the 
application. If we drop the data in send queue, when application restores, it 
sends some more data then turns off the cork and actually sends a packet. The 
receiving side may get that packet but it's unusual that the first part of that 
packet is missing because we drop it. So we try to solve this problem with some 
help from the Linux kernel.

Quang Minh.

  reply	other threads:[~2021-08-13 11:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 15:45 Bui Quang Minh
2021-08-11 16:14 ` Eric Dumazet
2021-08-12 13:46   ` Bui Quang Minh
2021-08-12 15:51     ` Eric Dumazet
2021-08-13 11:08       ` Bui Quang Minh [this message]
2021-08-13 13:00         ` David Laight
2021-08-17 16:22           ` avagin
2021-08-16 14:35         ` Willem de Bruijn
2021-08-16 14:38 ` Willem de Bruijn

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v2 1/2] udp: UDP socket send queue repair' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).