Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2111373pxb; Mon, 11 Jan 2021 00:46:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzki+YlpbGZC1gxDehwLp1qJsd/PusPIK1QAZ/2eLg9Og/h8tLy7skH4y7sbPUQflnj/XI8 X-Received: by 2002:aa7:cb12:: with SMTP id s18mr13469820edt.125.1610354794387; Mon, 11 Jan 2021 00:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610354794; cv=none; d=google.com; s=arc-20160816; b=ldbhU6RDhITtsY57IyDJsYE+fYZWltaKzSjk8zOXFAzDkdJULfFsrIBzEDJ1+Ex1uk 17wE/ASO+FmtA0J3KspuZpjNeYxvV/BarXGhrdLfFnTFBxW7/8HZX1rgyp4ecZ1WwGim HlPDF0qXzc9GKgqjmM6eatd4kbJK6Ia8OJqgOqTkpW4H9FLvC3QyEOFlK+htczwmh0jQ PHCK9GIyxaev2PTFHOnkBCuDxs+zSQYifqcAjhwEMnxIsknWTtXx4V917FxIYciB8JOj iuAWXe2I6q9fNlx8NWinqEb+ITwHsXM3L8D4/zYwroLwQjCwnQPg6qiNrARMWqVDokU6 EbDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ok1nx4zXscNMzxW336iCYM4BL6wIYkd6X5svAsA7xek=; b=FEfKg5eoHkj+iSQSGBkHCVyLTyYWhgQ3JTmTICfKIm9ImVmcimG/N8A2ntmMv9i9xu R9XX5LCQ4T3QBCCIfEgL3Lbc8AKtoM/OT+ezdtPdAgO6kZWxSknBoYhtwDnXlydnrjq5 0NZh7m/xWaHY6yKqR22NgZNmf49dbmT6ib6gN+/gYMOs21++48Me5K6WFHLFF5Mrs96A xPdKPGICDQRa9nov+nMRaSL0zRRSJWmzdSf4KrTc1UxnSPRUO7EMRuSq3nYoP+mfVcbo lkw5W3ApZNnPWszs+bxWYsTKctLQpTIk/tFVFmkQUOcQYyliA1aRKRTNTcfXsMUjGnF4 Y1tw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si6553096ejq.432.2021.01.11.00.46.11; Mon, 11 Jan 2021 00:46:34 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728093AbhAKIoI (ORCPT + 99 others); Mon, 11 Jan 2021 03:44:08 -0500 Received: from a.mx.secunet.com ([62.96.220.36]:59116 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbhAKIoH (ORCPT ); Mon, 11 Jan 2021 03:44:07 -0500 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 4F277200A0; Mon, 11 Jan 2021 09:43:25 +0100 (CET) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vxaVLGGRqSMG; Mon, 11 Jan 2021 09:43:24 +0100 (CET) Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id D2975201CC; Mon, 11 Jan 2021 09:43:24 +0100 (CET) Received: from mbx-dresden-01.secunet.de (10.53.40.199) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 11 Jan 2021 09:43:24 +0100 Received: from gauss2.secunet.de (10.182.7.193) by mbx-dresden-01.secunet.de (10.53.40.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Mon, 11 Jan 2021 09:43:23 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id DA198318028B; Mon, 11 Jan 2021 09:43:22 +0100 (CET) Date: Mon, 11 Jan 2021 09:43:22 +0100 From: Steffen Klassert To: Dongseok Yi CC: "'David S. Miller'" , , 'Alexey Kuznetsov' , 'Hideaki YOSHIFUJI' , 'Jakub Kicinski' , "'Willem de Bruijn'" , , Subject: Re: [RFC PATCH net] udp: check sk for UDP GRO fraglist Message-ID: <20210111084322.GD3576117@gauss3.secunet.de> References: <1610110348-119768-1-git-send-email-dseok.yi@samsung.com> <20210108133502.GZ3576117@gauss3.secunet.de> <003701d6e7bd$d90ea860$8b2bf920$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <003701d6e7bd$d90ea860$8b2bf920$@samsung.com> X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-dresden-01.secunet.de (10.53.40.199) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 11:02:42AM +0900, Dongseok Yi wrote: > On 2021-01-08 22:35, Steffen Klassert wrote: > > On Fri, Jan 08, 2021 at 09:52:28PM +0900, Dongseok Yi wrote: > > > It is a workaround patch. > > > > > > UDP/IP header of UDP GROed frag_skbs are not updated even after NAT > > > forwarding. Only the header of head_skb from ip_finish_output_gso -> > > > skb_gso_segment is updated but following frag_skbs are not updated. > > > > > > A call path skb_mac_gso_segment -> inet_gso_segment -> > > > udp4_ufo_fragment -> __udp_gso_segment -> __udp_gso_segment_list > > > does not try to update any UDP/IP header of the segment list. > > > > > > It might make sense because each skb of frag_skbs is converted to a > > > list of regular packets. Header update with checksum calculation may > > > be not needed for UDP GROed frag_skbs. > > > > > > But UDP GRO frag_list is started from udp_gro_receive, we don't know > > > whether the skb will be NAT forwarded at that time. For workaround, > > > try to get sock always when call udp4_gro_receive -> udp_gro_receive > > > to check if the skb is for local. > > > > > > I'm still not sure if UDP GRO frag_list is really designed for local > > > session only. Can kernel support NAT forward for UDP GRO frag_list? > > > What am I missing? > > > > The initial idea when I implemented this was to have a fast > > forwarding path for UDP. So forwarding is a usecase, but NAT > > is a problem, indeed. A quick fix could be to segment the > > skb before it gets NAT forwarded. Alternatively we could > > check for a header change in __udp_gso_segment_list and > > update the header of the frag_skbs accordingly in that case. > > Thank you for explaining. > Can I think of it as a known issue? No, it was not known before you reported it. > I think we should have a fix > because NAT can be triggered by user. Can I check the current status? > Already planning a patch or a new patch should be written? We have to do a new patch to fix that issue. If you want do do so, go ahead.