ixl.h (ab43ce7a22690b66cf76f0d8e70d538442657077) | ixl.h (b4a7ce0690aedd9763b3b47ee7fcdb421f0434c7) |
---|---|
1/****************************************************************************** 2 3 Copyright (c) 2013-2018, Intel Corporation 4 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 are met: 8 --- 186 unchanged lines hidden (view full) --- 195 196/* used in the vlan field of the filter when not a vlan */ 197#define IXL_VLAN_ANY -1 198 199#define CSUM_OFFLOAD_IPV4 (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) 200#define CSUM_OFFLOAD_IPV6 (CSUM_TCP_IPV6|CSUM_UDP_IPV6|CSUM_SCTP_IPV6) 201#define CSUM_OFFLOAD (CSUM_OFFLOAD_IPV4|CSUM_OFFLOAD_IPV6|CSUM_TSO) 202 | 1/****************************************************************************** 2 3 Copyright (c) 2013-2018, Intel Corporation 4 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 are met: 8 --- 186 unchanged lines hidden (view full) --- 195 196/* used in the vlan field of the filter when not a vlan */ 197#define IXL_VLAN_ANY -1 198 199#define CSUM_OFFLOAD_IPV4 (CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP) 200#define CSUM_OFFLOAD_IPV6 (CSUM_TCP_IPV6|CSUM_UDP_IPV6|CSUM_SCTP_IPV6) 201#define CSUM_OFFLOAD (CSUM_OFFLOAD_IPV4|CSUM_OFFLOAD_IPV6|CSUM_TSO) 202 |
203/* Misc flags for ixl_vsi.flags */ 204#define IXL_FLAGS_KEEP_TSO4 (1 << 0) 205#define IXL_FLAGS_KEEP_TSO6 (1 << 1) 206#define IXL_FLAGS_USES_MSIX (1 << 2) 207#define IXL_FLAGS_IS_VF (1 << 3) 208 209#define IXL_VSI_IS_PF(v) ((v->flags & IXL_FLAGS_IS_VF) == 0) 210#define IXL_VSI_IS_VF(v) ((v->flags & IXL_FLAGS_IS_VF) != 0) 211 |
|
203#define IXL_VF_RESET_TIMEOUT 100 204 205#define IXL_VSI_DATA_PORT 0x01 206 207#define IAVF_MAX_QUEUES 16 208#define IXL_MAX_VSI_QUEUES (2 * (I40E_VSILAN_QTABLE_MAX_INDEX + 1)) 209 210#define IXL_RX_CTX_BASE_UNITS 128 --- 76 unchanged lines hidden (view full) --- 287#define IXL_SET_IMCASTS(vsi, count) (vsi)->ifp->if_imcasts = (count) 288#define IXL_SET_OMCASTS(vsi, count) (vsi)->ifp->if_omcasts = (count) 289#define IXL_SET_IQDROPS(vsi, count) (vsi)->ifp->if_iqdrops = (count) 290#define IXL_SET_OQDROPS(vsi, odrops) (vsi)->ifp->if_snd.ifq_drops = (odrops) 291#define IXL_SET_NOPROTO(vsi, count) (vsi)->noproto = (count) 292#endif 293 294/* For stats sysctl naming */ | 212#define IXL_VF_RESET_TIMEOUT 100 213 214#define IXL_VSI_DATA_PORT 0x01 215 216#define IAVF_MAX_QUEUES 16 217#define IXL_MAX_VSI_QUEUES (2 * (I40E_VSILAN_QTABLE_MAX_INDEX + 1)) 218 219#define IXL_RX_CTX_BASE_UNITS 128 --- 76 unchanged lines hidden (view full) --- 296#define IXL_SET_IMCASTS(vsi, count) (vsi)->ifp->if_imcasts = (count) 297#define IXL_SET_OMCASTS(vsi, count) (vsi)->ifp->if_omcasts = (count) 298#define IXL_SET_IQDROPS(vsi, count) (vsi)->ifp->if_iqdrops = (count) 299#define IXL_SET_OQDROPS(vsi, odrops) (vsi)->ifp->if_snd.ifq_drops = (odrops) 300#define IXL_SET_NOPROTO(vsi, count) (vsi)->noproto = (count) 301#endif 302 303/* For stats sysctl naming */ |
295#define QUEUE_NAME_LEN 32 | 304#define IXL_QUEUE_NAME_LEN 32 |
296 297#define IXL_DEV_ERR(_dev, _format, ...) \ 298 device_printf(_dev, "%s: " _format " (%s:%d)\n", __func__, ##__VA_ARGS__, __FILE__, __LINE__) 299 300/* 301 ***************************************************************************** 302 * vendor_info_array 303 * --- 129 unchanged lines hidden (view full) --- 433 struct ixl_tx_queue *tx_queues; /* TX queue array */ 434 struct ixl_rx_queue *rx_queues; /* RX queue array */ 435 struct if_irq irq; 436 u32 link_speed; 437 438 /* MAC/VLAN Filter list */ 439 struct ixl_ftl_head ftl; 440 u16 num_macs; | 305 306#define IXL_DEV_ERR(_dev, _format, ...) \ 307 device_printf(_dev, "%s: " _format " (%s:%d)\n", __func__, ##__VA_ARGS__, __FILE__, __LINE__) 308 309/* 310 ***************************************************************************** 311 * vendor_info_array 312 * --- 129 unchanged lines hidden (view full) --- 442 struct ixl_tx_queue *tx_queues; /* TX queue array */ 443 struct ixl_rx_queue *rx_queues; /* RX queue array */ 444 struct if_irq irq; 445 u32 link_speed; 446 447 /* MAC/VLAN Filter list */ 448 struct ixl_ftl_head ftl; 449 u16 num_macs; |
450 u64 num_hw_filters; |
|
441 442 /* Contains readylist & stat counter id */ 443 struct i40e_aqc_vsi_properties_data info; 444 445 u16 num_vlans; 446 447 /* Per-VSI stats from hardware */ 448 struct i40e_eth_stats eth_stats; 449 struct i40e_eth_stats eth_stats_offsets; | 451 452 /* Contains readylist & stat counter id */ 453 struct i40e_aqc_vsi_properties_data info; 454 455 u16 num_vlans; 456 457 /* Per-VSI stats from hardware */ 458 struct i40e_eth_stats eth_stats; 459 struct i40e_eth_stats eth_stats_offsets; |
450 bool stat_offsets_loaded; | 460 bool stat_offsets_loaded; |
451 /* VSI stat counters */ 452 u64 ipackets; 453 u64 ierrors; 454 u64 opackets; 455 u64 oerrors; 456 u64 ibytes; 457 u64 obytes; 458 u64 imcasts; 459 u64 omcasts; 460 u64 iqdrops; 461 u64 oqdrops; 462 u64 noproto; 463 | 461 /* VSI stat counters */ 462 u64 ipackets; 463 u64 ierrors; 464 u64 opackets; 465 u64 oerrors; 466 u64 ibytes; 467 u64 obytes; 468 u64 imcasts; 469 u64 omcasts; 470 u64 iqdrops; 471 u64 oqdrops; 472 u64 noproto; 473 |
464 /* Driver statistics */ 465 u64 hw_filters_del; 466 u64 hw_filters_add; 467 | |
468 /* Misc. */ | 474 /* Misc. */ |
469 u64 flags; | 475 u64 flags; |
470 /* Stats sysctls for this VSI */ 471 struct sysctl_oid *vsi_node; | 476 /* Stats sysctls for this VSI */ 477 struct sysctl_oid *vsi_node; |
478 struct sysctl_ctx_list sysctl_ctx; |
|
472}; 473 474/* 475** Creates new filter with given MAC address and VLAN ID 476*/ 477static inline struct ixl_mac_filter * 478ixl_new_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan) 479{ --- 12 unchanged lines hidden (view full) --- 492 return (f); 493} 494 495/* 496** Compare two ethernet addresses 497*/ 498static inline bool 499cmp_etheraddr(const u8 *ea1, const u8 *ea2) | 479}; 480 481/* 482** Creates new filter with given MAC address and VLAN ID 483*/ 484static inline struct ixl_mac_filter * 485ixl_new_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan) 486{ --- 12 unchanged lines hidden (view full) --- 499 return (f); 500} 501 502/* 503** Compare two ethernet addresses 504*/ 505static inline bool 506cmp_etheraddr(const u8 *ea1, const u8 *ea2) |
500{ 501 return (bcmp(ea1, ea2, 6) == 0); 502} | 507{ 508 return (bcmp(ea1, ea2, ETHER_ADDR_LEN) == 0); 509} |
503 504/* 505 * Return next largest power of 2, unsigned 506 * 507 * Public domain, from Bit Twiddling Hacks 508 */ 509static inline u32 510next_power_of_two(u32 n) --- 32 unchanged lines hidden (view full) --- 543void ixl_init_tx_rsqs(struct ixl_vsi *vsi); 544void ixl_init_tx_cidx(struct ixl_vsi *vsi); 545u64 ixl_max_vc_speed_to_value(u8 link_speeds); 546void ixl_add_vsi_sysctls(device_t dev, struct ixl_vsi *vsi, 547 struct sysctl_ctx_list *ctx, const char *sysctl_name); 548void ixl_add_sysctls_eth_stats(struct sysctl_ctx_list *ctx, 549 struct sysctl_oid_list *child, 550 struct i40e_eth_stats *eth_stats); | 510 511/* 512 * Return next largest power of 2, unsigned 513 * 514 * Public domain, from Bit Twiddling Hacks 515 */ 516static inline u32 517next_power_of_two(u32 n) --- 32 unchanged lines hidden (view full) --- 550void ixl_init_tx_rsqs(struct ixl_vsi *vsi); 551void ixl_init_tx_cidx(struct ixl_vsi *vsi); 552u64 ixl_max_vc_speed_to_value(u8 link_speeds); 553void ixl_add_vsi_sysctls(device_t dev, struct ixl_vsi *vsi, 554 struct sysctl_ctx_list *ctx, const char *sysctl_name); 555void ixl_add_sysctls_eth_stats(struct sysctl_ctx_list *ctx, 556 struct sysctl_oid_list *child, 557 struct i40e_eth_stats *eth_stats); |
551void ixl_add_queues_sysctls(device_t dev, struct ixl_vsi *vsi); | 558void ixl_vsi_add_queues_stats(struct ixl_vsi *vsi, 559 struct sysctl_ctx_list *ctx); |
552#endif /* _IXL_H_ */ | 560#endif /* _IXL_H_ */ |