From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH net-next RFC 1/2] page_pool: add page recycling support based on elevated refcnt
Date: Thu, 01 Jul 2021 01:14:09 +0800 [thread overview]
Message-ID: <202107010105.mCGaOYdO-lkp@intel.com> (raw)
In-Reply-To: <1625044676-12441-2-git-send-email-linyunsheng@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 11300 bytes --]
Hi Yunsheng,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Yunsheng-Lin/add-elevated-refcnt-support-for-page-pool/20210630-172028
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b6df00789e2831fff7a2c65aa7164b2a4dcbe599
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-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/0day-ci/linux/commit/036f121934cee24c956537edfcaae70d17bd4918
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yunsheng-Lin/add-elevated-refcnt-support-for-page-pool/20210630-172028
git checkout 036f121934cee24c956537edfcaae70d17bd4918
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/net/ethernet/ti/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_rx_handler':
>> drivers/net/ethernet/ti/cpsw.c:434:2: error: too many arguments to function 'skb_mark_for_recycle'
434 | skb_mark_for_recycle(skb, page, pool);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/if_ether.h:19,
from drivers/net/ethernet/ti/cpsw.c:17:
include/linux/skbuff.h:4714:20: note: declared here
4714 | static inline void skb_mark_for_recycle(struct sk_buff *skb)
| ^~~~~~~~~~~~~~~~~~~~
--
drivers/net/ethernet/ti/cpsw_new.c: In function 'cpsw_rx_handler':
>> drivers/net/ethernet/ti/cpsw_new.c:377:2: error: too many arguments to function 'skb_mark_for_recycle'
377 | skb_mark_for_recycle(skb, page, pool);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/if_ether.h:19,
from drivers/net/ethernet/ti/cpsw_new.c:14:
include/linux/skbuff.h:4714:20: note: declared here
4714 | static inline void skb_mark_for_recycle(struct sk_buff *skb)
| ^~~~~~~~~~~~~~~~~~~~
vim +/skb_mark_for_recycle +434 drivers/net/ethernet/ti/cpsw.c
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 343
1a3b50566f259e Olof Johansson 2013-12-11 344 static void cpsw_rx_handler(void *token, int len, int status)
df828598a75573 Mugunthan V N 2012-03-18 345 {
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 346 struct page *new_page, *page = token;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 347 void *pa = page_address(page);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 348 struct cpsw_meta_xdp *xmeta = pa + CPSW_XMETA_OFFSET;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 349 struct cpsw_common *cpsw = ndev_to_cpsw(xmeta->ndev);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 350 int pkt_size = cpsw->rx_packet_max;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 351 int ret = 0, port, ch = xmeta->ch;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 352 int headroom = CPSW_HEADROOM;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 353 struct net_device *ndev = xmeta->ndev;
a9423120343cb5 Ivan Khoronzhuk 2018-11-12 354 struct cpsw_priv *priv;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 355 struct page_pool *pool;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 356 struct sk_buff *skb;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 357 struct xdp_buff xdp;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 358 dma_addr_t dma;
df828598a75573 Mugunthan V N 2012-03-18 359
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 360 if (cpsw->data.dual_emac && status >= 0) {
fea49f60c9b748 Ivan Khoronzhuk 2018-07-31 361 port = CPDMA_RX_SOURCE_PORT(status);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 362 if (port)
fea49f60c9b748 Ivan Khoronzhuk 2018-07-31 363 ndev = cpsw->slaves[--port].ndev;
fea49f60c9b748 Ivan Khoronzhuk 2018-07-31 364 }
d9ba8f9e6298af Mugunthan V N 2013-02-11 365
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 366 priv = netdev_priv(ndev);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 367 pool = cpsw->page_pool[ch];
16e5c57da61cda Mugunthan V N 2014-04-10 368 if (unlikely(status < 0) || unlikely(!netif_running(ndev))) {
a0e2c822bf0a10 Mugunthan V N 2014-09-10 369 /* In dual emac mode check for all interfaces */
d5bc1613d02f1c Ivan Khoronzhuk 2017-02-14 370 if (cpsw->data.dual_emac && cpsw->usage_count &&
fe734d0aa9e120 Ivan Khoronzhuk 2017-01-19 371 (status >= 0)) {
a0e2c822bf0a10 Mugunthan V N 2014-09-10 372 /* The packet received is for the interface which
a0e2c822bf0a10 Mugunthan V N 2014-09-10 373 * is already down and the other interface is up
dbedd44e982d61 Joe Perches 2015-03-06 374 * and running, instead of freeing which results
a0e2c822bf0a10 Mugunthan V N 2014-09-10 375 * in reducing of the number of rx descriptor in
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 376 * DMA engine, requeue page back to cpdma.
a0e2c822bf0a10 Mugunthan V N 2014-09-10 377 */
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 378 new_page = page;
a0e2c822bf0a10 Mugunthan V N 2014-09-10 379 goto requeue;
a0e2c822bf0a10 Mugunthan V N 2014-09-10 380 }
a0e2c822bf0a10 Mugunthan V N 2014-09-10 381
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 382 /* the interface is going down, pages are purged */
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 383 page_pool_recycle_direct(pool, page);
df828598a75573 Mugunthan V N 2012-03-18 384 return;
df828598a75573 Mugunthan V N 2012-03-18 385 }
b4727e69b81b71 Sebastian Siewior 2013-04-23 386
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 387 new_page = page_pool_dev_alloc_pages(pool);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 388 if (unlikely(!new_page)) {
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 389 new_page = page;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 390 ndev->stats.rx_dropped++;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 391 goto requeue;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 392 }
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 393
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 394 if (priv->xdp_prog) {
be9df4aff65f18 Lorenzo Bianconi 2020-12-22 395 int headroom = CPSW_HEADROOM, size = len;
43b5169d8355cc Lorenzo Bianconi 2020-12-22 396
be9df4aff65f18 Lorenzo Bianconi 2020-12-22 397 xdp_init_buff(&xdp, PAGE_SIZE, &priv->xdp_rxq[ch]);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 398 if (status & CPDMA_RX_VLAN_ENCAP) {
be9df4aff65f18 Lorenzo Bianconi 2020-12-22 399 headroom += CPSW_RX_VLAN_ENCAP_HDR_SIZE;
be9df4aff65f18 Lorenzo Bianconi 2020-12-22 400 size -= CPSW_RX_VLAN_ENCAP_HDR_SIZE;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 401 }
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 402
be9df4aff65f18 Lorenzo Bianconi 2020-12-22 403 xdp_prepare_buff(&xdp, pa, headroom, size, false);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 404
c5013ac1dd0e11 Grygorii Strashko 2019-11-20 405 port = priv->emac_port + cpsw->data.dual_emac;
a8225efdf31e94 Lorenzo Bianconi 2021-02-03 406 ret = cpsw_run_xdp(priv, ch, &xdp, page, port, &len);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 407 if (ret != CPSW_XDP_PASS)
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 408 goto requeue;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 409
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 410 headroom = xdp.data - xdp.data_hard_start;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 411
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 412 /* XDP prog can modify vlan tag, so can't use encap header */
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 413 status &= ~CPDMA_RX_VLAN_ENCAP;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 414 }
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 415
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 416 /* pass skb to netstack if no XDP prog or returned XDP_PASS */
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 417 skb = build_skb(pa, cpsw_rxbuf_total_len(pkt_size));
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 418 if (!skb) {
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 419 ndev->stats.rx_dropped++;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 420 page_pool_recycle_direct(pool, page);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 421 goto requeue;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 422 }
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 423
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 424 skb_reserve(skb, headroom);
df828598a75573 Mugunthan V N 2012-03-18 425 skb_put(skb, len);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 426 skb->dev = ndev;
a3a41d2f948746 Grygorii Strashko 2018-03-15 427 if (status & CPDMA_RX_VLAN_ENCAP)
a3a41d2f948746 Grygorii Strashko 2018-03-15 428 cpsw_rx_vlan_encap(skb);
a9423120343cb5 Ivan Khoronzhuk 2018-11-12 429 if (priv->rx_ts_enabled)
2a05a622d88a8e Ivan Khoronzhuk 2016-08-10 430 cpts_rx_timestamp(cpsw->cpts, skb);
df828598a75573 Mugunthan V N 2012-03-18 431 skb->protocol = eth_type_trans(skb, ndev);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 432
a078d981f8632f Lorenzo Bianconi 2021-06-15 433 /* mark skb for recycling */
a078d981f8632f Lorenzo Bianconi 2021-06-15 @434 skb_mark_for_recycle(skb, page, pool);
df828598a75573 Mugunthan V N 2012-03-18 435 netif_receive_skb(skb);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 436
8dc43ddc9fe0af Tobias Klauser 2014-03-10 437 ndev->stats.rx_bytes += len;
8dc43ddc9fe0af Tobias Klauser 2014-03-10 438 ndev->stats.rx_packets++;
df828598a75573 Mugunthan V N 2012-03-18 439
a0e2c822bf0a10 Mugunthan V N 2014-09-10 440 requeue:
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 441 xmeta = page_address(new_page) + CPSW_XMETA_OFFSET;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 442 xmeta->ndev = ndev;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 443 xmeta->ch = ch;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 444
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 445 dma = page_pool_get_dma_addr(new_page) + CPSW_HEADROOM;
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 446 ret = cpdma_chan_submit_mapped(cpsw->rxv[ch].ch, new_page, dma,
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 447 pkt_size, 0);
871e846585919a Ivan Khoronzhuk 2019-06-15 448 if (ret < 0) {
871e846585919a Ivan Khoronzhuk 2019-06-15 449 WARN_ON(ret == -ENOMEM);
9ed4050c0d7576 Ivan Khoronzhuk 2019-07-09 450 page_pool_recycle_direct(pool, new_page);
df828598a75573 Mugunthan V N 2012-03-18 451 }
871e846585919a Ivan Khoronzhuk 2019-06-15 452 }
df828598a75573 Mugunthan V N 2012-03-18 453
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 64229 bytes --]
next prev parent reply other threads:[~2021-06-30 17:14 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 9:17 [PATCH net-next RFC 0/2] add elevated refcnt support for page pool Yunsheng Lin
2021-06-30 9:17 ` [PATCH net-next RFC 1/2] page_pool: add page recycling support based on elevated refcnt Yunsheng Lin
2021-06-30 15:08 ` kernel test robot
2021-06-30 17:14 ` kernel test robot [this message]
2021-07-02 9:42 ` Jesper Dangaard Brouer
2021-07-02 10:15 ` Yunsheng Lin
2021-07-06 4:54 ` Ilias Apalodimas
2021-07-06 6:46 ` Yunsheng Lin
2021-07-06 8:18 ` Ilias Apalodimas
2021-07-06 20:45 ` Alexander Duyck
2021-07-07 3:05 ` Yunsheng Lin
2021-07-07 15:01 ` Alexander Duyck
2021-07-07 19:03 ` Ilias Apalodimas
2021-07-07 21:49 ` Alexander Duyck
2021-07-08 14:21 ` Ilias Apalodimas
2021-07-08 14:24 ` Alexander Duyck
2021-07-08 14:50 ` Ilias Apalodimas
2021-07-08 15:17 ` Ilias Apalodimas
2021-07-08 15:29 ` Alexander Duyck
2021-07-08 15:36 ` Ilias Apalodimas
2021-07-08 15:41 ` Alexander Duyck
2021-07-08 15:47 ` Ilias Apalodimas
2021-07-08 2:27 ` Yunsheng Lin
2021-07-08 15:36 ` Alexander Duyck
2021-07-09 6:26 ` Yunsheng Lin
2021-07-09 14:15 ` Alexander Duyck
2021-07-10 9:16 ` [Linuxarm] " Yunsheng Lin
2021-06-30 9:17 ` [PATCH net-next RFC 2/2] net: hns3: support skb's frag page recycling based on page pool Yunsheng Lin
2021-07-02 8:36 ` [PATCH net-next RFC 0/2] add elevated refcnt support for " Ilias Apalodimas
2021-07-02 13:39 ` Matteo Croce
2021-07-06 15:51 ` Russell King (Oracle)
2021-07-06 23:19 ` Matteo Croce
2021-07-07 16:50 ` Marcin Wojtas
2021-07-09 4:15 ` Matteo Croce
2021-07-09 6:40 ` Yunsheng Lin
2021-07-09 6:42 ` Ilias Apalodimas
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=202107010105.mCGaOYdO-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.