Visible to Intel only — GUID: hvp1672430220148
Ixiasoft
Visible to Intel only — GUID: hvp1672430220148
Ixiasoft
6.7.3.4. Netlink Interface
The MACsec IP driver accesses memory mapped MACsec IP registers over the AXI bus. This module communicates with user-space over netlink socket. The details of netlink structure, family, and API's are as follows:
NETLINK STRUCTURE
- INTEL_MACSEC_C_GETATTR
- INTEL_MACSEC_C_SETATTR
- INTEL_MACSEC_C_GETSAATTR
- INTEL_MACSEC_C_SETSAATTR
The above netlink commands are responsible for handling macsec_get_attr(), macsec_set_attr(), macsec_get_sa_attr() and macsec_set_sa_attr() APIs based on invokation from the CLI.
- INTEL_MACSEC_C_PPBB_READREG
- INTEL_MACSEC_C_PPBB_WRITEREG
- INTEL_MACSEC_C_READREG
- INTEL_MACSEC_C_WRITEREG
- INTEL_MACSEC_A_PORT
- INTEL_MACSEC_A_ATTR
- INTEL_MACSEC_A_RW_VAL
- INTEL_MACSEC_A_SC
- INTEL_MACSEC_A_SA
The above netlink attributes correspond to the MACsec ip port value, MACsec ip command attribute, read/write value for a particular command attribute, MACsec ip secure channel value, and MACsec ip secure association value.
- INTEL_MACSEC_A_OFFSET
NETLINK FAMILY
The linux kernel module registers a generic netlink family name, on which the kernel routes any user-space interaction. A Linux kernel can have multiple netlink families registered at a time. A User-space application has to mention the corresponding name to interact with a particular netlink channel.
The MACsec IP kernel module registers with "intel_MACsec" as a netlink family name, which is used by the CLI to interact with the Kernel module.
NETLINK HANDLER FUNCTIONS
- genl_get_attr()
- genl_set_attr()
- genl_get_sa_attr()
- genl_set_sa_attr()
- genl_ppbb_read_reg()
- genl_ppbb_write_reg()
- genl_read_reg()
- genl_write_reg()
All of the above handlers receive socket buffer information from the CLI, invoke the respective MACsec IP API, on success return the data received from the API, on failure returns the error code back to the CLI.