1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Aquantia Corporation
6 * @file rte_pmd_atlantic.h
7 * atlantic PMD specific functions.
11 #ifndef _PMD_ATLANTIC_H_
12 #define _PMD_ATLANTIC_H_
14 #include <rte_compat.h>
18 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
20 * Enable MACsec offload.
23 * The port identifier of the Ethernet device.
25 * 1 - Enable encryption (encrypt and add integrity signature).
26 * 0 - Disable encryption (only add integrity signature).
28 * 1 - Enable replay protection.
29 * 0 - Disable replay protection.
31 * - (0) if successful.
32 * - (-ENODEV) if *port* invalid.
33 * - (-ENOTSUP) if hardware doesn't support this feature.
36 int rte_pmd_atl_macsec_enable(uint16_t port, uint8_t encr, uint8_t repl_prot);
40 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
42 * Disable MACsec offload.
45 * The port identifier of the Ethernet device.
47 * - (0) if successful.
48 * - (-ENODEV) if *port* invalid.
49 * - (-ENOTSUP) if hardware doesn't support this feature.
52 int rte_pmd_atl_macsec_disable(uint16_t port);
56 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
58 * Configure Tx SC (Secure Connection).
61 * The port identifier of the Ethernet device.
63 * The MAC address on the local side.
65 * - (0) if successful.
66 * - (-ENODEV) if *port* invalid.
67 * - (-ENOTSUP) if hardware doesn't support this feature.
70 int rte_pmd_atl_macsec_config_txsc(uint16_t port, uint8_t *mac);
74 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
76 * Configure Rx SC (Secure Connection).
79 * The port identifier of the Ethernet device.
81 * The MAC address on the remote side.
83 * The PI (port identifier) on the remote side.
85 * - (0) if successful.
86 * - (-ENODEV) if *port* invalid.
87 * - (-ENOTSUP) if hardware doesn't support this feature.
90 int rte_pmd_atl_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi);
94 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
96 * Enable Tx SA (Secure Association).
99 * The port identifier of the Ethernet device.
101 * The SA to be enabled (0 or 1).
103 * The association number on the local side.
105 * The packet number on the local side.
107 * The key on the local side.
109 * - (0) if successful.
110 * - (-ENODEV) if *port* invalid.
111 * - (-ENOTSUP) if hardware doesn't support this feature.
112 * - (-EINVAL) if bad parameter.
115 int rte_pmd_atl_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
116 uint32_t pn, uint8_t *key);
120 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
122 * Enable Rx SA (Secure Association).
125 * The port identifier of the Ethernet device.
127 * The SA to be enabled (0 or 1)
129 * The association number on the remote side.
131 * The packet number on the remote side.
133 * The key on the remote side.
135 * - (0) if successful.
136 * - (-ENODEV) if *port* invalid.
137 * - (-ENOTSUP) if hardware doesn't support this feature.
138 * - (-EINVAL) if bad parameter.
141 int rte_pmd_atl_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
142 uint32_t pn, uint8_t *key);
144 #endif /* _PMD_ATLANTIC_H_ */