DPDK  17.11.10
rte_pmd_ixgbe.h
Go to the documentation of this file.
1 /*-
2  * BSD LICENSE
3  *
4  * Copyright (c) 2016 Intel Corporation. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
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
15  * distribution.
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.
19  *
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.
31  */
32 
39 #ifndef _PMD_IXGBE_H_
40 #define _PMD_IXGBE_H_
41 
42 #include <rte_ethdev.h>
43 
56 int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf);
57 
72 int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
73  struct ether_addr *mac_addr);
74 
90 int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf,
91  uint8_t on);
92 
108 int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
109 
126 int rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf,
127  uint16_t vlan_id);
128 
143 int rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on);
144 
159 int rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on);
160 
178 int rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on);
179 
197 int
198 rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
199 
216 int rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp);
217 
228 int rte_pmd_ixgbe_macsec_disable(uint16_t port);
229 
242 int rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac);
243 
258 int rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi);
259 
279 int rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
280  uint32_t pn, uint8_t *key);
281 
301 int rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
302  uint32_t pn, uint8_t *key);
303 
326 int
327 rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf, uint16_t rx_mask,
328  uint8_t on);
329 
346 int
347 rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on);
348 
365 int
366 rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on);
367 
387 int
388 rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
389  uint64_t vf_mask, uint8_t vlan_on);
390 
408 int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
409  uint16_t tx_rate, uint64_t q_msk);
410 
431  uint8_t tc_num,
432  uint8_t *bw_weight);
433 
434 
446 int rte_pmd_ixgbe_bypass_init(uint16_t port);
447 
463 int rte_pmd_ixgbe_bypass_state_show(uint16_t port, uint32_t *state);
464 
480 int rte_pmd_ixgbe_bypass_state_set(uint16_t port, uint32_t *new_state);
481 
505  uint32_t event,
506  uint32_t *state);
507 
531  uint32_t event,
532  uint32_t state);
533 
554 int rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port, uint32_t timeout);
555 
568 int rte_pmd_ixgbe_bypass_ver_show(uint16_t port, uint32_t *ver);
569 
590 int rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port, uint32_t *wd_timeout);
591 
602 int rte_pmd_ixgbe_bypass_wd_reset(uint16_t port);
603 
604 
613 };
614 
619  uint16_t vfid;
620  uint16_t msg_type;
621  uint16_t retval;
622  void *msg;
623 };
624 enum {
625  RTE_PMD_IXGBE_BYPASS_MODE_NONE,
626  RTE_PMD_IXGBE_BYPASS_MODE_NORMAL,
627  RTE_PMD_IXGBE_BYPASS_MODE_BYPASS,
628  RTE_PMD_IXGBE_BYPASS_MODE_ISOLATE,
629  RTE_PMD_IXGBE_BYPASS_MODE_NUM,
630 };
631 
632 #define RTE_PMD_IXGBE_BYPASS_MODE_VALID(x) \
633  ((x) > RTE_PMD_IXGBE_BYPASS_MODE_NONE && \
634  (x) < RTE_PMD_IXGBE_BYPASS_MODE_NUM)
635 
636 enum {
637  RTE_PMD_IXGBE_BYPASS_EVENT_NONE,
638  RTE_PMD_IXGBE_BYPASS_EVENT_START,
639  RTE_PMD_IXGBE_BYPASS_EVENT_OS_ON = RTE_PMD_IXGBE_BYPASS_EVENT_START,
640  RTE_PMD_IXGBE_BYPASS_EVENT_POWER_ON,
641  RTE_PMD_IXGBE_BYPASS_EVENT_OS_OFF,
642  RTE_PMD_IXGBE_BYPASS_EVENT_POWER_OFF,
643  RTE_PMD_IXGBE_BYPASS_EVENT_TIMEOUT,
644  RTE_PMD_IXGBE_BYPASS_EVENT_NUM
645 };
646 
647 #define RTE_PMD_IXGBE_BYPASS_EVENT_VALID(x) \
648  ((x) > RTE_PMD_IXGBE_BYPASS_EVENT_NONE && \
649  (x) < RTE_PMD_IXGBE_BYPASS_MODE_NUM)
650 
651 enum {
652  RTE_PMD_IXGBE_BYPASS_TMT_OFF, /* timeout disabled. */
653  RTE_PMD_IXGBE_BYPASS_TMT_1_5_SEC, /* timeout for 1.5 seconds */
654  RTE_PMD_IXGBE_BYPASS_TMT_2_SEC, /* timeout for 2 seconds */
655  RTE_PMD_IXGBE_BYPASS_TMT_3_SEC, /* timeout for 3 seconds */
656  RTE_PMD_IXGBE_BYPASS_TMT_4_SEC, /* timeout for 4 seconds */
657  RTE_PMD_IXGBE_BYPASS_TMT_8_SEC, /* timeout for 8 seconds */
658  RTE_PMD_IXGBE_BYPASS_TMT_16_SEC, /* timeout for 16 seconds */
659  RTE_PMD_IXGBE_BYPASS_TMT_32_SEC, /* timeout for 32 seconds */
660  RTE_PMD_IXGBE_BYPASS_TMT_NUM
661 };
662 
663 #define RTE_PMD_IXGBE_BYPASS_TMT_VALID(x) \
664  ((x) == RTE_PMD_IXGBE_BYPASS_TMT_OFF || \
665  ((x) > RTE_PMD_IXGBE_BYPASS_TMT_OFF && \
666  (x) < RTE_PMD_IXGBE_BYPASS_TMT_NUM))
667 
668 #endif /* _PMD_IXGBE_H_ */
int rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac)
int rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf, uint16_t rx_mask, uint8_t on)
int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
int rte_pmd_ixgbe_bypass_state_show(uint16_t port, uint32_t *state)
int rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port, uint8_t tc_num, uint8_t *bw_weight)
int rte_pmd_ixgbe_bypass_event_show(uint16_t port, uint32_t event, uint32_t *state)
int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf)
int rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on)
int rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf, uint16_t vlan_id)
int rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an, uint32_t pn, uint8_t *key)
int rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on)
int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf, struct ether_addr *mac_addr)
int rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on)
int rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi)
int rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on)
int rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port, uint32_t *wd_timeout)
int rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp)
int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
int rte_pmd_ixgbe_bypass_init(uint16_t port)
int rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
int rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port, uint32_t timeout)
int rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan, uint64_t vf_mask, uint8_t vlan_on)
int rte_pmd_ixgbe_bypass_ver_show(uint16_t port, uint32_t *ver)
int rte_pmd_ixgbe_bypass_wd_reset(uint16_t port)
int rte_pmd_ixgbe_macsec_disable(uint16_t port)
int rte_pmd_ixgbe_bypass_event_store(uint16_t port, uint32_t event, uint32_t state)
int rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an, uint32_t pn, uint8_t *key)
int rte_pmd_ixgbe_bypass_state_set(uint16_t port, uint32_t *new_state)
int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf, uint16_t tx_rate, uint64_t q_msk)
rte_pmd_ixgbe_mb_event_rsp
int rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on)