From patchwork Fri Oct 27 12:16:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinas Rasheed X-Patchwork-Id: 158919 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp557491vqb; Fri, 27 Oct 2023 05:17:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTZPgviWF/pcyherIgkzf34AcP2RMEXlYz+CwWLgoHKRD5F3Xd2TBvyozr4q7S0ZhYpXGK X-Received: by 2002:a81:b723:0:b0:5a7:e4d9:f091 with SMTP id v35-20020a81b723000000b005a7e4d9f091mr2157712ywh.25.1698409063264; Fri, 27 Oct 2023 05:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698409063; cv=none; d=google.com; s=arc-20160816; b=nYPmsq3me8+W+rFu+Aw+wjOpxTrKBejrc6gaOW/8u+u2FIJdG/ngQ+lqyyG5Fu+MVA dQVmWUCl0u1s47UelJ2x64LdFGKrOi5C5+LA9dyUXuMiJJolAGPtw3J9Ig202BPW1hQp hhoroBUW6oeL2trwmecmdSptmN6T5Oty9bAlt27vBepJWFGQda9TuGwBwYrJxZwgKX/N A09MzSBiNRL1Unk82pbD+l3ATRI7Yx7hYXlWmAGOy6yNxrp3+P+OwLXnJF2k/19GPfkh yifDzPjcop3kC+UP0QTi1n8NmloghN3yCoRt7xSjECD4h1AnDLKLSENODNqs9RNvkRZP DnOg== 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=jlQE7Trx+hL863FAcvrhiexDmPgZBBetpSLGPvFjgj9dieYMNF7DR0ZGwhyJop+965 R00XGW1QzfONu3awGih0NXe8rrClNyPy7pGzsOgbWrWIKOo/FcKS7Y1a0fW8168fAno9 M1T9WFhksa1kLgZ3juI2VyRviCjwANQRaYJOiNJLShY7CNYpTnoyEBIPQa1gaIfYtl0O Ek97yT+oBoZxQlbY/8AIAead5vsviGdl+UBLdxbSO/zL5V+xnrGcQrjvH+0JsiT2P2kt eWxBFakR4gH/MJp9FkwkqXOsABEpRTpTQ9t62hl/KaSWhm09jqnM2552ZABhyJ+mhlkK ACow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=ERFzmM95; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id m203-20020a0dcad4000000b005a1ffa137easi2129363ywd.319.2023.10.27.05.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 05:17:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=ERFzmM95; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id A85768456519; Fri, 27 Oct 2023 05:17:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345823AbjJ0MRH (ORCPT + 25 others); Fri, 27 Oct 2023 08:17:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345802AbjJ0MRF (ORCPT ); Fri, 27 Oct 2023 08:17:05 -0400 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5B0EC0; Fri, 27 Oct 2023 05:17:03 -0700 (PDT) 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 39R5TnXB012400; Fri, 27 Oct 2023 05:16:57 -0700 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=ERFzmM95gEeY82VS4DxohelNb97pXld4kfoPOxb11uVV1myYkkaFKA4aS7mPh7s6KV9d EXGBX9wtBA7KT5XNrxCxRc8nbZhvBv/UmK4nbyIoL3PAtl715wVCJzS9cvjzm8e2SSAS kbyRmLdrWN5MstcVGDLETlfL0lt9oRy0YQFiMOwxl811K7mjfquCkEaSnKMdQR7ZWrE4 iFXO75vdZiK7YjaLBdFD88K5tHsL9RqddaI0rzcg/RuBBrFi+bzaTi5xeGBrog0o25xY skC7I7b43lWIMyilleCSMmmankLTh1zfK48vt8VxdsYFvQeBtwQ1//bN1LjSy2w4I8xX lQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tywr83b33-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 27 Oct 2023 05:16:57 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 27 Oct 2023 05:16:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Fri, 27 Oct 2023 05:16:56 -0700 Received: from ubuntu-PowerEdge-T110-II.sclab.marvell.com (unknown [10.106.27.86]) by maili.marvell.com (Postfix) with ESMTP id E71B03F7050; Fri, 27 Oct 2023 05:16:55 -0700 (PDT) From: Shinas Rasheed To: , CC: , , , , , , , , , , Shinas Rasheed , "Veerasenareddy Burru" , Sathesh Edara , Eric Dumazet Subject: [PATCH net-next v3 2/4] octeon_ep: remove dma sync in trasmit path Date: Fri, 27 Oct 2023 05:16:37 -0700 Message-ID: <20231027121639.2382565-3-srasheed@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231027121639.2382565-1-srasheed@marvell.com> References: <20231027121639.2382565-1-srasheed@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 1-PWzt5bDtpitJb4IAJ7x93ZNFmBZOYr X-Proofpoint-ORIG-GUID: 1-PWzt5bDtpitJb4IAJ7x93ZNFmBZOYr 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-10-27_10,2023-10-27_01,2023-05-22_02 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Fri, 27 Oct 2023 05:17:39 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780910981564580812 X-GMAIL-MSGID: 1780910981564580812 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; }