Ariel Elior | 1ab4434 | 2013-01-01 05:22:23 +0000 | [diff] [blame] | 1 | /* bnx2x_sriov.h: Broadcom Everest network driver. |
| 2 | * |
Yuval Mintz | 247fa82 | 2013-01-14 05:11:50 +0000 | [diff] [blame] | 3 | * Copyright 2009-2013 Broadcom Corporation |
Ariel Elior | 1ab4434 | 2013-01-01 05:22:23 +0000 | [diff] [blame] | 4 | * |
| 5 | * Unless you and Broadcom execute a separate written software license |
| 6 | * agreement governing use of this software, this software is licensed to you |
| 7 | * under the terms of the GNU General Public License version 2, available |
| 8 | * at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (the "GPL"). |
| 9 | * |
| 10 | * Notwithstanding the above, under no circumstances may you combine this |
| 11 | * software in any way with any other Broadcom software provided under a |
| 12 | * license other than the GPL, without Broadcom's express prior written |
| 13 | * consent. |
| 14 | * |
| 15 | * Maintained by: Eilon Greenstein <eilong@broadcom.com> |
| 16 | * Written by: Shmulik Ravid <shmulikr@broadcom.com> |
| 17 | * Ariel Elior <ariele@broadcom.com> |
| 18 | */ |
| 19 | #ifndef BNX2X_SRIOV_H |
| 20 | #define BNX2X_SRIOV_H |
| 21 | |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 22 | #include "bnx2x_vfpf.h" |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 23 | #include "bnx2x.h" |
| 24 | |
| 25 | enum sample_bulletin_result { |
| 26 | PFVF_BULLETIN_UNCHANGED, |
| 27 | PFVF_BULLETIN_UPDATED, |
| 28 | PFVF_BULLETIN_CRC_ERR |
| 29 | }; |
| 30 | |
| 31 | #ifdef CONFIG_BNX2X_SRIOV |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 32 | |
Yuval Mintz | 370d4a2 | 2014-03-23 18:12:24 +0200 | [diff] [blame] | 33 | extern struct workqueue_struct *bnx2x_iov_wq; |
| 34 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 35 | /* The bnx2x device structure holds vfdb structure described below. |
| 36 | * The VF array is indexed by the relative vfid. |
| 37 | */ |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 38 | #define BNX2X_VF_MAX_QUEUES 16 |
Ariel Elior | 8db573b | 2013-01-01 05:22:37 +0000 | [diff] [blame] | 39 | #define BNX2X_VF_MAX_TPA_AGG_QUEUES 8 |
| 40 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 41 | struct bnx2x_sriov { |
| 42 | u32 first_vf_in_pf; |
| 43 | |
| 44 | /* standard SRIOV capability fields, mostly for debugging */ |
| 45 | int pos; /* capability position */ |
| 46 | int nres; /* number of resources */ |
| 47 | u32 cap; /* SR-IOV Capabilities */ |
| 48 | u16 ctrl; /* SR-IOV Control */ |
| 49 | u16 total; /* total VFs associated with the PF */ |
| 50 | u16 initial; /* initial VFs associated with the PF */ |
| 51 | u16 nr_virtfn; /* number of VFs available */ |
| 52 | u16 offset; /* first VF Routing ID offset */ |
| 53 | u16 stride; /* following VF stride */ |
| 54 | u32 pgsz; /* page size for BAR alignment */ |
| 55 | u8 link; /* Function Dependency Link */ |
| 56 | }; |
| 57 | |
| 58 | /* bars */ |
| 59 | struct bnx2x_vf_bar { |
| 60 | u64 bar; |
| 61 | u32 size; |
| 62 | }; |
| 63 | |
Ariel Elior | f1929b0 | 2013-01-01 05:22:41 +0000 | [diff] [blame] | 64 | struct bnx2x_vf_bar_info { |
| 65 | struct bnx2x_vf_bar bars[PCI_SRIOV_NUM_BARS]; |
| 66 | u8 nr_bars; |
| 67 | }; |
| 68 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 69 | /* vf queue (used both for rx or tx) */ |
| 70 | struct bnx2x_vf_queue { |
| 71 | struct eth_context *cxt; |
| 72 | |
| 73 | /* MACs object */ |
| 74 | struct bnx2x_vlan_mac_obj mac_obj; |
| 75 | |
| 76 | /* VLANs object */ |
| 77 | struct bnx2x_vlan_mac_obj vlan_obj; |
| 78 | atomic_t vlan_count; /* 0 means vlan-0 is set ~ untagged */ |
Yuval Mintz | e8379c7 | 2014-01-05 18:33:54 +0200 | [diff] [blame] | 79 | unsigned long accept_flags; /* last accept flags configured */ |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 80 | |
| 81 | /* Queue Slow-path State object */ |
| 82 | struct bnx2x_queue_sp_obj sp_obj; |
| 83 | |
| 84 | u32 cid; |
| 85 | u16 index; |
| 86 | u16 sb_idx; |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 87 | bool is_leading; |
Yuval Mintz | 3a3534e | 2014-02-12 18:19:54 +0200 | [diff] [blame] | 88 | bool sp_initialized; |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 89 | }; |
| 90 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 91 | /* struct bnx2x_vf_queue_construct_params - prepare queue construction |
| 92 | * parameters: q-init, q-setup and SB index |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 93 | */ |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 94 | struct bnx2x_vf_queue_construct_params { |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 95 | struct bnx2x_queue_state_params qstate; |
| 96 | struct bnx2x_queue_setup_params prep_qsetup; |
| 97 | }; |
| 98 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 99 | /* forward */ |
| 100 | struct bnx2x_virtf; |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 101 | |
| 102 | /* VFOP definitions */ |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 103 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 104 | struct bnx2x_vf_mac_vlan_filter { |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 105 | int type; |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 106 | #define BNX2X_VF_FILTER_MAC 1 |
| 107 | #define BNX2X_VF_FILTER_VLAN 2 |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 108 | |
| 109 | bool add; |
| 110 | u8 *mac; |
| 111 | u16 vid; |
| 112 | }; |
| 113 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 114 | struct bnx2x_vf_mac_vlan_filters { |
| 115 | int count; |
| 116 | struct bnx2x_vf_mac_vlan_filter filters[]; |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 117 | }; |
| 118 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 119 | /* vf context */ |
| 120 | struct bnx2x_virtf { |
| 121 | u16 cfg_flags; |
| 122 | #define VF_CFG_STATS 0x0001 |
| 123 | #define VF_CFG_FW_FC 0x0002 |
| 124 | #define VF_CFG_TPA 0x0004 |
| 125 | #define VF_CFG_INT_SIMD 0x0008 |
| 126 | #define VF_CACHE_LINE 0x0010 |
Ariel Elior | 3ec9f9c | 2013-03-11 05:17:45 +0000 | [diff] [blame] | 127 | #define VF_CFG_VLAN 0x0020 |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 128 | #define VF_CFG_STATS_COALESCE 0x0040 |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 129 | |
| 130 | u8 state; |
| 131 | #define VF_FREE 0 /* VF ready to be acquired holds no resc */ |
Yuval Mintz | 16a5fd9 | 2013-06-02 00:06:18 +0000 | [diff] [blame] | 132 | #define VF_ACQUIRED 1 /* VF acquired, but not initialized */ |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 133 | #define VF_ENABLED 2 /* VF Enabled */ |
| 134 | #define VF_RESET 3 /* VF FLR'd, pending cleanup */ |
| 135 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 136 | bool flr_clnup_stage; /* true during flr cleanup */ |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 137 | |
| 138 | /* dma */ |
| 139 | dma_addr_t fw_stat_map; /* valid iff VF_CFG_STATS */ |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 140 | u16 stats_stride; |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 141 | dma_addr_t spq_map; |
| 142 | dma_addr_t bulletin_map; |
| 143 | |
| 144 | /* Allocated resources counters. Before the VF is acquired, the |
| 145 | * counters hold the following values: |
| 146 | * |
| 147 | * - xxq_count = 0 as the queues memory is not allocated yet. |
| 148 | * |
| 149 | * - sb_count = The number of status blocks configured for this VF in |
| 150 | * the IGU CAM. Initially read during probe. |
| 151 | * |
| 152 | * - xx_rules_count = The number of rules statically and equally |
| 153 | * allocated for each VF, during PF load. |
| 154 | */ |
| 155 | struct vf_pf_resc_request alloc_resc; |
| 156 | #define vf_rxq_count(vf) ((vf)->alloc_resc.num_rxqs) |
| 157 | #define vf_txq_count(vf) ((vf)->alloc_resc.num_txqs) |
| 158 | #define vf_sb_count(vf) ((vf)->alloc_resc.num_sbs) |
| 159 | #define vf_mac_rules_cnt(vf) ((vf)->alloc_resc.num_mac_filters) |
| 160 | #define vf_vlan_rules_cnt(vf) ((vf)->alloc_resc.num_vlan_filters) |
| 161 | #define vf_mc_rules_cnt(vf) ((vf)->alloc_resc.num_mc_filters) |
| 162 | |
| 163 | u8 sb_count; /* actual number of SBs */ |
| 164 | u8 igu_base_id; /* base igu status block id */ |
| 165 | |
| 166 | struct bnx2x_vf_queue *vfqs; |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 167 | #define LEADING_IDX 0 |
| 168 | #define bnx2x_vfq_is_leading(vfq) ((vfq)->index == LEADING_IDX) |
| 169 | #define bnx2x_vfq(vf, nr, var) ((vf)->vfqs[(nr)].var) |
| 170 | #define bnx2x_leading_vfq(vf, var) ((vf)->vfqs[LEADING_IDX].var) |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 171 | |
| 172 | u8 index; /* index in the vf array */ |
| 173 | u8 abs_vfid; |
| 174 | u8 sp_cl_id; |
| 175 | u32 error; /* 0 means all's-well */ |
| 176 | |
| 177 | /* BDF */ |
| 178 | unsigned int bus; |
| 179 | unsigned int devfn; |
| 180 | |
| 181 | /* bars */ |
| 182 | struct bnx2x_vf_bar bars[PCI_SRIOV_NUM_BARS]; |
| 183 | |
| 184 | /* set-mac ramrod state 1-pending, 0-done */ |
| 185 | unsigned long filter_state; |
| 186 | |
| 187 | /* leading rss client id ~~ the client id of the first rxq, must be |
| 188 | * set for each txq. |
| 189 | */ |
| 190 | int leading_rss; |
| 191 | |
| 192 | /* MCAST object */ |
Yuval Mintz | 858f4de | 2013-12-26 09:57:12 +0200 | [diff] [blame] | 193 | int mcast_list_len; |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 194 | struct bnx2x_mcast_obj mcast_obj; |
| 195 | |
| 196 | /* RSS configuration object */ |
| 197 | struct bnx2x_rss_config_obj rss_conf_obj; |
| 198 | |
| 199 | /* slow-path operations */ |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 200 | struct mutex op_mutex; /* one vfop at a time mutex */ |
| 201 | enum channel_tlvs op_current; |
| 202 | }; |
| 203 | |
| 204 | #define BNX2X_NR_VIRTFN(bp) ((bp)->vfdb->sriov.nr_virtfn) |
| 205 | |
| 206 | #define for_each_vf(bp, var) \ |
| 207 | for ((var) = 0; (var) < BNX2X_NR_VIRTFN(bp); (var)++) |
| 208 | |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 209 | #define for_each_vfq(vf, var) \ |
| 210 | for ((var) = 0; (var) < vf_rxq_count(vf); (var)++) |
| 211 | |
| 212 | #define for_each_vf_sb(vf, var) \ |
| 213 | for ((var) = 0; (var) < vf_sb_count(vf); (var)++) |
| 214 | |
Ariel Elior | b93288d | 2013-01-01 05:22:35 +0000 | [diff] [blame] | 215 | #define is_vf_multi(vf) (vf_rxq_count(vf) > 1) |
| 216 | |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 217 | #define HW_VF_HANDLE(bp, abs_vfid) \ |
| 218 | (u16)(BP_ABS_FUNC((bp)) | (1<<3) | ((u16)(abs_vfid) << 4)) |
| 219 | |
| 220 | #define FW_PF_MAX_HANDLE 8 |
| 221 | |
| 222 | #define FW_VF_HANDLE(abs_vfid) \ |
| 223 | (abs_vfid + FW_PF_MAX_HANDLE) |
| 224 | |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 225 | /* locking and unlocking the channel mutex */ |
| 226 | void bnx2x_lock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 227 | enum channel_tlvs tlv); |
| 228 | |
| 229 | void bnx2x_unlock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 230 | enum channel_tlvs expected_tlv); |
| 231 | |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 232 | /* VF mail box (aka vf-pf channel) */ |
| 233 | |
| 234 | /* a container for the bi-directional vf<-->pf messages. |
| 235 | * The actual response will be placed according to the offset parameter |
| 236 | * provided in the request |
| 237 | */ |
| 238 | |
| 239 | #define MBX_MSG_ALIGN 8 |
| 240 | #define MBX_MSG_ALIGNED_SIZE (roundup(sizeof(struct bnx2x_vf_mbx_msg), \ |
| 241 | MBX_MSG_ALIGN)) |
| 242 | |
Ariel Elior | 1ab4434 | 2013-01-01 05:22:23 +0000 | [diff] [blame] | 243 | struct bnx2x_vf_mbx_msg { |
| 244 | union vfpf_tlvs req; |
| 245 | union pfvf_tlvs resp; |
| 246 | }; |
| 247 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 248 | struct bnx2x_vf_mbx { |
| 249 | struct bnx2x_vf_mbx_msg *msg; |
| 250 | dma_addr_t msg_mapping; |
| 251 | |
| 252 | /* VF GPA address */ |
| 253 | u32 vf_addr_lo; |
| 254 | u32 vf_addr_hi; |
| 255 | |
| 256 | struct vfpf_first_tlv first_tlv; /* saved VF request header */ |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 257 | }; |
| 258 | |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 259 | struct bnx2x_vf_sp { |
| 260 | union { |
| 261 | struct eth_classify_rules_ramrod_data e2; |
| 262 | } mac_rdata; |
| 263 | |
| 264 | union { |
| 265 | struct eth_classify_rules_ramrod_data e2; |
| 266 | } vlan_rdata; |
| 267 | |
| 268 | union { |
| 269 | struct eth_filter_rules_ramrod_data e2; |
| 270 | } rx_mode_rdata; |
| 271 | |
| 272 | union { |
| 273 | struct eth_multicast_rules_ramrod_data e2; |
| 274 | } mcast_rdata; |
| 275 | |
| 276 | union { |
| 277 | struct client_init_ramrod_data init_data; |
| 278 | struct client_update_ramrod_data update_data; |
| 279 | } q_data; |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 280 | |
| 281 | union { |
| 282 | struct eth_rss_update_ramrod_data e2; |
| 283 | } rss_rdata; |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 284 | }; |
| 285 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 286 | struct hw_dma { |
| 287 | void *addr; |
| 288 | dma_addr_t mapping; |
| 289 | size_t size; |
| 290 | }; |
| 291 | |
| 292 | struct bnx2x_vfdb { |
| 293 | #define BP_VFDB(bp) ((bp)->vfdb) |
| 294 | /* vf array */ |
| 295 | struct bnx2x_virtf *vfs; |
| 296 | #define BP_VF(bp, idx) (&((bp)->vfdb->vfs[(idx)])) |
| 297 | #define bnx2x_vf(bp, idx, var) ((bp)->vfdb->vfs[(idx)].var) |
| 298 | |
| 299 | /* queue array - for all vfs */ |
| 300 | struct bnx2x_vf_queue *vfqs; |
| 301 | |
| 302 | /* vf HW contexts */ |
| 303 | struct hw_dma context[BNX2X_VF_CIDS/ILT_PAGE_CIDS]; |
| 304 | #define BP_VF_CXT_PAGE(bp, i) (&(bp)->vfdb->context[(i)]) |
| 305 | |
| 306 | /* SR-IOV information */ |
| 307 | struct bnx2x_sriov sriov; |
| 308 | struct hw_dma mbx_dma; |
| 309 | #define BP_VF_MBX_DMA(bp) (&((bp)->vfdb->mbx_dma)) |
| 310 | struct bnx2x_vf_mbx mbxs[BNX2X_MAX_NUM_OF_VFS]; |
| 311 | #define BP_VF_MBX(bp, vfid) (&((bp)->vfdb->mbxs[(vfid)])) |
| 312 | |
Ariel Elior | abc5a02 | 2013-01-01 05:22:43 +0000 | [diff] [blame] | 313 | struct hw_dma bulletin_dma; |
| 314 | #define BP_VF_BULLETIN_DMA(bp) (&((bp)->vfdb->bulletin_dma)) |
| 315 | #define BP_VF_BULLETIN(bp, vf) \ |
| 316 | (((struct pf_vf_bulletin_content *)(BP_VF_BULLETIN_DMA(bp)->addr)) \ |
| 317 | + (vf)) |
| 318 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 319 | struct hw_dma sp_dma; |
| 320 | #define bnx2x_vf_sp(bp, vf, field) ((bp)->vfdb->sp_dma.addr + \ |
| 321 | (vf)->index * sizeof(struct bnx2x_vf_sp) + \ |
| 322 | offsetof(struct bnx2x_vf_sp, field)) |
| 323 | #define bnx2x_vf_sp_map(bp, vf, field) ((bp)->vfdb->sp_dma.mapping + \ |
| 324 | (vf)->index * sizeof(struct bnx2x_vf_sp) + \ |
| 325 | offsetof(struct bnx2x_vf_sp, field)) |
| 326 | |
| 327 | #define FLRD_VFS_DWORDS (BNX2X_MAX_NUM_OF_VFS / 32) |
| 328 | u32 flrd_vfs[FLRD_VFS_DWORDS]; |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 329 | |
| 330 | /* the number of msix vectors belonging to this PF designated for VFs */ |
| 331 | u16 vf_sbs_pool; |
| 332 | u16 first_vf_igu_entry; |
Yuval Mintz | 370d4a2 | 2014-03-23 18:12:24 +0200 | [diff] [blame] | 333 | |
| 334 | /* sp_rtnl synchronization */ |
| 335 | struct mutex event_mutex; |
| 336 | u64 event_occur; |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 337 | }; |
| 338 | |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 339 | /* queue access */ |
| 340 | static inline struct bnx2x_vf_queue *vfq_get(struct bnx2x_virtf *vf, u8 index) |
| 341 | { |
| 342 | return &(vf->vfqs[index]); |
| 343 | } |
| 344 | |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 345 | /* FW ids */ |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 346 | static inline u8 vf_igu_sb(struct bnx2x_virtf *vf, u16 sb_idx) |
| 347 | { |
| 348 | return vf->igu_base_id + sb_idx; |
| 349 | } |
| 350 | |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 351 | static inline u8 vf_hc_qzone(struct bnx2x_virtf *vf, u16 sb_idx) |
| 352 | { |
| 353 | return vf_igu_sb(vf, sb_idx); |
| 354 | } |
| 355 | |
| 356 | static u8 vfq_cl_id(struct bnx2x_virtf *vf, struct bnx2x_vf_queue *q) |
| 357 | { |
| 358 | return vf->igu_base_id + q->index; |
| 359 | } |
| 360 | |
Ariel Elior | 8db573b | 2013-01-01 05:22:37 +0000 | [diff] [blame] | 361 | static inline u8 vfq_stat_id(struct bnx2x_virtf *vf, struct bnx2x_vf_queue *q) |
| 362 | { |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 363 | if (vf->cfg_flags & VF_CFG_STATS_COALESCE) |
| 364 | return vf->leading_rss; |
| 365 | else |
| 366 | return vfq_cl_id(vf, q); |
Ariel Elior | 8db573b | 2013-01-01 05:22:37 +0000 | [diff] [blame] | 367 | } |
| 368 | |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 369 | static inline u8 vfq_qzone_id(struct bnx2x_virtf *vf, struct bnx2x_vf_queue *q) |
| 370 | { |
| 371 | return vfq_cl_id(vf, q); |
| 372 | } |
| 373 | |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 374 | /* global iov routines */ |
| 375 | int bnx2x_iov_init_ilt(struct bnx2x *bp, u16 line); |
| 376 | int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, int num_vfs_param); |
| 377 | void bnx2x_iov_remove_one(struct bnx2x *bp); |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 378 | void bnx2x_iov_free_mem(struct bnx2x *bp); |
| 379 | int bnx2x_iov_alloc_mem(struct bnx2x *bp); |
| 380 | int bnx2x_iov_nic_init(struct bnx2x *bp); |
Ariel Elior | f1929b0 | 2013-01-01 05:22:41 +0000 | [diff] [blame] | 381 | int bnx2x_iov_chip_cleanup(struct bnx2x *bp); |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 382 | void bnx2x_iov_init_dq(struct bnx2x *bp); |
| 383 | void bnx2x_iov_init_dmae(struct bnx2x *bp); |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 384 | void bnx2x_iov_set_queue_sp_obj(struct bnx2x *bp, int vf_cid, |
| 385 | struct bnx2x_queue_sp_obj **q_obj); |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 386 | int bnx2x_iov_eq_sp_event(struct bnx2x *bp, union event_ring_elem *elem); |
Ariel Elior | 67c431a | 2013-01-01 05:22:36 +0000 | [diff] [blame] | 387 | void bnx2x_iov_adjust_stats_req(struct bnx2x *bp); |
| 388 | void bnx2x_iov_storm_stats_update(struct bnx2x *bp); |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 389 | /* global vf mailbox routines */ |
Yuval Mintz | 370d4a2 | 2014-03-23 18:12:24 +0200 | [diff] [blame] | 390 | void bnx2x_vf_mbx(struct bnx2x *bp); |
| 391 | void bnx2x_vf_mbx_schedule(struct bnx2x *bp, |
| 392 | struct vf_pf_event_data *vfpf_event); |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 393 | void bnx2x_vf_enable_mbx(struct bnx2x *bp, u8 abs_vfid); |
Ariel Elior | 954ea74 | 2013-01-01 05:22:38 +0000 | [diff] [blame] | 394 | |
| 395 | /* CORE VF API */ |
| 396 | typedef u8 bnx2x_mac_addr_t[ETH_ALEN]; |
| 397 | |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 398 | /* acquire */ |
| 399 | int bnx2x_vf_acquire(struct bnx2x *bp, struct bnx2x_virtf *vf, |
Ariel Elior | b93288d | 2013-01-01 05:22:35 +0000 | [diff] [blame] | 400 | struct vf_pf_resc_request *resc); |
| 401 | /* init */ |
| 402 | int bnx2x_vf_init(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 403 | dma_addr_t *sb_map); |
Ariel Elior | 8db573b | 2013-01-01 05:22:37 +0000 | [diff] [blame] | 404 | |
Ariel Elior | 8db573b | 2013-01-01 05:22:37 +0000 | [diff] [blame] | 405 | /* VFOP queue construction helpers */ |
| 406 | void bnx2x_vfop_qctor_dump_tx(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 407 | struct bnx2x_queue_init_params *init_params, |
| 408 | struct bnx2x_queue_setup_params *setup_params, |
| 409 | u16 q_idx, u16 sb_idx); |
| 410 | |
| 411 | void bnx2x_vfop_qctor_dump_rx(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 412 | struct bnx2x_queue_init_params *init_params, |
| 413 | struct bnx2x_queue_setup_params *setup_params, |
| 414 | u16 q_idx, u16 sb_idx); |
| 415 | |
| 416 | void bnx2x_vfop_qctor_prep(struct bnx2x *bp, |
| 417 | struct bnx2x_virtf *vf, |
| 418 | struct bnx2x_vf_queue *q, |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 419 | struct bnx2x_vf_queue_construct_params *p, |
Ariel Elior | 8db573b | 2013-01-01 05:22:37 +0000 | [diff] [blame] | 420 | unsigned long q_type); |
Ariel Elior | 954ea74 | 2013-01-01 05:22:38 +0000 | [diff] [blame] | 421 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 422 | int bnx2x_vf_mac_vlan_config_list(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 423 | struct bnx2x_vf_mac_vlan_filters *filters, |
| 424 | int qid, bool drv_only); |
Ariel Elior | 954ea74 | 2013-01-01 05:22:38 +0000 | [diff] [blame] | 425 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 426 | int bnx2x_vf_queue_setup(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid, |
| 427 | struct bnx2x_vf_queue_construct_params *qctor); |
Ariel Elior | 8db573b | 2013-01-01 05:22:37 +0000 | [diff] [blame] | 428 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 429 | int bnx2x_vf_queue_teardown(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid); |
Ariel Elior | 463a68a | 2013-01-01 05:22:39 +0000 | [diff] [blame] | 430 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 431 | int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 432 | bnx2x_mac_addr_t *mcasts, int mc_num, bool drv_only); |
Ariel Elior | 954ea74 | 2013-01-01 05:22:38 +0000 | [diff] [blame] | 433 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 434 | int bnx2x_vf_rxmode(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 435 | int qid, unsigned long accept_flags); |
Ariel Elior | 954ea74 | 2013-01-01 05:22:38 +0000 | [diff] [blame] | 436 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 437 | int bnx2x_vf_close(struct bnx2x *bp, struct bnx2x_virtf *vf); |
Ariel Elior | 99e9d21 | 2013-01-01 05:22:40 +0000 | [diff] [blame] | 438 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 439 | int bnx2x_vf_free(struct bnx2x *bp, struct bnx2x_virtf *vf); |
Ariel Elior | f1929b0 | 2013-01-01 05:22:41 +0000 | [diff] [blame] | 440 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 441 | int bnx2x_vf_rss_update(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 442 | struct bnx2x_config_rss_params *rss); |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 443 | |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 444 | int bnx2x_vf_tpa_update(struct bnx2x *bp, struct bnx2x_virtf *vf, |
| 445 | struct vfpf_tpa_tlv *tlv, |
| 446 | struct bnx2x_queue_update_tpa_params *params); |
Michal Kalderon | 14a94eb | 2014-02-12 18:19:53 +0200 | [diff] [blame] | 447 | |
Ariel Elior | f1929b0 | 2013-01-01 05:22:41 +0000 | [diff] [blame] | 448 | /* VF release ~ VF close + VF release-resources |
| 449 | * |
| 450 | * Release is the ultimate SW shutdown and is called whenever an |
| 451 | * irrecoverable error is encountered. |
| 452 | */ |
Yuval Mintz | 2dc33bb | 2014-03-23 18:12:25 +0200 | [diff] [blame] | 453 | int bnx2x_vf_release(struct bnx2x *bp, struct bnx2x_virtf *vf); |
Ariel Elior | 290ca2b | 2013-01-01 05:22:31 +0000 | [diff] [blame] | 454 | int bnx2x_vf_idx_by_abs_fid(struct bnx2x *bp, u16 abs_vfid); |
Ariel Elior | 8ca5e17 | 2013-01-01 05:22:34 +0000 | [diff] [blame] | 455 | u8 bnx2x_vf_max_queue_cnt(struct bnx2x *bp, struct bnx2x_virtf *vf); |
Ariel Elior | d16132c | 2013-01-01 05:22:42 +0000 | [diff] [blame] | 456 | |
| 457 | /* FLR routines */ |
| 458 | |
Ariel Elior | b56e967 | 2013-01-01 05:22:32 +0000 | [diff] [blame] | 459 | /* VF FLR helpers */ |
| 460 | int bnx2x_vf_flr_clnup_epilog(struct bnx2x *bp, u8 abs_vfid); |
| 461 | void bnx2x_vf_enable_access(struct bnx2x *bp, u8 abs_vfid); |
Ariel Elior | d16132c | 2013-01-01 05:22:42 +0000 | [diff] [blame] | 462 | |
| 463 | /* Handles an FLR (or VF_DISABLE) notification form the MCP */ |
| 464 | void bnx2x_vf_handle_flr_event(struct bnx2x *bp); |
| 465 | |
Ariel Elior | fd1fc79 | 2013-01-01 05:22:33 +0000 | [diff] [blame] | 466 | bool bnx2x_tlv_supported(u16 tlvtype); |
| 467 | |
Ariel Elior | abc5a02 | 2013-01-01 05:22:43 +0000 | [diff] [blame] | 468 | u32 bnx2x_crc_vf_bulletin(struct bnx2x *bp, |
| 469 | struct pf_vf_bulletin_content *bulletin); |
| 470 | int bnx2x_post_vf_bulletin(struct bnx2x *bp, int vf); |
| 471 | |
Ariel Elior | abc5a02 | 2013-01-01 05:22:43 +0000 | [diff] [blame] | 472 | enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp); |
| 473 | |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 474 | /* VF side vfpf channel functions */ |
| 475 | int bnx2x_vfpf_acquire(struct bnx2x *bp, u8 tx_count, u8 rx_count); |
| 476 | int bnx2x_vfpf_release(struct bnx2x *bp); |
| 477 | int bnx2x_vfpf_release(struct bnx2x *bp); |
| 478 | int bnx2x_vfpf_init(struct bnx2x *bp); |
| 479 | void bnx2x_vfpf_close_vf(struct bnx2x *bp); |
Ariel Elior | 60cad4e | 2013-09-04 14:09:22 +0300 | [diff] [blame] | 480 | int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, |
| 481 | bool is_leading); |
Dmitry Kravkov | f8f4f61 | 2013-04-24 01:45:00 +0000 | [diff] [blame] | 482 | int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, u8 vf_qid, bool set); |
Ariel Elior | 60cad4e | 2013-09-04 14:09:22 +0300 | [diff] [blame] | 483 | int bnx2x_vfpf_config_rss(struct bnx2x *bp, |
| 484 | struct bnx2x_config_rss_params *params); |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 485 | int bnx2x_vfpf_set_mcast(struct net_device *dev); |
| 486 | int bnx2x_vfpf_storm_rx_mode(struct bnx2x *bp); |
| 487 | |
| 488 | static inline void bnx2x_vf_fill_fw_str(struct bnx2x *bp, char *buf, |
| 489 | size_t buf_len) |
| 490 | { |
| 491 | strlcpy(buf, bp->acquire_resp.pfdev_info.fw_ver, buf_len); |
| 492 | } |
| 493 | |
| 494 | static inline int bnx2x_vf_ustorm_prods_offset(struct bnx2x *bp, |
| 495 | struct bnx2x_fastpath *fp) |
| 496 | { |
| 497 | return PXP_VF_ADDR_USDM_QUEUES_START + |
| 498 | bp->acquire_resp.resc.hw_qid[fp->index] * |
| 499 | sizeof(struct ustorm_queue_zone_data); |
| 500 | } |
| 501 | |
| 502 | enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp); |
Yuval Mintz | 37173488 | 2013-06-24 11:04:10 +0300 | [diff] [blame] | 503 | void bnx2x_timer_sriov(struct bnx2x *bp); |
Dmitry Kravkov | 1d6f3cd | 2013-03-27 01:05:17 +0000 | [diff] [blame] | 504 | void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp); |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 505 | int bnx2x_vf_pci_alloc(struct bnx2x *bp); |
Ariel Elior | 3c76fef | 2013-03-11 05:17:46 +0000 | [diff] [blame] | 506 | int bnx2x_enable_sriov(struct bnx2x *bp); |
| 507 | void bnx2x_disable_sriov(struct bnx2x *bp); |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 508 | static inline int bnx2x_vf_headroom(struct bnx2x *bp) |
| 509 | { |
Ariel Elior | b9871bc | 2013-09-04 14:09:21 +0300 | [diff] [blame] | 510 | return bp->vfdb->sriov.nr_virtfn * BNX2X_CIDS_PER_VF; |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 511 | } |
Ariel Elior | 3ec9f9c | 2013-03-11 05:17:45 +0000 | [diff] [blame] | 512 | void bnx2x_pf_set_vfs_vlan(struct bnx2x *bp); |
Ariel Elior | 3c76fef | 2013-03-11 05:17:46 +0000 | [diff] [blame] | 513 | int bnx2x_sriov_configure(struct pci_dev *dev, int num_vfs); |
Ariel Elior | 78c3bcc | 2013-06-20 17:39:08 +0300 | [diff] [blame] | 514 | void bnx2x_iov_channel_down(struct bnx2x *bp); |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 515 | |
Yuval Mintz | 370d4a2 | 2014-03-23 18:12:24 +0200 | [diff] [blame] | 516 | void bnx2x_iov_task(struct work_struct *work); |
| 517 | |
| 518 | void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag); |
| 519 | |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 520 | #else /* CONFIG_BNX2X_SRIOV */ |
| 521 | |
| 522 | static inline void bnx2x_iov_set_queue_sp_obj(struct bnx2x *bp, int vf_cid, |
| 523 | struct bnx2x_queue_sp_obj **q_obj) {} |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 524 | static inline void bnx2x_vf_handle_flr_event(struct bnx2x *bp) {} |
| 525 | static inline int bnx2x_iov_eq_sp_event(struct bnx2x *bp, |
| 526 | union event_ring_elem *elem) {return 1; } |
Yuval Mintz | 370d4a2 | 2014-03-23 18:12:24 +0200 | [diff] [blame] | 527 | static inline void bnx2x_vf_mbx(struct bnx2x *bp) {} |
| 528 | static inline void bnx2x_vf_mbx_schedule(struct bnx2x *bp, |
| 529 | struct vf_pf_event_data *vfpf_event) {} |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 530 | static inline int bnx2x_iov_init_ilt(struct bnx2x *bp, u16 line) {return line; } |
| 531 | static inline void bnx2x_iov_init_dq(struct bnx2x *bp) {} |
| 532 | static inline int bnx2x_iov_alloc_mem(struct bnx2x *bp) {return 0; } |
Yuval Mintz | 580d9d0 | 2013-01-23 03:21:51 +0000 | [diff] [blame] | 533 | static inline void bnx2x_iov_free_mem(struct bnx2x *bp) {} |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 534 | static inline int bnx2x_iov_chip_cleanup(struct bnx2x *bp) {return 0; } |
| 535 | static inline void bnx2x_iov_init_dmae(struct bnx2x *bp) {} |
| 536 | static inline int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, |
| 537 | int num_vfs_param) {return 0; } |
| 538 | static inline void bnx2x_iov_remove_one(struct bnx2x *bp) {} |
Ariel Elior | 3c76fef | 2013-03-11 05:17:46 +0000 | [diff] [blame] | 539 | static inline int bnx2x_enable_sriov(struct bnx2x *bp) {return 0; } |
| 540 | static inline void bnx2x_disable_sriov(struct bnx2x *bp) {} |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 541 | static inline int bnx2x_vfpf_acquire(struct bnx2x *bp, |
| 542 | u8 tx_count, u8 rx_count) {return 0; } |
| 543 | static inline int bnx2x_vfpf_release(struct bnx2x *bp) {return 0; } |
| 544 | static inline int bnx2x_vfpf_init(struct bnx2x *bp) {return 0; } |
| 545 | static inline void bnx2x_vfpf_close_vf(struct bnx2x *bp) {} |
Ariel Elior | 60cad4e | 2013-09-04 14:09:22 +0300 | [diff] [blame] | 546 | static inline int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, bool is_leading) {return 0; } |
Dmitry Kravkov | f8f4f61 | 2013-04-24 01:45:00 +0000 | [diff] [blame] | 547 | static inline int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, |
| 548 | u8 vf_qid, bool set) {return 0; } |
Dmitry Kravkov | 9b0be65 | 2013-09-06 10:35:28 +0300 | [diff] [blame] | 549 | static inline int bnx2x_vfpf_config_rss(struct bnx2x *bp, |
| 550 | struct bnx2x_config_rss_params *params) {return 0; } |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 551 | static inline int bnx2x_vfpf_set_mcast(struct net_device *dev) {return 0; } |
| 552 | static inline int bnx2x_vfpf_storm_rx_mode(struct bnx2x *bp) {return 0; } |
| 553 | static inline int bnx2x_iov_nic_init(struct bnx2x *bp) {return 0; } |
| 554 | static inline int bnx2x_vf_headroom(struct bnx2x *bp) {return 0; } |
| 555 | static inline void bnx2x_iov_adjust_stats_req(struct bnx2x *bp) {} |
| 556 | static inline void bnx2x_vf_fill_fw_str(struct bnx2x *bp, char *buf, |
| 557 | size_t buf_len) {} |
| 558 | static inline int bnx2x_vf_ustorm_prods_offset(struct bnx2x *bp, |
| 559 | struct bnx2x_fastpath *fp) {return 0; } |
| 560 | static inline enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp) |
| 561 | { |
| 562 | return PFVF_BULLETIN_UNCHANGED; |
| 563 | } |
Yuval Mintz | 37173488 | 2013-06-24 11:04:10 +0300 | [diff] [blame] | 564 | static inline void bnx2x_timer_sriov(struct bnx2x *bp) {} |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 565 | |
Dmitry Kravkov | 1d6f3cd | 2013-03-27 01:05:17 +0000 | [diff] [blame] | 566 | static inline void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) |
| 567 | { |
| 568 | return NULL; |
| 569 | } |
| 570 | |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 571 | static inline int bnx2x_vf_pci_alloc(struct bnx2x *bp) {return 0; } |
Ariel Elior | 3ec9f9c | 2013-03-11 05:17:45 +0000 | [diff] [blame] | 572 | static inline void bnx2x_pf_set_vfs_vlan(struct bnx2x *bp) {} |
Ariel Elior | 3c76fef | 2013-03-11 05:17:46 +0000 | [diff] [blame] | 573 | static inline int bnx2x_sriov_configure(struct pci_dev *dev, int num_vfs) {return 0; } |
Ariel Elior | 78c3bcc | 2013-06-20 17:39:08 +0300 | [diff] [blame] | 574 | static inline void bnx2x_iov_channel_down(struct bnx2x *bp) {} |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 575 | |
Yuval Mintz | 370d4a2 | 2014-03-23 18:12:24 +0200 | [diff] [blame] | 576 | static inline void bnx2x_iov_task(struct work_struct *work) {} |
Yuval Mintz | 19915f5 | 2014-03-26 09:06:29 +0200 | [diff] [blame] | 577 | static inline void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag) {} |
Yuval Mintz | 370d4a2 | 2014-03-23 18:12:24 +0200 | [diff] [blame] | 578 | |
Ariel Elior | 6411280 | 2013-01-07 00:50:23 +0000 | [diff] [blame] | 579 | #endif /* CONFIG_BNX2X_SRIOV */ |
Ariel Elior | 1ab4434 | 2013-01-01 05:22:23 +0000 | [diff] [blame] | 580 | #endif /* bnx2x_sriov.h */ |