aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e.h')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h49
1 files changed, 36 insertions, 13 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 72dae4d97b43..33cd8b67535d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -86,12 +86,12 @@
86 86
87#define I40E_NVM_VERSION_LO_SHIFT 0 87#define I40E_NVM_VERSION_LO_SHIFT 0
88#define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT) 88#define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT)
89#define I40E_NVM_VERSION_HI_SHIFT 8 89#define I40E_NVM_VERSION_HI_SHIFT 12
90#define I40E_NVM_VERSION_HI_MASK (0xff << I40E_NVM_VERSION_HI_SHIFT) 90#define I40E_NVM_VERSION_HI_MASK (0xf << I40E_NVM_VERSION_HI_SHIFT)
91 91
92/* The values in here are decimal coded as hex as is the case in the NVM map*/ 92/* The values in here are decimal coded as hex as is the case in the NVM map*/
93#define I40E_CURRENT_NVM_VERSION_HI 0x2 93#define I40E_CURRENT_NVM_VERSION_HI 0x2
94#define I40E_CURRENT_NVM_VERSION_LO 0x30 94#define I40E_CURRENT_NVM_VERSION_LO 0x40
95 95
96/* magic for getting defines into strings */ 96/* magic for getting defines into strings */
97#define STRINGIFY(foo) #foo 97#define STRINGIFY(foo) #foo
@@ -152,8 +152,21 @@ struct i40e_lump_tracking {
152}; 152};
153 153
154#define I40E_DEFAULT_ATR_SAMPLE_RATE 20 154#define I40E_DEFAULT_ATR_SAMPLE_RATE 20
155#define I40E_FDIR_MAX_RAW_PACKET_LOOKUP 512 155#define I40E_FDIR_MAX_RAW_PACKET_SIZE 512
156struct i40e_fdir_data { 156#define I40E_FDIR_BUFFER_FULL_MARGIN 10
157#define I40E_FDIR_BUFFER_HEAD_ROOM 200
158
159struct i40e_fdir_filter {
160 struct hlist_node fdir_node;
161 /* filter ipnut set */
162 u8 flow_type;
163 u8 ip4_proto;
164 __be32 dst_ip[4];
165 __be32 src_ip[4];
166 __be16 src_port;
167 __be16 dst_port;
168 __be32 sctp_v_tag;
169 /* filter control */
157 u16 q_index; 170 u16 q_index;
158 u8 flex_off; 171 u8 flex_off;
159 u8 pctype; 172 u8 pctype;
@@ -162,7 +175,6 @@ struct i40e_fdir_data {
162 u8 fd_status; 175 u8 fd_status;
163 u16 cnt_index; 176 u16 cnt_index;
164 u32 fd_id; 177 u32 fd_id;
165 u8 *raw_packet;
166}; 178};
167 179
168#define I40E_ETH_P_LLDP 0x88cc 180#define I40E_ETH_P_LLDP 0x88cc
@@ -196,7 +208,7 @@ struct i40e_pf {
196 bool fc_autoneg_status; 208 bool fc_autoneg_status;
197 209
198 u16 eeprom_version; 210 u16 eeprom_version;
199 u16 num_vmdq_vsis; /* num vmdq pools this pf has set up */ 211 u16 num_vmdq_vsis; /* num vmdq vsis this pf has set up */
200 u16 num_vmdq_qps; /* num queue pairs per vmdq pool */ 212 u16 num_vmdq_qps; /* num queue pairs per vmdq pool */
201 u16 num_vmdq_msix; /* num queue vectors per vmdq pool */ 213 u16 num_vmdq_msix; /* num queue vectors per vmdq pool */
202 u16 num_req_vfs; /* num vfs requested for this vf */ 214 u16 num_req_vfs; /* num vfs requested for this vf */
@@ -210,6 +222,9 @@ struct i40e_pf {
210 u8 atr_sample_rate; 222 u8 atr_sample_rate;
211 bool wol_en; 223 bool wol_en;
212 224
225 struct hlist_head fdir_filter_list;
226 u16 fdir_pf_active_filters;
227
213#ifdef CONFIG_I40E_VXLAN 228#ifdef CONFIG_I40E_VXLAN
214 __be16 vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS]; 229 __be16 vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS];
215 u16 pending_vxlan_bitmap; 230 u16 pending_vxlan_bitmap;
@@ -251,6 +266,9 @@ struct i40e_pf {
251#define I40E_FLAG_VXLAN_FILTER_SYNC (u64)(1 << 27) 266#define I40E_FLAG_VXLAN_FILTER_SYNC (u64)(1 << 27)
252#endif 267#endif
253 268
269 /* tracks features that get auto disabled by errors */
270 u64 auto_disable_flags;
271
254 bool stat_offsets_loaded; 272 bool stat_offsets_loaded;
255 struct i40e_hw_port_stats stats; 273 struct i40e_hw_port_stats stats;
256 struct i40e_hw_port_stats stats_offsets; 274 struct i40e_hw_port_stats stats_offsets;
@@ -477,10 +495,10 @@ static inline char *i40e_fw_version_str(struct i40e_hw *hw)
477 "f%d.%d a%d.%d n%02x.%02x e%08x", 495 "f%d.%d a%d.%d n%02x.%02x e%08x",
478 hw->aq.fw_maj_ver, hw->aq.fw_min_ver, 496 hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
479 hw->aq.api_maj_ver, hw->aq.api_min_ver, 497 hw->aq.api_maj_ver, hw->aq.api_min_ver,
480 (hw->nvm.version & I40E_NVM_VERSION_HI_MASK) 498 (hw->nvm.version & I40E_NVM_VERSION_HI_MASK) >>
481 >> I40E_NVM_VERSION_HI_SHIFT, 499 I40E_NVM_VERSION_HI_SHIFT,
482 (hw->nvm.version & I40E_NVM_VERSION_LO_MASK) 500 (hw->nvm.version & I40E_NVM_VERSION_LO_MASK) >>
483 >> I40E_NVM_VERSION_LO_SHIFT, 501 I40E_NVM_VERSION_LO_SHIFT,
484 hw->nvm.eetrack); 502 hw->nvm.eetrack);
485 503
486 return buf; 504 return buf;
@@ -534,9 +552,13 @@ struct rtnl_link_stats64 *i40e_get_vsi_stats_struct(struct i40e_vsi *vsi);
534int i40e_fetch_switch_configuration(struct i40e_pf *pf, 552int i40e_fetch_switch_configuration(struct i40e_pf *pf,
535 bool printconfig); 553 bool printconfig);
536 554
537int i40e_program_fdir_filter(struct i40e_fdir_data *fdir_data, 555int i40e_program_fdir_filter(struct i40e_fdir_filter *fdir_data, u8 *raw_packet,
538 struct i40e_pf *pf, bool add); 556 struct i40e_pf *pf, bool add);
539 557int i40e_add_del_fdir(struct i40e_vsi *vsi,
558 struct i40e_fdir_filter *input, bool add);
559void i40e_fdir_check_and_reenable(struct i40e_pf *pf);
560int i40e_get_current_fd_count(struct i40e_pf *pf);
561bool i40e_set_ntuple(struct i40e_pf *pf, netdev_features_t features);
540void i40e_set_ethtool_ops(struct net_device *netdev); 562void i40e_set_ethtool_ops(struct net_device *netdev);
541struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi, 563struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi,
542 u8 *macaddr, s16 vlan, 564 u8 *macaddr, s16 vlan,
@@ -575,6 +597,7 @@ void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector);
575void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf); 597void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf);
576void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf); 598void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf);
577int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); 599int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
600int i40e_vsi_open(struct i40e_vsi *vsi);
578void i40e_vlan_stripping_disable(struct i40e_vsi *vsi); 601void i40e_vlan_stripping_disable(struct i40e_vsi *vsi);
579int i40e_vsi_add_vlan(struct i40e_vsi *vsi, s16 vid); 602int i40e_vsi_add_vlan(struct i40e_vsi *vsi, s16 vid);
580int i40e_vsi_kill_vlan(struct i40e_vsi *vsi, s16 vid); 603int i40e_vsi_kill_vlan(struct i40e_vsi *vsi, s16 vid);