From patchwork Fri Jan 15 08:21:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 364407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9BB6C433E0 for ; Fri, 15 Jan 2021 08:22:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 771AD22A84 for ; Fri, 15 Jan 2021 08:22:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732575AbhAOIWS (ORCPT ); Fri, 15 Jan 2021 03:22:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbhAOIWS (ORCPT ); Fri, 15 Jan 2021 03:22:18 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E311BC0613C1; Fri, 15 Jan 2021 00:21:37 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id i7so5544073pgc.8; Fri, 15 Jan 2021 00:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=KUsV1bM5sIVlTpPanw1WlNTCb4EgouPn3IG0lHd1U10=; b=Znrvfcwd859bNqV+w13Y22ZaRAbMaWObOP4zrYmIWA0Xce97UvI87ua8bJdn0hpgeV VL9Me5dkYHH1BRw8pusf34bABLKR7/D/X7QkHN8MDM7edvXqqfWHIa/zy0mLiIZCrcCe uBcBbHqBhjrz2Xj/escsHWCobl3PyCgpeC/NccRMfvphIOnWbK/FWJifn1MYvnRduYrN 6M3dGgrLS4jBJeF5k+oHb0bc9QEMrGiZe+wD2Rui64qg4/m4XKTD3MIOpwU5A3yRfVwp ybc65INq8aJTC2lRzhrnaOgMqusV3PPUMhSbpxJ0wRsmqAvv8TwY+UbFdLFnw59zxBSa 238A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=KUsV1bM5sIVlTpPanw1WlNTCb4EgouPn3IG0lHd1U10=; b=Z5+9/naUxACG7+1x4KQHzEeXEKaboo0lBQAv/oqWLcknLZYkLdX637qcmPYRPgRI/2 r4yBQvWinJGCBVIvv0K0do5YnEVHtGZrFbIg/IUKfgqwcPnw5BX4216qp5VwxrVAuA96 C8DOvdwrdyPWYlXf/+DPz/rBvbvZ2bVXRTlJdVrc7gSYVY0+n1SF+tk1WUaUC4cQK6YQ W40QF4nnEwKF4Vof+lr8Bhyp6Anqt96/4NHyiENySSoIziTJGEfVNc6KFQCfDHwxBrdx mw8AwAynSBYM98jkC91orJuR4p8rYpx07RTehQgx01WaxYrrXazJ8ywjAQJg1DO9O4Lt BAlA== X-Gm-Message-State: AOAM531rDDnEJtU8Kk5PcR1VRH5p33bhviA3Tl+PNKzLALhTZ/2WRrbw BqgUlNV7bwRl2LxTU2U6/aB+JraJNqZNPQ== X-Google-Smtp-Source: ABdhPJzIMfjSOn1hpGTWvYZGEnAsCBBwR9uOOZHRqVMjw0AZDIlGlvjtdxd2gclMGSBHN5wmQS9JCw== X-Received: by 2002:a63:db08:: with SMTP id e8mr5989709pgg.261.1610698897237; Fri, 15 Jan 2021 00:21:37 -0800 (PST) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id x28sm7189523pff.182.2021.01.15.00.21.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2021 00:21:36 -0800 (PST) From: Xin Long To: network dev , linux-sctp@vger.kernel.org Cc: Marcelo Ricardo Leitner , Neil Horman , davem@davemloft.net, Jakub Kicinski , Alexander Duyck Subject: [PATCHv2 net-next 2/2] udp: remove CRC flag from dev features in __skb_udp_tunnel_segment Date: Fri, 15 Jan 2021 16:21:12 +0800 Message-Id: X-Mailer: git-send-email 2.1.0 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Xin Long --- net/ipv4/udp_offload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index ff39e94..1168d18 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -68,8 +68,8 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb, (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM)))); features &= skb->dev->hw_enc_features; - /* CRC checksum can't be handled by HW when it's a UDP tunneling packet. */ - features &= ~NETIF_F_SCTP_CRC; + if (need_csum) + features &= ~NETIF_F_SCTP_CRC; /* The only checksum offload we care about from here on out is the * outer one so strip the existing checksum feature flags and