From: kernel test robot <lkp@intel.com>
To: "Clément Léger" <clement.leger@bootlin.com>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Vladimir Oltean" <vladimir.oltean@nxp.com>,
"Claudiu Manoil" <claudiu.manoil@nxp.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
UNGLinuxDriver@microchip.com, "Andrew Lunn" <andrew@lunn.ch>
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
"Clément Léger" <clement.leger@bootlin.com>
Subject: Re: [PATCH net-next v3 4/4] net: ocelot: add FDMA support
Date: Sat, 27 Nov 2021 04:04:11 +0800 [thread overview]
Message-ID: <202111270323.iOXcpsFC-lkp@intel.com> (raw)
In-Reply-To: <20211126172739.329098-5-clement.leger@bootlin.com>
Hi "Clément,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on net/master linus/master v5.16-rc2 next-20211126]
[cannot apply to net-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Cl-ment-L-ger/Add-FDMA-support-on-ocelot-switch-driver/20211127-013140
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20211127/202111270323.iOXcpsFC-lkp@intel.com/config)
compiler: m68k-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/07c95fe9105be293d2b7edf193e5fd139c70c194
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cl-ment-L-ger/Add-FDMA-support-on-ocelot-switch-driver/20211127-013140
git checkout 07c95fe9105be293d2b7edf193e5fd139c70c194
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/ethernet/mscc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/mscc/ocelot_fdma.c: In function 'ocelot_fdma_tx_cleanup':
>> drivers/net/ethernet/mscc/ocelot_fdma.c:306:22: warning: variable 'tmp_head' set but not used [-Wunused-but-set-variable]
306 | unsigned int tmp_head, new_null_llp_idx;
| ^~~~~~~~
vim +/tmp_head +306 drivers/net/ethernet/mscc/ocelot_fdma.c
302
303 static void ocelot_fdma_tx_cleanup(struct ocelot_fdma *fdma, int budget)
304 {
305 struct ocelot_fdma_ring *ring = &fdma->inj;
> 306 unsigned int tmp_head, new_null_llp_idx;
307 struct ocelot_fdma_dcb *dcb;
308 bool end_of_list = false;
309 int ret;
310
311 spin_lock_bh(&fdma->xmit_lock);
312
313 /* Purge the TX packets that have been sent up to the NULL llp or the
314 * end of done list.
315 */
316 while (!ocelot_fdma_ring_empty(&fdma->inj)) {
317 dcb = &ring->dcbs[ring->head];
318 if (!(dcb->hw->stat & MSCC_FDMA_DCB_STAT_PD))
319 break;
320
321 tmp_head = ring->head;
322 ring->head = ocelot_fdma_idx_incr(ring->head);
323
324 dma_unmap_single(fdma->dev, dcb->mapping, dcb->mapped_size,
325 DMA_TO_DEVICE);
326 napi_consume_skb(dcb->skb, budget);
327
328 /* If we hit the NULL LLP, stop, we might need to reload FDMA */
329 if (dcb->hw->llp == 0) {
330 end_of_list = true;
331 break;
332 }
333 }
334
335 /* If there is still some DCBs to be processed by the FDMA or if the
336 * pending list is empty, there is no need to restart the FDMA.
337 */
338 if (!end_of_list || ocelot_fdma_ring_empty(&fdma->inj))
339 goto out_unlock;
340
341 ret = ocelot_fdma_wait_chan_safe(fdma, MSCC_FDMA_INJ_CHAN);
342 if (ret) {
343 dev_warn(fdma->dev, "Failed to wait for TX channel to stop\n");
344 goto out_unlock;
345 }
346
347 /* Set NULL LLP */
348 new_null_llp_idx = ocelot_fdma_idx_decr(ring->tail);
349 dcb = &ring->dcbs[new_null_llp_idx];
350 dcb->hw->llp = 0;
351
352 dcb = &ring->dcbs[ring->head];
353 ocelot_fdma_activate_chan(fdma, dcb, MSCC_FDMA_INJ_CHAN);
354
355 out_unlock:
356 spin_unlock_bh(&fdma->xmit_lock);
357 }
358
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2021-11-26 20:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 17:27 [PATCH net-next v3 0/4] Add FDMA support on ocelot switch driver Clément Léger
2021-11-26 17:27 ` [PATCH net-next v3 1/4] dt-bindings: net: mscc,vsc7514-switch: convert txt bindings to yaml Clément Léger
2021-11-26 17:50 ` Vladimir Oltean
2021-11-26 18:00 ` Clément Léger
2021-11-26 18:04 ` Vladimir Oltean
2021-11-26 22:41 ` Andrew Lunn
2021-11-27 7:13 ` Clément Léger
2021-11-26 17:27 ` [PATCH net-next v3 2/4] net: ocelot: add support to get port mac from device-tree Clément Léger
2021-11-26 17:27 ` [PATCH net-next v3 3/4] net: ocelot: pre-compute injection frame header content Clément Léger
2021-11-26 17:54 ` Vladimir Oltean
2021-11-26 17:57 ` Clément Léger
2021-11-26 17:27 ` [PATCH net-next v3 4/4] net: ocelot: add FDMA support Clément Léger
2021-11-26 20:04 ` kernel test robot [this message]
2021-11-27 14:58 ` Vladimir Oltean
2021-11-29 8:19 ` Clément Léger
2021-11-29 17:40 ` Vladimir Oltean
2021-12-01 9:29 ` Clément Léger
2021-12-03 11:23 ` Vladimir Oltean
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=202111270323.iOXcpsFC-lkp@intel.com \
--to=lkp@intel.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=clement.leger@bootlin.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=vladimir.oltean@nxp.com \
/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).