From patchwork Tue Nov 14 13:45:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinas Rasheed X-Patchwork-Id: 164908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1867333vqg; Tue, 14 Nov 2023 05:47:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IE188UEmipnqO16ZETdVqePc5qxOPWSUQqiTyp1T7DxE59Im3OrXp1AabViH/8qw28VK11U X-Received: by 2002:a05:6808:4442:b0:3b2:e3d0:863f with SMTP id ep2-20020a056808444200b003b2e3d0863fmr9815159oib.13.1699969633879; Tue, 14 Nov 2023 05:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699969633; cv=none; d=google.com; s=arc-20160816; b=DCGE77vQ5BkacUkCgfCFY5AFK/FdzAautlihS8xos2dI7JFBja8B6w+Rgaabke2a1J jftt9EIqa14Yk4AqbtmcIu8hdRkLPPFC4jNkBxwBA1roV5EUw9yPVAf5qiJjQAq4Jmq9 pIqbey70wzYRIn3Mq0boqTKdN2+X0kTn1uKWpSQ+FSYLmkkdyoSYEYGubso6VbyPg97C u0ZTsvGZXkv6MxazTVJm894zgz81KNEs9LZv4807xZ86ngq812Rfc04+0CHCxjRYa/zi UdKFb+Cdlxx7oUIQmabX7D/JtfkOKRdd4NFwXnaeojoM8jjbppt4GoHpN/nXM+wNq7KD JPeg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fSqhxtS/1AmnssqhTQOzpYaNfkzU3t8Jj5QZNarTP9M=; fh=PUbSZjf2dtyqulLdd5rISVghnntgSGxvYpWMBobeHB0=; b=O64LU1VsxyikEmBlB/npRO0ptffniSgUb+mTTQErg0nOfIwuy5NbY1zDbrfbYpLUmU qZJvXIMLl/eGTrfIxvDefkX4YRHWf55bzj2sXmoK65Q6W1uikyTIIj/ZZKbCNhRIuLQD d3ebtawnf+esG8X70vqci85ZY/J3WS0xG5F/pFUGaOhsRPPdI+cUR1l44jePzVUXbZb/ nDlx2zVd+7FmvsyaskrXccOWQDbGZeB1NY3EJsKaMx5uBl+6lg8nJJYwdUPt+rOSx3V0 Q+deozmaxTUz8fO0HBPNaB3ncv7h63ApcnCJPv8H8F7zC6rb/nlLO88YdJz06XQ2zybZ 3S6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="ZG4jR/hY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w123-20020a636281000000b005bdf5961e67si8191356pgb.639.2023.11.14.05.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 05:47:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b="ZG4jR/hY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1E5B98069F10; Tue, 14 Nov 2023 05:46:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233294AbjKNNqH (ORCPT + 29 others); Tue, 14 Nov 2023 08:46:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233237AbjKNNp7 (ORCPT ); Tue, 14 Nov 2023 08:45:59 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CDBC1BC; Tue, 14 Nov 2023 05:45:56 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AE84a2l017584; Tue, 14 Nov 2023 05:45:44 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=fSqhxtS/1AmnssqhTQOzpYaNfkzU3t8Jj5QZNarTP9M=; b=ZG4jR/hYjx+YNWsKoemHf9jzllhG/ehzG6u5xMymx1QBdo+84Z5/ArZSsZM1E5BhbcWf tnjWwMRqEuFDl/gDYm9ZcyjJm2DG2mouAf4djqTpY+dncA2n9tBMaf6ozKHSU4dJPhkh VwwaYOIqxJA/EWUc6wTQbiI9R6mqAz/Jxxyn3Vbb2gi0/PnJdPuLndyl+F0M5uLRjQiU aIaJfAPMYlkCi4yA+pmsHfMCyhLspu3hU9/UmRBkq9fvRxENmZ80FVcaGPlulgGe24vj OcsSbm72eeEA28CbVnDZprPnrWObm75xXaKL4V6AekWdHN0rVKZODgLglK6PEGemQI5e jg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3uc52eh2gb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 14 Nov 2023 05:45:44 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 14 Nov 2023 05:45:43 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 14 Nov 2023 05:45:43 -0800 Received: from ubuntu-PowerEdge-T110-II.sclab.marvell.com (unknown [10.106.27.86]) by maili.marvell.com (Postfix) with ESMTP id 911B73F7055; Tue, 14 Nov 2023 05:45:42 -0800 (PST) From: Shinas Rasheed To: , CC: , , , , , , , , , , Shinas Rasheed , "Veerasenareddy Burru" , Sathesh Edara , Eric Dumazet Subject: [PATCH net-next v3 RESEND 2/4] octeon_ep: remove dma sync in trasmit path Date: Tue, 14 Nov 2023 05:45:33 -0800 Message-ID: <20231114134535.2455051-3-srasheed@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231114134535.2455051-1-srasheed@marvell.com> References: <20231114134535.2455051-1-srasheed@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: uxXA49tBbC49GUy1NidEsVXOjcvv0rVh X-Proofpoint-ORIG-GUID: uxXA49tBbC49GUy1NidEsVXOjcvv0rVh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-14_13,2023-11-09_01,2023-05-22_02 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 14 Nov 2023 05:46:17 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782547358882758814 X-GMAIL-MSGID: 1782547358882758814 Cleanup dma sync calls for scatter gather mappings, since they are coherent allocations and do not need explicit sync to be called. Signed-off-by: Shinas Rasheed --- V3: - No changes. V2: https://lore.kernel.org/all/20231024145119.2366588-3-srasheed@marvell.com/ - Provided more details in changelog V1: https://lore.kernel.org/all/20231023114449.2362147-2-srasheed@marvell.com/ drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c index 2c86b911a380..1c02304677c9 100644 --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c @@ -872,9 +872,6 @@ static netdev_tx_t octep_start_xmit(struct sk_buff *skb, if (dma_mapping_error(iq->dev, dma)) goto dma_map_err; - dma_sync_single_for_cpu(iq->dev, tx_buffer->sglist_dma, - OCTEP_SGLIST_SIZE_PER_PKT, - DMA_TO_DEVICE); memset(sglist, 0, OCTEP_SGLIST_SIZE_PER_PKT); sglist[0].len[3] = len; sglist[0].dma_ptr[0] = dma; @@ -894,10 +891,6 @@ static netdev_tx_t octep_start_xmit(struct sk_buff *skb, frag++; si++; } - dma_sync_single_for_device(iq->dev, tx_buffer->sglist_dma, - OCTEP_SGLIST_SIZE_PER_PKT, - DMA_TO_DEVICE); - hw_desc->dptr = tx_buffer->sglist_dma; }