Visible to Intel only — GUID: iso1672427531041
Ixiasoft
Visible to Intel only — GUID: iso1672427531041
Ixiasoft
6.4.2. MACsec IP APIs
The MACsec IP APIs are exposed/included with McDMA(or can be added to any network driver).
- MACsec Ops
The APIs below are implemented to perform MACsec control path functionality.
- intel_macsec_isr()
This is the interrupt service routine registered for MACsec ip interrupts. On receiving an Interrupt, this signals user which interrupt has been raised. After signaling it clears the Interrupt line and clears the interrupt status register.
- genl_ppbb_read_reg() & genl_ppbb_write_reg()
The netlink support is added here to get the netlink request from CLI tool and response it. In the reference design, the data path is through packet generator and checker. The CLI debug tool is used to configure the packet generator using netlink support.
- Netlink functions
The netlink functions are added to McDMA driver to support register access. In the reference design, the data flow is from the packet generator/checker. Therefore, register settings are required from user application (i.e CLI Debug Tool). The linux kernel module registers a generic netlink family name, on which the kernel routes any user-space interaction. Linux kernel can have multiple netlink families registered at a time. User-space application has to mention a corresponding name to interact with a particular netlink channel. The MACsec IP (i.e McDMA driver) kernel module registers the "intel_macsec" netlink family name, which is used by CLI to interact with the kernel module.
The linux kernel module registers 6 handlers for all of the above netlink commands. These handler functions are as follows:- 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 and invoke the respective MACsec IP API. On success, they return the data received from the API. On failure, they return the error code back to CLI.