]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | /* SPDX-License-Identifier: BSD-3-Clause |
2 | * Copyright(c) 2014-2018 Broadcom | |
3 | * All rights reserved. | |
7c673cae FG |
4 | */ |
5 | ||
6 | #ifndef _BNXT_VNIC_H_ | |
7 | #define _BNXT_VNIC_H_ | |
8 | ||
9 | #include <sys/queue.h> | |
10 | #include <stdbool.h> | |
11 | ||
12 | struct bnxt_vnic_info { | |
13 | STAILQ_ENTRY(bnxt_vnic_info) next; | |
14 | uint8_t ff_pool_idx; | |
15 | ||
16 | uint16_t fw_vnic_id; /* returned by Chimp during alloc */ | |
9f95a23c | 17 | uint16_t rss_rule; |
7c673cae FG |
18 | uint16_t start_grp_id; |
19 | uint16_t end_grp_id; | |
9f95a23c TL |
20 | uint16_t *fw_grp_ids; |
21 | uint16_t dflt_ring_grp; | |
22 | uint16_t mru; | |
7c673cae | 23 | uint16_t hash_type; |
9f95a23c TL |
24 | uint8_t hash_mode; |
25 | rte_iova_t rss_table_dma_addr; | |
7c673cae | 26 | uint16_t *rss_table; |
9f95a23c | 27 | rte_iova_t rss_hash_key_dma_addr; |
7c673cae | 28 | void *rss_hash_key; |
9f95a23c TL |
29 | rte_iova_t mc_list_dma_addr; |
30 | char *mc_list; | |
31 | uint32_t mc_addr_cnt; | |
32 | #define BNXT_MAX_MC_ADDRS 16 | |
7c673cae FG |
33 | uint32_t flags; |
34 | #define BNXT_VNIC_INFO_PROMISC (1 << 0) | |
35 | #define BNXT_VNIC_INFO_ALLMULTI (1 << 1) | |
9f95a23c TL |
36 | #define BNXT_VNIC_INFO_BCAST (1 << 2) |
37 | #define BNXT_VNIC_INFO_UCAST (1 << 3) | |
38 | #define BNXT_VNIC_INFO_MCAST (1 << 4) | |
39 | #define BNXT_VNIC_INFO_TAGGED (1 << 5) | |
40 | #define BNXT_VNIC_INFO_UNTAGGED (1 << 6) | |
7c673cae | 41 | |
9f95a23c TL |
42 | uint16_t cos_rule; |
43 | uint16_t lb_rule; | |
7c673cae FG |
44 | bool vlan_strip; |
45 | bool func_default; | |
9f95a23c TL |
46 | bool bd_stall; |
47 | bool roce_dual; | |
48 | bool roce_only; | |
49 | bool rss_dflt_cr; | |
7c673cae FG |
50 | |
51 | STAILQ_HEAD(, bnxt_filter_info) filter; | |
9f95a23c | 52 | STAILQ_HEAD(, rte_flow) flow_list; |
7c673cae FG |
53 | }; |
54 | ||
55 | struct bnxt; | |
56 | void bnxt_init_vnics(struct bnxt *bp); | |
57 | int bnxt_free_vnic(struct bnxt *bp, struct bnxt_vnic_info *vnic, | |
58 | int pool); | |
59 | struct bnxt_vnic_info *bnxt_alloc_vnic(struct bnxt *bp); | |
60 | void bnxt_free_all_vnics(struct bnxt *bp); | |
61 | void bnxt_free_vnic_attributes(struct bnxt *bp); | |
62 | int bnxt_alloc_vnic_attributes(struct bnxt *bp); | |
63 | void bnxt_free_vnic_mem(struct bnxt *bp); | |
64 | int bnxt_alloc_vnic_mem(struct bnxt *bp); | |
7c673cae | 65 | #endif |