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_ethdev_driver.h>
17 * Enable MACsec offload.
20 * The port identifier of the Ethernet device.
22 * 1 - Enable encryption (encrypt and add integrity signature).
23 * 0 - Disable encryption (only add integrity signature).
25 * 1 - Enable replay protection.
26 * 0 - Disable replay protection.
28 * - (0) if successful.
29 * - (-ENODEV) if *port* invalid.
30 * - (-ENOTSUP) if hardware doesn't support this feature.
32 int rte_pmd_atl_macsec_enable(uint16_t port, uint8_t encr, uint8_t repl_prot);
35 * Disable MACsec offload.
38 * The port identifier of the Ethernet device.
40 * - (0) if successful.
41 * - (-ENODEV) if *port* invalid.
42 * - (-ENOTSUP) if hardware doesn't support this feature.
44 int rte_pmd_atl_macsec_disable(uint16_t port);
47 * Configure Tx SC (Secure Connection).
50 * The port identifier of the Ethernet device.
52 * The MAC address on the local side.
54 * - (0) if successful.
55 * - (-ENODEV) if *port* invalid.
56 * - (-ENOTSUP) if hardware doesn't support this feature.
58 int rte_pmd_atl_macsec_config_txsc(uint16_t port, uint8_t *mac);
61 * Configure Rx SC (Secure Connection).
64 * The port identifier of the Ethernet device.
66 * The MAC address on the remote side.
68 * The PI (port identifier) on the remote side.
70 * - (0) if successful.
71 * - (-ENODEV) if *port* invalid.
72 * - (-ENOTSUP) if hardware doesn't support this feature.
74 int rte_pmd_atl_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi);
77 * Enable Tx SA (Secure Association).
80 * The port identifier of the Ethernet device.
82 * The SA to be enabled (0 or 1).
84 * The association number on the local side.
86 * The packet number on the local side.
88 * The key on the local side.
90 * - (0) if successful.
91 * - (-ENODEV) if *port* invalid.
92 * - (-ENOTSUP) if hardware doesn't support this feature.
93 * - (-EINVAL) if bad parameter.
95 int rte_pmd_atl_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
96 uint32_t pn, uint8_t *key);
99 * Enable Rx SA (Secure Association).
102 * The port identifier of the Ethernet device.
104 * The SA to be enabled (0 or 1)
106 * The association number on the remote side.
108 * The packet number on the remote side.
110 * The key on the remote side.
112 * - (0) if successful.
113 * - (-ENODEV) if *port* invalid.
114 * - (-ENOTSUP) if hardware doesn't support this feature.
115 * - (-EINVAL) if bad parameter.
117 int rte_pmd_atl_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
118 uint32_t pn, uint8_t *key);
120 #endif /* _PMD_ATLANTIC_H_ */