netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Brett Creeley <brett.creeley@amd.com>,
	netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	edumazet@google.com, pabeni@redhat.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	shannon.nelson@amd.com, brett.creeley@amd.com
Subject: Re: [PATCH v2 net-next 5/5] ionic: convert Rx queue buffers to use page_pool
Date: Wed, 28 Aug 2024 06:22:53 +0800	[thread overview]
Message-ID: <202408280648.f6Hb9cX3-lkp@intel.com> (raw)
In-Reply-To: <20240826184422.21895-6-brett.creeley@amd.com>

Hi Brett,

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/Brett-Creeley/ionic-debug-line-for-Tx-completion-errors/20240827-024626
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240826184422.21895-6-brett.creeley%40amd.com
patch subject: [PATCH v2 net-next 5/5] ionic: convert Rx queue buffers to use page_pool
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20240828/202408280648.f6Hb9cX3-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 08e5a1de8227512d4774a534b91cb2353cef6284)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240828/202408280648.f6Hb9cX3-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/202408280648.f6Hb9cX3-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/net/ethernet/pensando/ionic/ionic_txrx.c:4:
   In file included from include/linux/ip.h:16:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/powerpc/include/asm/cacheflush.h:7:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:503:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     503 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     504 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:510:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     510 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     511 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     517 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:523:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     523 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     524 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/pensando/ionic/ionic_txrx.c:203:30: warning: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 65536 to 0 [-Wconstant-conversion]
     203 |                 frag_len = min_t(u16, len, IONIC_PAGE_SIZE);
         |                            ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
   drivers/net/ethernet/pensando/ionic/ionic_dev.h:184:28: note: expanded from macro 'IONIC_PAGE_SIZE'
     184 | #define IONIC_PAGE_SIZE                         PAGE_SIZE
         |                                                 ^
   arch/powerpc/include/asm/page.h:25:34: note: expanded from macro 'PAGE_SIZE'
      25 | #define PAGE_SIZE               (ASM_CONST(1) << PAGE_SHIFT)
         |                                               ^
   include/linux/minmax.h:213:52: note: expanded from macro 'min_t'
     213 | #define min_t(type, x, y) __cmp_once(min, type, x, y)
         |                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~
   include/linux/minmax.h:96:33: note: expanded from macro '__cmp_once'
      96 |         __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:93:31: note: expanded from macro '__cmp_once_unique'
      93 |         ({ type ux = (x); type uy = (y); __cmp(op, ux, uy); })
         |                                ~~    ^
   drivers/net/ethernet/pensando/ionic/ionic_txrx.c:797:36: warning: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 65536 to 0 [-Wconstant-conversion]
     797 |                 first_frag_len = min_t(u16, len, IONIC_PAGE_SIZE);
         |                                  ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
   drivers/net/ethernet/pensando/ionic/ionic_dev.h:184:28: note: expanded from macro 'IONIC_PAGE_SIZE'
     184 | #define IONIC_PAGE_SIZE                         PAGE_SIZE
         |                                                 ^
   arch/powerpc/include/asm/page.h:25:34: note: expanded from macro 'PAGE_SIZE'
      25 | #define PAGE_SIZE               (ASM_CONST(1) << PAGE_SHIFT)
         |                                               ^
   include/linux/minmax.h:213:52: note: expanded from macro 'min_t'
     213 | #define min_t(type, x, y) __cmp_once(min, type, x, y)
         |                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~
   include/linux/minmax.h:96:33: note: expanded from macro '__cmp_once'
      96 |         __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:93:31: note: expanded from macro '__cmp_once_unique'
      93 |         ({ type ux = (x); type uy = (y); __cmp(op, ux, uy); })
         |                                ~~    ^
   drivers/net/ethernet/pensando/ionic/ionic_txrx.c:832:38: warning: implicit conversion from 'unsigned long' to 'u16' (aka 'unsigned short') changes value from 65536 to 0 [-Wconstant-conversion]
     832 |                         frag_len = min_t(u16, remain_len, IONIC_PAGE_SIZE);
         |                                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
   drivers/net/ethernet/pensando/ionic/ionic_dev.h:184:28: note: expanded from macro 'IONIC_PAGE_SIZE'
     184 | #define IONIC_PAGE_SIZE                         PAGE_SIZE
         |                                                 ^
   arch/powerpc/include/asm/page.h:25:34: note: expanded from macro 'PAGE_SIZE'
      25 | #define PAGE_SIZE               (ASM_CONST(1) << PAGE_SHIFT)
         |                                               ^
   include/linux/minmax.h:213:52: note: expanded from macro 'min_t'
     213 | #define min_t(type, x, y) __cmp_once(min, type, x, y)
         |                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~
   include/linux/minmax.h:96:33: note: expanded from macro '__cmp_once'
      96 |         __cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:93:31: note: expanded from macro '__cmp_once_unique'
      93 |         ({ type ux = (x); type uy = (y); __cmp(op, ux, uy); })
         |                                ~~    ^
   7 warnings generated.


vim +203 drivers/net/ethernet/pensando/ionic/ionic_txrx.c

   174	
   175	static struct sk_buff *ionic_rx_build_skb(struct ionic_queue *q,
   176						  struct ionic_rx_desc_info *desc_info,
   177						  unsigned int headroom,
   178						  unsigned int len,
   179						  unsigned int num_sg_elems,
   180						  bool synced)
   181	{
   182		struct ionic_buf_info *buf_info;
   183		struct sk_buff *skb;
   184		unsigned int i;
   185		u16 frag_len;
   186	
   187		buf_info = &desc_info->bufs[0];
   188		prefetchw(buf_info->page);
   189	
   190		skb = napi_get_frags(&q_to_qcq(q)->napi);
   191		if (unlikely(!skb)) {
   192			net_warn_ratelimited("%s: SKB alloc failed on %s!\n",
   193					     dev_name(q->dev), q->name);
   194			q_to_rx_stats(q)->alloc_err++;
   195			return NULL;
   196		}
   197		skb_mark_for_recycle(skb);
   198	
   199		if (headroom)
   200			frag_len = min_t(u16, len,
   201					 IONIC_XDP_MAX_LINEAR_MTU + VLAN_ETH_HLEN);
   202		else
 > 203			frag_len = min_t(u16, len, IONIC_PAGE_SIZE);
   204	
   205		if (unlikely(!buf_info->page))
   206			goto err_bad_buf_page;
   207		ionic_rx_add_skb_frag(q, skb, buf_info, headroom, frag_len, synced);
   208		len -= frag_len;
   209		buf_info++;
   210	
   211		for (i = 0; i < num_sg_elems; i++, buf_info++) {
   212			if (unlikely(!buf_info->page))
   213				goto err_bad_buf_page;
   214			frag_len = min_t(u16, len, buf_info->len);
   215			ionic_rx_add_skb_frag(q, skb, buf_info, 0, frag_len, synced);
   216			len -= frag_len;
   217		}
   218	
   219		return skb;
   220	
   221	err_bad_buf_page:
   222		dev_kfree_skb(skb);
   223		return NULL;
   224	}
   225	

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

      parent reply	other threads:[~2024-08-27 22:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 18:44 [PATCH v2 net-next 0/5] ionic: convert Rx queue buffers to use page_pool Brett Creeley
2024-08-26 18:44 ` [PATCH v2 net-next 1/5] ionic: debug line for Tx completion errors Brett Creeley
2024-08-26 18:44 ` [PATCH v2 net-next 2/5] ionic: rename ionic_xdp_rx_put_bufs Brett Creeley
2024-08-26 18:44 ` [PATCH v2 net-next 3/5] ionic: use per-queue xdp_prog Brett Creeley
2024-08-27 11:44   ` Larysa Zaremba
2024-08-27 11:57     ` Larysa Zaremba
2024-08-27 22:27       ` Brett Creeley
2024-08-27 21:40     ` Brett Creeley
2024-08-26 18:44 ` [PATCH v2 net-next 4/5] ionic: always use rxq_info Brett Creeley
2024-08-27 12:08   ` Larysa Zaremba
2024-08-27 22:32     ` Brett Creeley
2024-08-26 18:44 ` [PATCH v2 net-next 5/5] ionic: convert Rx queue buffers to use page_pool Brett Creeley
2024-08-27 19:59   ` kernel test robot
2024-08-27 22:22   ` 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=202408280648.f6Hb9cX3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=shannon.nelson@amd.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).