diff options
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e.h')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 29cd81ae29f4..801da392a20e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h | |||
@@ -54,6 +54,9 @@ | |||
54 | #include <linux/ptp_clock_kernel.h> | 54 | #include <linux/ptp_clock_kernel.h> |
55 | #include "i40e_type.h" | 55 | #include "i40e_type.h" |
56 | #include "i40e_prototype.h" | 56 | #include "i40e_prototype.h" |
57 | #ifdef I40E_FCOE | ||
58 | #include "i40e_fcoe.h" | ||
59 | #endif | ||
57 | #include "i40e_virtchnl.h" | 60 | #include "i40e_virtchnl.h" |
58 | #include "i40e_virtchnl_pf.h" | 61 | #include "i40e_virtchnl_pf.h" |
59 | #include "i40e_txrx.h" | 62 | #include "i40e_txrx.h" |
@@ -79,6 +82,10 @@ | |||
79 | #define I40E_MAX_QUEUES_PER_TC 64 /* should be a power of 2 */ | 82 | #define I40E_MAX_QUEUES_PER_TC 64 /* should be a power of 2 */ |
80 | #define I40E_FDIR_RING 0 | 83 | #define I40E_FDIR_RING 0 |
81 | #define I40E_FDIR_RING_COUNT 32 | 84 | #define I40E_FDIR_RING_COUNT 32 |
85 | #ifdef I40E_FCOE | ||
86 | #define I40E_DEFAULT_FCOE 8 /* default number of QPs for FCoE */ | ||
87 | #define I40E_MINIMUM_FCOE 1 /* minimum number of QPs for FCoE */ | ||
88 | #endif /* I40E_FCOE */ | ||
82 | #define I40E_MAX_AQ_BUF_SIZE 4096 | 89 | #define I40E_MAX_AQ_BUF_SIZE 4096 |
83 | #define I40E_AQ_LEN 32 | 90 | #define I40E_AQ_LEN 32 |
84 | #define I40E_AQ_WORK_LIMIT 16 | 91 | #define I40E_AQ_WORK_LIMIT 16 |
@@ -225,6 +232,10 @@ struct i40e_pf { | |||
225 | u16 num_vmdq_msix; /* num queue vectors per vmdq pool */ | 232 | u16 num_vmdq_msix; /* num queue vectors per vmdq pool */ |
226 | u16 num_req_vfs; /* num vfs requested for this vf */ | 233 | u16 num_req_vfs; /* num vfs requested for this vf */ |
227 | u16 num_vf_qps; /* num queue pairs per vf */ | 234 | u16 num_vf_qps; /* num queue pairs per vf */ |
235 | #ifdef I40E_FCOE | ||
236 | u16 num_fcoe_qps; /* num fcoe queues this pf has set up */ | ||
237 | u16 num_fcoe_msix; /* num queue vectors per fcoe pool */ | ||
238 | #endif /* I40E_FCOE */ | ||
228 | u16 num_lan_qps; /* num lan queues this pf has set up */ | 239 | u16 num_lan_qps; /* num lan queues this pf has set up */ |
229 | u16 num_lan_msix; /* num queue vectors for the base pf vsi */ | 240 | u16 num_lan_msix; /* num queue vectors for the base pf vsi */ |
230 | int queues_left; /* queues left unclaimed */ | 241 | int queues_left; /* queues left unclaimed */ |
@@ -265,6 +276,9 @@ struct i40e_pf { | |||
265 | #define I40E_FLAG_VMDQ_ENABLED (u64)(1 << 7) | 276 | #define I40E_FLAG_VMDQ_ENABLED (u64)(1 << 7) |
266 | #define I40E_FLAG_FDIR_REQUIRES_REINIT (u64)(1 << 8) | 277 | #define I40E_FLAG_FDIR_REQUIRES_REINIT (u64)(1 << 8) |
267 | #define I40E_FLAG_NEED_LINK_UPDATE (u64)(1 << 9) | 278 | #define I40E_FLAG_NEED_LINK_UPDATE (u64)(1 << 9) |
279 | #ifdef I40E_FCOE | ||
280 | #define I40E_FLAG_FCOE_ENABLED (u64)(1 << 11) | ||
281 | #endif /* I40E_FCOE */ | ||
268 | #define I40E_FLAG_IN_NETPOLL (u64)(1 << 12) | 282 | #define I40E_FLAG_IN_NETPOLL (u64)(1 << 12) |
269 | #define I40E_FLAG_16BYTE_RX_DESC_ENABLED (u64)(1 << 13) | 283 | #define I40E_FLAG_16BYTE_RX_DESC_ENABLED (u64)(1 << 13) |
270 | #define I40E_FLAG_CLEAN_ADMINQ (u64)(1 << 14) | 284 | #define I40E_FLAG_CLEAN_ADMINQ (u64)(1 << 14) |
@@ -286,6 +300,10 @@ struct i40e_pf { | |||
286 | /* tracks features that get auto disabled by errors */ | 300 | /* tracks features that get auto disabled by errors */ |
287 | u64 auto_disable_flags; | 301 | u64 auto_disable_flags; |
288 | 302 | ||
303 | #ifdef I40E_FCOE | ||
304 | struct i40e_fcoe fcoe; | ||
305 | |||
306 | #endif /* I40E_FCOE */ | ||
289 | bool stat_offsets_loaded; | 307 | bool stat_offsets_loaded; |
290 | struct i40e_hw_port_stats stats; | 308 | struct i40e_hw_port_stats stats; |
291 | struct i40e_hw_port_stats stats_offsets; | 309 | struct i40e_hw_port_stats stats_offsets; |
@@ -408,6 +426,11 @@ struct i40e_vsi { | |||
408 | struct rtnl_link_stats64 net_stats_offsets; | 426 | struct rtnl_link_stats64 net_stats_offsets; |
409 | struct i40e_eth_stats eth_stats; | 427 | struct i40e_eth_stats eth_stats; |
410 | struct i40e_eth_stats eth_stats_offsets; | 428 | struct i40e_eth_stats eth_stats_offsets; |
429 | #ifdef I40E_FCOE | ||
430 | struct i40e_fcoe_stats fcoe_stats; | ||
431 | struct i40e_fcoe_stats fcoe_stats_offsets; | ||
432 | bool fcoe_stat_offsets_loaded; | ||
433 | #endif | ||
411 | u32 tx_restart; | 434 | u32 tx_restart; |
412 | u32 tx_busy; | 435 | u32 tx_busy; |
413 | u32 rx_buf_failed; | 436 | u32 rx_buf_failed; |
@@ -598,6 +621,11 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type, | |||
598 | int i40e_vsi_release(struct i40e_vsi *vsi); | 621 | int i40e_vsi_release(struct i40e_vsi *vsi); |
599 | struct i40e_vsi *i40e_vsi_lookup(struct i40e_pf *pf, enum i40e_vsi_type type, | 622 | struct i40e_vsi *i40e_vsi_lookup(struct i40e_pf *pf, enum i40e_vsi_type type, |
600 | struct i40e_vsi *start_vsi); | 623 | struct i40e_vsi *start_vsi); |
624 | #ifdef I40E_FCOE | ||
625 | void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi, | ||
626 | struct i40e_vsi_context *ctxt, | ||
627 | u8 enabled_tc, bool is_add); | ||
628 | #endif | ||
601 | int i40e_vsi_control_rings(struct i40e_vsi *vsi, bool enable); | 629 | int i40e_vsi_control_rings(struct i40e_vsi *vsi, bool enable); |
602 | int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count); | 630 | int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count); |
603 | struct i40e_veb *i40e_veb_setup(struct i40e_pf *pf, u16 flags, u16 uplink_seid, | 631 | struct i40e_veb *i40e_veb_setup(struct i40e_pf *pf, u16 flags, u16 uplink_seid, |
@@ -624,7 +652,21 @@ void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector); | |||
624 | void i40e_irq_dynamic_disable(struct i40e_vsi *vsi, int vector); | 652 | void i40e_irq_dynamic_disable(struct i40e_vsi *vsi, int vector); |
625 | void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf); | 653 | void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf); |
626 | void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf); | 654 | void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf); |
655 | #ifdef I40E_FCOE | ||
656 | struct rtnl_link_stats64 *i40e_get_netdev_stats_struct( | ||
657 | struct net_device *netdev, | ||
658 | struct rtnl_link_stats64 *storage); | ||
659 | int i40e_set_mac(struct net_device *netdev, void *p); | ||
660 | void i40e_set_rx_mode(struct net_device *netdev); | ||
661 | #endif | ||
627 | int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); | 662 | int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); |
663 | #ifdef I40E_FCOE | ||
664 | void i40e_tx_timeout(struct net_device *netdev); | ||
665 | int i40e_vlan_rx_add_vid(struct net_device *netdev, | ||
666 | __always_unused __be16 proto, u16 vid); | ||
667 | int i40e_vlan_rx_kill_vid(struct net_device *netdev, | ||
668 | __always_unused __be16 proto, u16 vid); | ||
669 | #endif | ||
628 | int i40e_vsi_open(struct i40e_vsi *vsi); | 670 | int i40e_vsi_open(struct i40e_vsi *vsi); |
629 | void i40e_vlan_stripping_disable(struct i40e_vsi *vsi); | 671 | void i40e_vlan_stripping_disable(struct i40e_vsi *vsi); |
630 | int i40e_vsi_add_vlan(struct i40e_vsi *vsi, s16 vid); | 672 | int i40e_vsi_add_vlan(struct i40e_vsi *vsi, s16 vid); |
@@ -634,6 +676,26 @@ struct i40e_mac_filter *i40e_put_mac_in_vlan(struct i40e_vsi *vsi, u8 *macaddr, | |||
634 | bool i40e_is_vsi_in_vlan(struct i40e_vsi *vsi); | 676 | bool i40e_is_vsi_in_vlan(struct i40e_vsi *vsi); |
635 | struct i40e_mac_filter *i40e_find_mac(struct i40e_vsi *vsi, u8 *macaddr, | 677 | struct i40e_mac_filter *i40e_find_mac(struct i40e_vsi *vsi, u8 *macaddr, |
636 | bool is_vf, bool is_netdev); | 678 | bool is_vf, bool is_netdev); |
679 | #ifdef I40E_FCOE | ||
680 | int i40e_open(struct net_device *netdev); | ||
681 | int i40e_close(struct net_device *netdev); | ||
682 | int i40e_setup_tc(struct net_device *netdev, u8 tc); | ||
683 | void i40e_netpoll(struct net_device *netdev); | ||
684 | int i40e_fcoe_enable(struct net_device *netdev); | ||
685 | int i40e_fcoe_disable(struct net_device *netdev); | ||
686 | int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt); | ||
687 | u8 i40e_get_fcoe_tc_map(struct i40e_pf *pf); | ||
688 | void i40e_fcoe_config_netdev(struct net_device *netdev, struct i40e_vsi *vsi); | ||
689 | void i40e_fcoe_vsi_setup(struct i40e_pf *pf); | ||
690 | int i40e_init_pf_fcoe(struct i40e_pf *pf); | ||
691 | int i40e_fcoe_setup_ddp_resources(struct i40e_vsi *vsi); | ||
692 | void i40e_fcoe_free_ddp_resources(struct i40e_vsi *vsi); | ||
693 | int i40e_fcoe_handle_offload(struct i40e_ring *rx_ring, | ||
694 | union i40e_rx_desc *rx_desc, | ||
695 | struct sk_buff *skb); | ||
696 | void i40e_fcoe_handle_status(struct i40e_ring *rx_ring, | ||
697 | union i40e_rx_desc *rx_desc, u8 prog_id); | ||
698 | #endif /* I40E_FCOE */ | ||
637 | void i40e_vlan_stripping_enable(struct i40e_vsi *vsi); | 699 | void i40e_vlan_stripping_enable(struct i40e_vsi *vsi); |
638 | #ifdef CONFIG_I40E_DCB | 700 | #ifdef CONFIG_I40E_DCB |
639 | void i40e_dcbnl_flush_apps(struct i40e_pf *pf, | 701 | void i40e_dcbnl_flush_apps(struct i40e_pf *pf, |