netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>,
	wei.fang@nxp.com, shenwei.wang@nxp.com, xiaoning.wang@nxp.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, imx@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
Subject: Re: [PATCH net-next] net: fec: implement TSO descriptor cleanup
Date: Fri, 17 Jan 2025 23:30:47 +0800	[thread overview]
Message-ID: <202501172328.IoOTB8n0-lkp@intel.com> (raw)
In-Reply-To: <20250116130920.30984-1-dheeraj.linuxdev@gmail.com>

Hi Dheeraj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Dheeraj-Reddy-Jonnalagadda/net-fec-implement-TSO-descriptor-cleanup/20250116-211046
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250116130920.30984-1-dheeraj.linuxdev%40gmail.com
patch subject: [PATCH net-next] net: fec: implement TSO descriptor cleanup
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250117/202501172328.IoOTB8n0-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250117/202501172328.IoOTB8n0-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501172328.IoOTB8n0-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/net/ethernet/freescale/fec_main.c:25:
   In file included from include/linux/module.h:19:
   In file included from include/linux/elf.h:6:
   In file included from arch/s390/include/asm/elf.h:181:
   In file included from arch/s390/include/asm/mmu_context.h:11:
   In file included from arch/s390/include/asm/pgalloc.h:18:
   In file included from include/linux/mm.h:2224:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/freescale/fec_main.c:917:2: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     917 |         struct bufdesc *tmp_bdp = txq->bd.cur;
         |         ^
   4 warnings generated.


vim +917 drivers/net/ethernet/freescale/fec_main.c

   835	
   836	static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,
   837					   struct sk_buff *skb,
   838					   struct net_device *ndev)
   839	{
   840		struct fec_enet_private *fep = netdev_priv(ndev);
   841		int hdr_len, total_len, data_left;
   842		struct bufdesc *bdp = txq->bd.cur;
   843		struct tso_t tso;
   844		unsigned int index = 0;
   845		int ret;
   846	
   847		if (tso_count_descs(skb) >= fec_enet_get_free_txdesc_num(txq)) {
   848			dev_kfree_skb_any(skb);
   849			if (net_ratelimit())
   850				netdev_err(ndev, "NOT enough BD for TSO!\n");
   851			return NETDEV_TX_OK;
   852		}
   853	
   854		/* Protocol checksum off-load for TCP and UDP. */
   855		if (fec_enet_clear_csum(skb, ndev)) {
   856			dev_kfree_skb_any(skb);
   857			return NETDEV_TX_OK;
   858		}
   859	
   860		/* Initialize the TSO handler, and prepare the first payload */
   861		hdr_len = tso_start(skb, &tso);
   862	
   863		total_len = skb->len - hdr_len;
   864		while (total_len > 0) {
   865			char *hdr;
   866	
   867			index = fec_enet_get_bd_index(bdp, &txq->bd);
   868			data_left = min_t(int, skb_shinfo(skb)->gso_size, total_len);
   869			total_len -= data_left;
   870	
   871			/* prepare packet headers: MAC + IP + TCP */
   872			hdr = txq->tso_hdrs + index * TSO_HEADER_SIZE;
   873			tso_build_hdr(skb, hdr, &tso, data_left, total_len == 0);
   874			ret = fec_enet_txq_put_hdr_tso(txq, skb, ndev, bdp, index);
   875			if (ret)
   876				goto err_release;
   877	
   878			while (data_left > 0) {
   879				int size;
   880	
   881				size = min_t(int, tso.size, data_left);
   882				bdp = fec_enet_get_nextdesc(bdp, &txq->bd);
   883				index = fec_enet_get_bd_index(bdp, &txq->bd);
   884				ret = fec_enet_txq_put_data_tso(txq, skb, ndev,
   885								bdp, index,
   886								tso.data, size,
   887								size == data_left,
   888								total_len == 0);
   889				if (ret)
   890					goto err_release;
   891	
   892				data_left -= size;
   893				tso_build_data(skb, &tso, size);
   894			}
   895	
   896			bdp = fec_enet_get_nextdesc(bdp, &txq->bd);
   897		}
   898	
   899		/* Save skb pointer */
   900		txq->tx_buf[index].buf_p = skb;
   901	
   902		skb_tx_timestamp(skb);
   903		txq->bd.cur = bdp;
   904	
   905		/* Trigger transmission start */
   906		if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
   907		    !readl(txq->bd.reg_desc_active) ||
   908		    !readl(txq->bd.reg_desc_active) ||
   909		    !readl(txq->bd.reg_desc_active) ||
   910		    !readl(txq->bd.reg_desc_active))
   911			writel(0, txq->bd.reg_desc_active);
   912	
   913		return 0;
   914	
   915	err_release:
   916		/* Release all used data descriptors for TSO */
 > 917		struct bufdesc *tmp_bdp = txq->bd.cur;
   918	
   919		while (tmp_bdp != bdp) {
   920			tmp_bdp->cbd_sc = 0;
   921			tmp_bdp->cbd_bufaddr = 0;
   922			tmp_bdp->cbd_datlen = 0;
   923			tmp_bdp = fec_enet_get_nextdesc(tmp_bdp, &txq->bd);
   924		}
   925	
   926		dev_kfree_skb_any(skb);
   927	
   928		return ret;
   929	}
   930	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2025-01-17 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 13:09 [PATCH net-next] net: fec: implement TSO descriptor cleanup Dheeraj Reddy Jonnalagadda
2025-01-16 18:24 ` Simon Horman
2025-01-17  2:47 ` Wei Fang
2025-01-18  4:23   ` Dheeraj Reddy Jonnalagadda
2025-01-17 15:30 ` kernel test robot [this message]

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=202501172328.IoOTB8n0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dheeraj.linuxdev@gmail.com \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).