From patchwork Tue Jul 5 07:36:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 12906010 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 C45BFC43334 for ; Tue, 5 Jul 2022 07:36:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230107AbiGEHgd (ORCPT ); Tue, 5 Jul 2022 03:36:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbiGEHg2 (ORCPT ); Tue, 5 Jul 2022 03:36:28 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2117.outbound.protection.outlook.com [40.107.96.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DF1513D13 for ; Tue, 5 Jul 2022 00:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CoiPxhhj11QI8Sko65y2Yf0UFB9xPfZWoScNrJPUdgU86VWi+oGfMavU9x8aZrbmyxQD3s2FbpPQk0NP8BD0mt3ftRa2VumC9CSc9vJVTTDgUripLC3sMNCX7YqPtBdG0VGZ0nkRKmd8j6t7qfc+YOi5hlMrc1Qn/2QCi2P4tE+IEA7/I8ezbn3YnUsisTQa1vMb/K4XzMUyFPgiESVC+Ck9kvK7REIKPJMjpzt5Quxs+GXZ1RG/I+4njAFra5qniBi5KlOiBv3ivzgDQ/LT2ov67BDk4m4ZSYkDXUQkN0FK3m7liQE8oehi4NeEb/Z9gA4H9xci5iACiZkb4L3gaQ== 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=Sq3F8iSAsbfvaJGOPu90bQ7c9DosIIx8V46kDhxgEr8=; b=L2di+xiBrMF1pAN0gr2ab0TwaWHMJr/0rAz3CQAnxKVt9kIziep4+fcxVk+R1rJKcfuk5OpkNDxra+S04eaKpRLWVGTzR71T24do/ZN8zvEaUU94HnXW1KFTl/BcfqOctEkBzVYjhPHhUN9pnJ6kL0bqxXj6UQki49GOfb4hKbIaxaHO2P+DPc8mnawZpcVX2pWK0eIrhkfvVk+xeQZhk9ig7bChxsRrueoLBShP5x5qUrKw8CrxKnpCG8vFXlUR9S9306YBD96mEbHq2pSZcpcxGoN9l5HfjmJGdaYqJGRlk6NtLpOCyUOFWeJ+SJ959IyKF2DJTNeR3wi41RmGcA== 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=Sq3F8iSAsbfvaJGOPu90bQ7c9DosIIx8V46kDhxgEr8=; b=HRoNGMWQ8W/x6lTraF6psuu+NTsfCxc3AR7BAbf/kumayldBqLZI+FUrJ8azSE5FbqEsBCcl3Zk0iaG7FEgsXVsZ9L6+HB/odqDuVem8G+hATMzdVn50UbFYgArsAL2mBxmH7eSooz28XAHYQeMK7q3msDLscOUzSW7wXZXaKsE= 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 SN4PR13MB5312.namprd13.prod.outlook.com (2603:10b6:806:20b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.8; Tue, 5 Jul 2022 07:36:25 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::bd99:64d1:83ec:1b2]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::bd99:64d1:83ec:1b2%7]) with mapi id 15.20.5417.013; Tue, 5 Jul 2022 07:36:25 +0000 From: Simon Horman To: David Miller , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, oss-drivers@corigine.com Subject: [PATCH net-next 1/2] nfp: allow TSO packets with metadata prepended in NFDK path Date: Tue, 5 Jul 2022 08:36:03 +0100 Message-Id: <20220705073604.697491-2-simon.horman@corigine.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220705073604.697491-1-simon.horman@corigine.com> References: <20220705073604.697491-1-simon.horman@corigine.com> X-ClientProxiedBy: LNXP265CA0033.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::21) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d61152be-7525-4fb6-a3c7-08da5e591055 X-MS-TrafficTypeDiagnostic: SN4PR13MB5312:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zAie9/vZD7feFLbUWbW58BuS1t3cFJkWjRIoGqk7fzUaoly+sGpr2XRq7mbarQsSjZnKeXXUeDktN/ebiFa+rHxAODVQ5Oe7n5N4jWNSIRizuuyG8KGR9yEHTWeeBGUl3aKx5iWwStSmzog0gSa5egmwGv95usJXEQqTREoB7IZEt92c/ik4Bmv2kxN4pVBgA5hX8mBN9XqVflFDjnOFTZ6WxHExR9Nuwgg1DKv8rHrBcgkX6euE/0nTfMac5+EGzy8sneTx5PD83gwkP5PR+SKWZ6TMBpUmWFHHC5uyoJWs+U4wt3Wj49ttq53mA3/wVYe7gia+QPby/BVR4C5rs/+tDVPxT7fraWUiM7Zjlg/TU0BqHCOYFYnLfi3cikWvo+YXXml7iT2PvbbiyLecCOB7tzqybk/V1Mv+YTZNIP4jJmvFXUGyn11D2eILIIvF0KvZvN8xATKzGR1qZY6O0D+ptrwR2czg9Dxvo1HuDgObyC15OfBNGTn+oKbHsfIbRsISNfaXApVdKx8ZYvs6pPb0Hak9awpYSGzXcsl/t9H5FarppLZpku9sGW5FA6KWYC7daQYMNilk6oxQw2tmvqhNTXxvPysD8an1LvcCFbgCb1GiN4/k9mowjsrYUfnzmpiy0tCuZGAGQUvFWPMG0K7WFhtF3bkCkA3kMSYo7Rs+7A96rnJMXdaqXvPhsXUXXpywM5r7aAUtVh7yGKlnu18+8ztjS0r4vH/l2sKrq+AedYmQVl7zsy6HW/kk1o29gPRETF/Iaqc/neEOaaNmZDQ9lQH3kH1iQ258KxwKmVZGLOQvKRAXdsaVhOgvnHJuO21MYME5LsoMq7bRQu1YA4tkXAwFwvlJI0xa/im3rc8= 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:(13230016)(4636009)(376002)(346002)(136003)(39840400004)(366004)(396003)(110136005)(83380400001)(44832011)(6486002)(2906002)(86362001)(478600001)(52116002)(1076003)(107886003)(2616005)(186003)(6506007)(36756003)(26005)(38100700002)(66476007)(66556008)(66946007)(38350700002)(6512007)(4326008)(8676002)(316002)(6666004)(8936002)(41300700001)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1SVlJgZcc6DFSE071/7iMYiVfNHyJDQvUln9U9tT4eZKgx9K5qK7B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NvVVfQrw5qKG8V35oA84VpV94Ka/wY/cP/ng8uRIbdVJST3lEYf8wpT4GDL2juk8yxxicpTgmeBWL//t72qceQ5r5cHF11VGff2a5c3Hd8IeaBltzUh5px9SGhhonC01hCEIJ86DJzTDHwqhONrQsqK1Kxhduigh6FXgG3JYdSycF0bvc3BBudAEbh4rLsXq8T+vMnWhLncYa5GbHps/qjTKRdcgHHoS6rSF90gKknAYxliyY0Q0yXOjzdlYOaGSZzOevN4cSCw0w2S3zPEM0EOXihVBE2UckwW8JeUHoOdmapzmRmV9wvTCvZupmgL2dPxX0RDIvJlbUtT7gmF8ypbTDdTb9WATwCUk7fLLoblGtmr/fst5DYjQpkAuUAm/ksNHI9ooIGp0Lz8YIwZDdnuKzLSWN9Hv7Tpx2kb+pVKPL6aTuzi7GIK3XSBXoTJTKTIJ8f7kUJ55HZ3CRCGDo12oTWhCM8esNjeDA== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d61152be-7525-4fb6-a3c7-08da5e591055 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2022 07:36:24.9857 (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: 9LcNOEGC5ieWOnZKSYIBrheYDoAawK9SU0oiOMu9VUK7oOMlzXn9i1ExABIIrpgVSE6Dzc8zz79Oa4zoFX/UpbjCbvQ1voZQw+0/bmEUwS0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR13MB5312 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Yinjun Zhang Packets with metadata prepended can be correctly handled in firmware when TSO is enabled, now remove the error path and related comments. Since there's no existing firmware that uses prepended metadata, no need to add compatibility check here. Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Signed-off-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/nfdk/dp.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfdk/dp.c b/drivers/net/ethernet/netronome/nfp/nfdk/dp.c index 34fe179513bf..0b4f550aa39d 100644 --- a/drivers/net/ethernet/netronome/nfp/nfdk/dp.c +++ b/drivers/net/ethernet/netronome/nfp/nfdk/dp.c @@ -56,17 +56,6 @@ nfp_nfdk_tx_tso(struct nfp_net_r_vector *r_vec, struct nfp_nfdk_tx_buf *txbuf, segs = skb_shinfo(skb)->gso_segs; mss = skb_shinfo(skb)->gso_size & NFDK_DESC_TX_MSS_MASK; - /* Note: TSO of the packet with metadata prepended to skb is not - * supported yet, in which case l3/l4_offset and lso_hdrlen need - * be correctly handled here. - * Concern: - * The driver doesn't have md_bytes easily available at this point. - * The PCI.IN PD ME won't have md_bytes bytes to add to lso_hdrlen, - * so it needs the full length there. The app MEs might prefer - * l3_offset and l4_offset relative to the start of packet data, - * but could probably cope with it being relative to the CTM buf - * data offset. - */ txd.l3_offset = l3_offset; txd.l4_offset = l4_offset; txd.lso_meta_res = 0; @@ -190,12 +179,6 @@ static int nfp_nfdk_prep_port_id(struct sk_buff *skb) if (unlikely(md_dst->type != METADATA_HW_PORT_MUX)) return 0; - /* Note: Unsupported case when TSO a skb with metedata prepended. - * See the comments in `nfp_nfdk_tx_tso` for details. - */ - if (unlikely(md_dst && skb_is_gso(skb))) - return -EOPNOTSUPP; - if (unlikely(skb_cow_head(skb, sizeof(md_dst->u.port_info.port_id)))) return -ENOMEM; From patchwork Tue Jul 5 07:36:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 12906011 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 8D917C433EF for ; Tue, 5 Jul 2022 07:36:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230153AbiGEHge (ORCPT ); Tue, 5 Jul 2022 03:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbiGEHgc (ORCPT ); Tue, 5 Jul 2022 03:36:32 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2117.outbound.protection.outlook.com [40.107.96.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BBF413D1C for ; Tue, 5 Jul 2022 00:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OhTU8YGik40GED8noLeJJ0DMXC54Zxg315VJdcozzNC2vuRncERod9jAlPXpHMLPMRxKnNjC5AsTBhHjIp44hikPn+96Pp8IWqN9QB+zbqVbUTpbsNgmwIdg/2ZeRvWVvXDYqPNPMtVVBs+rCbmffoPiOVsKmqlrYIJt1MhvKgkYdlyPu96+/LyM++nvYRSwwyXZewIY3tgq2EkfjIikrrsYnNwI8fijpR1nFF13h8ZHDSxfm+OdcXeIxr+X98HVh6kmF76UM3THk0SXlz/MHpjgpXFKcKsMBZqtQvlPEsav2baNf2kT3/qs/+ncMFNmw2qK0toT7YihO4LfMo/ILg== 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=vKjjDikefbCYq9kOB+YC2sAUtnBytK2a3GQaQqsjTBg=; b=ZBy2HbmMWt9vlAVbkPpcPukRjAYahsPzLNYJC3kAi/YMLWBO8+tT4C2cC52QM1+CvvRkf7gTMBqirv8EL+qhARPK/EYNyFFMflGzVl8EDQI128dVJm+hZO2jTbtzS23RbbmUc05bigGBj3uhL65uwEMb5sCEPl0RXbt+eem6aXIpr+2pMA8Zt+a2DlyZtSHw9bMUpMyOGkxpCTMmFRiQgPrZZRew5t4KdGQtJOfa+ZVCul4B2YnVDRJo4bD8b2jNg4HB3rcaajUAqCoyGUj9zCVN/1vcs/58DZwnAMIx+vdUHRaRhkCnN5iFDZlpWl2KlaPgnSC969PgZ8X2nlvmCQ== 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=vKjjDikefbCYq9kOB+YC2sAUtnBytK2a3GQaQqsjTBg=; b=rbmbRUGAB339msPMEzQNxnWYxMh+VcZph1s+EZNCjyHayqt349bb/zOuwOIGx+TalByH6plVwZyLz3SqTsSS+C2AzzoLK5laO6+ViVNJbJxgwfGIJXvo9AsuKtNwsSKNIv6k+NJ0gfgiL7gt1jy6WoHRSubZDyLDodn3hv3JYGw= 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 SN4PR13MB5312.namprd13.prod.outlook.com (2603:10b6:806:20b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.8; Tue, 5 Jul 2022 07:36:27 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::bd99:64d1:83ec:1b2]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::bd99:64d1:83ec:1b2%7]) with mapi id 15.20.5417.013; Tue, 5 Jul 2022 07:36:27 +0000 From: Simon Horman To: David Miller , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, oss-drivers@corigine.com Subject: [PATCH net-next 2/2] nfp: enable TSO by default for nfp netdev Date: Tue, 5 Jul 2022 08:36:04 +0100 Message-Id: <20220705073604.697491-3-simon.horman@corigine.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220705073604.697491-1-simon.horman@corigine.com> References: <20220705073604.697491-1-simon.horman@corigine.com> X-ClientProxiedBy: LNXP265CA0033.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::21) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b790fc82-3229-4968-0195-08da5e5911b9 X-MS-TrafficTypeDiagnostic: SN4PR13MB5312:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Krr08EKBTDX1Vu0EkcFtanwHu05stoNtlHPT8MlR1CSB/B/32PZ+7iU0RLmvcvj7oZLx1GRmjUTs3/tYzIpYcYOfLM05sFA1ZPG+RJ1jmEfLhO9/erIrS5RYVuuwlxQEhZeDQGppzPaFRVT/AMyoz83DSTUah3bgEBm+v53Vy0n+aNngkymFTfStAYTqVciudgVayKEnYReHTfPYMo9328enG22ngtlFWnRFGiccBzVeXwyHu0DAdRvuqwoTCallbj6vFHppvOBRm6BRo47XShCa3nbehLaAQraZEAWJaPEER+1okewidEMz/T/an1vc0MJzvg3YHceV3n1ye/vrf0rOdA09xrP3CJWssdfwqwASiNvZnDJrl3EEwV2XduyLE19dDyZxRI6rEhqVXHvmfGwUyxuUYhYtBUNo1cb1uDLm9jyv2FXyx5YNDEtG3kzFtxnz253pB5ACQjDwmDA1Rh/qDCmvbNLuEO20jNOL92E6zGo5s6nROk+AM5gou5NlKGGkMXGCZhBiTi4JUevP/46QrBCdGVhYYkS+WCuCFV924sVF0OiKh7gGETibJ4eE0Y9voF4SDukP6q7oM38Yb6+Or15IvD4rQ+JFNthmIvtDbERXPKLcicMXOdv9m8y98PZpTL9Yt+WVlv6sECVctPWR3Nox8rUWZKWE0BHelRWv1iYthliq3nylz1i5dQTor9ns3DrSV3gTsJ5MCYTMYVIC99KNW8n/s9ag72RrycS1Bhralu9zl4uMjbWZdHuLUxZaWy4dp5SNjny5adpwgVLq7iVYpqDdhYYtaPMoyhoM6F804RyYUzyCPrmb9YXE4GupK2pGay2cN0e82HhROqqVQnA+VJKNwD6EPDOkEDo= 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:(13230016)(4636009)(376002)(346002)(136003)(39840400004)(366004)(396003)(110136005)(83380400001)(44832011)(6486002)(2906002)(86362001)(478600001)(52116002)(1076003)(107886003)(2616005)(186003)(6506007)(36756003)(26005)(38100700002)(66476007)(66556008)(66946007)(38350700002)(6512007)(4326008)(8676002)(316002)(6666004)(8936002)(41300700001)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GKX00O4WhDxoUg+yM8Js0MbiupOa6/7N0vLbV3UW3YXMHmXYZ8wsVG3kU02r+ErZokk3z7JmoG7WGKB8ddE0Lagf3lb3zyQLiHOXeL4sSjMCr5suyJqPIDSgDfTb5yZPVq+PbYEAmRrhmWHHaVv2rKdE770PN7B7K7p6Pmnd9lVZXGy9LOaKPvyTJ6mf+wnF6Y2J52Ara2P3WcOOVNMzduPY/dkySCYSpeSxcaR4tG6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PVjuRYwWAr8h3LWHLj/RZU4GHr/8RUGhDsdjD5luUtDKZ5ugX9BwZlWg1+KhXx1erHXilIdywxf5sCDBM49TzauQ0lCv9g++Iiu8BfYVkUjZ5ZzWSfzGnT8K1BIiRFo9z0YEIioUSalsG5po+I7Ses8CZeM57C3aLkjcDV5uvj4i45iCA2D3h3il+Y00U1wsrr4nhZc5yAvRd0NTXJW4tChUdDb7ZGsQ8vSBZ2vy5qXPhkUaWBOnpsJxfpIu3PveSaShX0Wh5bveNh8nhHpQrydBadM5dEFxAuyip9ZzuRsOWgYPSN8oh9kA== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: b790fc82-3229-4968-0195-08da5e5911b9 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2022 07:36:27.1752 (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: QVZxMN3UmJv6Gy4CU9HH7acfZUXrqNVbvPs6hy65s0FhClx3qlbS8WCau378SxjPbkSCfUrVZYIU2/u0L2Z4PXWiVon/rHATFRt/vD16RG4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR13MB5312 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org We can benefit from TSO when the host CPU is not powerful enough, so enable it by default now. Signed-off-by: Yinjun Zhang Reviewed-by: Louis Peens Signed-off-by: Simon Horman --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 +++---- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index d4b4966d6e29..c5c3a4aac788 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -2420,12 +2420,11 @@ static void nfp_net_netdev_init(struct nfp_net *nn) if (nfp_app_has_tc(nn->app) && nn->port) netdev->hw_features |= NETIF_F_HW_TC; - /* Advertise but disable TSO by default. - * C-Tag strip and S-Tag strip can't be supported simultaneously, + /* C-Tag strip and S-Tag strip can't be supported simultaneously, * so enable C-Tag strip and disable S-Tag strip by default. */ - netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_HW_VLAN_STAG_RX); - nn->dp.ctrl &= ~(NFP_NET_CFG_CTRL_LSO_ANY | NFP_NET_CFG_CTRL_RXQINQ); + netdev->features &= ~NETIF_F_HW_VLAN_STAG_RX; + nn->dp.ctrl &= ~NFP_NET_CFG_CTRL_RXQINQ; /* Finalise the netdev setup */ switch (nn->dp.ops->version) { diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c index 8ea4d8b55750..8b77582bdfa0 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c @@ -380,11 +380,10 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev, netdev->features = netdev->hw_features; - /* Advertise but disable TSO by default. - * C-Tag strip and S-Tag strip can't be supported simultaneously, + /* C-Tag strip and S-Tag strip can't be supported simultaneously, * so enable C-Tag strip and disable S-Tag strip by default. */ - netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_HW_VLAN_STAG_RX); + netdev->features &= ~NETIF_F_HW_VLAN_STAG_RX; netif_set_tso_max_segs(netdev, NFP_NET_LSO_MAX_SEGS); netdev->priv_flags |= IFF_NO_QUEUE | IFF_DISABLE_NETPOLL;