From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08256C433EF for ; Thu, 5 May 2022 23:51:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K0X5uXXdV28Iab8brlotxK2z8Y9tgmbUYWchL0hxcxQ=; b=XKi3cMUSV5v96y 5agSwysr17LDxHSEG5xWcDpMz3x4fAYy0IQ1kzoR3mrv5pG/J/CTqciWsvf7dwqNj0pYMu0Ebfg8b 7Lkskkjr+aB2xCBNbofvXx9Q5SouLDxHZjhoadalAXv7zSqeqYAiav5o1Lqdf+OOnQmWpb1qmKs8M Nyyvg9VXCwjiuGuhPh4hBYpnF4TkDaFKTVON7F05aPmm0FhPr1CIzmQxv5uyklyOgvzpMQKVofQ6O qcNaM5QgK6hdRX+Rwgh60IxexniByKKOe/zqd2OGPMAb3djtpJSpP+xOgN2dzj7tEzC14ov6n3JaY muRiqPik/5EHIlPuPaBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmlE5-000YDl-SO; Thu, 05 May 2022 23:49:41 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmlE2-000YCV-2g for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2022 23:49:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651794578; x=1683330578; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=SvwrWnfPhfL0Tbu+CeyKLfzg2nr/nAjCUZEl4mcnbd8=; b=FQRAVBj3ABmIZcrxObama+FvjUGFIkXDW5AegPW1dNia3dYQrk+U+PzQ 2mA/+U7EqOkoxVdwkqDXDLfBiAih5XLiIC0ZHJ6fHnoP4L2pp/PVyiVKC J3SrXFSyK0cKIHKcGWL8+ECRrft+yW2EWfbIhP675BeV7lOlLJpOeow4A tnNgNpHBR1hvc54zOdn6TxZbTQ3gWfa9ZT2ipwERzRY+aji9iROYp/F+8 8bXjbAzzptkv/rpsloEr2s6+DZHA0SydQcPNFUQXpZBSnUI6B+p9D3u95 J9mxjFsBvzLdxdS4dyllxUlncZr4eSVProRaEYn8r/l4PaYNZeQ4p8LGh Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="250282033" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="250282033" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 16:49:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="709183065" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 05 May 2022 16:49:08 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1nmlDY-000CqI-8i; Thu, 05 May 2022 23:49:08 +0000 Date: Fri, 6 May 2022 07:48:58 +0800 From: kernel test robot To: Robert Hancock , netdev@vger.kernel.org Cc: kbuild-all@lists.01.org, radhey.shyam.pandey@xilinx.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org, Robert Hancock Subject: Re: [PATCH net-next v3] net: axienet: Use NAPI for TX completion path Message-ID: <202205060706.r3focpXn-lkp@intel.com> References: <20220505203754.1905881-1-robert.hancock@calian.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220505203754.1905881-1-robert.hancock@calian.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_164938_196409_9D18595F X-CRM114-Status: GOOD ( 14.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Robert, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Robert-Hancock/net-axienet-Use-NAPI-for-TX-completion-path/20220506-043932 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1c1ed5a48411e1686997157c21633653fbe045c6 config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220506/202205060706.r3focpXn-lkp@intel.com/config) compiler: m68k-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/89eb9e692229a3af81eaf2f599781bfae3091e93 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Robert-Hancock/net-axienet-Use-NAPI-for-TX-completion-path/20220506-043932 git checkout 89eb9e692229a3af81eaf2f599781bfae3091e93 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/xilinx/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:765: warning: expecting prototype for axienet_start_xmit_done(). Prototype was for axienet_tx_poll() instead vim +765 drivers/net/ethernet/xilinx/xilinx_axienet_main.c bb193e3db8b86a Robert Hancock 2022-01-18 749 ab365c3393664f Andre Przywara 2020-03-24 750 /** ab365c3393664f Andre Przywara 2020-03-24 751 * axienet_start_xmit_done - Invoked once a transmit is completed by the ab365c3393664f Andre Przywara 2020-03-24 752 * Axi DMA Tx channel. 89eb9e692229a3 Robert Hancock 2022-05-05 753 * @napi: Pointer to NAPI structure. 89eb9e692229a3 Robert Hancock 2022-05-05 754 * @budget: Max number of TX packets to process. 89eb9e692229a3 Robert Hancock 2022-05-05 755 * 89eb9e692229a3 Robert Hancock 2022-05-05 756 * Return: Number of TX packets processed. ab365c3393664f Andre Przywara 2020-03-24 757 * 89eb9e692229a3 Robert Hancock 2022-05-05 758 * This function is invoked from the NAPI processing to notify the completion ab365c3393664f Andre Przywara 2020-03-24 759 * of transmit operation. It clears fields in the corresponding Tx BDs and ab365c3393664f Andre Przywara 2020-03-24 760 * unmaps the corresponding buffer so that CPU can regain ownership of the ab365c3393664f Andre Przywara 2020-03-24 761 * buffer. It finally invokes "netif_wake_queue" to restart transmission if ab365c3393664f Andre Przywara 2020-03-24 762 * required. ab365c3393664f Andre Przywara 2020-03-24 763 */ 89eb9e692229a3 Robert Hancock 2022-05-05 764 static int axienet_tx_poll(struct napi_struct *napi, int budget) ab365c3393664f Andre Przywara 2020-03-24 @765 { 89eb9e692229a3 Robert Hancock 2022-05-05 766 struct axienet_local *lp = container_of(napi, struct axienet_local, napi_tx); 89eb9e692229a3 Robert Hancock 2022-05-05 767 struct net_device *ndev = lp->ndev; ab365c3393664f Andre Przywara 2020-03-24 768 u32 size = 0; 89eb9e692229a3 Robert Hancock 2022-05-05 769 int packets; ab365c3393664f Andre Przywara 2020-03-24 770 89eb9e692229a3 Robert Hancock 2022-05-05 771 packets = axienet_free_tx_chain(lp, lp->tx_bd_ci, budget, false, &size, budget); ab365c3393664f Andre Przywara 2020-03-24 772 89eb9e692229a3 Robert Hancock 2022-05-05 773 if (packets) { ab365c3393664f Andre Przywara 2020-03-24 774 lp->tx_bd_ci += packets; ab365c3393664f Andre Przywara 2020-03-24 775 if (lp->tx_bd_ci >= lp->tx_bd_num) 89eb9e692229a3 Robert Hancock 2022-05-05 776 lp->tx_bd_ci %= lp->tx_bd_num; ab365c3393664f Andre Przywara 2020-03-24 777 8a3b7a252dca9f Daniel Borkmann 2012-01-19 778 ndev->stats.tx_packets += packets; 8a3b7a252dca9f Daniel Borkmann 2012-01-19 779 ndev->stats.tx_bytes += size; 7de44285c1f69c Robert Hancock 2019-06-06 780 7de44285c1f69c Robert Hancock 2019-06-06 781 /* Matches barrier in axienet_start_xmit */ 7de44285c1f69c Robert Hancock 2019-06-06 782 smp_mb(); 7de44285c1f69c Robert Hancock 2019-06-06 783 bb193e3db8b86a Robert Hancock 2022-01-18 784 if (!axienet_check_tx_bd_space(lp, MAX_SKB_FRAGS + 1)) 8a3b7a252dca9f Daniel Borkmann 2012-01-19 785 netif_wake_queue(ndev); 8a3b7a252dca9f Daniel Borkmann 2012-01-19 786 } 8a3b7a252dca9f Daniel Borkmann 2012-01-19 787 89eb9e692229a3 Robert Hancock 2022-05-05 788 if (packets < budget && napi_complete_done(napi, packets)) { 89eb9e692229a3 Robert Hancock 2022-05-05 789 /* Re-enable TX completion interrupts. This should 89eb9e692229a3 Robert Hancock 2022-05-05 790 * cause an immediate interrupt if any TX packets are 89eb9e692229a3 Robert Hancock 2022-05-05 791 * already pending. 89eb9e692229a3 Robert Hancock 2022-05-05 792 */ 89eb9e692229a3 Robert Hancock 2022-05-05 793 axienet_dma_out32(lp, XAXIDMA_TX_CR_OFFSET, lp->tx_dma_cr); 89eb9e692229a3 Robert Hancock 2022-05-05 794 } 89eb9e692229a3 Robert Hancock 2022-05-05 795 return packets; 89eb9e692229a3 Robert Hancock 2022-05-05 796 } 89eb9e692229a3 Robert Hancock 2022-05-05 797 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D1A8C433F5 for ; Thu, 5 May 2022 23:49:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386935AbiEEXwy (ORCPT ); Thu, 5 May 2022 19:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386937AbiEEXww (ORCPT ); Thu, 5 May 2022 19:52:52 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1E6E60AA1 for ; Thu, 5 May 2022 16:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651794551; x=1683330551; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=SvwrWnfPhfL0Tbu+CeyKLfzg2nr/nAjCUZEl4mcnbd8=; b=AyCtP5QdCNkglWCCHpNcc+O4sPsZZiqpdJkHPFKzGG9aPv70t4lJzFoC qNWTjqH74IdFh3Y2+aB1XZ8ReutwcQCwuFlbUpQjqea7yzfW4fCNYzAOa woMsdhdXetgTqUWMr1XkX5xOD0tBdpVgue1v5QyJyjZr4ar++rtyxd3G/ J5rtQ5giOfdzN2a8A+qxIOViWib1PfeRGZKb0Eah+PBhQjkFkZo3iUCoE p7F5xQ63P8oNG2YDaznV8okwN3o/WHYYuUkDVqbkMZF/Nfuk1dTciW+CS z5zeCCICqZbAHsFfUmE0iS5VYDUHVI4vcU0zKQ8e8oMdtsAT72K1Nqjet A==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="328835404" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="328835404" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 16:49:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="709183065" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 05 May 2022 16:49:08 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1nmlDY-000CqI-8i; Thu, 05 May 2022 23:49:08 +0000 Date: Fri, 6 May 2022 07:48:58 +0800 From: kernel test robot To: Robert Hancock , netdev@vger.kernel.org Cc: kbuild-all@lists.01.org, radhey.shyam.pandey@xilinx.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org, Robert Hancock Subject: Re: [PATCH net-next v3] net: axienet: Use NAPI for TX completion path Message-ID: <202205060706.r3focpXn-lkp@intel.com> References: <20220505203754.1905881-1-robert.hancock@calian.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220505203754.1905881-1-robert.hancock@calian.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Robert, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Robert-Hancock/net-axienet-Use-NAPI-for-TX-completion-path/20220506-043932 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1c1ed5a48411e1686997157c21633653fbe045c6 config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220506/202205060706.r3focpXn-lkp@intel.com/config) compiler: m68k-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/89eb9e692229a3af81eaf2f599781bfae3091e93 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Robert-Hancock/net-axienet-Use-NAPI-for-TX-completion-path/20220506-043932 git checkout 89eb9e692229a3af81eaf2f599781bfae3091e93 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/xilinx/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:765: warning: expecting prototype for axienet_start_xmit_done(). Prototype was for axienet_tx_poll() instead vim +765 drivers/net/ethernet/xilinx/xilinx_axienet_main.c bb193e3db8b86a Robert Hancock 2022-01-18 749 ab365c3393664f Andre Przywara 2020-03-24 750 /** ab365c3393664f Andre Przywara 2020-03-24 751 * axienet_start_xmit_done - Invoked once a transmit is completed by the ab365c3393664f Andre Przywara 2020-03-24 752 * Axi DMA Tx channel. 89eb9e692229a3 Robert Hancock 2022-05-05 753 * @napi: Pointer to NAPI structure. 89eb9e692229a3 Robert Hancock 2022-05-05 754 * @budget: Max number of TX packets to process. 89eb9e692229a3 Robert Hancock 2022-05-05 755 * 89eb9e692229a3 Robert Hancock 2022-05-05 756 * Return: Number of TX packets processed. ab365c3393664f Andre Przywara 2020-03-24 757 * 89eb9e692229a3 Robert Hancock 2022-05-05 758 * This function is invoked from the NAPI processing to notify the completion ab365c3393664f Andre Przywara 2020-03-24 759 * of transmit operation. It clears fields in the corresponding Tx BDs and ab365c3393664f Andre Przywara 2020-03-24 760 * unmaps the corresponding buffer so that CPU can regain ownership of the ab365c3393664f Andre Przywara 2020-03-24 761 * buffer. It finally invokes "netif_wake_queue" to restart transmission if ab365c3393664f Andre Przywara 2020-03-24 762 * required. ab365c3393664f Andre Przywara 2020-03-24 763 */ 89eb9e692229a3 Robert Hancock 2022-05-05 764 static int axienet_tx_poll(struct napi_struct *napi, int budget) ab365c3393664f Andre Przywara 2020-03-24 @765 { 89eb9e692229a3 Robert Hancock 2022-05-05 766 struct axienet_local *lp = container_of(napi, struct axienet_local, napi_tx); 89eb9e692229a3 Robert Hancock 2022-05-05 767 struct net_device *ndev = lp->ndev; ab365c3393664f Andre Przywara 2020-03-24 768 u32 size = 0; 89eb9e692229a3 Robert Hancock 2022-05-05 769 int packets; ab365c3393664f Andre Przywara 2020-03-24 770 89eb9e692229a3 Robert Hancock 2022-05-05 771 packets = axienet_free_tx_chain(lp, lp->tx_bd_ci, budget, false, &size, budget); ab365c3393664f Andre Przywara 2020-03-24 772 89eb9e692229a3 Robert Hancock 2022-05-05 773 if (packets) { ab365c3393664f Andre Przywara 2020-03-24 774 lp->tx_bd_ci += packets; ab365c3393664f Andre Przywara 2020-03-24 775 if (lp->tx_bd_ci >= lp->tx_bd_num) 89eb9e692229a3 Robert Hancock 2022-05-05 776 lp->tx_bd_ci %= lp->tx_bd_num; ab365c3393664f Andre Przywara 2020-03-24 777 8a3b7a252dca9f Daniel Borkmann 2012-01-19 778 ndev->stats.tx_packets += packets; 8a3b7a252dca9f Daniel Borkmann 2012-01-19 779 ndev->stats.tx_bytes += size; 7de44285c1f69c Robert Hancock 2019-06-06 780 7de44285c1f69c Robert Hancock 2019-06-06 781 /* Matches barrier in axienet_start_xmit */ 7de44285c1f69c Robert Hancock 2019-06-06 782 smp_mb(); 7de44285c1f69c Robert Hancock 2019-06-06 783 bb193e3db8b86a Robert Hancock 2022-01-18 784 if (!axienet_check_tx_bd_space(lp, MAX_SKB_FRAGS + 1)) 8a3b7a252dca9f Daniel Borkmann 2012-01-19 785 netif_wake_queue(ndev); 8a3b7a252dca9f Daniel Borkmann 2012-01-19 786 } 8a3b7a252dca9f Daniel Borkmann 2012-01-19 787 89eb9e692229a3 Robert Hancock 2022-05-05 788 if (packets < budget && napi_complete_done(napi, packets)) { 89eb9e692229a3 Robert Hancock 2022-05-05 789 /* Re-enable TX completion interrupts. This should 89eb9e692229a3 Robert Hancock 2022-05-05 790 * cause an immediate interrupt if any TX packets are 89eb9e692229a3 Robert Hancock 2022-05-05 791 * already pending. 89eb9e692229a3 Robert Hancock 2022-05-05 792 */ 89eb9e692229a3 Robert Hancock 2022-05-05 793 axienet_dma_out32(lp, XAXIDMA_TX_CR_OFFSET, lp->tx_dma_cr); 89eb9e692229a3 Robert Hancock 2022-05-05 794 } 89eb9e692229a3 Robert Hancock 2022-05-05 795 return packets; 89eb9e692229a3 Robert Hancock 2022-05-05 796 } 89eb9e692229a3 Robert Hancock 2022-05-05 797 -- 0-DAY CI Kernel Test Service https://01.org/lkp