All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Robert Hancock <robert.hancock@calian.com>, netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, 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 <robert.hancock@calian.com>
Subject: Re: [PATCH net-next v3] net: axienet: Use NAPI for TX completion path
Date: Fri, 6 May 2022 09:54:34 +0800	[thread overview]
Message-ID: <202205060910.pO104P2e-lkp@intel.com> (raw)
In-Reply-To: <20220505203754.1905881-1-robert.hancock@calian.com>

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: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220506/202205060910.pO104P2e-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
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=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/xilinx/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Robert Hancock <robert.hancock@calian.com>, netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, 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 <robert.hancock@calian.com>
Subject: Re: [PATCH net-next v3] net: axienet: Use NAPI for TX completion path
Date: Fri, 6 May 2022 09:54:34 +0800	[thread overview]
Message-ID: <202205060910.pO104P2e-lkp@intel.com> (raw)
In-Reply-To: <20220505203754.1905881-1-robert.hancock@calian.com>

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: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220506/202205060910.pO104P2e-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
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=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/xilinx/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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

  parent reply	other threads:[~2022-05-06  1:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 20:37 [PATCH net-next v3] net: axienet: Use NAPI for TX completion path Robert Hancock
2022-05-05 20:37 ` Robert Hancock
2022-05-05 23:48 ` kernel test robot
2022-05-05 23:48   ` kernel test robot
2022-05-06  1:54 ` kernel test robot [this message]
2022-05-06  1:54   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202205060910.pO104P2e-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=radhey.shyam.pandey@xilinx.com \
    --cc=robert.hancock@calian.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.