bnx2x_set_real_num_queues(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bnx2x_set_real_num_queues(9) πŸ’…

okay so bestie, this is a page from the Kernel API Manual, and it's all about one very specific little function. let's get into it ✨


🌸 NAME 🌸

bnx2x_set_real_num_queues β€” configure netdev->real_num_[tx,rx]_queues


πŸŽ€ SYNOPSIS πŸŽ€

int bnx2x_set_real_num_queues (struct bnx2x *bp , int include_cnic );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • bp β€” Driver handle
  • include_cnic β€” handle cnic case

✨ DESCRIPTION ✨

So rn we support at most 16 Tx queues for each CoS, which means we're gonna allocate a multiple of 16 for ETH L2 rings according to the value of the bp->max_cos. periodt πŸ’…

If there's an FCoE L2 queue, the appropriate Tx queue gets the next index after all the ETH L2 indices. no cap.

If the actual number of Tx queues (for each CoS) is less than 16, then there are gonna be holes at the end of each group of 16 ETH L2 indices β€” like 0..15, 16..31, and so on β€” with indices that are not coupled with any real Tx queue. it's giving gaps, but make it intentional 🫢

The proper configuration of skb->queue_mapping is handled by bnx2x_select_queue and __skb_tx_hash. iconic behaviour tbh.

And bnx2x_setup_tc takes care of the proper TC mappings so that __skb_tx_hash will return a proper Tx index if TC is enabled (netdev->num_tc > 0). slay πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c


okay that's the whole vibe πŸ’– shoutout to the source/version ./drivers/net/ethernet/broadco... and the date October 2026 β€” mwah, bye bestie πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from