STRUCT PRUETH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct prueth(9) β€” the kernel API manual, bestie edition πŸ’–

Okay so this page is from the struct prueth(9) manual, and it's literally the whole glow-up tour of struct prueth β€” the PRUeth structure. Yes, that's the NAME, and yes, it's an icon πŸ‘‘


✨ NAME ✨

struct prueth β€” the PRUeth structure. That's it, that's the whole vibe. Main character energy for the TI ICSSG Ethernet driver πŸ¦‹


🌸 SYNOPSIS 🌸

Bestie, here's the whole struct, character for character. Don't touch anything, just look at it respectfully:

struct prueth {
    struct device *dev;
    struct pruss *pruss;
    struct rproc *pru[PRUSS_NUM_PRUS];
    struct rproc *rtu[PRUSS_NUM_PRUS];
    struct rproc *txpru[PRUSS_NUM_PRUS];
    struct pruss_mem_region shram;
    struct gen_pool *sram_pool;
    struct pruss_mem_region msmcram;
    struct device_node *eth_node[PRUETH_NUM_MACS];
    struct prueth_emac *emac[PRUETH_NUM_MACS];
    struct net_device *registered_netdevs[PRUETH_NUM_MACS];
    struct regmap *miig_rt;
    struct regmap *mii_rt;
    struct regmap *pa_stats;
    enum pruss_pru_id pru_id[PRUSS_NUM_PRUS];
    struct platform_device *pdev;
    struct prueth_pdata pdata;
    u8 icssg_hwcmdseq;
    int emacs_initialized;
    struct icss_iep *iep0;
    struct icss_iep *iep1;
    struct prueth_vlan_tbl *vlan_tbl;
    struct net_device *hw_bridge_dev;
    struct net_device *hsr_dev;
    enum hsr_version hsr_prp_version;
    u8 br_members;
    u8 hsr_members;
    struct notifier_block prueth_netdevice_nb;
    struct notifier_block prueth_switchdev_nb;
    struct notifier_block prueth_switchdev_bl_nb;
    bool is_switch_mode;
    bool is_hsr_offload_mode;
    bool is_switchmode_supported;
    unsigned char switch_id[MAX_PHYS_ITEM_ID_LEN];
    int default_vlan;
    spinlock_t vtbl_lock;
    spinlock_t stats_lock;
    struct icssg_firmwares icssg_emac_firmwares[PRUETH_NUM_MACS];
    struct icssg_firmwares icssg_switch_firmwares[PRUETH_NUM_MACS];
    struct icssg_firmwares icssg_hsr_firmwares[PRUETH_NUM_MACS];
    struct icssg_firmwares icssg_prp_firmwares[PRUETH_NUM_MACS];
 };

That's 40-ish fields of pure slay. Let's go through every single one πŸ’…


πŸŽ€ Members πŸŽ€

Every field, one by one. No skipping, no cap, we're doing the full tour:

  • dev β€” the device. Yeah, that one.
  • pruss β€” the pruss handle.
  • pru β€” rproc instances of PRUs.
  • rtu β€” rproc instances of RTUs.
  • txpru β€” rproc instances of TX_PRUs. (Yes bestie, TX_PRUs are their own thing, don't @ me.)
  • shram β€” the PRUSS shared RAM region.
  • sram_pool β€” the MSMC RAM pool for buffers.
  • msmcram β€” the MSMC RAM region.
  • eth_node β€” DT node for the port.
  • emac β€” the private EMAC data structure. It's giving private. πŸ™ˆ
  • registered_netdevs β€” list of registered netdevs.
  • miig_rt β€” regmap to the mii_g_rt block.
  • mii_rt β€” regmap to the mii_rt block.
  • pa_stats β€” regmap to the pa_stats block.
  • pru_id β€” ID for each of the PRUs.
  • pdev β€” pointer to the ICSSG platform device.
  • pdata β€” pointer to platform data for the ICSSG driver.
  • icssg_hwcmdseq β€” seq counter or HWQ messages. (That's what it says, fr fr.)
  • emacs_initialized β€” num of EMACs/ext ports that are up/running. Count 'em πŸ‘‘
  • iep0 β€” pointer to the IEP0 device.
  • iep1 β€” pointer to the IEP1 device. (Sibling energy ✨)
  • vlan_tbl β€” VLAN-FID table pointer.
  • hw_bridge_dev β€” pointer to the HW bridge net device.
  • hsr_dev β€” pointer to the HSR net device.
  • hsr_prp_version β€” enum to store the protocol version of the hsr master.
  • br_members β€” bitmask of bridge member ports.
  • hsr_members β€” bitmask of hsr member ports.
  • prueth_netdevice_nb β€” netdevice notifier block.
  • prueth_switchdev_nb β€” switchdev notifier block.
  • prueth_switchdev_bl_nb β€” switchdev blocking notifier block. (Blocking! Not like that, it's the notifier type πŸ’€)
  • is_switch_mode β€” flag to indicate if the device is in Switch mode.
  • is_hsr_offload_mode β€” flag to indicate if the device is in hsr offload mode.
  • is_switchmode_supported β€” indicates platform support for switch mode.
  • switch_id β€” ID for mapping switch ports to bridge. Sized MAX_PHYS_ITEM_ID_LEN, iykyk.
  • default_vlan β€” Default VLAN for host.
  • vtbl_lock β€” Lock for vtbl in shared memory.
  • stats_lock β€” Lock for reading icssg stats.
  • icssg_emac_firmwares β€” Firmware names for EMAC mode, indexed per MAC.
  • icssg_switch_firmwares β€” Firmware names for SWITCH mode, indexed per MAC.
  • icssg_hsr_firmwares β€” Firmware names for HSR mode, indexed per MAC.
  • icssg_prp_firmwares β€” Firmware names for PRP mode, indexed per MAC.
Not me listing every single field 😭 but that's literally the whole point of this page β€” every member matters, bestie. No gatekeeping the struct.

πŸ¦‹ SEE ALSO πŸ¦‹

Go peek at these, they're lowkey essential:

  • Kernel file ./drivers/net/ethernet/ti/icssg/icssg_prueth.h
  • struct prueth_pdata(9)

✨ That's the whole page, bestie ✨ This one came from ./drivers/net/ethernet/ti/icssg, dated October 2026, and it's filed under struct prueth(9). Periodt. πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from