From: kernel test robot <lkp@intel.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>, netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, nbd@nbd.name,
lorenzo.bianconi83@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
conor@kernel.org, linux-arm-kernel@lists.infradead.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, devicetree@vger.kernel.org,
catalin.marinas@arm.com, will@kernel.org, upstream@airoha.com,
angelogioacchino.delregno@collabora.com,
benjamin.larsson@genexis.eu, linux-clk@vger.kernel.org,
rkannoth@marvell.com, sgoutham@marvell.com, andrew@lunn.ch
Subject: Re: [PATCH v2 net-next 2/2] net: airoha: Introduce ethernet support for EN7581 SoC
Date: Mon, 24 Jun 2024 23:58:50 +0800 [thread overview]
Message-ID: <202406242337.21CXNZvT-lkp@intel.com> (raw)
In-Reply-To: <f146a6f58492394a77f7d159f3c650a268fbe489.1718696209.git.lorenzo@kernel.org>
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@intel.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 = ð->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
next prev parent reply other threads:[~2024-06-24 15:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 7:49 [PATCH v2 net-next 0/2] Introduce EN7581 ethernet support Lorenzo Bianconi
2024-06-18 7:49 ` [PATCH v2 net-next 1/2] dt-bindings: net: airoha: Add EN7581 ethernet controller Lorenzo Bianconi
2024-06-18 11:32 ` Rob Herring (Arm)
2024-06-18 17:46 ` Conor Dooley
2024-06-19 6:42 ` Lorenzo Bianconi
2024-06-18 17:47 ` Conor Dooley
2024-06-19 6:58 ` Lorenzo Bianconi
2024-06-18 7:49 ` [PATCH v2 net-next 2/2] net: airoha: Introduce ethernet support for EN7581 SoC Lorenzo Bianconi
2024-06-18 13:46 ` Andrew Lunn
2024-06-19 7:19 ` Lorenzo Bianconi
2024-06-24 15:58 ` kernel test robot [this message]
2024-06-24 20:05 ` Arnd Bergmann
2024-06-28 17:27 ` Lorenzo Bianconi
2024-06-28 19:34 ` Arnd Bergmann
2024-06-28 19:57 ` Felix Fietkau
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=202406242337.21CXNZvT-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=benjamin.larsson@genexis.eu \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=robh+dt@kernel.org \
--cc=sgoutham@marvell.com \
--cc=upstream@airoha.com \
--cc=will@kernel.org \
/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).