From patchwork Thu Aug 5 14:55:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 12421377 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=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 5B922C4320A for ; Thu, 5 Aug 2021 14:56:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CE7E60EE5 for ; Thu, 5 Aug 2021 14:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241095AbhHEO4Q (ORCPT ); Thu, 5 Aug 2021 10:56:16 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:32980 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234937AbhHEO4P (ORCPT ); Thu, 5 Aug 2021 10:56:15 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 175EtwXZ056394; Thu, 5 Aug 2021 09:55:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1628175358; bh=Y9s9Dxf07rGEfmpOV135yFoMO3k/L0SryHWgyobHw5M=; h=From:To:CC:Subject:Date; b=kwZG7KsT2ZRP+iWLonx/+QXZYCgSl7jgkAkVCpCAGRiO5t8ZVQ65fm/EL058765g+ FvP/WaNxUuMRW1TMhPejFjkD6kc5GO+T7f0whckTR/OntBvL3L/RUieLzu8iV3g3Gm cN7GXFTL6GMQnBgFL3l76dXzXJ1yMHE7TYRsdF5Q= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 175Etw5T100857 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 5 Aug 2021 09:55:58 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 5 Aug 2021 09:55:58 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Thu, 5 Aug 2021 09:55:58 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 175Etvvq006718; Thu, 5 Aug 2021 09:55:57 -0500 From: Grygorii Strashko To: "David S. Miller" , , Jakub Kicinski CC: , Ben Hutchings , Vignesh Raghavendra , , Lokesh Vutla , Grygorii Strashko Subject: [PATCH net-next 0/3] net: ethernet: ti: cpsw/emac: switch to use skb_put_padto() Date: Thu, 5 Aug 2021 17:55:52 +0300 Message-ID: <20210805145555.12182-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org hi Now frame padding in TI TI CPSW/EMAC is implemented in a bit of entangled way as frame SKB padded in drivers (without skb->len) while frame length fixed in CPDMA. Things became even more confusing hence CPSW switcdev driver need to perform min TX frame length correction in switch mode [1]. To avoid further confusion, make xmit path more clear and linear, and avoid updating CPDMA configuration interface for min TX frame length correction (which is not CPDMA job in general) this series switches TI CPSW/EMAC drivers to skb_put_padto() instead of skb_padto() in their xmit path, so skb->len also got updated properly and then removes TX frame length fixup from CPDMA code. [1] https://patchwork.kernel.org/project/netdevbpf/patch/20210611132732.10690-1-grygorii.strashko@ti.com/ Grygorii Strashko (3): net: ethernet: ti: cpsw: switch to use skb_put_padto() net: ethernet: ti: davinci_emac: switch to use skb_put_padto() net: ethernet: ti: davinci_cpdma: drop frame padding drivers/net/ethernet/ti/cpsw.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 1 - drivers/net/ethernet/ti/davinci_cpdma.c | 5 ----- drivers/net/ethernet/ti/davinci_cpdma.h | 1 - drivers/net/ethernet/ti/davinci_emac.c | 3 +-- 5 files changed, 2 insertions(+), 10 deletions(-)