diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 23:53:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 23:53:45 -0400 |
commit | cd6362befe4cc7bf589a5236d2a780af2d47bcc9 (patch) | |
tree | 3bd4e13ec3f92a00dc4f6c3d65e820b54dbfe46e /drivers/net/ethernet/intel/i40evf/i40evf.h | |
parent | 0f1b1e6d73cb989ce2c071edc57deade3b084dfe (diff) | |
parent | b1586f099ba897542ece36e8a23c1a62907261ef (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
"Here is my initial pull request for the networking subsystem during
this merge window:
1) Support for ESN in AH (RFC 4302) from Fan Du.
2) Add full kernel doc for ethtool command structures, from Ben
Hutchings.
3) Add BCM7xxx PHY driver, from Florian Fainelli.
4) Export computed TCP rate information in netlink socket dumps, from
Eric Dumazet.
5) Allow IPSEC SA to be dumped partially using a filter, from Nicolas
Dichtel.
6) Convert many drivers to pci_enable_msix_range(), from Alexander
Gordeev.
7) Record SKB timestamps more efficiently, from Eric Dumazet.
8) Switch to microsecond resolution for TCP round trip times, also
from Eric Dumazet.
9) Clean up and fix 6lowpan fragmentation handling by making use of
the existing inet_frag api for it's implementation.
10) Add TX grant mapping to xen-netback driver, from Zoltan Kiss.
11) Auto size SKB lengths when composing netlink messages based upon
past message sizes used, from Eric Dumazet.
12) qdisc dumps can take a long time, add a cond_resched(), From Eric
Dumazet.
13) Sanitize netpoll core and drivers wrt. SKB handling semantics.
Get rid of never-used-in-tree netpoll RX handling. From Eric W
Biederman.
14) Support inter-address-family and namespace changing in VTI tunnel
driver(s). From Steffen Klassert.
15) Add Altera TSE driver, from Vince Bridgers.
16) Optimizing csum_replace2() so that it doesn't adjust the checksum
by checksumming the entire header, from Eric Dumazet.
17) Expand BPF internal implementation for faster interpreting, more
direct translations into JIT'd code, and much cleaner uses of BPF
filtering in non-socket ocntexts. From Daniel Borkmann and Alexei
Starovoitov"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1976 commits)
netpoll: Use skb_irq_freeable to make zap_completion_queue safe.
net: Add a test to see if a skb is freeable in irq context
qlcnic: Fix build failure due to undefined reference to `vxlan_get_rx_port'
net: ptp: move PTP classifier in its own file
net: sxgbe: make "core_ops" static
net: sxgbe: fix logical vs bitwise operation
net: sxgbe: sxgbe_mdio_register() frees the bus
Call efx_set_channels() before efx->type->dimension_resources()
xen-netback: disable rogue vif in kthread context
net/mlx4: Set proper build dependancy with vxlan
be2net: fix build dependency on VxLAN
mac802154: make csma/cca parameters per-wpan
mac802154: allow only one WPAN to be up at any given time
net: filter: minor: fix kdoc in __sk_run_filter
netlink: don't compare the nul-termination in nla_strcmp
can: c_can: Avoid led toggling for every packet.
can: c_can: Simplify TX interrupt cleanup
can: c_can: Store dlc private
can: c_can: Reduce register access
can: c_can: Make the code readable
...
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40evf.h')
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40evf.h | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h index ff6529b288a1..807807d62387 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf.h +++ b/drivers/net/ethernet/intel/i40evf/i40evf.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | * | 2 | * |
3 | * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver | 3 | * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver |
4 | * Copyright(c) 2013 Intel Corporation. | 4 | * Copyright(c) 2013 - 2014 Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -38,8 +38,6 @@ | |||
38 | #include <linux/ipv6.h> | 38 | #include <linux/ipv6.h> |
39 | #include <net/ip6_checksum.h> | 39 | #include <net/ip6_checksum.h> |
40 | #include <net/udp.h> | 40 | #include <net/udp.h> |
41 | #include <linux/sctp.h> | ||
42 | |||
43 | 41 | ||
44 | #include "i40e_type.h" | 42 | #include "i40e_type.h" |
45 | #include "i40e_virtchnl.h" | 43 | #include "i40e_virtchnl.h" |
@@ -164,15 +162,14 @@ struct i40evf_vlan_filter { | |||
164 | /* Driver state. The order of these is important! */ | 162 | /* Driver state. The order of these is important! */ |
165 | enum i40evf_state_t { | 163 | enum i40evf_state_t { |
166 | __I40EVF_STARTUP, /* driver loaded, probe complete */ | 164 | __I40EVF_STARTUP, /* driver loaded, probe complete */ |
167 | __I40EVF_FAILED, /* PF communication failed. Fatal. */ | ||
168 | __I40EVF_REMOVE, /* driver is being unloaded */ | 165 | __I40EVF_REMOVE, /* driver is being unloaded */ |
169 | __I40EVF_INIT_VERSION_CHECK, /* aq msg sent, awaiting reply */ | 166 | __I40EVF_INIT_VERSION_CHECK, /* aq msg sent, awaiting reply */ |
170 | __I40EVF_INIT_GET_RESOURCES, /* aq msg sent, awaiting reply */ | 167 | __I40EVF_INIT_GET_RESOURCES, /* aq msg sent, awaiting reply */ |
171 | __I40EVF_INIT_SW, /* got resources, setting up structs */ | 168 | __I40EVF_INIT_SW, /* got resources, setting up structs */ |
169 | __I40EVF_RESETTING, /* in reset */ | ||
172 | /* Below here, watchdog is running */ | 170 | /* Below here, watchdog is running */ |
173 | __I40EVF_DOWN, /* ready, can be opened */ | 171 | __I40EVF_DOWN, /* ready, can be opened */ |
174 | __I40EVF_TESTING, /* in ethtool self-test */ | 172 | __I40EVF_TESTING, /* in ethtool self-test */ |
175 | __I40EVF_RESETTING, /* in reset */ | ||
176 | __I40EVF_RUNNING, /* opened, working */ | 173 | __I40EVF_RUNNING, /* opened, working */ |
177 | }; | 174 | }; |
178 | 175 | ||
@@ -185,47 +182,25 @@ enum i40evf_critical_section_t { | |||
185 | /* board specific private data structure */ | 182 | /* board specific private data structure */ |
186 | struct i40evf_adapter { | 183 | struct i40evf_adapter { |
187 | struct timer_list watchdog_timer; | 184 | struct timer_list watchdog_timer; |
188 | struct vlan_group *vlgrp; | ||
189 | struct work_struct reset_task; | 185 | struct work_struct reset_task; |
190 | struct work_struct adminq_task; | 186 | struct work_struct adminq_task; |
191 | struct delayed_work init_task; | 187 | struct delayed_work init_task; |
192 | struct i40e_q_vector *q_vector[MAX_MSIX_Q_VECTORS]; | 188 | struct i40e_q_vector *q_vector[MAX_MSIX_Q_VECTORS]; |
193 | struct list_head vlan_filter_list; | 189 | struct list_head vlan_filter_list; |
194 | char name[MAX_MSIX_COUNT][IFNAMSIZ + 9]; | 190 | char misc_vector_name[IFNAMSIZ + 9]; |
195 | |||
196 | /* Interrupt Throttle Rate */ | ||
197 | u32 itr_setting; | ||
198 | u16 eitr_low; | ||
199 | u16 eitr_high; | ||
200 | 191 | ||
201 | /* TX */ | 192 | /* TX */ |
202 | struct i40e_ring *tx_rings[I40E_MAX_VSI_QP]; | 193 | struct i40e_ring *tx_rings[I40E_MAX_VSI_QP]; |
203 | u64 restart_queue; | ||
204 | u64 hw_csum_tx_good; | ||
205 | u64 lsc_int; | ||
206 | u64 hw_tso_ctxt; | ||
207 | u64 hw_tso6_ctxt; | ||
208 | u32 tx_timeout_count; | 194 | u32 tx_timeout_count; |
209 | struct list_head mac_filter_list; | 195 | struct list_head mac_filter_list; |
210 | #ifdef DEBUG | ||
211 | bool detect_tx_hung; | ||
212 | #endif /* DEBUG */ | ||
213 | 196 | ||
214 | /* RX */ | 197 | /* RX */ |
215 | struct i40e_ring *rx_rings[I40E_MAX_VSI_QP]; | 198 | struct i40e_ring *rx_rings[I40E_MAX_VSI_QP]; |
216 | int txd_count; | ||
217 | int rxd_count; | ||
218 | u64 hw_csum_rx_error; | 199 | u64 hw_csum_rx_error; |
219 | u64 hw_rx_no_dma_resources; | ||
220 | u64 hw_csum_rx_good; | ||
221 | u64 non_eop_descs; | ||
222 | int num_msix_vectors; | 200 | int num_msix_vectors; |
223 | struct msix_entry *msix_entries; | 201 | struct msix_entry *msix_entries; |
224 | 202 | ||
225 | u64 rx_hdr_split; | 203 | u32 flags; |
226 | |||
227 | u32 init_state; | ||
228 | volatile unsigned long flags; | ||
229 | #define I40EVF_FLAG_RX_CSUM_ENABLED (u32)(1) | 204 | #define I40EVF_FLAG_RX_CSUM_ENABLED (u32)(1) |
230 | #define I40EVF_FLAG_RX_1BUF_CAPABLE (u32)(1 << 1) | 205 | #define I40EVF_FLAG_RX_1BUF_CAPABLE (u32)(1 << 1) |
231 | #define I40EVF_FLAG_RX_PS_CAPABLE (u32)(1 << 2) | 206 | #define I40EVF_FLAG_RX_PS_CAPABLE (u32)(1 << 2) |
@@ -234,6 +209,9 @@ struct i40evf_adapter { | |||
234 | #define I40EVF_FLAG_IMIR_ENABLED (u32)(1 << 5) | 209 | #define I40EVF_FLAG_IMIR_ENABLED (u32)(1 << 5) |
235 | #define I40EVF_FLAG_MQ_CAPABLE (u32)(1 << 6) | 210 | #define I40EVF_FLAG_MQ_CAPABLE (u32)(1 << 6) |
236 | #define I40EVF_FLAG_NEED_LINK_UPDATE (u32)(1 << 7) | 211 | #define I40EVF_FLAG_NEED_LINK_UPDATE (u32)(1 << 7) |
212 | #define I40EVF_FLAG_PF_COMMS_FAILED (u32)(1 << 8) | ||
213 | #define I40EVF_FLAG_RESET_PENDING (u32)(1 << 9) | ||
214 | #define I40EVF_FLAG_RESET_NEEDED (u32)(1 << 10) | ||
237 | /* duplcates for common code */ | 215 | /* duplcates for common code */ |
238 | #define I40E_FLAG_FDIR_ATR_ENABLED 0 | 216 | #define I40E_FLAG_FDIR_ATR_ENABLED 0 |
239 | #define I40E_FLAG_DCB_ENABLED 0 | 217 | #define I40E_FLAG_DCB_ENABLED 0 |
@@ -251,21 +229,19 @@ struct i40evf_adapter { | |||
251 | #define I40EVF_FLAG_AQ_CONFIGURE_QUEUES (u32)(1 << 6) | 229 | #define I40EVF_FLAG_AQ_CONFIGURE_QUEUES (u32)(1 << 6) |
252 | #define I40EVF_FLAG_AQ_MAP_VECTORS (u32)(1 << 7) | 230 | #define I40EVF_FLAG_AQ_MAP_VECTORS (u32)(1 << 7) |
253 | #define I40EVF_FLAG_AQ_HANDLE_RESET (u32)(1 << 8) | 231 | #define I40EVF_FLAG_AQ_HANDLE_RESET (u32)(1 << 8) |
232 | |||
254 | /* OS defined structs */ | 233 | /* OS defined structs */ |
255 | struct net_device *netdev; | 234 | struct net_device *netdev; |
256 | struct pci_dev *pdev; | 235 | struct pci_dev *pdev; |
257 | struct net_device_stats net_stats; | 236 | struct net_device_stats net_stats; |
258 | 237 | ||
259 | /* structs defined in i40e_vf.h */ | 238 | struct i40e_hw hw; /* defined in i40e_type.h */ |
260 | struct i40e_hw hw; | ||
261 | 239 | ||
262 | enum i40evf_state_t state; | 240 | enum i40evf_state_t state; |
263 | volatile unsigned long crit_section; | 241 | volatile unsigned long crit_section; |
264 | u64 tx_busy; | ||
265 | 242 | ||
266 | struct work_struct watchdog_task; | 243 | struct work_struct watchdog_task; |
267 | bool netdev_registered; | 244 | bool netdev_registered; |
268 | bool dev_closed; | ||
269 | bool link_up; | 245 | bool link_up; |
270 | enum i40e_virtchnl_ops current_op; | 246 | enum i40e_virtchnl_ops current_op; |
271 | struct i40e_virtchnl_vf_resource *vf_res; /* incl. all VSIs */ | 247 | struct i40e_virtchnl_vf_resource *vf_res; /* incl. all VSIs */ |
@@ -276,11 +252,6 @@ struct i40evf_adapter { | |||
276 | u32 aq_wait_count; | 252 | u32 aq_wait_count; |
277 | }; | 253 | }; |
278 | 254 | ||
279 | struct i40evf_info { | ||
280 | enum i40e_mac_type mac; | ||
281 | unsigned int flags; | ||
282 | }; | ||
283 | |||
284 | 255 | ||
285 | /* needed by i40evf_ethtool.c */ | 256 | /* needed by i40evf_ethtool.c */ |
286 | extern char i40evf_driver_name[]; | 257 | extern char i40evf_driver_name[]; |
@@ -315,6 +286,7 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter); | |||
315 | void i40evf_del_vlans(struct i40evf_adapter *adapter); | 286 | void i40evf_del_vlans(struct i40evf_adapter *adapter); |
316 | void i40evf_set_promiscuous(struct i40evf_adapter *adapter, int flags); | 287 | void i40evf_set_promiscuous(struct i40evf_adapter *adapter, int flags); |
317 | void i40evf_request_stats(struct i40evf_adapter *adapter); | 288 | void i40evf_request_stats(struct i40evf_adapter *adapter); |
289 | void i40evf_request_reset(struct i40evf_adapter *adapter); | ||
318 | void i40evf_virtchnl_completion(struct i40evf_adapter *adapter, | 290 | void i40evf_virtchnl_completion(struct i40evf_adapter *adapter, |
319 | enum i40e_virtchnl_ops v_opcode, | 291 | enum i40e_virtchnl_ops v_opcode, |
320 | i40e_status v_retval, u8 *msg, u16 msglen); | 292 | i40e_status v_retval, u8 *msg, u16 msglen); |