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] [thread-next>] [day] [month] [year] [list]
Date: Mon, 24 Jun 2024 23:58:50 +0800
From: kernel test robot <lkp@...el.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, nbd@....name,
	lorenzo.bianconi83@...il.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	conor@...nel.org, linux-arm-kernel@...ts.infradead.org,
	robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
	conor+dt@...nel.org, devicetree@...r.kernel.org,
	catalin.marinas@....com, will@...nel.org, upstream@...oha.com,
	angelogioacchino.delregno@...labora.com,
	benjamin.larsson@...exis.eu, linux-clk@...r.kernel.org,
	rkannoth@...vell.com, sgoutham@...vell.com, andrew@...n.ch
Subject: Re: [PATCH v2 net-next 2/2] net: airoha: Introduce ethernet support
 for EN7581 SoC

Hi Lorenzo,

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/Lorenzo-Bianconi/dt-bindings-net-airoha-Add-EN7581-ethernet-controller/20240618-182217
base:   net-next/main
patch link:    https://lore.kernel.org/r/f146a6f58492394a77f7d159f3c650a268fbe489.1718696209.git.lorenzo%40kernel.org
patch subject: [PATCH v2 net-next 2/2] net: airoha: Introduce ethernet support for EN7581 SoC
config: arm64-randconfig-r121-20240623 (https://download.01.org/0day-ci/archive/20240624/202406242337.21CXNZvT-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project ad79a14c9e5ec4a369eed4adf567c22cc029863f)
reproduce: (https://download.01.org/0day-ci/archive/20240624/202406242337.21CXNZvT-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/202406242337.21CXNZvT-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/mediatek/airoha_eth.c:1328:45: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __sum16 [usertype] check @@     got restricted __be16 [usertype] @@
   drivers/net/ethernet/mediatek/airoha_eth.c:1328:45: sparse:     expected restricted __sum16 [usertype] check
   drivers/net/ethernet/mediatek/airoha_eth.c:1328:45: sparse:     got restricted __be16 [usertype]
>> drivers/net/ethernet/mediatek/airoha_eth.c:1787:27: sparse: sparse: symbol 'of_airoha_match' was not declared. Should it be static?

vim +1328 drivers/net/ethernet/mediatek/airoha_eth.c

  1303	
  1304	static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
  1305					   struct net_device *dev)
  1306	{
  1307		struct skb_shared_info *sinfo = skb_shinfo(skb);
  1308		struct airoha_eth *eth = netdev_priv(dev);
  1309		int i, qid = skb_get_queue_mapping(skb);
  1310		u32 nr_frags, msg0 = 0, msg1;
  1311		u32 len = skb_headlen(skb);
  1312		struct netdev_queue *txq;
  1313		struct airoha_queue *q;
  1314		void *data = skb->data;
  1315		u16 index;
  1316	
  1317		if (skb->ip_summed == CHECKSUM_PARTIAL)
  1318			msg0 |= FIELD_PREP(QDMA_ETH_TXMSG_TCO_MASK, 1) |
  1319				FIELD_PREP(QDMA_ETH_TXMSG_UCO_MASK, 1) |
  1320				FIELD_PREP(QDMA_ETH_TXMSG_ICO_MASK, 1);
  1321	
  1322		/* TSO: fill MSS info in tcp checksum field */
  1323		if (skb_is_gso(skb)) {
  1324			if (skb_cow_head(skb, 0))
  1325				goto error;
  1326	
  1327			if (sinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) {
> 1328				tcp_hdr(skb)->check = cpu_to_be16(sinfo->gso_size);
  1329				msg0 |= FIELD_PREP(QDMA_ETH_TXMSG_TSO_MASK, 1);
  1330			}
  1331		}
  1332	
  1333		msg1 = FIELD_PREP(QDMA_ETH_TXMSG_FPORT_MASK, DPORT_GDM1) |
  1334		       FIELD_PREP(QDMA_ETH_TXMSG_METER_MASK, 0x7f);
  1335	
  1336		if (WARN_ON_ONCE(qid >= ARRAY_SIZE(eth->q_tx)))
  1337			qid = 0;
  1338	
  1339		q = &eth->q_tx[qid];
  1340		if (WARN_ON_ONCE(!q->ndesc))
  1341			goto error;
  1342	
  1343		spin_lock_bh(&q->lock);
  1344	
  1345		nr_frags = 1 + sinfo->nr_frags;
  1346		if (q->queued + nr_frags > q->ndesc) {
  1347			/* not enough space in the queue */
  1348			spin_unlock_bh(&q->lock);
  1349			return NETDEV_TX_BUSY;
  1350		}
  1351	
  1352		index = q->head;
  1353		for (i = 0; i < nr_frags; i++) {
  1354			struct airoha_qdma_desc *desc = &q->desc[index];
  1355			struct airoha_queue_entry *e = &q->entry[index];
  1356			skb_frag_t *frag = &sinfo->frags[i];
  1357			dma_addr_t addr;
  1358			u32 val;
  1359	
  1360			addr = dma_map_single(dev->dev.parent, data, len,
  1361					      DMA_TO_DEVICE);
  1362			if (unlikely(dma_mapping_error(dev->dev.parent, addr)))
  1363				goto error_unmap;
  1364	
  1365			index = (index + 1) % q->ndesc;
  1366	
  1367			val = FIELD_PREP(QDMA_DESC_LEN_MASK, len);
  1368			if (i < nr_frags - 1)
  1369				val |= FIELD_PREP(QDMA_DESC_MORE_MASK, 1);
  1370			WRITE_ONCE(desc->ctrl, cpu_to_le32(val));
  1371			WRITE_ONCE(desc->addr, cpu_to_le32(addr));
  1372			val = FIELD_PREP(QDMA_DESC_NEXT_ID_MASK, index);
  1373			WRITE_ONCE(desc->data, cpu_to_le32(val));
  1374			WRITE_ONCE(desc->msg0, cpu_to_le32(msg0));
  1375			WRITE_ONCE(desc->msg1, cpu_to_le32(msg1));
  1376			WRITE_ONCE(desc->msg2, cpu_to_le32(0xffff));
  1377	
  1378			e->skb = i ? NULL : skb;
  1379			e->dma_addr = addr;
  1380			e->dma_len = len;
  1381	
  1382			wmb();
  1383			airoha_qdma_rmw(eth, REG_TX_CPU_IDX(qid), TX_RING_CPU_IDX_MASK,
  1384					FIELD_PREP(TX_RING_CPU_IDX_MASK, index));
  1385	
  1386			data = skb_frag_address(frag);
  1387			len = skb_frag_size(frag);
  1388		}
  1389	
  1390		q->head = index;
  1391		q->queued += i;
  1392	
  1393		txq = netdev_get_tx_queue(dev, qid);
  1394		netdev_tx_sent_queue(txq, skb->len);
  1395		skb_tx_timestamp(skb);
  1396	
  1397		if (q->ndesc - q->queued < q->free_thr)
  1398			netif_tx_stop_queue(txq);
  1399	
  1400		spin_unlock_bh(&q->lock);
  1401	
  1402		return NETDEV_TX_OK;
  1403	
  1404	error_unmap:
  1405		for (i--; i >= 0; i++)
  1406			dma_unmap_single(dev->dev.parent, q->entry[i].dma_addr,
  1407					 q->entry[i].dma_len, DMA_TO_DEVICE);
  1408	
  1409		spin_unlock_bh(&q->lock);
  1410	error:
  1411		dev_kfree_skb_any(skb);
  1412		dev->stats.tx_dropped++;
  1413	
  1414		return NETDEV_TX_OK;
  1415	}
  1416	

-- 
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