All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC net-next 0/6] net: macb: Add XDP support and page pool integration
@ 2025-11-19 13:53 Paolo Valerio
  2025-11-19 13:53 ` [PATCH RFC net-next 1/6] cadence: macb/gem: Add page pool support Paolo Valerio
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Paolo Valerio @ 2025-11-19 13:53 UTC (permalink / raw)
  To: netdev
  Cc: Nicolas Ferre, Claudiu Beznea, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Lorenzo Bianconi

Testing were performed on Raspberry Pi 5 with upstream kernel
and all the changes are intended for gem only.

The series consists of two main changes:

- Migration from netdev_alloc_skb() to page pool allocation,
  enabling skb recycling.
  This also adds support for multi-descriptor frame reception,
  removing the previous single-descriptor approach and avoiding
  potentially large contiguous allocations for e.g. jumbo frames
  with CONFIG_PAGE_SIZE_4KB.

- XDP support: Complete XDP implementation supporting all major
  verdicts (XDP_PASS, XDP_DROP, XDP_REDIRECT, XDP_TX) along with
  the ndo_xdp_xmit function for packet redirection.

The driver now advertises NETDEV_XDP_ACT_BASIC, NETDEV_XDP_ACT_REDIRECT,
NETDEV_XDP_ACT_NDO_XMIT capabilities.

Paolo Valerio (6):
  cadence: macb/gem: Add page pool support
  cadence: macb/gem: handle multi-descriptor frame reception
  cadence: macb/gem: use the current queue number for stats
  cadence: macb/gem: add XDP support for gem
  cadence: macb/gem: make tx path skb agnostic
  cadence: macb/gem: introduce xmit support

 drivers/net/ethernet/cadence/Kconfig     |   1 +
 drivers/net/ethernet/cadence/macb.h      |  42 +-
 drivers/net/ethernet/cadence/macb_main.c | 680 ++++++++++++++++++-----
 3 files changed, 567 insertions(+), 156 deletions(-)

-- 
2.51.1


^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: [PATCH RFC net-next 6/6] cadence: macb/gem: introduce xmit support
@ 2025-12-11  7:35 kernel test robot
  0 siblings, 0 replies; 30+ messages in thread
From: kernel test robot @ 2025-12-11  7:35 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20251119135330.551835-7-pvalerio@redhat.com>
References: <20251119135330.551835-7-pvalerio@redhat.com>
TO: Paolo Valerio <pvalerio@redhat.com>

Hi Paolo,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Paolo-Valerio/cadence-macb-gem-Add-page-pool-support/20251208-222631
base:   net-next/main
patch link:    https://lore.kernel.org/r/20251119135330.551835-7-pvalerio%40redhat.com
patch subject: [PATCH RFC net-next 6/6] cadence: macb/gem: introduce xmit support
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: i386-randconfig-141-20251211 (https://download.01.org/0day-ci/archive/20251211/202512111439.XPT2quKV-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202512111439.XPT2quKV-lkp@intel.com/

smatch warnings:
drivers/net/ethernet/cadence/macb_main.c:1515 gem_xdp_run() warn: statement has no effect 'struct'

vim +/struct +1515 drivers/net/ethernet/cadence/macb_main.c

cef83d10b917a0 Paolo Valerio 2025-11-19  1491  
0091ece12c4ae5 Paolo Valerio 2025-11-19  1492  static u32 gem_xdp_run(struct macb_queue *queue, struct xdp_buff *xdp,
cef83d10b917a0 Paolo Valerio 2025-11-19  1493  		       struct net_device *dev, dma_addr_t addr)
0091ece12c4ae5 Paolo Valerio 2025-11-19  1494  {
0091ece12c4ae5 Paolo Valerio 2025-11-19  1495  	struct bpf_prog *prog;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1496  	u32 act = XDP_PASS;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1497  
0091ece12c4ae5 Paolo Valerio 2025-11-19  1498  	rcu_read_lock();
0091ece12c4ae5 Paolo Valerio 2025-11-19  1499  
0091ece12c4ae5 Paolo Valerio 2025-11-19  1500  	prog = rcu_dereference(queue->bp->prog);
0091ece12c4ae5 Paolo Valerio 2025-11-19  1501  	if (!prog)
0091ece12c4ae5 Paolo Valerio 2025-11-19  1502  		goto out;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1503  
0091ece12c4ae5 Paolo Valerio 2025-11-19  1504  	act = bpf_prog_run_xdp(prog, xdp);
0091ece12c4ae5 Paolo Valerio 2025-11-19  1505  	switch (act) {
0091ece12c4ae5 Paolo Valerio 2025-11-19  1506  	case XDP_PASS:
0091ece12c4ae5 Paolo Valerio 2025-11-19  1507  		goto out;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1508  	case XDP_REDIRECT:
0091ece12c4ae5 Paolo Valerio 2025-11-19  1509  		if (unlikely(xdp_do_redirect(dev, xdp, prog))) {
0091ece12c4ae5 Paolo Valerio 2025-11-19  1510  			act = XDP_DROP;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1511  			break;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1512  		}
0091ece12c4ae5 Paolo Valerio 2025-11-19  1513  		goto out;
cef83d10b917a0 Paolo Valerio 2025-11-19  1514  	case XDP_TX:
cef83d10b917a0 Paolo Valerio 2025-11-19 @1515  		struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);
cef83d10b917a0 Paolo Valerio 2025-11-19  1516  
cef83d10b917a0 Paolo Valerio 2025-11-19  1517  		if (!xdpf || macb_xdp_submit_frame(queue->bp, xdpf, dev, addr))
cef83d10b917a0 Paolo Valerio 2025-11-19  1518  			act = XDP_DROP;
cef83d10b917a0 Paolo Valerio 2025-11-19  1519  		goto out;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1520  	default:
0091ece12c4ae5 Paolo Valerio 2025-11-19  1521  		bpf_warn_invalid_xdp_action(dev, prog, act);
0091ece12c4ae5 Paolo Valerio 2025-11-19  1522  		fallthrough;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1523  	case XDP_ABORTED:
0091ece12c4ae5 Paolo Valerio 2025-11-19  1524  		trace_xdp_exception(dev, prog, act);
0091ece12c4ae5 Paolo Valerio 2025-11-19  1525  		fallthrough;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1526  	case XDP_DROP:
0091ece12c4ae5 Paolo Valerio 2025-11-19  1527  		break;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1528  	}
0091ece12c4ae5 Paolo Valerio 2025-11-19  1529  
0091ece12c4ae5 Paolo Valerio 2025-11-19  1530  	page_pool_put_full_page(queue->page_pool,
0091ece12c4ae5 Paolo Valerio 2025-11-19  1531  				virt_to_head_page(xdp->data), true);
0091ece12c4ae5 Paolo Valerio 2025-11-19  1532  out:
0091ece12c4ae5 Paolo Valerio 2025-11-19  1533  	rcu_read_unlock();
0091ece12c4ae5 Paolo Valerio 2025-11-19  1534  
0091ece12c4ae5 Paolo Valerio 2025-11-19  1535  	return act;
0091ece12c4ae5 Paolo Valerio 2025-11-19  1536  }
0091ece12c4ae5 Paolo Valerio 2025-11-19  1537  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2025-12-11  7:36 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-19 13:53 [PATCH RFC net-next 0/6] net: macb: Add XDP support and page pool integration Paolo Valerio
2025-11-19 13:53 ` [PATCH RFC net-next 1/6] cadence: macb/gem: Add page pool support Paolo Valerio
2025-11-27 13:21   ` Théo Lebrun
2025-12-02 17:30     ` Paolo Valerio
2025-11-19 13:53 ` [PATCH RFC net-next 2/6] cadence: macb/gem: handle multi-descriptor frame reception Paolo Valerio
2025-11-27 13:38   ` Théo Lebrun
2025-12-02 17:32     ` Paolo Valerio
2025-12-08 10:21       ` Théo Lebrun
2025-12-08 10:22         ` [PATCH 1/8] net: macb: move Rx buffers alloc from link up to open Théo Lebrun
2025-12-08 12:53         ` [PATCH RFC net-next 2/6] cadence: macb/gem: handle multi-descriptor frame reception Paolo Valerio
2025-12-09  9:01           ` Théo Lebrun
2025-11-19 13:53 ` [PATCH RFC net-next 3/6] cadence: macb/gem: use the current queue number for stats Paolo Valerio
2025-11-19 13:53 ` [PATCH RFC net-next 4/6] cadence: macb/gem: add XDP support for gem Paolo Valerio
2025-11-27 14:41   ` Théo Lebrun
2025-12-02 17:32     ` Paolo Valerio
2025-12-08 10:59       ` Théo Lebrun
2025-11-19 13:53 ` [PATCH RFC net-next 5/6] cadence: macb/gem: make tx path skb agnostic Paolo Valerio
2025-11-27 14:49   ` Théo Lebrun
2025-12-02 17:33     ` Paolo Valerio
2025-11-19 13:53 ` [PATCH RFC net-next 6/6] cadence: macb/gem: introduce xmit support Paolo Valerio
2025-11-22 20:49   ` kernel test robot
2025-11-27 15:07   ` Théo Lebrun
2025-12-02 17:34     ` Paolo Valerio
2025-12-08 11:01       ` Théo Lebrun
2025-11-25 16:50 ` [PATCH RFC net-next 0/6] net: macb: Add XDP support and page pool integration Théo Lebrun
2025-11-25 23:11   ` Paolo Valerio
2025-11-26 18:08 ` Théo Lebrun
2025-12-02 17:24   ` Paolo Valerio
2025-12-03 14:28     ` Théo Lebrun
  -- strict thread matches above, loose matches on Subject: below --
2025-12-11  7:35 [PATCH RFC net-next 6/6] cadence: macb/gem: introduce xmit support kernel test robot

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.