[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202103231816.XMhD6pts-lkp@intel.com>
Date: Tue, 23 Mar 2021 18:10:28 +0800
From: kernel test robot <lkp@...el.com>
To: "Song, Yoong Siang" <yoong.siang.song@...el.com>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org,
Voon Weifeng <weifeng.voon@...el.com>,
Ong Boon Leong <boon.leong.ong@...el.com>
Subject: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1948:12: warning:
stack frame size of 1048 bytes in function 'stmmac_tx_clean'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 84196390620ac0e5070ae36af84c137c6216a7dc
commit: aa042f60e4961d4bec57e3268624df1f3a6befa4 net: stmmac: Add support to Ethtool get/set ring parameters
date: 6 months ago
config: mips-randconfig-r023-20210322 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 14696baaf4c43fe53f738bc292bbe169eed93d5d)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aa042f60e4961d4bec57e3268624df1f3a6befa4
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout aa042f60e4961d4bec57e3268624df1f3a6befa4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3677:12: warning: stack frame size of 1664 bytes in function 'stmmac_rx' [-Wframe-larger-than=]
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
^
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1948:12: warning: stack frame size of 1048 bytes in function 'stmmac_tx_clean' [-Wframe-larger-than=]
static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue)
^
2 warnings generated.
vim +/stmmac_tx_clean +1948 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1941
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1942 /**
732fdf0e5253e9 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2014-11-18 1943 * stmmac_tx_clean - to manage the transmission completion
32ceabcad3c8ab drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2013-04-08 1944 * @priv: driver private structure
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1945 * @queue: TX queue index
732fdf0e5253e9 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2014-11-18 1946 * Description: it reclaims the transmit resources after transmission completes.
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1947 */
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 @1948 static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue)
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1949 {
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1950 struct stmmac_tx_queue *tx_q = &priv->tx_queue[queue];
3897957494d979 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Beniamino Galvani 2015-01-21 1951 unsigned int bytes_compl = 0, pkts_compl = 0;
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 1952 unsigned int entry, count = 0;
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1953
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 1954 __netif_tx_lock_bh(netdev_get_tx_queue(priv->dev, queue));
a9097a9666fd7b drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2011-10-18 1955
9125cdd1be1199 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2012-11-25 1956 priv->xstats.tx_clean++;
9125cdd1be1199 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2012-11-25 1957
8d5f4b07174976 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Bernd Edlinger 2017-10-21 1958 entry = tx_q->dirty_tx;
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 1959 while ((entry != tx_q->cur_tx) && (count < budget)) {
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1960 struct sk_buff *skb = tx_q->tx_skbuff[entry];
c24602ef866493 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2013-03-26 1961 struct dma_desc *p;
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1962 int status;
c24602ef866493 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2013-03-26 1963
c24602ef866493 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2013-03-26 1964 if (priv->extend_desc)
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1965 p = (struct dma_desc *)(tx_q->dma_etx + entry);
579a25a854d482 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2020-01-13 1966 else if (tx_q->tbs & STMMAC_TBS_AVAIL)
579a25a854d482 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2020-01-13 1967 p = &tx_q->dma_entx[entry].basic;
c24602ef866493 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2013-03-26 1968 else
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1969 p = tx_q->dma_tx + entry;
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1970
42de047d60bc5d drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-04-16 1971 status = stmmac_tx_status(priv, &priv->dev->stats,
42de047d60bc5d drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-04-16 1972 &priv->xstats, p, priv->ioaddr);
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1973 /* Check if the descriptor is owned by the DMA */
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1974 if (unlikely(status & tx_dma_own))
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1975 break;
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1976
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 1977 count++;
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 1978
a6b25da5e7ba21 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Niklas Cassel 2018-02-26 1979 /* Make sure descriptor fields are read after reading
a6b25da5e7ba21 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Niklas Cassel 2018-02-26 1980 * the own bit.
a6b25da5e7ba21 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Niklas Cassel 2018-02-26 1981 */
a6b25da5e7ba21 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Niklas Cassel 2018-02-26 1982 dma_rmb();
a6b25da5e7ba21 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Niklas Cassel 2018-02-26 1983
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1984 /* Just consider the last segment and ...*/
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1985 if (likely(!(status & tx_not_ls))) {
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1986 /* ... verify the status error condition */
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1987 if (unlikely(status & tx_err)) {
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1988 priv->dev->stats.tx_errors++;
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1989 } else {
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1990 priv->dev->stats.tx_packets++;
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1991 priv->xstats.tx_pkt_n++;
c363b6586cd424 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Fabrice Gasnier 2016-02-29 1992 }
ba1ffd74df74a9 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2016-11-14 1993 stmmac_get_tx_hwtstamp(priv, p, skb);
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1994 }
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 1995
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1996 if (likely(tx_q->tx_skbuff_dma[entry].buf)) {
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1997 if (tx_q->tx_skbuff_dma[entry].map_as_page)
362b37be01edc7 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2014-08-27 1998 dma_unmap_page(priv->device,
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 1999 tx_q->tx_skbuff_dma[entry].buf,
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2000 tx_q->tx_skbuff_dma[entry].len,
362b37be01edc7 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2014-08-27 2001 DMA_TO_DEVICE);
362b37be01edc7 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2014-08-27 2002 else
cf32deec16e4e8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Rayagond Kokatanur 2013-03-26 2003 dma_unmap_single(priv->device,
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2004 tx_q->tx_skbuff_dma[entry].buf,
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2005 tx_q->tx_skbuff_dma[entry].len,
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2006 DMA_TO_DEVICE);
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2007 tx_q->tx_skbuff_dma[entry].buf = 0;
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2008 tx_q->tx_skbuff_dma[entry].len = 0;
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2009 tx_q->tx_skbuff_dma[entry].map_as_page = false;
cf32deec16e4e8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Rayagond Kokatanur 2013-03-26 2010 }
f748be531d7012 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Alexandre TORGUE 2016-04-01 2011
2c520b1c9cfa7d drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-04-16 2012 stmmac_clean_desc3(priv, tx_q, p);
f748be531d7012 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Alexandre TORGUE 2016-04-01 2013
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2014 tx_q->tx_skbuff_dma[entry].last_segment = false;
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2015 tx_q->tx_skbuff_dma[entry].is_jumbo = false;
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2016
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2017 if (likely(skb != NULL)) {
3897957494d979 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Beniamino Galvani 2015-01-21 2018 pkts_compl++;
3897957494d979 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Beniamino Galvani 2015-01-21 2019 bytes_compl += skb->len;
7c565c33464798 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Eric W. Biederman 2014-03-15 2020 dev_consume_skb_any(skb);
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2021 tx_q->tx_skbuff[entry] = NULL;
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2022 }
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2023
42de047d60bc5d drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-04-16 2024 stmmac_release_tx_desc(priv, p, priv->mode);
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2025
aa042f60e4961d drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Song, Yoong Siang 2020-09-16 2026 entry = STMMAC_GET_ENTRY(entry, priv->dma_tx_size);
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2027 }
ce736788e8a92c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2028 tx_q->dirty_tx = entry;
3897957494d979 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Beniamino Galvani 2015-01-21 2029
c22a3f48ef99ea drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2030 netdev_tx_completed_queue(netdev_get_tx_queue(priv->dev, queue),
c22a3f48ef99ea drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2031 pkts_compl, bytes_compl);
c22a3f48ef99ea drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2032
c22a3f48ef99ea drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2033 if (unlikely(netif_tx_queue_stopped(netdev_get_tx_queue(priv->dev,
c22a3f48ef99ea drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2034 queue))) &&
aa042f60e4961d drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Song, Yoong Siang 2020-09-16 2035 stmmac_tx_avail(priv, queue) > STMMAC_TX_THRESH(priv)) {
3897957494d979 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Beniamino Galvani 2015-01-21 2036
b3e51069627e2b drivers/net/ethernet/stmicro/stmmac/stmmac_main.c LABBE Corentin 2016-11-16 2037 netif_dbg(priv, tx_done, priv->dev,
b3e51069627e2b drivers/net/ethernet/stmicro/stmmac/stmmac_main.c LABBE Corentin 2016-11-16 2038 "%s: restart transmit\n", __func__);
c22a3f48ef99ea drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Joao Pinto 2017-04-06 2039 netif_tx_wake_queue(netdev_get_tx_queue(priv->dev, queue));
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2040 }
d765955d2ae0b8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2012-06-27 2041
d765955d2ae0b8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2012-06-27 2042 if ((priv->eee_enabled) && (!priv->tx_path_in_lpi_mode)) {
d765955d2ae0b8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2012-06-27 2043 stmmac_enable_eee_mode(priv);
f5351ef73e476d drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2013-06-18 2044 mod_timer(&priv->eee_ctrl_timer, STMMAC_LPI_T(eee_timer));
d765955d2ae0b8 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Giuseppe CAVALLARO 2012-06-27 2045 }
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 2046
4ccb45857c2c07 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2019-02-19 2047 /* We still have pending packets, let's call for a new scheduling */
4ccb45857c2c07 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2019-02-19 2048 if (tx_q->dirty_tx != tx_q->cur_tx)
3755b21b04b096 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2019-12-18 2049 mod_timer(&tx_q->txtimer, STMMAC_COAL_TIMER(priv->tx_coal_timer));
4ccb45857c2c07 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2019-02-19 2050
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 2051 __netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue));
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 2052
8fce3331702316 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c Jose Abreu 2018-09-17 2053 return count;
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2054 }
47dd7a540b8a0c drivers/net/stmmac/stmmac_main.c Giuseppe Cavallaro 2009-10-14 2055
:::::: The code at line 1948 was first introduced by commit
:::::: 8fce3331702316d4bcfeb0771c09ac75d2192bbc net: stmmac: Rework coalesce timer and fix multi-queue races
:::::: TO: Jose Abreu <Jose.Abreu@...opsys.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32880 bytes)
Powered by blists - more mailing lists