STRUCT MACSEC_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct macsec_ops(9) πŸ’–

okay so this is struct macsec_ops from the Kernel API Manual β€” literally the whole vibe is "MACsec offloading operations", i.e. the ops table a driver fills in so hardware can do the MACsec thing instead of your poor CPU 😭 it's giving very much "let the NIC cook" energy πŸ”₯


✨ NAME ✨

struct macsec_ops β€” the MACsec offloading operations struct πŸŽ€


🌸 SYNOPSIS 🌸

bestie, here's the whole thing, look at all these function pointers πŸ‘‘

struct macsec_ops {
    int (*mdo_dev_open)(struct macsec_context *ctx);
    int (*mdo_dev_stop)(struct macsec_context *ctx);
    int (*mdo_add_secy)(struct macsec_context *ctx);
    int (*mdo_upd_secy)(struct macsec_context *ctx);
    int (*mdo_del_secy)(struct macsec_context *ctx);
    int (*mdo_add_rxsc)(struct macsec_context *ctx);
    int (*mdo_upd_rxsc)(struct macsec_context *ctx);
    int (*mdo_del_rxsc)(struct macsec_context *ctx);
    int (*mdo_add_rxsa)(struct macsec_context *ctx);
    int (*mdo_upd_rxsa)(struct macsec_context *ctx);
    int (*mdo_del_rxsa)(struct macsec_context *ctx);
    int (*mdo_add_txsa)(struct macsec_context *ctx);
    int (*mdo_upd_txsa)(struct macsec_context *ctx);
    int (*mdo_del_txsa)(struct macsec_context *ctx);
    int (*mdo_get_dev_stats)(struct macsec_context *ctx);
    int (*mdo_get_tx_sc_stats)(struct macsec_context *ctx);
    int (*mdo_get_tx_sa_stats)(struct macsec_context *ctx);
    int (*mdo_get_rx_sc_stats)(struct macsec_context *ctx);
    int (*mdo_get_rx_sa_stats)(struct macsec_context *ctx);
    int (*mdo_insert_tx_tag)(struct phy_device *phydev, struct sk_buff *skb);
    unsigned int needed_headroom;
    unsigned int needed_tailroom;
    bool rx_uses_md_dst;
};

πŸ¦‹ Members πŸ¦‹

so every single one of these is a callback the kernel will hit up when the matching thing happens. no skipping, we're listing all of them 🫢

  • mdo_dev_open β€” gets called when the MACsec interface transitions to the up state ⭐
  • mdo_dev_stop β€” gets called when the MACsec interface transitions to the down state πŸ’€
  • mdo_add_secy β€” gets called when a new SecY is added ✨
  • mdo_upd_secy β€” gets called when the SecY flags are changed or the MAC address of the MACsec interface is changed 🌈
  • mdo_del_secy β€” gets called when the hw offload is disabled or the MACsec interface is removed πŸ’…
  • mdo_add_rxsc β€” gets called when a new RX SC is added πŸŽ€
  • mdo_upd_rxsc β€” gets called when a certain RX SC is updated πŸ¦‹
  • mdo_del_rxsc β€” gets called when a certain RX SC is removed πŸ“
  • mdo_add_rxsa β€” gets called when a new RX SA is added 🌸
  • mdo_upd_rxsa β€” gets called when a certain RX SA is updated πŸ’œ
  • mdo_del_rxsa β€” gets called when a certain RX SA is removed 🧚
  • mdo_add_txsa β€” gets called when a new TX SA is added ⭐
  • mdo_upd_txsa β€” gets called when a certain TX SA is updated ✨
  • mdo_del_txsa β€” gets called when a certain TX SA is removed πŸ¦‹
  • mdo_get_dev_stats β€” gets called when dev stats are read πŸ”₯
  • mdo_get_tx_sc_stats β€” gets called when TX SC stats are read πŸ”₯
  • mdo_get_tx_sa_stats β€” gets called when TX SA stats are read πŸ”₯
  • mdo_get_rx_sc_stats β€” gets called when RX SC stats are read πŸ”₯
  • mdo_get_rx_sa_stats β€” gets called when RX SA stats are read πŸ”₯
  • mdo_insert_tx_tag β€” gets called to insert the TX tag 🏷️
  • needed_headroom β€” number of bytes reserved at the beginning of the sk_buff for the TX tag πŸ“
  • needed_tailroom β€” number of bytes reserved at the end of the sk_buff for the TX tag πŸ“
  • rx_uses_md_dst β€” whether MACsec device offload supports sk_buff md_dst πŸ‘‘

🌟 SEE ALSO 🌟

go read the Kernel file ./include/net/macsec.h bestie, and also these iconic structs:

  • struct macsec_key(9)
  • struct macsec_rx_sa(9)
  • struct macsec_rx_sc(9)
  • struct macsec_tx_sa(9)
  • struct macsec_tx_sc(9)
  • struct macsec_secy(9)
  • struct macsec_context(9)

ngl this page came from ./include/net and it's dated October 2026 β€” yes we're being that specific. mwah, go off πŸ’‹βœ¨

okay that's the whole page, you ate that fr fr πŸ«ΆπŸ’–

πŸ“¦ where this page comes from