4 * Copyright (c) 2016 Intel Corporation. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
16 * * Neither the name of Intel Corporation nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 * @file rte_pmd_ixgbe.h
35 * ixgbe PMD specific functions.
42 #include <rte_ethdev.h>
45 * Set the VF MAC address.
48 * The port identifier of the Ethernet device.
54 * - (0) if successful.
55 * - (-ENODEV) if *port* invalid.
56 * - (-EINVAL) if *vf* or *mac_addr* is invalid.
58 int rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
59 struct ether_addr *mac_addr);
62 * Enable/Disable VF VLAN anti spoofing.
65 * The port identifier of the Ethernet device.
67 * VF on which to set VLAN anti spoofing.
69 * 1 - Enable VFs VLAN anti spoofing.
70 * 0 - Disable VFs VLAN anti spoofing.
72 * - (0) if successful.
73 * - (-ENODEV) if *port* invalid.
74 * - (-EINVAL) if bad parameter.
76 int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
79 * Enable/Disable VF MAC anti spoofing.
82 * The port identifier of the Ethernet device.
84 * VF on which to set MAC anti spoofing.
86 * 1 - Enable VFs MAC anti spoofing.
87 * 0 - Disable VFs MAC anti spoofing.
89 * - (0) if successful.
90 * - (-ENODEV) if *port* invalid.
91 * - (-EINVAL) if bad parameter.
93 int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
96 * Enable/Disable vf vlan insert
99 * The port identifier of the Ethernet device.
103 * 1 - Enable VF's vlan insert.
104 * 0 - Disable VF's vlan insert
107 * - (0) if successful.
108 * - (-ENODEV) if *port* invalid.
109 * - (-EINVAL) if bad parameter.
111 int rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf, uint8_t on);
114 * Enable/Disable tx loopback
117 * The port identifier of the Ethernet device.
119 * 1 - Enable tx loopback.
120 * 0 - Disable tx loopback.
123 * - (0) if successful.
124 * - (-ENODEV) if *port* invalid.
125 * - (-EINVAL) if bad parameter.
127 int rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on);
130 * set all queues drop enable bit
133 * The port identifier of the Ethernet device.
135 * 1 - set the queue drop enable bit for all pools.
136 * 0 - reset the queue drop enable bit for all pools.
139 * - (0) if successful.
140 * - (-ENODEV) if *port* invalid.
141 * - (-EINVAL) if bad parameter.
143 int rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on);
146 * set drop enable bit in the VF split rx control register
149 * The port identifier of the Ethernet device.
153 * 1 - set the drop enable bit in the split rx control register.
154 * 0 - reset the drop enable bit in the split rx control register.
157 * - (0) if successful.
158 * - (-ENODEV) if *port* invalid.
159 * - (-EINVAL) if bad parameter.
162 int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
165 * Enable/Disable vf vlan strip for all queues in a pool
168 * The port identifier of the Ethernet device.
172 * 1 - Enable VF's vlan strip on RX queues.
173 * 0 - Disable VF's vlan strip on RX queues.
176 * - (0) if successful.
177 * - (-ENOTSUP) if hardware doesn't support this feature.
178 * - (-ENODEV) if *port* invalid.
179 * - (-EINVAL) if bad parameter.
182 rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
183 #endif /* _PMD_IXGBE_H_ */