Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp62594pxb; Thu, 12 Aug 2021 10:47:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtNKWoPZ16b+VIUw0PNqaptZgpyH0QGGAiG0KClM5GAQPX9Jri6Ns4b/epZF81MmxPhDJU X-Received: by 2002:a05:6402:d68:: with SMTP id ec40mr6997591edb.344.1628790478276; Thu, 12 Aug 2021 10:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628790478; cv=none; d=google.com; s=arc-20160816; b=fIy6ahpiaohHVK3JZaRGbeitOSnr+OYEH5AdtCbBhtymzXvZ8jG+qqJ+KHh7lhH0aX /evU4G0xqdxPVTGY/wLLBxPtAaWs9uM8w209JcmLVCpPl4OBhgGZxdFpTHWN7Kh6ZVw6 emusK4GR+scZwEAeBj2Q/eTfXYJfTx1u0rwnRv07m0QvfVENMeNzQKfkRf/L06fYL1DT 6PF9Xm75ukH0oXeifTUlesKZu69JkH8lNeoJ78YcJLwSdNX64mmrphyJwPkSqSC9dfnz yylcc1fqKdaw1xz9HFBCwML2A5CxwalIsgJi+v9xymL5SmSulwGFBTSaZJnMOhK0Povd uQ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=7Ox8EA3msfn26kOfs3nfK6Ep7YttC7NK9mJ+afKsxEI=; b=KC66oUSbkVcL/poUIbHveolGZSJAtbRAQein65e7h3/nGUiNwMX45FUG0JR4kVNUeS eLlHmflXcPYISenO9QsdzDkJI6ZAS5U5QExQ7n2kC18poO3yvgbf4v9ji0Yf3O4xI1sS ZwOsMOVomy/kV0iQozBgwRF2bFb0Y44OA/OxJBnXIp+hqlah0fHdlRk/KFQqasLFsPFg BgXhTGTWvuF+B0n6ZORgpUNgnJYjqd3lZ4P1+2+6WRDnBsyT82d63d/n4HoMlvCKi7AE iN/x569MEDRxD+XtU0Nee/8mbUzVp8Y5Wd4udpcpRJ0ARnFcSk/QNugD9pVHFdahbIrx p5Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YUkvhqc+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt11si3744164ejc.85.2021.08.12.10.47.26; Thu, 12 Aug 2021 10:47:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YUkvhqc+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238407AbhHLPvz (ORCPT + 99 others); Thu, 12 Aug 2021 11:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238365AbhHLPvd (ORCPT ); Thu, 12 Aug 2021 11:51:33 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C076C061756; Thu, 12 Aug 2021 08:51:08 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id z9so8893918wrh.10; Thu, 12 Aug 2021 08:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7Ox8EA3msfn26kOfs3nfK6Ep7YttC7NK9mJ+afKsxEI=; b=YUkvhqc+QAdePDaPdTt5Xjix4FY9Jwr63o0QwfgpzV/9lxY3A6Bzc6nuZ6tPeV+v3u OnjDVGVxM/w/6yskm+0Hn3Lyt8V6CPVcn1AiuVgwLLh3dCnDwAprTdwaFnIIVoFIXuuL mVoTcYnD4NTTNckm/Fzu/JJwELPRNV3wzxAOBtF8Q79ejWkfPhbKfbgtRoIGPLapOeXP g6Ayk+eQR0uTWEoQaq1mMb8EU5SwMRFPFfvF+pYOndn79fsqIh8kEHl3ltpyy86G+VbU j06cjJbGocqrZI28bKvAH1oV3xrrvU7ec8QvhjFs3Vko7Twm5625aM4r+lFqw3sl6Lhn IiyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7Ox8EA3msfn26kOfs3nfK6Ep7YttC7NK9mJ+afKsxEI=; b=Shg5XT+88fBr0ZsyAECe0y+1MXnpvVEdh/OSaTTmZYQGnh0j4xQzzTlBhytBoaoeRJ UsYG3OPGR5QknHd3vzVPsMAmuWiyIWz9UXSwYhjloDeMwCtrC2ca2kLrse78/KCtlPI/ 4VHU1jwhkHYyGpoQ12ucmipBxn7cH1oAgxiZgN1l86/iFA10GpVpZndXXeiZI7uQFmeI wh543gKSPAmONAI36ggn5qtjjsMtczcdPNNAk5M7cXM57KDwL64uwVpHHCgTaNZyEosm ePtyWdGpgthBZwLs+3aw4KKq2J7UT03hrhw6R1VTc4pSPZWMKuNwenFbi/Y0H/lkW4xZ Dv4Q== X-Gm-Message-State: AOAM5322mzKZfi+dkucSxEp312KMXcqMcKZg9YpiRp6QcPG/Ls9RWmSO 8MVVEFFqRwQvNGnJ5reilRU= X-Received: by 2002:a5d:42c2:: with SMTP id t2mr4772060wrr.49.1628783466985; Thu, 12 Aug 2021 08:51:06 -0700 (PDT) Received: from [10.0.0.18] ([37.165.40.60]) by smtp.gmail.com with ESMTPSA id y14sm3397044wrs.29.2021.08.12.08.51.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Aug 2021 08:51:06 -0700 (PDT) Subject: Re: [PATCH v2 1/2] udp: UDP socket send queue repair To: Bui Quang Minh , Eric Dumazet , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, yoshfuji@linux-ipv6.org, dsahern@kernel.org, willemb@google.com, pabeni@redhat.com, avagin@gmail.com, alexander@mihalicyn.com, lesedorucalin01@gmail.com References: <20210811154557.6935-1-minhquangbui99@gmail.com> <721a2e32-c930-ad6b-5055-631b502ed11b@gmail.com> <7f3ecbaf-7759-88ae-53d3-2cc5b1623aff@gmail.com> From: Eric Dumazet Message-ID: <489f0200-b030-97de-cf3a-2d715b07dfa4@gmail.com> Date: Thu, 12 Aug 2021 17:51:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <7f3ecbaf-7759-88ae-53d3-2cc5b1623aff@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > >> IMO, TCP_REPAIR hijacking standard system calls was a design error, >> we should have added new system calls. > > You are right that adding new system calls is a better approach. What do you think about adding a new option in getsockopt approach? > > Thanks, > Quang Minh.