lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202411020715.L7KdiUt4-lkp@intel.com>
Date: Sat, 2 Nov 2024 08:11:54 +0800
From: kernel test robot <lkp@...el.com>
To: David Arinzon <darinzon@...zon.com>, David Miller <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	netdev@...r.kernel.org, David Arinzon <darinzon@...zon.com>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Richard Cochran <richardcochran@...il.com>,
	"Woodhouse, David" <dwmw@...zon.com>,
	"Machulsky, Zorik" <zorik@...zon.com>,
	"Matushevsky, Alexander" <matua@...zon.com>,
	Saeed Bshara <saeedb@...zon.com>, "Wilson, Matt" <msw@...zon.com>,
	"Liguori, Anthony" <aliguori@...zon.com>,
	"Bshara, Nafea" <nafea@...zon.com>,
	"Schmeilin, Evgeny" <evgenys@...zon.com>,
	"Belgazal, Netanel" <netanel@...zon.com>,
	"Saidi, Ali" <alisaidi@...zon.com>,
	"Herrenschmidt, Benjamin" <benh@...zon.com>,
	"Kiyanovski, Arthur" <akiyano@...zon.com>,
	"Dagan, Noam" <ndagan@...zon.com>,
	"Bernstein, Amit" <amitbern@...zon.com>,
	"Agroskin, Shay" <shayagr@...zon.com>,
	"Abboud, Osama" <osamaabb@...zon.com>,
	"Ostrovsky, Evgeny" <evostrov@...zon.com>,
	"Tabachnik, Ofir" <ofirt@...zon.com>,
	"Machnikowski, Maciek" <maciek@...hnikowski.net>
Subject: Re: [PATCH v2 net-next 1/3] net: ena: Add PHC support in the ENA
 driver

Hi David,

kernel test robot noticed the following build errors:

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

url:    https://github.com/intel-lab-lkp/linux/commits/David-Arinzon/net-ena-Add-PHC-support-in-the-ENA-driver/20241031-165503
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241031085245.18146-2-darinzon%40amazon.com
patch subject: [PATCH v2 net-next 1/3] net: ena: Add PHC support in the ENA driver
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20241102/202411020715.L7KdiUt4-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 639a7ac648f1e50ccd2556e17d401c04f9cce625)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241102/202411020715.L7KdiUt4-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411020715.L7KdiUt4-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/amazon/ena/ena_com.c:6:
   In file included from drivers/net/ethernet/amazon/ena/ena_com.h:11:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2213:
   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:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   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/amazon/ena/ena_com.c:1703:7: error: expected ')'
    1703 |                                   ENA_ADMIN_PHC_CONFIG,
         |                                   ^
   drivers/net/ethernet/amazon/ena/ena_com.c:1701:27: note: to match this '('
    1701 |         ret = ena_com_get_feature(ena_dev,
         |                                  ^
   4 warnings and 1 error generated.


vim +1703 drivers/net/ethernet/amazon/ena/ena_com.c

  1691	
  1692	int ena_com_phc_config(struct ena_com_dev *ena_dev)
  1693	{
  1694		struct ena_com_phc_info *phc = &ena_dev->phc;
  1695		struct ena_admin_get_feat_resp get_feat_resp;
  1696		struct ena_admin_set_feat_resp set_feat_resp;
  1697		struct ena_admin_set_feat_cmd set_feat_cmd;
  1698		int ret = 0;
  1699	
  1700		/* Get device PHC default configuration */
  1701		ret = ena_com_get_feature(ena_dev,
  1702					  &get_feat_resp
> 1703					  ENA_ADMIN_PHC_CONFIG,
  1704					  0);
  1705		if (unlikely(ret)) {
  1706			netdev_err(ena_dev->net_device,
  1707				   "Failed to get PHC feature configuration, error: %d\n",
  1708				   ret);
  1709			return ret;
  1710		}
  1711	
  1712		/* Supporting only readless PHC retrieval */
  1713		if (get_feat_resp.u.phc.type != ENA_ADMIN_PHC_TYPE_READLESS) {
  1714			netdev_err(ena_dev->net_device, "Unsupported PHC type, error: %d\n",
  1715				   -EOPNOTSUPP);
  1716			return -EOPNOTSUPP;
  1717		}
  1718	
  1719		/* Update PHC doorbell offset according to device value,
  1720		 * used to write req_id to PHC bar
  1721		 */
  1722		phc->doorbell_offset = get_feat_resp.u.phc.doorbell_offset;
  1723	
  1724		/* Update PHC expire timeout according to device
  1725		 * or default driver value
  1726		 */
  1727		phc->expire_timeout_usec = (get_feat_resp.u.phc.expire_timeout_usec) ?
  1728					    get_feat_resp.u.phc.expire_timeout_usec :
  1729					    ENA_PHC_DEFAULT_EXPIRE_TIMEOUT_USEC;
  1730	
  1731		/* Update PHC block timeout according to device
  1732		 * or default driver value
  1733		 */
  1734		phc->block_timeout_usec = (get_feat_resp.u.phc.block_timeout_usec) ?
  1735					   get_feat_resp.u.phc.block_timeout_usec :
  1736					   ENA_PHC_DEFAULT_BLOCK_TIMEOUT_USEC;
  1737	
  1738		/* Sanity check - expire timeout must not be above skip timeout */
  1739		if (phc->expire_timeout_usec > phc->block_timeout_usec)
  1740			phc->expire_timeout_usec = phc->block_timeout_usec;
  1741	
  1742		/* Prepare PHC config feature command */
  1743		memset(&set_feat_cmd, 0x0, sizeof(set_feat_cmd));
  1744		set_feat_cmd.aq_common_descriptor.opcode = ENA_ADMIN_SET_FEATURE;
  1745		set_feat_cmd.feat_common.feature_id = ENA_ADMIN_PHC_CONFIG;
  1746		set_feat_cmd.u.phc.output_length = sizeof(*phc->virt_addr);
  1747		ret = ena_com_mem_addr_set(ena_dev,
  1748					   &set_feat_cmd.u.phc.output_address,
  1749					   phc->phys_addr);
  1750		if (unlikely(ret)) {
  1751			netdev_err(ena_dev->net_device, "Failed setting PHC output address, error: %d\n",
  1752				   ret);
  1753			return ret;
  1754		}
  1755	
  1756		/* Send PHC feature command to the device */
  1757		ret = ena_com_execute_admin_command(&ena_dev->admin_queue,
  1758						    (struct ena_admin_aq_entry *)&set_feat_cmd,
  1759						    sizeof(set_feat_cmd),
  1760						    (struct ena_admin_acq_entry *)&set_feat_resp,
  1761						    sizeof(set_feat_resp));
  1762	
  1763		if (unlikely(ret)) {
  1764			netdev_err(ena_dev->net_device,
  1765				   "Failed to enable PHC, error: %d\n",
  1766				   ret);
  1767			return ret;
  1768		}
  1769	
  1770		phc->active = true;
  1771		netdev_dbg(ena_dev->net_device, "PHC is active in the device\n");
  1772	
  1773		return ret;
  1774	}
  1775	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ