ice_gen_key_word(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ice_gen_key_word β€” Kernel API Manual, but make it make sense πŸ’–

okay so bestie, we're deep in the Intel ice driver today and the function we're stanning is ice_gen_key_word β€” it generates 16-bits of a key/mask word ✨ that's literally the whole NAME section, no cap, that's the entire vibe of this whole page. It lives in the Kernel API Manual (section 9, the grown-up kernel-internals section πŸŽ€), so grab a snack and let's get into it.


✨ SYNOPSIS ✨

int ice_gen_key_word (u8 val , u8 valid , u8 dont_care , u8 nvr_mtch ,
u8 *key , u8 *key_inv );

six params, returns an int, that's the whole handshake 🫢


🌸 ARGUMENTS 🌸

  • val β€” the value πŸ’… just... the value. that's it.
  • valid β€” the valid bits mask, aka change only the valid bits β€” this is the "only touch these ones bestie" mask.
  • dont_care β€” the don't care mask, the bits you literally cannot be bothered about πŸ™ˆ
  • nvr_mtch β€” the never match mask, the bits that must never match, periodt.
  • key β€” pointer to an array of where the resulting key portion goes ✨
  • key_inv β€” pointer to an array of where the resulting key invert portion goes πŸ¦‹
ngl the whole page is 8-bit masks in, 16-bit mask word out β€” keep your pointer game strong for key and key_inv πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

So what does it actually do? It generates 16-bits from a 8-bit value, an 8-bit don't care mask and an 8-bit never match mask. The 16-bits of output get divided into 8 bits of key and 8 bits of key invert. it's giving split energy ✨

Here's the layout exactly how the page lays it out β€” eyes on the bit diagram bestie, don't blink 😭

Input: val:         b0  1  0  1  0  1 dont_care:   b0  0  1  1  0  0
never_mtch:  b0  0  0  0  1  1 ------------------------------ Result:
key:        b01 10 11 11 00 00

that's the whole input β†’ result pipeline laid out in the page, and yes the formatting is A Lot πŸ’€ but the bits are the bits.

lowkey the diagram is the main character here β€” val, dont_care, never_mtch go in, key comes out, and that's the flex πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹

First up, the source file for this whole situation:

  • Kernel file ./drivers/net/ethernet/intel/ice/ice_flex_pipe.c

And then... okay bestie, sit down, because this list is long. This function is highkey the social butterfly of ice_flex_pipe.c and it knows everyone πŸ‘‘πŸ’…

ice_sect_id(9), ice_hw_ptype_ena(9), ice_bits_max_set(9), ice_set_key(9), ice_acquire_change_lock(9), ice_release_change_lock(9), ice_get_open_tunnel_port(9), ice_upd_dvm_boost_entry(9), ice_set_dvm_boost_entries(9), ice_tunnel_idx_to_entry(9), ice_create_tunnel(9), ice_destroy_tunnel(9), ice_find_prot_off(9), ice_ptg_find_ptype(9), ice_ptg_alloc_val(9), ice_ptg_remove_ptype(9), ice_ptg_add_mv_ptype(9), ice_match_prop_lst(9), ice_vsig_find_vsi(9), ice_vsig_alloc_val(9), ice_vsig_alloc(9), ice_find_dup_props_vsig(9), ice_vsig_free(9), ice_vsig_remove_vsi(9), ice_vsig_add_mv_vsi(9), ice_prof_has_mask_idx(9), ice_prof_has_mask(9), ice_find_prof_id_with_mask(9), ice_prof_id_rsrc_type(9), ice_tcam_ent_rsrc_type(9), ice_alloc_tcam_ent(9), ice_free_tcam_ent(9), ice_alloc_prof_id(9), ice_free_prof_id(9), ice_prof_inc_ref(9), ice_write_prof_mask_reg(9), ice_write_prof_mask_enable_res(9), ice_init_prof_masks(9), ice_init_all_prof_masks(9), ice_alloc_prof_mask(9), ice_free_prof_mask(9), ice_free_prof_masks(9), ice_shutdown_prof_masks(9), ice_shutdown_all_prof_masks(9), ice_update_prof_masking(9), ice_write_es(9), ice_prof_dec_ref(9), ice_init_sw_xlt1_db(9), ice_init_sw_xlt2_db(9), ice_init_sw_db(9), ice_fill_tbl(9), ice_fill_blk_tbls(9), ice_free_prof_map(9), ice_free_flow_profs(9), ice_free_vsig_tbl(9), ice_free_hw_tbls(9), ice_init_flow_profs(9), ice_clear_hw_tbls(9), ice_init_hw_tbls(9), ice_prof_gen_key(9), ice_tcam_write_entry(9), ice_vsig_get_ref(9), ice_has_prof_vsig(9), ice_prof_bld_es(9), ice_prof_bld_tcam(9), ice_prof_bld_xlt1(9), ice_prof_bld_xlt2(9), ice_upd_prof_hw(9), ice_update_fd_mask(9), ice_update_fd_swap(9), ice_get_ptype_attrib_info(9), ice_add_prof_attrib(9), ice_disable_fd_swap(9), ice_search_prof_id(9), ice_vsig_prof_id_count(9), ice_rel_tcam_idx(9), ice_rem_prof_id(9), ice_rem_vsig(9), ice_rem_prof_id_vsig(9), ice_rem_flow_all(9), ice_rem_prof(9), ice_get_prof(9), ice_get_profs_vsig(9), ice_add_prof_to_lst(9), ice_move_vsi(9), ice_set_tcam_flags(9), ice_rem_chg_tcam_ent(9), ice_prof_tcam_ena_dis(9), ice_ptg_attr_in_use(9), ice_adj_prof_priorities(9), ice_add_prof_id_vsig(9), ice_create_prof_id_vsig(9), ice_create_vsig_from_lst(9), ice_find_prof_vsig(9), ice_add_prof_id_flow(9), ice_flow_assoc_fdir_prof(9), ice_rem_prof_from_list(9), ice_rem_prof_id_flow(9)

like, ninety-plus entries. she's not just networking, she's networking 😭πŸ”₯ iykyk.


🌈 and that's the page bestie! shoutout to the source over at ./drivers/net/ethernet/intel/ice, dated October 2026, published under ice_gen_key_word(9) β€” go generate some 16-bit key words, you've got this πŸ’–πŸ’…βœ¨

πŸ“¦ where this page comes from