Hi Eric,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url:
https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-make-dev_watchd...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
62803fec52f80e4dd375de2dd76510c405792928
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/461b045f634f4e17925ad5622adadf9cb...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Eric-Dumazet/net-make-dev_watchdog-less-intrusive/20211117-113056
git checkout 461b045f634f4e17925ad5622adadf9cbf474cec
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function
'stmmac_xdp_xmit_zc':
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2359:33:
warning: passing argument 1 of 'txq_trans_cond_update' makes pointer from integer
without a cast [-Wint-conversion]
2359 |
txq_trans_cond_update(nq->trans_start);
| ~~^~~~~~~~~~~~~
| |
| long unsigned int
In file included from include/net/sock.h:46,
from include/linux/tcp.h:19,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:21:
include/linux/netdevice.h:4107:63: note: expected 'struct netdev_queue *' but
argument is of type 'long unsigned int'
4107 | static inline void txq_trans_cond_update(struct netdev_queue *txq)
| ~~~~~~~~~~~~~~~~~~~~~^~~
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function
'stmmac_xdp_xmit_back':
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4660:33: warning: passing argument 1
of 'txq_trans_cond_update' makes pointer from integer without a cast
[-Wint-conversion]
4660 | txq_trans_cond_update(nq->trans_start);
| ~~^~~~~~~~~~~~~
| |
| long unsigned int
In file included from include/net/sock.h:46,
from include/linux/tcp.h:19,
from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:21:
include/linux/netdevice.h:4107:63: note: expected 'struct netdev_queue *' but
argument is of type 'long unsigned int'
4107 | static inline void txq_trans_cond_update(struct netdev_queue *txq)
| ~~~~~~~~~~~~~~~~~~~~~^~~
vim +/txq_trans_cond_update +2359 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
2347
2348 static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
2349 {
2350 struct netdev_queue *nq = netdev_get_tx_queue(priv->dev, queue);
2351 struct stmmac_tx_queue *tx_q = &priv->tx_queue[queue];
2352 struct xsk_buff_pool *pool = tx_q->xsk_pool;
2353 unsigned int entry = tx_q->cur_tx;
2354 struct dma_desc *tx_desc = NULL;
2355 struct xdp_desc xdp_desc;
2356 bool work_done = true;
2357
2358 /* Avoids TX time-out as we are sharing with slow path */
2359 txq_trans_cond_update(nq->trans_start);
2360
2361 budget = min(budget, stmmac_tx_avail(priv, queue));
2362
2363 while (budget-- > 0) {
2364 dma_addr_t dma_addr;
2365 bool set_ic;
2366
2367 /* We are sharing with slow path and stop XSK TX desc submission when
2368 * available TX ring is less than threshold.
2369 */
2370 if (unlikely(stmmac_tx_avail(priv, queue) < STMMAC_TX_XSK_AVAIL) ||
2371 !netif_carrier_ok(priv->dev)) {
2372 work_done = false;
2373 break;
2374 }
2375
2376 if (!xsk_tx_peek_desc(pool, &xdp_desc))
2377 break;
2378
2379 if (likely(priv->extend_desc))
2380 tx_desc = (struct dma_desc *)(tx_q->dma_etx + entry);
2381 else if (tx_q->tbs & STMMAC_TBS_AVAIL)
2382 tx_desc = &tx_q->dma_entx[entry].basic;
2383 else
2384 tx_desc = tx_q->dma_tx + entry;
2385
2386 dma_addr = xsk_buff_raw_get_dma(pool, xdp_desc.addr);
2387 xsk_buff_raw_dma_sync_for_device(pool, dma_addr, xdp_desc.len);
2388
2389 tx_q->tx_skbuff_dma[entry].buf_type = STMMAC_TXBUF_T_XSK_TX;
2390
2391 /* To return XDP buffer to XSK pool, we simple call
2392 * xsk_tx_completed(), so we don't need to fill up
2393 * 'buf' and 'xdpf'.
2394 */
2395 tx_q->tx_skbuff_dma[entry].buf = 0;
2396 tx_q->xdpf[entry] = NULL;
2397
2398 tx_q->tx_skbuff_dma[entry].map_as_page = false;
2399 tx_q->tx_skbuff_dma[entry].len = xdp_desc.len;
2400 tx_q->tx_skbuff_dma[entry].last_segment = true;
2401 tx_q->tx_skbuff_dma[entry].is_jumbo = false;
2402
2403 stmmac_set_desc_addr(priv, tx_desc, dma_addr);
2404
2405 tx_q->tx_count_frames++;
2406
2407 if (!priv->tx_coal_frames[queue])
2408 set_ic = false;
2409 else if (tx_q->tx_count_frames % priv->tx_coal_frames[queue] == 0)
2410 set_ic = true;
2411 else
2412 set_ic = false;
2413
2414 if (set_ic) {
2415 tx_q->tx_count_frames = 0;
2416 stmmac_set_tx_ic(priv, tx_desc);
2417 priv->xstats.tx_set_ic_bit++;
2418 }
2419
2420 stmmac_prepare_tx_desc(priv, tx_desc, 1, xdp_desc.len,
2421 true, priv->mode, true, true,
2422 xdp_desc.len);
2423
2424 stmmac_enable_dma_transmission(priv, priv->ioaddr);
2425
2426 tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, priv->dma_tx_size);
2427 entry = tx_q->cur_tx;
2428 }
2429
2430 if (tx_desc) {
2431 stmmac_flush_tx_descriptors(priv, queue);
2432 xsk_tx_release(pool);
2433 }
2434
2435 /* Return true if all of the 3 conditions are met
2436 * a) TX Budget is still available
2437 * b) work_done = true when XSK TX desc peek is empty (no more
2438 * pending XSK TX for transmission)
2439 */
2440 return !!budget && work_done;
2441 }
2442
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org