ice_run_xdp_zc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🧊 NAME πŸ’…

ice_run_xdp_zc β€” bestie, this is the one that Executes an XDP program in zero-copy path. Yes, that zero-copy path. The fast one. The one that gives main character energy at line rate. Obsessed.

This page lives in the Kernel API Manual (section 9, kernel-space girlies only 🫢), so if you were looking for the userspace version, wrong room, but I still love you.


✨ SYNOPSIS ✨

int ice_run_xdp_zc (struct ice_rx_ring *rx_ring , struct xdp_buff *xdp ,
struct bpf_prog *xdp_prog , struct ice_tx_ring *xdp_ring , struct
xsk_buff_pool *xsk_pool );

Five args, one int coming back, zero copies of your packet. It's giving efficiency. πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

Okay so here's the cast of characters, and every single one of them matters:

  • rx_ring β€” the Rx ring. Your receiving era. 🌸
  • xdp β€” the xdp_buff used as input to the XDP program. This is the packet's little passport before BPF does its thing. ✨
  • xdp_prog β€” the XDP program to run. The actual star of the show, no cap. πŸ‘‘
  • xdp_ring β€” the ring to be used for XDP_TX action. If your program says "send it back out," this is where it goes. πŸ“
  • xsk_pool β€” the AF_XDP buffer pool pointer. The zero-copy supply closet, lowkey essential. πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

It runs the XDP program and tells you what happened, and the answer is always one of these:

  • ICE_XDP_PASS
  • ICE_XDP_CONSUMED
  • ICE_XDP_TX
  • ICE_XDP_REDIR

That's the whole verdict list, bestie β€” Returns any of ICE_XDP_{PASS, CONSUMED, TX, REDIR}. Four possible plot twists. Pick your fighter. πŸ’…

Fr fr this is the zero-copy path, so treat those return codes like gospel β€” no guessing at extra behaviour, I'm just telling you what the page tells you. πŸ™ˆ

πŸ’– SEE ALSO πŸ’–

The source itself, if you wanna read the lore directly (and honestly? iconic behaviour):

  • ./drivers/net/ethernet/intel/ice/ice_xsk.c

And the whole friend group, all in section 9, all invited to the group chat 🫢:

ice_qvec_toggle_napi(9), ice_qvec_dis_irq(9), ice_qvec_cfg_msix(9), ice_qvec_ena_irq(9), ice_xsk_pool_disable(9), ice_xsk_pool_enable(9), ice_realloc_rx_xdp_bufs(9), ice_xsk_pool_setup(9), ice_fill_rx_descs(9), __ice_alloc_rx_bufs_zc(9), ice_alloc_rx_bufs_zc(9), ice_clean_xdp_irq_zc(9), ice_xmit_xdp_tx_zc(9), ice_clean_rx_irq_zc(9), ice_xmit_pkt(9), ice_xmit_pkt_batch(9), ice_fill_tx_hw_ring(9), ice_xmit_zc(9), ice_xsk_wakeup(9), ice_xsk_any_rx_ring_ena(9), ice_xsk_clean_rx_ring(9), ice_xsk_clean_xdp_ring(9)


✨ that's the whole page, mwah ✨

Shoutout to the source at ./drivers/net/ethernet/intel/ice, dated October 2026 β€” that's the version and date, and yes I'm putting it in the sign-off because it deserves a moment. πŸŽ€ Go forth, run your XDP program, stay zero-copy. πŸ’–

πŸ“¦ where this page comes from