tree:
https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 4f766df18cbde3e137d265e5ca530a491a9450bf [982/1142] net: stmmac: add need_wakeup
support for FILL & TX processing in driver
config: arm-randconfig-r034-20201111 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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/intel/linux-intel-lts/commit/4f766df18cbde3e137d265e5c...
git remote add intel-linux-intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 4f766df18cbde3e137d265e5ca530a491a9450bf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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_xsk.c: In function
'stmmac_xsk_wakeup':
> drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:999:25: warning:
variable 'ch' set but not used [-Wunused-but-set-variable]
999 |
struct stmmac_channel *ch;
| ^~
> drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c:997:26: warning:
variable 'rx_q' set but not used [-Wunused-but-set-variable]
997 |
struct stmmac_rx_queue *rx_q;
| ^~~~
vim +/ch +999 drivers/net/ethernet/stmicro/stmmac/stmmac_xsk.c
7544af8bd5bd27b Ong Boon Leong 2019-10-04 984
7544af8bd5bd27b Ong Boon Leong 2019-10-04 985 /**
7544af8bd5bd27b Ong Boon Leong 2019-10-04 986 * stmmac_xsk_wakeup - Implements the
ndo_xsk_wakeup
7544af8bd5bd27b Ong Boon Leong 2019-10-04 987 * @dev: the netdevice
7544af8bd5bd27b Ong Boon Leong 2019-10-04 988 * @queue_id: queue id to wake up
7544af8bd5bd27b Ong Boon Leong 2019-10-04 989 *
7544af8bd5bd27b Ong Boon Leong 2019-10-04 990 * Returns <0 for errors, 0
otherwise.
7544af8bd5bd27b Ong Boon Leong 2019-10-04 991 **/
7544af8bd5bd27b Ong Boon Leong 2019-10-04 992 int stmmac_xsk_wakeup(struct net_device
*dev, u32 queue, u32 flags)
7544af8bd5bd27b Ong Boon Leong 2019-10-04 993 {
7544af8bd5bd27b Ong Boon Leong 2019-10-04 994 struct stmmac_priv *priv =
netdev_priv(dev);
7544af8bd5bd27b Ong Boon Leong 2019-10-04 995 u16 qp_num =
priv->plat->num_queue_pairs;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 996 struct stmmac_tx_queue *xdp_q;
4f766df18cbde3e Ong Boon Leong 2020-05-24 @997 struct stmmac_rx_queue *rx_q;
4f766df18cbde3e Ong Boon Leong 2020-05-24 998 struct stmmac_channel *rx_ch;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 @999 struct stmmac_channel *ch;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1000
4f766df18cbde3e Ong Boon Leong 2020-05-24 1001 /* queue index is relative to XDP Queue
ID.
4f766df18cbde3e Ong Boon Leong 2020-05-24 1002 * XDP Q(N) maps: XDP TXQ[qp+N], SKB
TXQ[N] & XDP/SKB RXQ[N]
4f766df18cbde3e Ong Boon Leong 2020-05-24 1003 * where 0 < N < qp_num
4f766df18cbde3e Ong Boon Leong 2020-05-24 1004 */
4f766df18cbde3e Ong Boon Leong 2020-05-24 1005 xdp_q = get_tx_queue(priv, queue +
qp_num);
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1006 ch = &priv->channel[queue +
qp_num];
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1007
4f766df18cbde3e Ong Boon Leong 2020-05-24 1008 rx_q = &priv->rx_queue[queue];
4f766df18cbde3e Ong Boon Leong 2020-05-24 1009 rx_ch = &priv->channel[queue];
4f766df18cbde3e Ong Boon Leong 2020-05-24 1010
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1011 if (test_bit(STMMAC_DOWN,
&priv->state))
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1012 return -ENETDOWN;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1013
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1014 if (!stmmac_enabled_xdp(priv))
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1015 return -ENXIO;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1016
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1017 if (queue >=
priv->plat->num_queue_pairs)
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1018 return -ENXIO;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1019
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1020 if (!xdp_q->xsk_umem)
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1021 return -ENXIO;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1022
4f766df18cbde3e Ong Boon Leong 2020-05-24 1023 if (flags & XDP_WAKEUP_TX)
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1024 stmmac_xmit_zc(xdp_q,
priv->dma_tx_size);
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1025
4f766df18cbde3e Ong Boon Leong 2020-05-24 1026 if (flags & XDP_WAKEUP_RX
&&
4f766df18cbde3e Ong Boon Leong 2020-05-24 1027
!napi_if_scheduled_mark_missed(&rx_ch->rx_napi)) {
4f766df18cbde3e Ong Boon Leong 2020-05-24 1028 if
(likely(napi_schedule_prep(&rx_ch->rx_napi)))
4f766df18cbde3e Ong Boon Leong 2020-05-24 1029
__napi_schedule(&rx_ch->rx_napi);
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1030 }
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1031
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1032 return 0;
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1033 }
7544af8bd5bd27b Ong Boon Leong 2019-10-04 1034
:::::: The code at line 999 was first introduced by commit
:::::: 7544af8bd5bd27b550fcf305257e2092726cafc5 net: stmmac: add AF_XDP zero-copy Tx
support
:::::: TO: Ong Boon Leong <boon.leong.ong(a)intel.com>
:::::: CC: Voon Weifeng <weifeng.voon(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org