Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1750451pxk; Fri, 2 Oct 2020 19:10:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCIC1mZOOwfvI4iDu4y/SBPGVuf3yhREBoP1t3fpB1OmrXXIdxYAf6bvjvuFAO1zi1P1y/ X-Received: by 2002:a17:906:e103:: with SMTP id gj3mr4638299ejb.130.1601691048201; Fri, 02 Oct 2020 19:10:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601691048; cv=none; d=google.com; s=arc-20160816; b=qdSwLekeC3+2izzxrDPaECtlyl+v7g2B8Bqbr5lzGl+4rT07zcb2DvkQX9CFO4Jkvz ETfLNjtKGCIFX71ljpQfREiOFLnPZpXHW/RssQIsaKvGlvteNTrXKenzQGr/7iMQA87k 5TmAjUsFabZc+GcCuNG7rUwnYIniI3wRCkdbzrlgM88RQ2lTXZlKffUzK0ZVFsTtYLVy wdrF6k3iSy/iLf7Tj1fqPF+njfcvCik9IXeCebH/M49TK6451Sgqh+K8yuXILKywUTJC YHFU8TAYAFQzB07eIFBJxZuTNeNvKAEMMNUgN/h5THrJQVzazXWnnojqoYBM3G2hQiwH 735A== 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:from:subject:cc:to:message-id:date; bh=9OQiPgNiUOIYdhNOonfDFrIQLNOeNIX05ch9+bshcK4=; b=CR+CX0zmK1uApCWR6vCdPIAow+SfnWVGPb/3B5cSQy9I++CGC4LL9Lg8OOrB82O8w8 okePDDxp3suWiBmDyM6B88xA8HWc7xUr4vFjzi1CEO9eX7r8Xco+VgUIhXcROxsjaNtl i6R3W63+yl5cNvqgvP2l6HUDX4S0SNUrl8HCCOKiZgy6YToj0GEgpPk+sykr/BbmsKTA VTgbrf4FSvn2MirCQCMElmIIIsV898iWlqjC/JmuE1seqhuG8HrhbTBAYgv0UBO2xt2M mdQgIUsrBsC1+G827BHTj81v3gnCGX59ii7oT8eVzaXKfbfFMr3mY/IXl4+dI7whPUFL PZuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx3si2471723ejb.306.2020.10.02.19.10.26; Fri, 02 Oct 2020 19:10:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725820AbgJCCJd (ORCPT + 99 others); Fri, 2 Oct 2020 22:09:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbgJCCJc (ORCPT ); Fri, 2 Oct 2020 22:09:32 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7035C0613D0; Fri, 2 Oct 2020 19:09:32 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 4BCD9126298D1; Fri, 2 Oct 2020 18:52:44 -0700 (PDT) Date: Fri, 02 Oct 2020 19:09:31 -0700 (PDT) Message-Id: <20201002.190931.2160541172091214230.davem@davemloft.net> To: grygorii.strashko@ti.com Cc: netdev@vger.kernel.org, kuba@kernel.org, vigneshr@ti.com, nsekhar@ti.com, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, m-karicheri2@ti.com Subject: Re: [PATCH net-next 7/8] net: ethernet: ti: am65-cpsw: prepare xmit/rx path for multi-port devices in mac-only mode From: David Miller In-Reply-To: <20201001105258.2139-8-grygorii.strashko@ti.com> References: <20201001105258.2139-1-grygorii.strashko@ti.com> <20201001105258.2139-8-grygorii.strashko@ti.com> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [2620:137:e000::1:9]); Fri, 02 Oct 2020 18:52:44 -0700 (PDT) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Grygorii Strashko Date: Thu, 1 Oct 2020 13:52:57 +0300 > This patch adds multi-port support to TI AM65x CPSW driver xmit/rx path in > preparation for adding support for multi-port devices, like Main CPSW0 on > K3 J721E SoC or future CPSW3g on K3 AM64x SoC. > Hence DMA channels are common/shared for all ext Ports and the RX/TX NAPI > and DMA processing going to be assigned to first netdev this patch: > - ensures all RX descriptors fields are initialized; > - adds synchronization for TX DMA push/pop operation (locking) as > Networking core is not enough any more; > - updates TX bql processing for every packet in > am65_cpsw_nuss_tx_compl_packets() as every completed TX skb can have > different ndev assigned (come from different netdevs). > > Signed-off-by: Grygorii Strashko This locking is unnecessary in single-port non-shared DMA situations and therefore will impose unnecessary performance loss for basically all existing supported setups. Please do this another way. In fact, I would encourage you to find a way to avoid the new atomic operations even in multi-port configurations. Thank you.