libeth_xdpmo_rx_hash(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– libeth_xdpmo_rx_hash(9) β€” a Kernel API Manual moment πŸ’–

okay bestie, this page lives in the Kernel API Manual section and honestly it's giving "small function, big responsibility" ✨


🌸 NAME 🌸

libeth_xdpmo_rx_hash β€” converts a &libeth_rx_pt into an XDP RSS hash metadata. that's it, that's the whole gig, and she ate πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int libeth_xdpmo_rx_hash (u32 *hash , enum xdp_rss_hash_type *rss_type ,
u32 val , struct libeth_rx_pt pt );

look at her. four args. zero chill. πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • hash β€” a pointer to the variable where the hash gets written. she's not returning it, she's placing it, main character energy fr πŸ’«
  • rss_type β€” a pointer to the variable where the hash type gets written. yes, another pointer. yes, you have to keep track. you got this 🫢
  • val β€” the hash value straight out of the HW descriptor. raw. unprocessed. iconic πŸ’€
  • pt β€” the libeth parsed packet type. the libeth parsed one, not just any packet type, iykyk πŸ‘‘

⭐ DESCRIPTION ⭐

so here's the vibe: this function handles the zeroed / not-available hash situation and converts the libeth parsed packet type into the corresponding XDP RSS hash type. lowkey the whole point of her existence πŸ’–

she's meant to be called at the end of the xdp_metadata_ops idpf_xdpmo::xmo_rx_hash implementation. like, last. the finale. the closing number 🎬

⚠️ important caveat bestie, do not skip this: if your driver doesn't use a constant packet type lookup table but instead generates it at runtime, it must call libeth_rx_pt_gen_hash_type(pt) to generate the XDP RSS hash type for each packet type. no cap, it's a must, not a maybe πŸ™ˆ

🌈 RETURN 🌈

  • 0 on success β€” slay ✨
  • -ENODATA when the hash is not available β€” she's just not there, and that's valid 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/net/libeth/xdp.h, plus the whole friend group:

struct libeth_xdp_buff(9), __LIBETH_XDP_ONSTACK_BUFF(9), LIBETH_XDP_ONSTACK_BUFF(9), libeth_xdpsq_num(9), libeth_xdpsq_shared(9), libeth_xdpsq_id(9), libeth_xdpsq_get(9), libeth_xdpsq_put(9), libeth_xdpsq_lock(9), libeth_xdpsq_unlock(9), libeth_xdpsq_deinit_timer(9), libeth_xdpsq_queue_timer(9), libeth_xdpsq_run_timer(9), enum (anonymous)(9), enum (anonymous)(9), struct libeth_xdp_tx_frame(9), struct libeth_xdp_tx_bulk(9), LIBETH_XDP_ONSTACK_BULK(9), struct libeth_xdpsq(9), struct libeth_xdp_tx_desc(9), libeth_xdp_ptr_to_priv(9), libeth_xdp_priv_to_ptr(9), libeth_xdp_tx_xmit_bulk(9), libeth_xdp_tx_queue_head(9), libeth_xdp_tx_queue_frag(9), libeth_xdp_tx_queue_bulk(9), libeth_xdp_tx_fill_stats(9), libeth_xdp_tx_fill_buf(9), __libeth_xdp_tx_flush_bulk(9), libeth_xdp_tx_flush_bulk(9), libeth_xdp_xmit_init_bulk(9), libeth_xdp_xmit_frame_dma(9), libeth_xdp_xmit_queue_head(9), libeth_xdp_xmit_queue_frag(9), libeth_xdp_xmit_queue_bulk(9), libeth_xdp_xmit_fill_buf(9), libeth_xdp_xmit_flush_bulk(9), __libeth_xdp_xmit_do_bulk(9), libeth_xdp_xmit_do_bulk(9), libeth_xdp_tx_init_bulk(9), libeth_xdp_init_buff(9), libeth_xdp_save_buff(9), libeth_xdp_return_stash(9), libeth_xdp_return_buff(9), libeth_xdp_prepare_buff(9), libeth_xdp_process_buff(9), libeth_xdp_buff_stats_frags(9), __libeth_xdp_run_prog(9), __libeth_xdp_run_flush(9), libeth_xdp_run_prog(9), __libeth_xdp_run_pass(9), libeth_xdp_run_pass(9), libeth_xdp_finalize_rx(9), LIBETH_XDP_DEFINE_TIMER(9), LIBETH_XDP_DEFINE_FLUSH_TX(9), LIBETH_XDP_DEFINE_FLUSH_XMIT(9), LIBETH_XDP_DEFINE_RUN_PROG(9), LIBETH_XDP_DEFINE_RUN_PASS(9), LIBETH_XDP_DEFINE_RUN(9), LIBETH_XDP_DEFINE_FINALIZE(9), libeth_xdp_buff_to_rq(9), __libeth_xdp_complete_tx(9), libeth_xdp_set_features(9), libeth_xdp_set_features_noredir(9)


and that's the page, bestie πŸ§šπŸ’œ she ships from ./include/net/libeth and her version date is October 2026 β€” go be normal about it πŸ“

πŸ“¦ where this page comes from