STRUCT EFX_CHANNEL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME

okay bestie, welcome to the Kernel API Manual entry for struct efx_channel(9) πŸ’– β€” aka An Efx channel. yes, that's the whole name, short and iconic, no cap.

✨ SYNOPSIS ✨

the struct literally looks like this, and every field is staying exactly as-is, bestie:

struct efx_channel {
    struct efx_nic *efx;
    int channel;
    const struct efx_channel_type *type;
    bool eventq_init;
    bool enabled;
    int irq;
    unsigned int irq_moderation_us;
    struct net_device *napi_dev;
    struct napi_struct napi_str;
  #ifdef CONFIG_NET_RX_BUSY_POLL;
    unsigned long busy_poll_state;
  #endif;
    struct efx_special_buffer eventq;
    unsigned int eventq_mask;
    unsigned int eventq_read_ptr;
    int event_test_cpu;
    unsigned int irq_count;
    unsigned int irq_mod_score;
  #ifdef CONFIG_RFS_ACCEL;
    unsigned int rfs_filter_count;
    unsigned int rfs_last_expiry;
    unsigned int rfs_expire_index;
    unsigned int n_rfs_succeeded;
    unsigned int n_rfs_failed;
    struct delayed_work filter_work;
  #define RPS_FLOW_ID_INVALID 0xFFFFFFFF;
    u32 *rps_flow_id;
  #endif;
    unsigned int n_rx_tobe_disc;
    unsigned int n_rx_ip_hdr_chksum_err;
    unsigned int n_rx_tcp_udp_chksum_err;
    unsigned int n_rx_outer_ip_hdr_chksum_err;
    unsigned int n_rx_outer_tcp_udp_chksum_err;
    unsigned int n_rx_inner_ip_hdr_chksum_err;
    unsigned int n_rx_inner_tcp_udp_chksum_err;
    unsigned int n_rx_eth_crc_err;
    unsigned int n_rx_mcast_mismatch;
    unsigned int n_rx_frm_trunc;
    unsigned int n_rx_overlength;
    unsigned int n_skbuff_leaks;
    unsigned int n_rx_nodesc_trunc;
    unsigned int n_rx_merge_events;
    unsigned int n_rx_merge_packets;
    unsigned int n_rx_xdp_drops;
    unsigned int n_rx_xdp_bad_drops;
    unsigned int n_rx_xdp_tx;
    unsigned int n_rx_xdp_redirect;
    unsigned int rx_pkt_n_frags;
    unsigned int rx_pkt_index;
    struct list_head *rx_list;
    struct efx_rx_queue rx_queue;
    struct efx_tx_queue tx_queue[EFX_MAX_TXQ_PER_CHANNEL];
    struct efx_tx_queue *tx_queue_by_type[EFX_TXQ_TYPES];
    enum efx_sync_events_state sync_events_state;
    u32 sync_timestamp_major;
    u32 sync_timestamp_minor;
};

🫢 Members

okay so here's the member-by-member tea, nothing skipped:

  • efx β€” Associated Efx NIC.
  • channel β€” Channel instance number.
  • type β€” Channel type definition.
  • eventq_init β€” Event queue initialised flag.
  • enabled β€” Channel enabled indicator.
  • irq β€” IRQ number, and this one is MSI and MSI-X only, iykyk.
  • irq_moderation_us β€” IRQ moderation value, in microseconds.
  • napi_dev β€” Net device used with NAPI.
  • napi_str β€” NAPI control structure.
  • eventq β€” Event queue buffer.
  • eventq_mask β€” Event queue pointer mask.
  • eventq_read_ptr β€” Event queue read pointer.
  • event_test_cpu β€” Last CPU to handle interrupt or test event for this channel.
  • irq_count β€” Number of IRQs since last adaptive moderation decision.
  • irq_mod_score β€” IRQ moderation score.
  • rfs_filter_count β€” number of accelerated RFS filters currently in place; equals the count of rps_flow_id slots filled.
  • rfs_last_expiry β€” value of jiffies last time some accelerated RFS filters were checked for expiry.
  • rfs_expire_index β€” next accelerated RFS filter ID to check for expiry.
  • n_rfs_succeeded β€” number of successful accelerated RFS filter insertions.
  • n_rfs_failed β€” number of failed accelerated RFS filter insertions.
  • filter_work β€” Work item for efx_filter_rfs_expire.
  • rps_flow_id β€” Flow IDs of filters allocated for accelerated RFS, indexed by filter ID.
  • n_rx_tobe_disc β€” Count of RX_TOBE_DISC errors.
  • n_rx_ip_hdr_chksum_err β€” Count of RX IP header checksum errors.
  • n_rx_tcp_udp_chksum_err β€” Count of RX TCP and UDP checksum errors.
  • n_rx_mcast_mismatch β€” Count of unmatched multicast frames.
  • n_rx_frm_trunc β€” Count of RX_FRM_TRUNC errors.
  • n_rx_overlength β€” Count of RX_OVERLENGTH errors.
  • n_skbuff_leaks β€” Count of skbuffs leaked due to RX overrun.
  • n_rx_nodesc_trunc β€” Number of RX packets truncated and then dropped due to lack of descriptors.
  • n_rx_merge_events β€” Number of RX merged completion events.
  • n_rx_merge_packets β€” Number of RX packets completed by merged events.
  • n_rx_xdp_drops β€” Count of RX packets intentionally dropped due to XDP.
  • n_rx_xdp_bad_drops β€” Count of RX packets dropped due to XDP errors.
  • n_rx_xdp_tx β€” Count of RX packets retransmitted due to XDP.
  • n_rx_xdp_redirect β€” Count of RX packets redirected to a different NIC by XDP.
  • rx_pkt_n_frags β€” Number of fragments in next packet to be delivered by __efx_siena_rx_packet, or zero if there is none.
  • rx_pkt_index β€” Ring index of first buffer for next packet to be delivered by __efx_siena_rx_packet, if rx_pkt_n_frags != 0.
  • rx_list β€” list of SKBs from current RX, awaiting processing.
  • rx_queue β€” RX queue for this channel.
  • tx_queue β€” TX queues for this channel.
  • tx_queue_by_type β€” pointers into tx_queue, or NULL, indexed by txq type.
  • sync_events_state β€” Current state of sync events on this channel.
  • sync_timestamp_major β€” Major part of the last ptp sync event.
  • sync_timestamp_minor β€” Minor part of the last ptp sync event.
quick vibe-check aside: the synopsis also lists n_rx_outer_ip_hdr_chksum_err, n_rx_outer_tcp_udp_chksum_err, n_rx_inner_ip_hdr_chksum_err, n_rx_inner_tcp_udp_chksum_err, and n_rx_eth_crc_err; the member blurbs above don't give those their own descriptions, so I'm not inventing any. that's just the source, bestie 🫢

🌈 Description

A channel comprises an event queue, at least one TX queue, at least one RX queue, and an associated tasklet for processing the event queue. that's the canonical definition, and it ate. literally: event queue, at least one TX queue, at least one RX queue, plus the associated tasklet doing the event-queue processing. periodt.

πŸ‘‘ SEE ALSO

the source points at Kernel file ./drivers/net/ethernet/sfc/siena/net_driver.h, and then these besties:

  • struct efx_buffer(9)
  • struct efx_special_buffer(9)
  • struct efx_tx_buffer(9)
  • struct efx_tx_queue(9)
  • struct efx_rx_buffer(9)
  • struct efx_rx_page_state(9)
  • struct efx_rx_queue(9)
  • struct efx_msi_context(9)
  • struct efx_channel_type(9)
  • struct efx_link_state(9)
  • enum efx_phy_mode(9)
  • struct efx_hw_stat_desc(9)
  • struct efx_rss_context(9)
  • struct efx_arfs_rule(9)
  • struct efx_async_filter_insertion(9)
  • struct efx_nic(9)
  • struct efx_nic_type(9)

πŸ’– cute sign-off: this page came from ./drivers/net/ethernet/sfc/siena, manual/version struct efx_channel(9), dated October 2026 β€” mwah πŸ’…

πŸ“¦ where this page comes from