From patchwork Tue Oct 24 14:51:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinas Rasheed X-Patchwork-Id: 157539 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1996602vqx; Tue, 24 Oct 2023 07:52:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9sRGAT+HUTSiVBbgLVOjaLHmlnSB367vps+aPeNfrObfcDp7kbYDQ44P0yU0/BNrNLm3H X-Received: by 2002:a05:6a00:990:b0:690:c887:8cd8 with SMTP id u16-20020a056a00099000b00690c8878cd8mr11532906pfg.32.1698159139675; Tue, 24 Oct 2023 07:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698159139; cv=none; d=google.com; s=arc-20160816; b=hR0GQi0mruRRTadtHPovQQlfk+m4jEk9mVnwlskD+0ULTns6otPz4UHIL1Q4NHasyP xmszF5SL9HqjoUDb5SsNYOnxwdTKUDTTgFVu8YyB7JY8rSXlH5bGjfNrbFJMNzcRNif3 J3ugXmErK/ME1yY9iyzKBrU/avYWCeBENTExCTGH4CIobK4mgf9s71uKid4u1psxIR7R OEkoyRjkv3C1980DM5yHRZQAd/Vo/vFj5MVrFRINHttgiIC486n9ikaxmanSzBAqqrsv fv60BWPIYx1+Rdra8i1CUNre6csVd6K77m+6hpFBOxsjdmp7hf+lksUFIxX2ftzgksON 4xTA== 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=Ndvh1aB9dthejQfO+oYbkTOouX5yYrdETKaSV5RkMPU=; fh=PUbSZjf2dtyqulLdd5rISVghnntgSGxvYpWMBobeHB0=; b=g9NtT0wVSCev57KInUtaKBL1HJ91RCEkfgZF2IGGSVCPaE8hi2RbGujJveK7VV5ZpE GxBoRpwQ5Pr/6E2L4nkO0qtyN2sSDKu4XIbFaHN00SFCT3RQQI8gzY9Pbq7fUTsSUtp/ TPgH/lVvJFWMvjDcRxf7HxHarwgrk7yrdZv+VY2edLc4sjr4AvKVQCDhaILB5uJzhNlm ESvJg4Xj5TUlDObN3Yp46JqyHTb35eFSz5J+L7obhmMh4cfyt56KkZR54kTVObLMKX/H XOIdXR5OyPqdnPZPG7enp6Vl93r3ZvRZLDFY5TqozpBd7ifnIvD+D2u2QrA6Ue5FZAdO RwSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=UyDzgSc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id fj1-20020a056a003a0100b006b6424d826asi8544486pfb.16.2023.10.24.07.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 07:52:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=UyDzgSc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 634178062BA5; Tue, 24 Oct 2023 07:52:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343706AbjJXOwG (ORCPT + 26 others); Tue, 24 Oct 2023 10:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343700AbjJXOv4 (ORCPT ); Tue, 24 Oct 2023 10:51:56 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 596F01700; Tue, 24 Oct 2023 07:51:53 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39OBAkUY025366; Tue, 24 Oct 2023 07:51:39 -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=Ndvh1aB9dthejQfO+oYbkTOouX5yYrdETKaSV5RkMPU=; b=UyDzgSc6p0xaVaSCnpvsnz5mOmOovIMsyXUVVGz28+wm0O9IsbIlcEDbvXO8fPNC1dV9 uS/+JCbfQiMbqX8KjsAZAB4uhhd1onn/mzgwnpw7vALauX/sKIbNaCTq/MkHvaW5sfwn 2WtyToSdBNCdqfqR3F4zafXVU+LKTCwHbUUii0fCQed6SXFzsjXPl5koaYmHVY4yAeV4 k3iP6lp8Ar8IcRDmZGneueg7/L4xZ2WkxMfTMFDwMyCjN5rnBsV62M5u2ZBPqJrf4gi9 oFLydCVQtjO5NFzTOq7PdaByGk8ZY50b54x6Nx3w5RmGtTmI9JF1K6FpeOgd2RJ6tClb wA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3txcsqrucf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 07:51:39 -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; Tue, 24 Oct 2023 07:51:37 -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; Tue, 24 Oct 2023 07:51:37 -0700 Received: from ubuntu-PowerEdge-T110-II.sclab.marvell.com (unknown [10.106.27.86]) by maili.marvell.com (Postfix) with ESMTP id E71CA3F704B; Tue, 24 Oct 2023 07:51:36 -0700 (PDT) From: Shinas Rasheed To: , CC: , , , , , , , , , , Shinas Rasheed , "Veerasenareddy Burru" , Sathesh Edara , Eric Dumazet Subject: [PATCH net-next v2 2/4] octeon_ep: remove dma sync in trasmit path Date: Tue, 24 Oct 2023 07:51:17 -0700 Message-ID: <20231024145119.2366588-3-srasheed@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231024145119.2366588-1-srasheed@marvell.com> References: <20231024145119.2366588-1-srasheed@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: x2E5YogpK_8XHeYHQOcOWUwZohY8Zp6t X-Proofpoint-GUID: x2E5YogpK_8XHeYHQOcOWUwZohY8Zp6t X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-24_14,2023-10-24_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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 07:52:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780648918096098922 X-GMAIL-MSGID: 1780648918096098922 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 --- V2: - 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; }