Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2110131lqt; Mon, 22 Apr 2024 01:27:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUg5HAhgNKpQeOh5GqGiAxlAQaQbIPTFAOjw67rE+a5ao1YrlaKY9fJv5+bao5uDBZG+1gyK8hwMPbLHvI8HzvgUngzX2fIpcTNQagbcg== X-Google-Smtp-Source: AGHT+IHqmrBTDpFzgprTLeFyYhoBrHIB/O9xEQL0VsX621GJZgf3iBrLQwuun/HHlIP8jl4y1xMD X-Received: by 2002:a17:90a:7182:b0:2ad:3688:de80 with SMTP id i2-20020a17090a718200b002ad3688de80mr4334592pjk.30.1713774447594; Mon, 22 Apr 2024 01:27:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713774447; cv=pass; d=google.com; s=arc-20160816; b=vutjLMJUCo5LIrpaWK6aTrDwTex4Ex2Bvw+9efwxbzhqcOp5OdtPiJoz+Z/T6eNFqM uvesFVNKzbA7cBj5HBPzZIpVVKfhv6gVyxn1jmrj+B6BB3XpOeMfyr3rcKg9N/8VUSDv m18a8giTo5BdBIn1LiJXI1l6elqbQmOK7rD2Vp2GuTNhwYWeJ2BVC3i2fXnGTfbJhh2E IlWD7/Cezivezn5oBooUstRdxoWtkb6/BxPqGCQsZ/gIOMyAEa7KPGtAf1B3165f847b 5/u9IMFztuOV7LViL7xklIn9ixnCIXdnTKs0PKWU0c8ygeuimKPQ65TE/pLyYQRS/YR/ Uuww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=Tl8v7+QIongbV/JFkwC3zUEDrGJ4c281hF3bU9AFRbs=; fh=yUvXEjOyRTxru6UTuYb6SbqUKWOu9unlDRQTthKS1Cg=; b=yqb8DYuwuXb/GMbNN1JWfqsPURb2TLOQ1t27eI/xcrv70nX/ZxVLxr+VOkm+Wzr2rN 8hf5gczm/q3EV7APxmH9BHVDj58DZVx86LLVLj2ApmBO/kKW+jWhTtlsm8/Ate8U+y5H KB4UOjGJuH+KgBcGWrh2zPhdv8oHcWrzvMDfxLOhCyaDO3NvtN+eGV66/oT99iBXvGwy 9UZNQfva6hasVM4sAXQ4THNHwhyD/KRSmB2vcx5cGi8WY2VH4FK65gt0I1mxCO+AbMAj ufmm+hR6pb2CpIL5SurFAL4LgzRcEx7cROIOLSjYx0zHt3Xt0YxT6I8F+YCk1cvfmmjH FJ4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ssi.bg header.s=ink header.b="c/S7mFL+"; arc=pass (i=1 spf=pass spfdomain=ssi.bg dkim=pass dkdomain=ssi.bg dmarc=pass fromdomain=ssi.bg); spf=pass (google.com: domain of linux-kernel+bounces-152973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ssi.bg Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s8-20020a17090a1c0800b002a2e618912csi5195464pjs.27.2024.04.22.01.27.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 01:27:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ssi.bg header.s=ink header.b="c/S7mFL+"; arc=pass (i=1 spf=pass spfdomain=ssi.bg dkim=pass dkdomain=ssi.bg dmarc=pass fromdomain=ssi.bg); spf=pass (google.com: domain of linux-kernel+bounces-152973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ssi.bg Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CF67D280DF4 for ; Mon, 22 Apr 2024 08:27:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21D4A52F70; Mon, 22 Apr 2024 08:26:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ssi.bg header.i=@ssi.bg header.b="c/S7mFL+" Received: from mg.ssi.bg (mg.ssi.bg [193.238.174.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB06551C33; Mon, 22 Apr 2024 08:26:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.238.174.37 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713774412; cv=none; b=GCdkDiSm8XuhD/GYzPOAaIsqLb/eOFqq28VbL2kqsGHra58nN5hi8Lvky9h1NP7OMUqcGoGpn0aiZfdcrzEKcxHyojwrBRGdlunCOf8pGdrpfXNkHWKFsItAdlR31apcqW0zWmLkyKpxVF7MpToZggLQp8OXYXfg2VH2jQcNKsI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713774412; c=relaxed/simple; bh=y37r8XxZzttygEhBfvdyYxE8grygu1uvu5+ykK8tHnk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=TlawR0eGuNwdfni3gn+tKAxFqgEq1/al0VyzGXOK7WV+vm7vRDweMD74Wudb5Kg4Zp4jXjzuiE7XMFEsXiA554Ucw1oW/TX0ST+2+4f+AmYHcXxCIteHDxoYBPIFF90ScD3cVb8ib7J7phehBUsIrs6FlSAGGyrEbjs1/YCVwlg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ssi.bg; spf=pass smtp.mailfrom=ssi.bg; dkim=pass (1024-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=c/S7mFL+; arc=none smtp.client-ip=193.238.174.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ssi.bg Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ssi.bg Received: from mg.ssi.bg (localhost [127.0.0.1]) by mg.ssi.bg (Proxmox) with ESMTP id DD2CA25ACE; Mon, 22 Apr 2024 11:26:45 +0300 (EEST) Received: from ink.ssi.bg (ink.ssi.bg [193.238.174.40]) by mg.ssi.bg (Proxmox) with ESMTPS; Mon, 22 Apr 2024 11:26:44 +0300 (EEST) Received: from ja.ssi.bg (unknown [213.16.62.126]) by ink.ssi.bg (Postfix) with ESMTPSA id A1D67900394; Mon, 22 Apr 2024 11:26:40 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ssi.bg; s=ink; t=1713774401; bh=y37r8XxZzttygEhBfvdyYxE8grygu1uvu5+ykK8tHnk=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=c/S7mFL+JgNg1gjRTl5ehh6B7tYlTW1idzbuAX5bHSOOp9T4lyqUerFVOz4fVjNX3 2iwfZDd8prnAKZ+lswrjbDUmbtFoS1c1dB4/c+nQvnHtpb9p8CdQlaeOR6yslo1IAK niJDzGzR8lbSfTQTbkUgNicTfqKQv903EsPUfSe4= Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by ja.ssi.bg (8.17.1/8.17.1) with ESMTP id 43M8QctX040757; Mon, 22 Apr 2024 11:26:39 +0300 Date: Mon, 22 Apr 2024 11:26:38 +0300 (EEST) From: Julian Anastasov To: Ismael Luceno cc: linux-kernel@vger.kernel.org, Firo Yang , Andreas Taschner , =?UTF-8?Q?Michal_Kube=C4=8Dek?= , Simon Horman , lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, coreteam@netfilter.org Subject: Re: [PATCH v2] ipvs: Fix checksumming on GSO of SCTP packets In-Reply-To: <20240421142234.15764-1-iluceno@suse.de> Message-ID: <5a1b5536-a8ba-4438-9ed2-23819f1846a6@ssi.bg> References: <20240421142234.15764-1-iluceno@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463811672-2077803110-1713774400=:25471" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811672-2077803110-1713774400=:25471 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Hello, On Sun, 21 Apr 2024, Ismael Luceno wrote: > It was observed in the wild that pairs of consecutive packets would leave > the IPVS with the same wrong checksum, and the issue only went away when > disabling GSO. > > IPVS needs to avoid computing the SCTP checksum when using GSO. > > Fixes: 90017accff61 ("sctp: Add GSO support", 2016-06-02) > Co-developed-by: Firo Yang > Signed-off-by: Ismael Luceno > Tested-by: Andreas Taschner > CC: Michal Kubeček > CC: Simon Horman > CC: Julian Anastasov > CC: lvs-devel@vger.kernel.org > CC: netfilter-devel@vger.kernel.org > CC: netdev@vger.kernel.org > CC: coreteam@netfilter.org Looks good to me, thanks! Acked-by: Julian Anastasov As scripts/checkpatch.pl --strict /tmp/file.patch complains about Co-developed-by and Signed-off-by lines you may want to send v3... > --- > > Notes: > Changes since v1: > * Added skb_is_gso before skb_is_gso_sctp. > * Added "Fixes" tag. > > net/netfilter/ipvs/ip_vs_proto_sctp.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c b/net/netfilter/ipvs/ip_vs_proto_sctp.c > index a0921adc31a9..1e689c714127 100644 > --- a/net/netfilter/ipvs/ip_vs_proto_sctp.c > +++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c > @@ -126,7 +126,8 @@ sctp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, > if (sctph->source != cp->vport || payload_csum || > skb->ip_summed == CHECKSUM_PARTIAL) { > sctph->source = cp->vport; > - sctp_nat_csum(skb, sctph, sctphoff); > + if (!skb_is_gso(skb) || !skb_is_gso_sctp(skb)) > + sctp_nat_csum(skb, sctph, sctphoff); > } else { > skb->ip_summed = CHECKSUM_UNNECESSARY; > } > @@ -174,7 +175,8 @@ sctp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, > (skb->ip_summed == CHECKSUM_PARTIAL && > !(skb_dst(skb)->dev->features & NETIF_F_SCTP_CRC))) { > sctph->dest = cp->dport; > - sctp_nat_csum(skb, sctph, sctphoff); > + if (!skb_is_gso(skb) || !skb_is_gso_sctp(skb)) > + sctp_nat_csum(skb, sctph, sctphoff); > } else if (skb->ip_summed != CHECKSUM_PARTIAL) { > skb->ip_summed = CHECKSUM_UNNECESSARY; > } > -- > 2.43.0 Regards -- Julian Anastasov ---1463811672-2077803110-1713774400=:25471--