Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1183001iob; Wed, 4 May 2022 16:50:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzQhVSUYdD8XG4iMK59WnoquAPN+JyrizMyUgBuuvNERUS7+jeKemIeaf2w9c3LkU/gkFh X-Received: by 2002:a05:6402:ea8:b0:41d:78ca:b929 with SMTP id h40-20020a0564020ea800b0041d78cab929mr26187494eda.289.1651708232020; Wed, 04 May 2022 16:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651708232; cv=none; d=google.com; s=arc-20160816; b=FB7s++1RyWP1TlHikEbuOvGt/x609iJ4rIpT2UYu7HWmuLaRLNj5G7iCtD+tZgpxRQ Jf1Kt6IJdxARqsVwn9/plxjLENtlX7tlgIR7Q9a3lELMuRbW5OO5utdjN1B1PRD89zv6 048X14krmat1hUIz62AOquEQUxaqNWuzP7zzVhPwrsmDgJl7bANsZppX1Rbd0mljSWf4 BBfChoE2oink0KP8znEbdSFPfjySF3u4wuZPrGwkQwstp6IZZ3p7t9Gbz0/lKp9UbZPW qpHYXTl2YC7VpwtetYnaqBfc3BE4wRLuODrc3F6cJ8LICQcnTCA0VXGLW8z5Ee+M18EW APlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jAtIzuF0Y1quxNrQnTMSCLxgK2zmAiRtppXzlOy/DTY=; b=b7lfF3oz8+lgzyboBG2LRaMX5klIRIQiy5qRgAocr0/30CMpk6+TKq/jvtXUF60xVV 505yk2m6/L9X+d2KUZAT1CsHlrCHNqnbggOnKBft4QXFO1SLoesdw1Qfx4cdzhTubJ+P YbGI1Izwp5hC3VJ2bYUrOUSHnU+PJMyJUdk5XUKbFtSPxSMTVDUpri2841ODQM+SlEL0 TJanRaHlDR9F3raFIcKQrqihQ7ms201L97ymtyLBbKeEMAPBfrZR8z1P2tGHxgyAYHgH uuBmccUdwm7CWIYHNOR7p1rqUGYdLNxPpYWuEOZrbot/xV5oI3+Hk0I9xYXqvDRC1V6V UhKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uCGEuWHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n26-20020aa7c45a000000b00425cd11d846si158914edr.112.2022.05.04.16.50.09; Wed, 04 May 2022 16:50:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uCGEuWHZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359374AbiEDRtF (ORCPT + 99 others); Wed, 4 May 2022 13:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357552AbiEDRPG (ORCPT ); Wed, 4 May 2022 13:15:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E535C55201; Wed, 4 May 2022 09:58:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CE298B827A5; Wed, 4 May 2022 16:58:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E099C385A5; Wed, 4 May 2022 16:58:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683495; bh=34yqrLUrOLP4CJ6yBqeL5xAplowQx5MqJmelcFAmDbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uCGEuWHZCeyqZ/+u1uB3aCdbEFG8+I6oIVxSk7nDqX7+6M3+VmuaEcHcQ5gxjOefJ MLKpm6fntya7HFVlbRZEeCOf2rPo6HXeN4fs/GHUnjJNfaRhbBLU2bbIM4R/wsxN/S 5nf2BgXAwn2xWsxLaN1FIH+QDgjunCdSll3uG4o8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.17 153/225] net: enetc: allow tc-etf offload even with NETIF_F_CSUM_MASK Date: Wed, 4 May 2022 18:46:31 +0200 Message-Id: <20220504153123.731449210@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153110.096069935@linuxfoundation.org> References: <20220504153110.096069935@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean [ Upstream commit 66a2f5ef68faaf950746747d790a0c95f7ec96d2 ] The Time-Specified Departure feature is indeed mutually exclusive with TX IP checksumming in ENETC, but TX checksumming in itself is broken and was removed from this driver in commit 82728b91f124 ("enetc: Remove Tx checksumming offload code"). The blamed commit declared NETIF_F_HW_CSUM in dev->features to comply with software TSO's expectations, and still did the checksumming in software by calling skb_checksum_help(). So there isn't any restriction for the Time-Specified Departure feature. However, enetc_setup_tc_txtime() doesn't understand that, and blindly looks for NETIF_F_CSUM_MASK. Instead of checking for things which can literally never happen in the current code base, just remove the check and let the driver offload tc-etf qdiscs. Fixes: acede3c5dad5 ("net: enetc: declare NETIF_F_HW_CSUM and do it in software") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220427203017.1291634-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/enetc/enetc_qos.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_qos.c b/drivers/net/ethernet/freescale/enetc/enetc_qos.c index d3d7172e0fcc..3b148d4e0f0c 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_qos.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_qos.c @@ -308,10 +308,6 @@ int enetc_setup_tc_txtime(struct net_device *ndev, void *type_data) if (tc < 0 || tc >= priv->num_tx_rings) return -EINVAL; - /* Do not support TXSTART and TX CSUM offload simutaniously */ - if (ndev->features & NETIF_F_CSUM_MASK) - return -EBUSY; - /* TSD and Qbv are mutually exclusive in hardware */ if (enetc_rd(&priv->si->hw, ENETC_QBV_PTGCR_OFFSET) & ENETC_QBV_TGE) return -EBUSY; -- 2.35.1