1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* Copyright (c) 2021, Intel Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * 3. Neither the name of the Intel Corporation nor the names of its 16 * contributors may be used to endorse or promote products derived from 17 * this software without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 /** 33 * @file iavf_lib.h 34 * @brief header for structures and functions common to legacy and iflib 35 * 36 * Contains definitions and function declarations which are shared between the 37 * legacy and iflib driver implementation. 38 */ 39 #ifndef _IAVF_LIB_H_ 40 #define _IAVF_LIB_H_ 41 42 #include <sys/malloc.h> 43 #include <machine/stdarg.h> 44 #include <sys/sysctl.h> 45 #ifdef RSS 46 #include <net/rss_config.h> 47 #endif 48 49 #include "iavf_debug.h" 50 #include "iavf_osdep.h" 51 #include "iavf_type.h" 52 #include "iavf_prototype.h" 53 54 MALLOC_DECLARE(M_IAVF); 55 56 /* 57 * Ring Descriptors Valid Range: 32-4096 Default Value: 1024 This value is the 58 * number of tx/rx descriptors allocated by the driver. Increasing this 59 * value allows the driver to queue more operations. 60 * 61 * Tx descriptors are always 16 bytes, but Rx descriptors can be 32 bytes. 62 * The driver currently always uses 32 byte Rx descriptors. 63 */ 64 #define IAVF_DEFAULT_RING 1024 65 #define IAVF_MAX_RING 4096 66 #define IAVF_MIN_RING 64 67 #define IAVF_RING_INCREMENT 32 68 69 #define IAVF_AQ_LEN 256 70 #define IAVF_AQ_LEN_MAX 1024 71 72 /* 73 ** Default number of entries in Tx queue buf_ring. 74 */ 75 #define DEFAULT_TXBRSZ 4096 76 77 /* Alignment for rings */ 78 #define DBA_ALIGN 128 79 80 /* 81 * Max number of multicast MAC addrs added to the driver's 82 * internal lists before converting to promiscuous mode 83 */ 84 #define MAX_MULTICAST_ADDR 128 85 86 /* Byte alignment for Tx/Rx descriptor rings */ 87 #define DBA_ALIGN 128 88 89 #define IAVF_MSIX_BAR 3 90 #define IAVF_ADM_LIMIT 2 91 #define IAVF_TSO_SIZE ((255*1024)-1) 92 #define IAVF_AQ_BUF_SZ ((u32) 4096) 93 #define IAVF_RX_HDR 128 94 #define IAVF_RX_LIMIT 512 95 #define IAVF_RX_ITR 0 96 #define IAVF_TX_ITR 1 97 /** 98 * The maximum packet length allowed to be sent or received by the adapter. 99 */ 100 #define IAVF_MAX_FRAME 9728 101 /** 102 * The minimum packet length allowed to be sent by the adapter. 103 */ 104 #define IAVF_MIN_FRAME 17 105 #define IAVF_MAX_TX_SEGS 8 106 #define IAVF_MAX_RX_SEGS 5 107 #define IAVF_MAX_TSO_SEGS 128 108 #define IAVF_SPARSE_CHAIN 7 109 #define IAVF_MIN_TSO_MSS 64 110 #define IAVF_MAX_TSO_MSS 9668 111 #define IAVF_MAX_DMA_SEG_SIZE ((16 * 1024) - 1) 112 #define IAVF_AQ_MAX_ERR 30 113 #define IAVF_MAX_INIT_WAIT 120 114 #define IAVF_AQ_TIMEOUT (1 * hz) 115 #define IAVF_ADV_LINK_SPEED_SCALE ((u64)1000000) 116 #define IAVF_MAX_DIS_Q_RETRY 10 117 118 #define IAVF_RSS_KEY_SIZE_REG 13 119 #define IAVF_RSS_KEY_SIZE (IAVF_RSS_KEY_SIZE_REG * 4) 120 #define IAVF_RSS_VSI_LUT_SIZE 64 /* X722 -> VSI, X710 -> VF */ 121 #define IAVF_RSS_VSI_LUT_ENTRY_MASK 0x3F 122 #define IAVF_RSS_VF_LUT_ENTRY_MASK 0xF 123 124 /* Maximum MTU size */ 125 #define IAVF_MAX_MTU (IAVF_MAX_FRAME - \ 126 ETHER_HDR_LEN - ETHER_CRC_LEN - ETHER_VLAN_ENCAP_LEN) 127 128 /* 129 * Hardware requires that TSO packets have an segment size of at least 64 130 * bytes. To avoid sending bad frames to the hardware, the driver forces the 131 * MSS for all TSO packets to have a segment size of at least 64 bytes. 132 * 133 * However, if the MTU is reduced below a certain size, then the resulting 134 * larger MSS can result in transmitting segmented frames with a packet size 135 * larger than the MTU. 136 * 137 * Avoid this by preventing the MTU from being lowered below this limit. 138 * Alternative solutions require changing the TCP stack to disable offloading 139 * the segmentation when the requested segment size goes below 64 bytes. 140 */ 141 #define IAVF_MIN_MTU 112 142 143 /* 144 * Interrupt Moderation parameters 145 * Multiply ITR values by 2 for real ITR value 146 */ 147 #define IAVF_MAX_ITR 0x0FF0 148 #define IAVF_ITR_100K 0x0005 149 #define IAVF_ITR_20K 0x0019 150 #define IAVF_ITR_8K 0x003E 151 #define IAVF_ITR_4K 0x007A 152 #define IAVF_ITR_1K 0x01F4 153 #define IAVF_ITR_DYNAMIC 0x8000 154 #define IAVF_LOW_LATENCY 0 155 #define IAVF_AVE_LATENCY 1 156 #define IAVF_BULK_LATENCY 2 157 158 /* MacVlan Flags */ 159 #define IAVF_FILTER_USED (u16)(1 << 0) 160 #define IAVF_FILTER_VLAN (u16)(1 << 1) 161 #define IAVF_FILTER_ADD (u16)(1 << 2) 162 #define IAVF_FILTER_DEL (u16)(1 << 3) 163 #define IAVF_FILTER_MC (u16)(1 << 4) 164 /* used in the vlan field of the filter when not a vlan */ 165 #define IAVF_VLAN_ANY -1 166 167 #define CSUM_OFFLOAD_IPV4 (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) 168 #define CSUM_OFFLOAD_IPV6 (CSUM_TCP_IPV6|CSUM_UDP_IPV6|CSUM_SCTP_IPV6) 169 #define CSUM_OFFLOAD (CSUM_OFFLOAD_IPV4|CSUM_OFFLOAD_IPV6|CSUM_TSO) 170 171 /* Misc flags for iavf_vsi.flags */ 172 #define IAVF_FLAGS_KEEP_TSO4 (1 << 0) 173 #define IAVF_FLAGS_KEEP_TSO6 (1 << 1) 174 175 #define IAVF_DEFAULT_RSS_HENA_BASE (\ 176 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_UDP) | \ 177 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_TCP) | \ 178 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_SCTP) | \ 179 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_OTHER) | \ 180 BIT_ULL(IAVF_FILTER_PCTYPE_FRAG_IPV4) | \ 181 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_UDP) | \ 182 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_TCP) | \ 183 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_SCTP) | \ 184 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_OTHER) | \ 185 BIT_ULL(IAVF_FILTER_PCTYPE_FRAG_IPV6)) 186 187 #define IAVF_DEFAULT_ADV_RSS_HENA (\ 188 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \ 189 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \ 190 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \ 191 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP) | \ 192 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \ 193 BIT_ULL(IAVF_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK)) 194 195 #define IAVF_DEFAULT_RSS_HENA_XL710 (\ 196 IAVF_DEFAULT_RSS_HENA_BASE | \ 197 BIT_ULL(IAVF_FILTER_PCTYPE_L2_PAYLOAD)) 198 199 #define IAVF_DEFAULT_RSS_HENA_X722 (\ 200 IAVF_DEFAULT_RSS_HENA_XL710 | \ 201 IAVF_DEFAULT_ADV_RSS_HENA) 202 203 #define IAVF_DEFAULT_RSS_HENA_AVF (\ 204 IAVF_DEFAULT_RSS_HENA_BASE | \ 205 IAVF_DEFAULT_ADV_RSS_HENA) 206 207 /* Pre-11 counter(9) compatibility */ 208 #define IAVF_SET_IPACKETS(vsi, count) (vsi)->ipackets = (count) 209 #define IAVF_SET_IERRORS(vsi, count) (vsi)->ierrors = (count) 210 #define IAVF_SET_OPACKETS(vsi, count) (vsi)->opackets = (count) 211 #define IAVF_SET_OERRORS(vsi, count) (vsi)->oerrors = (count) 212 #define IAVF_SET_COLLISIONS(vsi, count) /* Do nothing; collisions is always 0. */ 213 #define IAVF_SET_IBYTES(vsi, count) (vsi)->ibytes = (count) 214 #define IAVF_SET_OBYTES(vsi, count) (vsi)->obytes = (count) 215 #define IAVF_SET_IMCASTS(vsi, count) (vsi)->imcasts = (count) 216 #define IAVF_SET_OMCASTS(vsi, count) (vsi)->omcasts = (count) 217 #define IAVF_SET_IQDROPS(vsi, count) (vsi)->iqdrops = (count) 218 #define IAVF_SET_OQDROPS(vsi, count) (vsi)->oqdrops = (count) 219 #define IAVF_SET_NOPROTO(vsi, count) (vsi)->noproto = (count) 220 221 /* For stats sysctl naming */ 222 #define IAVF_QUEUE_NAME_LEN 32 223 224 #define IAVF_FLAG_AQ_ENABLE_QUEUES (u32)(1 << 0) 225 #define IAVF_FLAG_AQ_DISABLE_QUEUES (u32)(1 << 1) 226 #define IAVF_FLAG_AQ_ADD_MAC_FILTER (u32)(1 << 2) 227 #define IAVF_FLAG_AQ_ADD_VLAN_FILTER (u32)(1 << 3) 228 #define IAVF_FLAG_AQ_DEL_MAC_FILTER (u32)(1 << 4) 229 #define IAVF_FLAG_AQ_DEL_VLAN_FILTER (u32)(1 << 5) 230 #define IAVF_FLAG_AQ_CONFIGURE_QUEUES (u32)(1 << 6) 231 #define IAVF_FLAG_AQ_MAP_VECTORS (u32)(1 << 7) 232 #define IAVF_FLAG_AQ_HANDLE_RESET (u32)(1 << 8) 233 #define IAVF_FLAG_AQ_CONFIGURE_PROMISC (u32)(1 << 9) 234 #define IAVF_FLAG_AQ_GET_STATS (u32)(1 << 10) 235 #define IAVF_FLAG_AQ_CONFIG_RSS_KEY (u32)(1 << 11) 236 #define IAVF_FLAG_AQ_SET_RSS_HENA (u32)(1 << 12) 237 #define IAVF_FLAG_AQ_GET_RSS_HENA_CAPS (u32)(1 << 13) 238 #define IAVF_FLAG_AQ_CONFIG_RSS_LUT (u32)(1 << 14) 239 240 #define IAVF_CAP_ADV_LINK_SPEED(_sc) \ 241 ((_sc)->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) 242 243 #define IAVF_NRXQS(_vsi) ((_vsi)->num_rx_queues) 244 #define IAVF_NTXQS(_vsi) ((_vsi)->num_tx_queues) 245 246 /** 247 * printf %b flag args 248 */ 249 #define IAVF_FLAGS \ 250 "\20\1ENABLE_QUEUES\2DISABLE_QUEUES\3ADD_MAC_FILTER" \ 251 "\4ADD_VLAN_FILTER\5DEL_MAC_FILTER\6DEL_VLAN_FILTER" \ 252 "\7CONFIGURE_QUEUES\10MAP_VECTORS\11HANDLE_RESET" \ 253 "\12CONFIGURE_PROMISC\13GET_STATS\14CONFIG_RSS_KEY" \ 254 "\15SET_RSS_HENA\16GET_RSS_HENA_CAPS\17CONFIG_RSS_LUT" 255 /** 256 * printf %b flag args for offloads from virtchnl.h 257 */ 258 #define IAVF_PRINTF_VF_OFFLOAD_FLAGS \ 259 "\20\1L2" \ 260 "\2IWARP" \ 261 "\3FCOE" \ 262 "\4RSS_AQ" \ 263 "\5RSS_REG" \ 264 "\6WB_ON_ITR" \ 265 "\7REQ_QUEUES" \ 266 "\10ADV_LINK_SPEED" \ 267 "\21VLAN" \ 268 "\22RX_POLLING" \ 269 "\23RSS_PCTYPE_V2" \ 270 "\24RSS_PF" \ 271 "\25ENCAP" \ 272 "\26ENCAP_CSUM" \ 273 "\27RX_ENCAP_CSUM" \ 274 "\30ADQ" 275 276 /** 277 * @enum iavf_ext_link_speed 278 * @brief Extended link speed enumeration 279 * 280 * Enumeration of possible link speeds that the device could be operating in. 281 * Contains an extended list compared to the virtchnl_link_speed, including 282 * additional higher speeds such as 50GB, and 100GB. 283 * 284 * The enumeration is used to convert between the old virtchnl_link_speed, the 285 * newer advanced speed reporting value specified in Mb/s, and the ifmedia 286 * link speeds reported to the operating system. 287 */ 288 enum iavf_ext_link_speed { 289 IAVF_EXT_LINK_SPEED_UNKNOWN, 290 IAVF_EXT_LINK_SPEED_10MB, 291 IAVF_EXT_LINK_SPEED_100MB, 292 IAVF_EXT_LINK_SPEED_1000MB, 293 IAVF_EXT_LINK_SPEED_2500MB, 294 IAVF_EXT_LINK_SPEED_5GB, 295 IAVF_EXT_LINK_SPEED_10GB, 296 IAVF_EXT_LINK_SPEED_20GB, 297 IAVF_EXT_LINK_SPEED_25GB, 298 IAVF_EXT_LINK_SPEED_40GB, 299 IAVF_EXT_LINK_SPEED_50GB, 300 IAVF_EXT_LINK_SPEED_100GB, 301 }; 302 303 /** 304 * @struct iavf_sysctl_info 305 * @brief sysctl statistic info 306 * 307 * Structure describing a single statistics sysctl, used for reporting 308 * specific hardware and software statistics via the sysctl interface. 309 */ 310 struct iavf_sysctl_info { 311 u64 *stat; 312 char *name; 313 char *description; 314 }; 315 316 /* Forward struct declarations */ 317 struct iavf_sc; 318 struct iavf_vsi; 319 320 /** 321 * @enum iavf_state 322 * @brief Driver state flags 323 * 324 * Used to indicate the status of various driver events. Intended to be 325 * modified only using atomic operations, so that we can use it even in places 326 * which aren't locked. 327 */ 328 enum iavf_state { 329 IAVF_STATE_INITIALIZED, 330 IAVF_STATE_RESET_REQUIRED, 331 IAVF_STATE_RESET_PENDING, 332 IAVF_STATE_RUNNING, 333 /* This entry must be last */ 334 IAVF_STATE_LAST, 335 }; 336 337 /* Functions for setting and checking driver state. Note the functions take 338 * bit positions, not bitmasks. The atomic_testandset_32 and 339 * atomic_testandclear_32 operations require bit positions, while the 340 * atomic_set_32 and atomic_clear_32 require bitmasks. This can easily lead to 341 * programming error, so we provide wrapper functions to avoid this. 342 */ 343 344 /** 345 * iavf_set_state - Set the specified state 346 * @s: the state bitmap 347 * @bit: the state to set 348 * 349 * Atomically update the state bitmap with the specified bit set. 350 */ 351 static inline void 352 iavf_set_state(volatile u32 *s, enum iavf_state bit) 353 { 354 /* atomic_set_32 expects a bitmask */ 355 atomic_set_32(s, BIT(bit)); 356 } 357 358 /** 359 * iavf_clear_state - Clear the specified state 360 * @s: the state bitmap 361 * @bit: the state to clear 362 * 363 * Atomically update the state bitmap with the specified bit cleared. 364 */ 365 static inline void 366 iavf_clear_state(volatile u32 *s, enum iavf_state bit) 367 { 368 /* atomic_clear_32 expects a bitmask */ 369 atomic_clear_32(s, BIT(bit)); 370 } 371 372 /** 373 * iavf_testandset_state - Test and set the specified state 374 * @s: the state bitmap 375 * @bit: the bit to test 376 * 377 * Atomically update the state bitmap, setting the specified bit. 378 * 379 * @returns the previous value of the bit. 380 */ 381 static inline u32 382 iavf_testandset_state(volatile u32 *s, enum iavf_state bit) 383 { 384 /* atomic_testandset_32 expects a bit position */ 385 return atomic_testandset_32(s, bit); 386 } 387 388 /** 389 * iavf_testandclear_state - Test and clear the specified state 390 * @s: the state bitmap 391 * @bit: the bit to test 392 * 393 * Atomically update the state bitmap, clearing the specified bit. 394 * 395 * @returns the previous value of the bit. 396 */ 397 static inline u32 398 iavf_testandclear_state(volatile u32 *s, enum iavf_state bit) 399 { 400 /* atomic_testandclear_32 expects a bit position */ 401 return atomic_testandclear_32(s, bit); 402 } 403 404 /** 405 * iavf_test_state - Test the specified state 406 * @s: the state bitmap 407 * @bit: the bit to test 408 * 409 * @returns true if the state is set, false otherwise. 410 * 411 * @remark Use this only if the flow does not need to update the state. If you 412 * must update the state as well, prefer iavf_testandset_state or 413 * iavf_testandclear_state. 414 */ 415 static inline u32 416 iavf_test_state(volatile u32 *s, enum iavf_state bit) 417 { 418 return (*s & BIT(bit)) ? true : false; 419 } 420 421 /** 422 * cmp_etheraddr - Compare two ethernet addresses 423 * @ea1: first ethernet address 424 * @ea2: second ethernet address 425 * 426 * Compares two ethernet addresses. 427 * 428 * @returns true if the addresses are equal, false otherwise. 429 */ 430 static inline bool 431 cmp_etheraddr(const u8 *ea1, const u8 *ea2) 432 { 433 bool cmp = FALSE; 434 435 if ((ea1[0] == ea2[0]) && (ea1[1] == ea2[1]) && 436 (ea1[2] == ea2[2]) && (ea1[3] == ea2[3]) && 437 (ea1[4] == ea2[4]) && (ea1[5] == ea2[5])) 438 cmp = TRUE; 439 440 return (cmp); 441 } 442 443 int iavf_send_vc_msg(struct iavf_sc *sc, u32 op); 444 int iavf_send_vc_msg_sleep(struct iavf_sc *sc, u32 op); 445 void iavf_update_link_status(struct iavf_sc *); 446 bool iavf_driver_is_detaching(struct iavf_sc *sc); 447 void iavf_msec_pause(int msecs); 448 void iavf_get_default_rss_key(u32 *key); 449 int iavf_allocate_pci_resources_common(struct iavf_sc *sc); 450 int iavf_reset_complete(struct iavf_hw *hw); 451 int iavf_setup_vc(struct iavf_sc *sc); 452 int iavf_reset(struct iavf_sc *sc); 453 void iavf_enable_adminq_irq(struct iavf_hw *hw); 454 void iavf_disable_adminq_irq(struct iavf_hw *hw); 455 int iavf_vf_config(struct iavf_sc *sc); 456 void iavf_print_device_info(struct iavf_sc *sc); 457 int iavf_get_vsi_res_from_vf_res(struct iavf_sc *sc); 458 void iavf_set_mac_addresses(struct iavf_sc *sc); 459 void iavf_init_filters(struct iavf_sc *sc); 460 void iavf_free_filters(struct iavf_sc *sc); 461 void iavf_add_device_sysctls_common(struct iavf_sc *sc); 462 void iavf_configure_tx_itr(struct iavf_sc *sc); 463 void iavf_configure_rx_itr(struct iavf_sc *sc); 464 struct sysctl_oid_list * 465 iavf_create_debug_sysctl_tree(struct iavf_sc *sc); 466 void iavf_add_debug_sysctls_common(struct iavf_sc *sc, 467 struct sysctl_oid_list *debug_list); 468 void iavf_add_vsi_sysctls(device_t dev, struct iavf_vsi *vsi, 469 struct sysctl_ctx_list *ctx, const char *sysctl_name); 470 void iavf_add_sysctls_eth_stats(struct sysctl_ctx_list *ctx, 471 struct sysctl_oid_list *child, struct iavf_eth_stats *eth_stats); 472 void iavf_media_status_common(struct iavf_sc *sc, 473 struct ifmediareq *ifmr); 474 int iavf_media_change_common(if_t ifp); 475 void iavf_set_initial_baudrate(if_t ifp); 476 u64 iavf_max_vc_speed_to_value(u8 link_speeds); 477 void iavf_config_rss_reg(struct iavf_sc *sc); 478 void iavf_config_rss_pf(struct iavf_sc *sc); 479 void iavf_config_rss(struct iavf_sc *sc); 480 int iavf_config_promisc(struct iavf_sc *sc, int flags); 481 void iavf_init_multi(struct iavf_sc *sc); 482 void iavf_multi_set(struct iavf_sc *sc); 483 int iavf_add_mac_filter(struct iavf_sc *sc, u8 *macaddr, u16 flags); 484 struct iavf_mac_filter * 485 iavf_find_mac_filter(struct iavf_sc *sc, u8 *macaddr); 486 struct iavf_mac_filter * 487 iavf_get_mac_filter(struct iavf_sc *sc); 488 u64 iavf_baudrate_from_link_speed(struct iavf_sc *sc); 489 void iavf_add_vlan_filter(struct iavf_sc *sc, u16 vtag); 490 int iavf_mark_del_vlan_filter(struct iavf_sc *sc, u16 vtag); 491 void iavf_update_msix_devinfo(device_t dev); 492 void iavf_disable_queues_with_retries(struct iavf_sc *); 493 494 int iavf_sysctl_current_speed(SYSCTL_HANDLER_ARGS); 495 int iavf_sysctl_tx_itr(SYSCTL_HANDLER_ARGS); 496 int iavf_sysctl_rx_itr(SYSCTL_HANDLER_ARGS); 497 int iavf_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); 498 499 #endif /* _IAVF_LIB_H_ */ 500