STRUCT MACSEC_OPS(9)
π 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 thesk_bufffor the TX tag πneeded_tailroomβ number of bytes reserved at the end of thesk_bufffor the TX tag πrx_uses_md_dstβ whether MACsec device offload supportssk_buffmd_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms