ice_tx_xsk_pool(9)
π ice_tx_xsk_pool(9) β bestie edition π
okay so this is a page from the Kernel API Manual, and it's literally about ice_tx_xsk_pool, no cap. sit down, grab a strawberry drink π, we're doing networking.
β¨ NAME β¨
ice_tx_xsk_pool β assign XSK buff pool to XDP ring. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
void ice_tx_xsk_pool (struct ice_vsi *vsi , u16 qid );
it returns void, meaning it gives you nothing back and honestly? iconic. it just does the thing. periodt.
πΈ ARGUMENTS πΈ
vsiβ pointer to VSI. yes, thestruct ice_vsi. she's the main character here πqidβ index of a queue to look at XSK buff pool presence. so like, which queue are we checking for the XSK buff pool vibe check π«Ά
π₯ DESCRIPTION π₯
so what does she actually do? Sets XSK buff pool pointer on XDP ring. slay. that's the whole assignment, no extra steps, no drama π
now the interesting part, because the way this works is genuinely kind of clever:
XDP ring is picked from Rx ring, whereas Rx ring is picked based on provided queue id. so like, qid β Rx ring β XDP ring. it's giving relay race, it's giving "i know a guy who knows a guy" π
and why do we go the long way around? because queue vectors might have assigned more than one XDP ring, e.g. when user reduced the queue count on netdev. yeah. more than one. so you can't just grab any old XDP ring and call it a day, bestie, that's not how this works π
Rx ring carries a pointer to one of these XDP rings for its own purposes, such as handling XDP_TX action, therefore we can piggyback here on the rx_ring->xdp_ring assignment that was done during XDP rings initialization. that's right β we're reusing the pointer that already got set up during init. no need to go find it ourselves, we just hop on the assignment that's already there πβ¨ lowkey efficient, highkey smart.
heads up: the rx_ring->xdp_ring assignment we're leaning on here was done during XDP rings initialization β that's the whole reason this shortcut is valid. iykyk.
π§ SEE ALSO π§
- Kernel file
./drivers/net/ethernet/intel/ice/ice.hβ go read the header, she has lore π ice_vector_ch_enabled(9)ice_ptp_pf_handles_tx_interrupt(9)ice_irq_dynamic_ena(9)ice_netdev_to_pf(9)ice_is_txtime_ena(9)ice_is_txtime_cfg(9)ice_get_xp_from_qid(9)ice_rx_xsk_pool(9)β the Rx sibling, we stan a family πice_get_max_txq(9)ice_get_max_rxq(9)ice_get_main_vsi(9)ice_get_netdev_priv_vsi(9)ice_get_ctrl_vsi(9)ice_find_vsi(9)ice_is_switchdev_running(9)ice_is_adq_active(9)ice_set_rdma_cap(9)ice_clear_rdma_cap(9)ice_is_dual(9)ice_is_primary(9)ice_pf_src_tmr_owned(9)ice_get_primary_hw(9)ice_get_ctrl_pf(9)
like. that's a lot of friends. she knows everyone at this party π
okay that's the whole page, ty for coming to my ted talk π this gem lives in ./drivers/net/ethernet/intel/ice, and the date stamp on it says October 2026 β so she's from the future, and she ate. no crumbs. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms