dpni_set_rx_hash_dist(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ dpni_set_rx_hash_dist β€” Set Rx hash distribution ✨

okay bestie, welcome to the Kernel API Manual πŸ’… this one's called dpni_set_rx_hash_dist(9) and it's genuinely not that deep, i promise β€” it's just telling your DPNI object "hey, wanna spread packets around using a hash?" let's get into it 🫢


🌸 NAME 🌸

dpni_set_rx_hash_dist β€” Set Rx hash distribution πŸ’–

like. that's the whole thing. it sets the Rx hash distribution. iconic behavior honestly.


✨ SYNOPSIS ✨

int dpni_set_rx_hash_dist (struct fsl_mc_io *mc_io , u32 cmd_flags , u16
token , const struct dpni_rx_dist_cfg *cfg );

it returns an int, it takes four things, and yes the line break in the middle is exactly where the original put it, don't @ me 😌


πŸ¦‹ ARGUMENTS πŸ¦‹

  • mc_io β€” Pointer to MC portal's I/O object. your little handle on the MC portal, your main character connection fr fr πŸ”Œ
  • cmd_flags β€” Command flags; one or more of 'MC_CMD_FLAG_'. yep, one or more, and they come from that 'MC_CMD_FLAG_' family. go off πŸ‘‘
  • token β€” Token of DPNI object. it's the token that identifies your DPNI object, no cap πŸŽ€
  • cfg β€” Distribution configuration. and here's the tea, bestie, because this one has two whole modes πŸ“:
    • if cfg.enable is set to 1, the packets get classified using a hash function based on the key received in the cfg.key_cfg_iova parameter. slay, hashing time πŸ”₯
    • if cfg.enable is set to 0, the packets are sent to the default queue. lowkey the chill option 😌

πŸ’€ RETURN πŸ’€

so… the original page literally lists nothing here. no return values described, nothing. it's giving silence πŸ™ˆ the function's declared to return an int in the synopsis, but this section has zero details on it, and i'm not about to make stuff up. so: empty. periodt.


🌈 SEE ALSO 🌈

the kernel file living its best life at ./drivers/net/ethernet/freescale/dpaa2/dpni.c πŸ“ and then the entire extended friend group of DPNI functions, all of them, every single one, i'm listing them all because i would never do you like that 🫢:

dpni_prepare_key_cfg(9), dpni_open(9), dpni_close(9), dpni_set_pools(9), dpni_enable(9), dpni_disable(9), dpni_is_enabled(9), dpni_reset(9), dpni_set_irq_enable(9), dpni_get_irq_enable(9), dpni_set_irq_mask(9), dpni_get_irq_mask(9), dpni_get_irq_status(9), dpni_clear_irq_status(9), dpni_get_attributes(9), dpni_set_errors_behavior(9), dpni_get_buffer_layout(9), dpni_set_buffer_layout(9), dpni_set_offload(9), dpni_get_qdid(9), dpni_get_tx_data_offset(9), dpni_set_link_cfg(9), dpni_get_link_cfg(9), dpni_get_link_state(9), dpni_set_max_frame_length(9), dpni_get_max_frame_length(9), dpni_set_multicast_promisc(9), dpni_get_multicast_promisc(9), dpni_set_unicast_promisc(9), dpni_get_unicast_promisc(9), dpni_set_primary_mac_addr(9), dpni_get_primary_mac_addr(9), dpni_get_port_mac_addr(9), dpni_enable_vlan_filter(9), dpni_add_vlan_id(9), dpni_remove_vlan_id(9), dpni_add_mac_addr(9), dpni_remove_mac_addr(9), dpni_clear_mac_filters(9), dpni_set_rx_tc_dist(9), dpni_set_congestion_notification(9), dpni_set_queue(9), dpni_get_queue(9), dpni_get_statistics(9), dpni_set_taildrop(9), dpni_get_taildrop(9), dpni_get_api_version(9), dpni_set_rx_fs_dist(9), dpni_add_fs_entry(9), dpni_remove_fs_entry(9), dpni_set_qos_table(9), dpni_add_qos_entry(9), dpni_remove_qos_entry(9), dpni_clear_qos_table(9), dpni_set_tx_shaping(9), dpni_get_single_step_cfg(9), dpni_set_single_step_cfg(9)

like, that's the whole group chat. everybody's here. ate πŸ’…βœ¨


ngl bestie, the takeaway is genuinely simple: cfg.enable = 1 β†’ hash-based classification using the key from cfg.key_cfg_iova; cfg.enable = 0 β†’ default queue. choose wisely 🧚

and that's the page!! πŸŽ€ source is ./drivers/net/ethernet/freesca... (yes it's truncated like that, i don't make the rules 😭) and it's dated October 2026. bye bestie, go hash some packets πŸ’œπŸ¦‹

πŸ“¦ where this page comes from