diff options
| author | David S. Miller <davem@davemloft.net> | 2014-06-11 15:25:12 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-06-11 15:25:12 -0400 |
| commit | d4f3862017f9aaa1a6b6bade396a99a4b77e2cb2 (patch) | |
| tree | 7da4b587f102f9c74f6b04205232e037fa39fec9 | |
| parent | 813ebbbf8e6c3d03b2a340ed10b88b551a531452 (diff) | |
| parent | f832090249d97c4070230fe225e12dc6126a92d1 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates 2014-06-11
This series contains updates to igb, i40e and i40evf.
Todd makes a change to igb to un-hide invariant returns by getting rid of
the E1000_SUCCESS define and converting those returns to return 0.
Jacob separates the hardware logic from the set function, so that we can
re-use it during a ptp_reset in igb. This enables the reset to return
functionality to the last know timestamp mode, rather than resetting the
value.
Ashish implements context flags for headwb and headwb_addr so that we
do not have to keep them always enabled.
Shannon updates the admin queue API for the new firmware, which adds
set_pf_content, nvm_config_read/write, replaces set_phy_reset with
set_phy_debug and removes nvm_read/write_reg_se. Cleans up the driver
to use the stored base_queue value since there is no need to read the
PCI register for the PF's base queue on every single transmit queue
enable and disable as we already have the value stored from reading
the capability features at startup.
Anjali changes the notion of source and destination for FD_SB in ethtool
to align i40e with other drivers. Adds flow director statistics to
the PF stats. Fixes a bug in ethtool for flow director drop packet
filter where the drop action comes down as a ring_cookie value, so allow
it as a special value that can be used to configure destination control.
Mitch fixes the i40evf to keep the driver from going down when it is
already in a down state. This prevents a CPU soft lock in napi_disable().
Also change the i40evf to check the admin queue error bits since the
firmware can indicate any admin queue error states to the driver via
some bits in the length registers.
Neerav separates out the DCB capability and enabled flags because currently
if the firmware reports DCB capability the driver enables
I40E_FLAG_DCB_ENABLED flag. When this flag is enabled the driver inserts
a tag when transmitting a packet from the port even if there are no DCB
traffic classes configured at the port. So by adding the additional flag,
I40E_FLAG_DCB_CAPABLE, that will be set when the DCB capability is present
and the existing enabled flag will only be set if there are more than one
traffic classes configured at the port.
Greg fixes the i40e driver to not automatically accept tagged packets by
default so that the system must request a VLAN tag packet filter to get
packets with that tag. Greg also converts i40e to use the in-kernel
ether_addr_copy() instead of mempcy().
Jesse removes the FTYPE field from the receive descriptor to match the
hardware implementation.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
20 files changed, 453 insertions, 174 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 2af28fd37bff..65985846345d 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h | |||
| @@ -154,11 +154,23 @@ struct i40e_lump_tracking { | |||
| 154 | #define I40E_FDIR_BUFFER_FULL_MARGIN 10 | 154 | #define I40E_FDIR_BUFFER_FULL_MARGIN 10 |
| 155 | #define I40E_FDIR_BUFFER_HEAD_ROOM 200 | 155 | #define I40E_FDIR_BUFFER_HEAD_ROOM 200 |
| 156 | 156 | ||
| 157 | enum i40e_fd_stat_idx { | ||
| 158 | I40E_FD_STAT_ATR, | ||
| 159 | I40E_FD_STAT_SB, | ||
| 160 | I40E_FD_STAT_PF_COUNT | ||
| 161 | }; | ||
| 162 | #define I40E_FD_STAT_PF_IDX(pf_id) ((pf_id) * I40E_FD_STAT_PF_COUNT) | ||
| 163 | #define I40E_FD_ATR_STAT_IDX(pf_id) \ | ||
| 164 | (I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_ATR) | ||
| 165 | #define I40E_FD_SB_STAT_IDX(pf_id) \ | ||
| 166 | (I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_SB) | ||
| 167 | |||
| 157 | struct i40e_fdir_filter { | 168 | struct i40e_fdir_filter { |
| 158 | struct hlist_node fdir_node; | 169 | struct hlist_node fdir_node; |
| 159 | /* filter ipnut set */ | 170 | /* filter ipnut set */ |
| 160 | u8 flow_type; | 171 | u8 flow_type; |
| 161 | u8 ip4_proto; | 172 | u8 ip4_proto; |
| 173 | /* TX packet view of src and dst */ | ||
| 162 | __be32 dst_ip[4]; | 174 | __be32 dst_ip[4]; |
| 163 | __be32 src_ip[4]; | 175 | __be32 src_ip[4]; |
| 164 | __be16 src_port; | 176 | __be16 src_port; |
| @@ -222,6 +234,8 @@ struct i40e_pf { | |||
| 222 | 234 | ||
| 223 | struct hlist_head fdir_filter_list; | 235 | struct hlist_head fdir_filter_list; |
| 224 | u16 fdir_pf_active_filters; | 236 | u16 fdir_pf_active_filters; |
| 237 | u16 fd_sb_cnt_idx; | ||
| 238 | u16 fd_atr_cnt_idx; | ||
| 225 | 239 | ||
| 226 | #ifdef CONFIG_I40E_VXLAN | 240 | #ifdef CONFIG_I40E_VXLAN |
| 227 | __be16 vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS]; | 241 | __be16 vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS]; |
| @@ -263,6 +277,7 @@ struct i40e_pf { | |||
| 263 | #ifdef CONFIG_I40E_VXLAN | 277 | #ifdef CONFIG_I40E_VXLAN |
| 264 | #define I40E_FLAG_VXLAN_FILTER_SYNC (u64)(1 << 27) | 278 | #define I40E_FLAG_VXLAN_FILTER_SYNC (u64)(1 << 27) |
| 265 | #endif | 279 | #endif |
| 280 | #define I40E_FLAG_DCB_CAPABLE (u64)(1 << 29) | ||
| 266 | 281 | ||
| 267 | /* tracks features that get auto disabled by errors */ | 282 | /* tracks features that get auto disabled by errors */ |
| 268 | u64 auto_disable_flags; | 283 | u64 auto_disable_flags; |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h index f2ba4b76ecd3..15f289f2917f 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | #define I40E_FW_API_VERSION_MAJOR 0x0001 | 36 | #define I40E_FW_API_VERSION_MAJOR 0x0001 |
| 37 | #define I40E_FW_API_VERSION_MINOR 0x0001 | 37 | #define I40E_FW_API_VERSION_MINOR 0x0002 |
| 38 | 38 | ||
| 39 | struct i40e_aq_desc { | 39 | struct i40e_aq_desc { |
| 40 | __le16 flags; | 40 | __le16 flags; |
| @@ -123,6 +123,7 @@ enum i40e_admin_queue_opc { | |||
| 123 | i40e_aqc_opc_get_version = 0x0001, | 123 | i40e_aqc_opc_get_version = 0x0001, |
| 124 | i40e_aqc_opc_driver_version = 0x0002, | 124 | i40e_aqc_opc_driver_version = 0x0002, |
| 125 | i40e_aqc_opc_queue_shutdown = 0x0003, | 125 | i40e_aqc_opc_queue_shutdown = 0x0003, |
| 126 | i40e_aqc_opc_set_pf_context = 0x0004, | ||
| 126 | 127 | ||
| 127 | /* resource ownership */ | 128 | /* resource ownership */ |
| 128 | i40e_aqc_opc_request_resource = 0x0008, | 129 | i40e_aqc_opc_request_resource = 0x0008, |
| @@ -222,13 +223,15 @@ enum i40e_admin_queue_opc { | |||
| 222 | i40e_aqc_opc_get_partner_advt = 0x0616, | 223 | i40e_aqc_opc_get_partner_advt = 0x0616, |
| 223 | i40e_aqc_opc_set_lb_modes = 0x0618, | 224 | i40e_aqc_opc_set_lb_modes = 0x0618, |
| 224 | i40e_aqc_opc_get_phy_wol_caps = 0x0621, | 225 | i40e_aqc_opc_get_phy_wol_caps = 0x0621, |
| 225 | i40e_aqc_opc_set_phy_reset = 0x0622, | 226 | i40e_aqc_opc_set_phy_debug = 0x0622, |
| 226 | i40e_aqc_opc_upload_ext_phy_fm = 0x0625, | 227 | i40e_aqc_opc_upload_ext_phy_fm = 0x0625, |
| 227 | 228 | ||
| 228 | /* NVM commands */ | 229 | /* NVM commands */ |
| 229 | i40e_aqc_opc_nvm_read = 0x0701, | 230 | i40e_aqc_opc_nvm_read = 0x0701, |
| 230 | i40e_aqc_opc_nvm_erase = 0x0702, | 231 | i40e_aqc_opc_nvm_erase = 0x0702, |
| 231 | i40e_aqc_opc_nvm_update = 0x0703, | 232 | i40e_aqc_opc_nvm_update = 0x0703, |
| 233 | i40e_aqc_opc_nvm_config_read = 0x0704, | ||
| 234 | i40e_aqc_opc_nvm_config_write = 0x0705, | ||
| 232 | 235 | ||
| 233 | /* virtualization commands */ | 236 | /* virtualization commands */ |
| 234 | i40e_aqc_opc_send_msg_to_pf = 0x0801, | 237 | i40e_aqc_opc_send_msg_to_pf = 0x0801, |
| @@ -270,8 +273,6 @@ enum i40e_admin_queue_opc { | |||
| 270 | i40e_aqc_opc_debug_set_mode = 0xFF01, | 273 | i40e_aqc_opc_debug_set_mode = 0xFF01, |
| 271 | i40e_aqc_opc_debug_read_reg = 0xFF03, | 274 | i40e_aqc_opc_debug_read_reg = 0xFF03, |
| 272 | i40e_aqc_opc_debug_write_reg = 0xFF04, | 275 | i40e_aqc_opc_debug_write_reg = 0xFF04, |
| 273 | i40e_aqc_opc_debug_read_reg_sg = 0xFF05, | ||
| 274 | i40e_aqc_opc_debug_write_reg_sg = 0xFF06, | ||
| 275 | i40e_aqc_opc_debug_modify_reg = 0xFF07, | 276 | i40e_aqc_opc_debug_modify_reg = 0xFF07, |
| 276 | i40e_aqc_opc_debug_dump_internals = 0xFF08, | 277 | i40e_aqc_opc_debug_dump_internals = 0xFF08, |
| 277 | i40e_aqc_opc_debug_modify_internals = 0xFF09, | 278 | i40e_aqc_opc_debug_modify_internals = 0xFF09, |
| @@ -339,6 +340,14 @@ struct i40e_aqc_queue_shutdown { | |||
| 339 | 340 | ||
| 340 | I40E_CHECK_CMD_LENGTH(i40e_aqc_queue_shutdown); | 341 | I40E_CHECK_CMD_LENGTH(i40e_aqc_queue_shutdown); |
| 341 | 342 | ||
| 343 | /* Set PF context (0x0004, direct) */ | ||
| 344 | struct i40e_aqc_set_pf_context { | ||
| 345 | u8 pf_id; | ||
| 346 | u8 reserved[15]; | ||
| 347 | }; | ||
| 348 | |||
| 349 | I40E_CHECK_CMD_LENGTH(i40e_aqc_set_pf_context); | ||
| 350 | |||
| 342 | /* Request resource ownership (direct 0x0008) | 351 | /* Request resource ownership (direct 0x0008) |
| 343 | * Release resource ownership (direct 0x0009) | 352 | * Release resource ownership (direct 0x0009) |
| 344 | */ | 353 | */ |
| @@ -1404,11 +1413,12 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_configure_switching_comp_bw_limit); | |||
| 1404 | struct i40e_aqc_configure_switching_comp_ets_data { | 1413 | struct i40e_aqc_configure_switching_comp_ets_data { |
| 1405 | u8 reserved[4]; | 1414 | u8 reserved[4]; |
| 1406 | u8 tc_valid_bits; | 1415 | u8 tc_valid_bits; |
| 1407 | u8 reserved1; | 1416 | u8 seepage; |
| 1417 | #define I40E_AQ_ETS_SEEPAGE_EN_MASK 0x1 | ||
| 1408 | u8 tc_strict_priority_flags; | 1418 | u8 tc_strict_priority_flags; |
| 1409 | u8 reserved2[17]; | 1419 | |
