From patchwork Thu Mar 2 09:58:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 13157033 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A3E2C678D4 for ; Thu, 2 Mar 2023 10:04:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbjCBKD6 (ORCPT ); Thu, 2 Mar 2023 05:03:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbjCBKDN (ORCPT ); Thu, 2 Mar 2023 05:03:13 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2103.outbound.protection.outlook.com [40.107.92.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DEFC3B3DF for ; Thu, 2 Mar 2023 02:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JUV8S2kvdGlbQZrOIbNondoE14gfoUEx0dYzGK6AOAUuoKWgPHGsr1vGaL6vwuSTmqWppBI30GBaeesquOVa+egVuhCelLTsCE5JoizUlnKmtu2Wuvo9tNRGK/X9pfI/q79lb9w+ckuThSVT6LuxXilFwPdiCk7p9uL7p4udZQOXcF9CWBrlyZIb+qN4vwoc2L2RcUJF35PUnnX79LZ3+fD2iIakJfdWH0nGRvGHJbpAtGkmHoaxQNtoLCIsrEEB6z7B72NUxRzAaWDPVKSWubiOeUtJA5c+6FSeVl23tJHiRNliKI5Er+6wtwQ9OnjqOYWVSRGEOxYRU7lQPkHCAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=w3AGYHwqHDlP4ts4sQ+R0AXMvdpk1u25Eg38SMf1zkk=; b=LAytyjxieDB2HZzVpRnJVZXV8ruQupue+XKInNRfNFQRlzpNyUynkXgKcqQ8AJuuySp+nDjBF2obdgaIHPLu154cHGWwexUXun9mDIaPo+y5n3IViHTsutQTTqQr0xRVvUfr9iiio9obPtPaGMLTRoWuP4DuZ8IZJhtG6Ux3fzWTdhAOF+jjOln/BDl2A98xm5qfms4rcGkVMqInqwA+zrY/f8E7GiM087crbjEL+Md/B3X2aWidmvNgvOdgvaPRj+o6wE3w+wVApG9OjWfvhJHsRfnSQEaOCXN6x5q2OeV88ZABAqbAj5qYujKGTrT6Iva/h/73H+cNazR3znRaEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w3AGYHwqHDlP4ts4sQ+R0AXMvdpk1u25Eg38SMf1zkk=; b=IiQAVh6B3uMCj8VMriZLS40s48jntSJQhfyXmCAWRPpRWHsPzmO0lEYY+fez8PmAimi044nwL+8IDBdB3rG+PlRpQPD4WP1p6NZtjXPmTkZkltbki6q0RMDdmp+XA1+5HH7CB/0ce/dl47OGrDbnIoVMiy4SOY9ly9SqM9zG7ts= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SJ0PR13MB5692.namprd13.prod.outlook.com (2603:10b6:a03:407::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.18; Thu, 2 Mar 2023 09:59:01 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::85f5:bdb:fb9e:294c]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::85f5:bdb:fb9e:294c%3]) with mapi id 15.20.6156.018; Thu, 2 Mar 2023 09:59:01 +0000 From: Simon Horman To: David Miller , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, oss-drivers@corigine.com, Huanhuan Wang , Simon Horman Subject: [PATCH net 3/3] nfp: fix esp-tx-csum-offload doesn't take effect Date: Thu, 2 Mar 2023 10:58:30 +0100 Message-Id: <20230302095830.2512535-4-simon.horman@corigine.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230302095830.2512535-1-simon.horman@corigine.com> References: <20230302095830.2512535-1-simon.horman@corigine.com> X-ClientProxiedBy: AS4PR10CA0008.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5dc::10) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SJ0PR13MB5692:EE_ X-MS-Office365-Filtering-Correlation-Id: b0d8e91b-6c2b-4c5a-b1cd-08db1b04bfb5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kXTOmNL/CjHmDQdzSXLXypkI2wu58VRsduI9r2kiEZp1if4M/L55N1W5zAm7bSfNavPva7DiYWN+AGnwHBUC7f/NMPfyBRIRwVjH3VEW4/A7Qf8w+Ma4VKwLPM1wBpaDxigQqy2DgVVGhN9JkK36Q844Sjz0VkdvARg6RbehrUTNL+OG4bmUoK1IT/NTi9SNEbZOE5WgyE2ik2LWmeVSliSiFaWVkU3ppc7JSXsGWKsbxY9yfyw5Bqy7/Y5VNECmlkWA9FFuwzY5wgxqSnO0+GAUKneA4Fbl/H8rYGN2XCDaWQmZc/94L1kRRZ7AXLOvbSyRNHxI+w5q0eMDrZYGdY4lyPictLqzRGWzyLQ30RKQo0TgMb2gyTnvqthkcrSjk/1YwcIzZxWpoOvu8qLAphN+6YTfw8Q7U6/Cn5giO8wZd8oSht8TSlbCXwfKCnwk29EBC5qKZFppgpmZke5odBeQu5V95lkwOlxK1xId2n4ENe/tKuOwKWQln4z8DraSzAbgHB/VCYvo93/2ANoP5ECtz3PjqQ6/O9P5kxa7u9Z4YBsQK4O7gIVK90zgUxtPmpqE8c308tn6fGE93OuCqIXMS5AwxpFQ4yclSlX2ixn7qhjB1xkoalJygLpZFeWCtcmTlcJYB+/vlbctRc2yUA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(346002)(136003)(376002)(396003)(366004)(39840400004)(451199018)(5660300002)(2616005)(44832011)(6666004)(54906003)(107886003)(110136005)(52116002)(38100700002)(6486002)(478600001)(41300700001)(186003)(36756003)(6512007)(8936002)(6506007)(1076003)(316002)(4326008)(86362001)(66556008)(66476007)(8676002)(66946007)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t0tMNiOmORINtnGS9uAaCAa/ZILfaF595FcDCfXfagzieRXuHGgWmYgqRi+GxHmoQarmJgypOBrY+petxss0vcrCHP+wyZaSLmt1+8XJuLZTA3gnGDfCqG33wD4yGlM2kYrEthuyIjIoxOALKSZsOs3RhqQSyY4eXOJP7shvtfC11zfbvdhUiZSWPHhw+cfuK97FXtVPgBIaU7dyHzp7OiRZ3nKWuSQsBaNgjCg0T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o/KFcFbY+5Z4z/ZGSvwBRahOW95DZrodSL7Ct9UjSevlglFrWZmFqprMG3oBLE+/2f41f7XepRDFEC51xwUifHOWmgtkfvEjjqccQ/yChunZOmF0nn0sI6A91nu5/FgIzuY92BsZXZ6z/Ga8nRKTuJmI3V1QEL2wUrOaeahn2yXTUeFg94IVbAUMuU1WYlTUHdEeAqXINxxtQAXWvI7ErCUVGF8rvM8atEQmp0QCZYhPwZcaf9B2rcK41nh1HNE9ATcep9eaKj8oFfmhIGNXo3fmmLeatA0KoQkhJXV9TmkPJ3bjYAq8A/Mrzh/dF7xow5tMXd7DWyu8Gs/14dXsgmNl0Q1pqw7D8ItIXVbriA/FBccuBc/F/jNloBeuNVVRI1VSUGQ== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0d8e91b-6c2b-4c5a-b1cd-08db1b04bfb5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2023 09:59:01.6356 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AC/+WurhuNdGOkoVvypcjRx4yjCH+LzasUcsrE/i0XhX75aFA1CThURB5x4Nr95ePd4kJf47ngkPTI1yvUPyAWUxW8zNkKzDm5Qwyb4slWc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB5692 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Huanhuan Wang When esp-tx-csum-offload is set to on, the protocol stack shouldn't calculate the IPsec offload packet's csum, but it does. Because the callback `.ndo_features_check` incorrectly masked NETIF_F_CSUM_MASK bit. Fixes: 57f273adbcd4 ("nfp: add framework to support ipsec offloading") Signed-off-by: Huanhuan Wang Signed-off-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 81b7ca0ad222..62f0bf91d1e1 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -38,6 +38,7 @@ #include #include #include +#include #include "nfpcore/nfp_dev.h" #include "nfpcore/nfp_nsp.h" @@ -1897,6 +1898,9 @@ nfp_net_features_check(struct sk_buff *skb, struct net_device *dev, features &= ~NETIF_F_GSO_MASK; } + if (xfrm_offload(skb)) + return features; + /* VXLAN/GRE check */ switch (vlan_get_protocol(skb)) { case htons(ETH_P_IP):