* Re: linux-next: Tree for Sep 5 (netfilter: xt_socket.c)
From: Randy Dunlap @ 2013-09-05 20:23 UTC (permalink / raw)
To: David Miller; +Cc: sfr, linux-next, linux-kernel, netdev, netfilter-devel
In-Reply-To: <20130905.143830.660252697193033003.davem@davemloft.net>
On 09/05/13 11:38, David Miller wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> Date: Thu, 05 Sep 2013 10:37:04 -0700
>
>> On 09/05/13 02:32, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Please do not add any code for v3.13 to your linux-next included branches
>>> until after v3.12-rc1 is released.
>>>
>>> Changes since 20130904:
>>>
>>
>> on x86_64:
>>
>> when CONFIG_IPV6=m
>> and CONFIG_NETFILTER_XT_MATCH_SOCKET=y:
>>
>> net/built-in.o: In function `socket_mt6_v1_v2':
>> xt_socket.c:(.text+0x51b55): undefined reference to `udp6_lib_lookup'
>> net/built-in.o: In function `socket_mt_init':
>> xt_socket.c:(.init.text+0x1ef8): undefined reference to `nf_defrag_ipv6_enable'
>
> I just commited the following to fix this:
>
> --------------------
> [PATCH] netfilter: Fix build errors with xt_socket.c
>
> As reported by Randy Dunlap:
>
> ====================
> when CONFIG_IPV6=m
> and CONFIG_NETFILTER_XT_MATCH_SOCKET=y:
>
> net/built-in.o: In function `socket_mt6_v1_v2':
> xt_socket.c:(.text+0x51b55): undefined reference to `udp6_lib_lookup'
> net/built-in.o: In function `socket_mt_init':
> xt_socket.c:(.init.text+0x1ef8): undefined reference to `nf_defrag_ipv6_enable'
> ====================
>
> Like several other modules under net/netfilter/ we have to
> have a dependency "IPV6 disabled or set compatibly with this
> module" clause.
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> net/netfilter/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
> index 62a171a..6e839b6 100644
> --- a/net/netfilter/Kconfig
> +++ b/net/netfilter/Kconfig
> @@ -1175,6 +1175,7 @@ config NETFILTER_XT_MATCH_SOCKET
> depends on NETFILTER_XTABLES
> depends on NETFILTER_ADVANCED
> depends on !NF_CONNTRACK || NF_CONNTRACK
> + depends on (IPV6 || IPV6=n)
> select NF_DEFRAG_IPV4
> select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES
> help
>
--
~Randy
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2013-09-05 20:37 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
There are three textual conflicts:
1) Overlapping changes with Greg KH's device tree, wrt. attributes.
Greg's tree modifies net/core/net-sysfs.c to use "struct attribute"
whilst the net-next tree adds a new read-only attribute named phys_port_id.
Resolve by renaming "show_phys_port_id" to "phys_port_id_show", adding
a "static DEVICE_ATTR_RO(phys_port_id);" right underneath that function,
and then adding a "&dev_attr_phys_port_id.attr," entry to net_class_attrs[].
2) include/net/netprio_cgroup.h, overlapping changes with Tejun's tree, retain
the removal of "struct cgroup_netprio_state" in one hunk and the removal
of "extern" from the function declaration in the other hunk.
3) include/linux/usb/usbnet.h, overlapping additions, retain them both.
One adds the "can_dma_sg" member, the other adds "rx_qlen" and "tx_tqlen".
Again, resolve by keeping them all.
And there is one semantic change, as mentioned by Stephen Rothwell, in
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c. bond_for_each_slave() no
longer has a final 'cnt' argument. Resolve by removing the final argument
to the bond_for_each_slave() call in cxgb4_inet6addr_handler(), and also remove
the local 'cnt' variable as it is no longer used.
Noteworthy changes this time around:
1) Multicast rejoin support for team driver, from Jiri Pirko.
2) Centralize and simplify TCP RTT measurement handling in order to
reduce the impact of bad RTO seeding from SYN/ACKs. Also, when
both timestamps and local RTT measurements are available prefer the
later because there are broken middleware devices which scramble
the timestamp.
From Yuchung Cheng.
3) Add TCP_NOTSENT_LOWAT socket option to limit the amount of kernel memory
consumed to queue up unsend user data. From Eric Dumazet.
4) Add a "physical port ID" abstraction for network devices, from Jiri Pirko.
5) Add a "suppress" operation to influence fib_rules lookups, from Stefan
Tomanek.
6) Add a networking development FAQ, from Paul Gortmaker.
7) Extend the information provided by tcp_probe and add ipv6 support, from
Daniel Borkmann.
8) Use RCU locking more extensively in openvswitch data paths, from Pravin
B. Shelar.
9) Add SCTP support to openvswitch, from Joe Stringer.
10) Add EF10 chip support to SFC driver, from Ben Hutchings.
11) Add new SYNPROXY netfilter target, from Patrick McHardy.
12) Compute a rate approximation for sending in TCP sockets, and use this
to more intelligently coalesce TSO frames. Furthermore, add a new
packet scheduler which takes advantage of this estimate when available.
From Eric Dumazet.
13) Allow AF_PACKET fanouts with random selection, from Daniel Borkmann.
14) Add ipv6 support to vxlan driver, from Cong Wang.
Please pull, thanks a lot!
The following changes since commit a8787645e14ce7bbc3db9788526ed0be968c0df2:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2013-08-30 17:43:17 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
for you to fetch changes up to 0d40f75bdab241868c0eb6f97aef9f8b3a66f7b3:
openvswitch: Fix alignment of struct sw_flow_key. (2013-09-05 15:54:37 -0400)
----------------------------------------------------------------
Ajit Khaparde (1):
be2net: set and query VEB/VEPA mode of the PF interface
Akeem G Abodunrin (11):
igb: Reset the link when EEE setting changed
igb: Read register for latch_on without return value
igb: Added rcu_lock to avoid race
igb: Implementation of 1-sec delay for i210 devices
igb: New PHY_ID for i354 device
igb: M88E1543 PHY downshift implementation
igb: No PHPM support in i354 devices
igb: Support to get 2_5G link status for appropriate media type
igb: Get speed and duplex for 1G non_copper devices
igb: Implementation to report advertised/supported link on i354 devices
igb: Update version number
Alexander Aring (5):
6lowpan: init ipv6hdr buffer to zero
6lowpan: introduce lowpan_fetch_skb function
6lowpan: add function to uncompress multicast addr
6lowpan: lowpan_uncompress_addr with address_mode
6lowpan: handle context based source address
Alexander Bondar (6):
iwlwifi: mvm: Upgrade to a new power management uAPSD API
iwlwifi: mvm: Change AM->PSM timeout for EAPOL frames
iwlwifi: mvm: Change beacon abort escape time value
iwlwifi: mvm: Fix beacon filtering enablement via debugfs
iwlwifi: mvm: Add basic uAPSD client support
iwlwifi: mvm: Add PBW snoozing enablement
Alexander Duyck (2):
ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned
igb: Update MTU so that it is always at least a standard frame size
Alexander Shiyan (3):
can: mcp251x: Replace power callbacks with regulator API
can: mcp251x: Eliminate irq_flags from driver platform_data
can: mcp251x: Allow tuning SPI mode and limit maximal SPI speed
Alexander Sverdlin (1):
net: sctp: Fix data chunk fragmentation for MTU values which are not multiple of 4
Alexandre Rames (3):
sfc: Add EF10 support for TX/RX DMA error events handling.
sfc: Return an error code when a sensor is busy.
sfc: Use a global count of active queues instead of pending drains
Alexandru Juncu (1):
mISDN: replace sum of bitmasks with OR operation.
Alexey Khoroshilov (1):
hostap: do not return positive number on failure path in prism2_open()
Amerigo Wang (1):
vti: switch to new ip tunnel code
Amir Vadai (4):
net/mlx4_en: Coding style cleanup in mlx4_en_dcbnl_ieee_setpfc()
net/mlx4_en: Notify user when TX ring in error state
net/mlx4_en: Fix handling of dma_map failure
net/mlx4_en: Reduce scope of local variables in mlx4_en_xmit
Amit Uttamchandani (1):
net/velocity: add poll controller function for velocity nic
Amitkumar Karwar (19):
cfg80211/nl80211: rename packet pattern related structures and enums
cfg80211/nl80211: Add packet coalesce support
mwifiex: add PCIe shutdown handler to avoid system hang on reboot
mwifiex: move del_timer_sync(scan_delay_timer) call to fix memleak
mwifiex: remove unnecessary del_timer(cmd_timer)
mwifiex: move if_ops.cleanup_if() call
mwifiex: add unregister_dev handler for usb interface
mwifiex: reduce firmware poll retries
mwifiex: replace mdelay with msleep
mwifiex: correction in mwifiex_check_fw_status() return status
mwifiex: remove duplicate structure host_cmd_tlv
mwifiex: handle driver initialization error paths
mwifiex: code rearrangement in sdio.c
mwifiex: fix adapter pointer dereference issue
mwifiex: rename mef macros
mwifiex: modify mwifiex_is_pattern_supported() routine
mwifiex: increase max supported pattern offset
mwifiex: add packet coalesce support
mwifiex: fix driver unload problem for usb chipsets
Anders Larsen (1):
pch_gbe: ethtool cannot change parameters when link is down
Andi Shyti (2):
net: trans_rdma: remove unused function
9p: client: remove unused code and any reference to "cancelled" function
Andrea Merello (1):
Update e-mail address for Andrea Merello (resubmit)
Andrei Otcheretianski (1):
iwlwifi: mvm: Implement CQM offloading
Andy King (1):
VMXNET3: Add support for virtual IOMMU
Andy Shevchenko (4):
e100: dump small buffers via %*ph
Bluetooth: use DIV_ROUND_UP in suitable places in btmrvl_sdio
atm: nicstar: re-use native mac_pton() helper
atm: he: print MAC via %pM
Andy Zhou (3):
openvswitch: Mega flow implementation
openvswitch: Rename key_len to key_end
openvswitch: optimize flow compare and mask functions
Anton Blanchard (1):
ibmveth: Fix little endian issues
Antonio Quartulli (4):
mac80211: ibss - remove not authorized station earlier
mac80211: ibss - do not scan if not needed when creating an IBSS
batman-adv: move enum definition at the top of the file
batman-adv: send GW_DEL event when the gw client mode is deselected
Arend van Spriel (17):
brcmfmac: use irq safe spinlock in brcmf_sdbrcm_txdata()
brcmfmac: .txdata() bus callback should not call brcmf_txcomplete()
brcmfmac: add AMPDU reordering functionality
brcmfmac: ignore IF event if firmware indicates it
brcmfmac: add support for manual TDLS operations
brcmsmac: cosmetic change in phy_lcn.c
brcmsmac: change pa_gain for bcm4313 iPA
brcmsmac: use ARRAY_SIZE in phytbl_lcn.c
brcmsmac: add debug info message providing phy and radio info
brcmsmac: update transmit gain table for lcn phy
brcmsmac: change lcnphy receive i/q calibration routine
brcmsmac: fix TSSI idle estimation
brcmsmac: avoid calling set_txpwr_by_index() twice
brcmsmac: rework switch control table init including iPA BT-combo
brcmsmac: correct phy registers for TSSI-based power control
brcmsmac: reinitialize TSSI power control upon channel switch
brcmsmac: add support for BCM4313 iPA variant
Ariel Elior (2):
bnx2x: VF RSS support - PF side
bnx2x: VF RSS support - VF side
Arron Wang (2):
NFC: Fix secure element state check
NFC: Update secure element state
Asias He (2):
VSOCK: Move af_vsock.h and vsock_addr.h to include/net
vhost: Include linux/uio.h instead of linux/socket.h
Avinash Patil (9):
mwifiex: rename pkt_count to ba_pkt_count in mwifiex_ra_list_tbl struct
mwifiex: maintain outstanding packet count for RA list instead of packet size
mwifiex: delete AP TX queues when bridged packets reach threshold
mwifiex: correct max IE length check for WPS IE
mwifiex: modify mwifiex_ap_sta_limits to advertise support for P2P
ieee80211: add definition for interworking support
mwifiex: populate rates in probe request using cfg80211_scan_request
mwifiex: fix ext_capab IE structure definition
mwifiex: drop gratuitous ARP frames
Avri Altman (2):
iwlwifi: mvm: new api to get signal strength
iwlwifi: mvm: fix signal reporting for < 3 antennas
Bartosz Markowski (1):
ath10k: add SoC power save option to PCI features map
Ben Hutchings (70):
Merge branch 'sfc-3.11'
sfc: const-qualify source pointers for MMIO write functions
sfc: Use efx_mcdi_mon() to find efx_mcdi_mon structure from efx_nic
sfc: Move details of a Falcon bug workaround out of ethtool.c
sfc: Move more Falcon-specific code and definitions into falcon.c
sfc: Introduce and use MCDI_DECLARE_BUF macro
sfc: Rationalise MCDI buffer accessors
sfc: Fill out the set of MCDI accessors
sfc: Introduce and use MCDI_CTL_SDU_LEN_MAX_V1 macro for Siena-specific code
sfc: Use proper macros to declare and access MCDI arrays
sfc: Ensure MCDI buffers, but not lengths, are dword aligned
sfc: Add and use MCDI_SET_QWORD() and MCDI_SET_ARRAY_QWORD()
sfc: Move siena_reset_hw() and siena_map_reset_reason() into MCDI module
sfc: Move efx_mcdi_mac_reconfigure() to siena.c and rename
sfc: Collect all MCDI port functions into mcdi_port.c
sfc: Make efx_mcdi_init() call efx_mcdi_handle_assertion()
sfc: Make MCDI independent of Siena
sfc: Add GFP flags to efx_nic_alloc_buffer() and make most callers allow blocking
sfc: Make struct efx_special_buffer less special
sfc: Rename Falcon-architecture register definitions
sfc: Remove efx_process_channel_now()
sfc: Rework IRQ enable/disable
sfc: Limit scope of a Falcon A1 IRQ workaround
sfc: Stop RX refill before flushing RX queues
sfc: Remove bogus call to efx_release_tx_buffers()
sfc: Refactor queue teardown sequence to allow for EF10 flush behaviour
sfc: Move and rename Falcon/Siena common NIC operations
sfc: Translate MCDI error numbers received in events
sfc: Update MCDI protocol definitions for EF10
sfc: Add support for MCDI v2
sfc: Fix race in completion handling
sfc: Update and improve kernel-doc for efx_mcdi_state & efx_mcdi_iface
sfc: Get rid of per-NIC-type phys_addr_channels and mem_map_size
sfc: EFX_WORKAROUND_ALWAYS is really specific to Falcon-architecture
sfc: Do not assume efx_nic_type::ev_fini is idempotent
sfc: Remove unused filter_flags variables and efx_farch_filter_id_flags()
sfc: Rename Falcon-arch filter implementation types and functions
sfc: Name the RX drop queue ID
sfc: Extend and abstract efx_filter_spec to cover Huntington/EF10
sfc: Split Falcon-arch-specific and common filter state
sfc: Refactor Falcon-arch search limit reset
sfc: Make most filter operations NIC-type-specific
sfc: Refactor Falcon-arch filter removal
sfc: Add flag for stack-owned RX MAC filters
sfc: Define and use MCDI_POPULATE_DWORD_{1,2,3,4,5,6,7}
sfc: Cleanup Falcon-arch simple MAC filter state
sfc: Rename SPI stuff to show that it is Falcon-specific
sfc: Eliminate struct efx_mtd
sfc: Move NIC-type-specific MTD partition date into separate structures
sfc: Move MTD operations into efx_nic_type
sfc: Remove more left-overs from Falcon GMAC support
sfc: Remove driver-local struct ethtool_string
sfc: Delegate MAC/NIC statistic description to efx_nic_type
sfc: Remove early call to efx_nic_type::reconfigure_mac in efx_reset_up()
sfc: Rename EFX_PAGE_BLOCK_SIZE to EFX_VI_PAGE_SIZE and adjust comments
sfc: Add TX merged completion counter
sfc: Add support for reading packet length from prefix
sfc: Use extended MC_CMD_SENSOR_INFO and MC_CMD_READ_SENSORS
sfc: Add support for new board sensors
sfc: Refactor efx_mcdi_rpc_start() and efx_mcdi_copyin()
sfc: Remove unnecessary use of atomic_t
sfc: Implement asynchronous MCDI requests
sfc: Document conditions for multicast replication vs filter replacement
sfc: Allow efx_nic_type::dimension_resources to fail
sfc: Initialise IRQ moderation for all NIC types from efx_init_eventq()
sfc: Extend struct efx_tx_buffer to allow pushing option descriptors
sfc: Add EF10 register and structure definitions
sfc: Make efx_mcdi_{init,fini}() call efx_mcdi_drv_attach()
sfc: Add support for Solarflare SFC9100 family
sfc: Update copyright banners
Benjamin Tissoires (2):
Bluetooth: hidp: implement hidinput_input_event callback
Bluetooth: hidp: remove wrong send_report at init
Bing Zhao (3):
mwifiex: fix build error when CONFIG_PM is not set
mwifiex: do not create AP and P2P interfaces upon driver loading
mwifiex: break a long line into two lines
Bjørn Mork (10):
net: etherdevice: add address inherit helper
net: vlan: inherit addr_assign_type along with dev_addr
net: dsa: inherit addr_assign_type along with dev_addr
net: macvlan: inherit addr_assign_type along with dev_addr
net: team: inherit addr_assign_type along with dev_addr
net: airo: inherit addr_assign_type along with dev_addr
net: hostap: inherit addr_assign_type along with dev_addr
net: libertas: inherit addr_assign_type along with dev_addr
staging: vt6655: inherit addr_assign_type along with dev_addr
net: usbnet: update addr_assign_type if appropriate
Bob Copeland (1):
mac80211: assign seqnums for group QoS frames
Boris BREZILLON (4):
net/cadence/macb: add support for dt phy definition
ARM: at91/dt: define phy available on sama5d3 mother board
net/cadence/macb: fix invalid 0 return if no phy is discovered on mii init
ARM: at91/dt: fix phy address in sama5xmb to match the reg property
Bruce Allan (10):
e1000e: disable ASPM L1 on 82583
e1000e: iAMT connections drop on driver unload when jumbo frames enabled
e1000e: low throughput using 4K jumbos on I218
e1000e: Tx hang on I218 when linked at 100Half and slow response at 10Mbps
e1000e: ethtool unnecessarily takes device out of RPM suspend
e1000e: enable support for new device IDs
e1000e: do not resume device from RPM suspend to read PHY status registers
e1000e: fix I217/I218 PHY initialization flow
e1000e: cleanup whitespace in recent commit
e1000e: resolve checkpatch JIFFIES_COMPARISON warning
Carlos O'Donell (1):
net: sync some IP headers with glibc
Carolyn Wyborny (5):
igb: Refactor of init_nvm_params
igb: Refactor NVM read functions to accommodate devices with no flash
igb: Add device support for flashless SKU of i210 device
igb: Fix get_fw_version function for all parts
e1000e: Add code to check for failure of pci_disable_link_state call
Chen Gang (2):
can: c_can: fix error checking of priv->instance in probe()
drivers: net: ethernet: 8390: Kconfig: add H8300H_AKI3068NET and H8300H_H8MAX dependancy for NE_H8300
Chris Metcalf (14):
tile: handle 64-bit statistics in tilepro network driver
tile: set hw_features and vlan_features in setup
tile: support rx_dropped/rx_errors in tilepro net driver
tile: avoid bug in tilepro net driver built with old hypervisor
tile: remove dead is_dup_ack() function from tilepro net driver
tile: support jumbo frames in the tilegx network driver
tile: update dev->stats directly in tilegx network driver
tile: fix panic bug in napi support for tilegx network driver
tile: enable GRO in the tilegx network driver
tile: support multiple mPIPE shims in tilegx network driver
tile: support TSO for IPv6 in tilegx network driver
tile: make "tile_net.custom" a proper bool module parameter
tile: remove deprecated NETIF_F_LLTX flag from tile drivers
tile: support PTP using the tilegx mPIPE (IEEE 1588)
Christoph Paasch (1):
tcp: trivial: Remove nocache argument from tcp_v4_send_synack
Chun-Yeow Yeoh (3):
mac80211: set forwarding in mesh capability info
mac80211: allow lowest basic rate for unicast management for mesh
mac80211: only respond to probe request with mesh ID
Claudiu Manoil (5):
gianfar: Remove unused field grp_id from gfar_priv_grp
gianfar: Fix Tx csum generation errata handling
gianfar: Cleanup TxFCB insertion on xmit
gianfar: Add flow control support
gianfar: Fix reported number of sent bytes to BQL
Cong Wang (15):
openvswitch: check CONFIG_OPENVSWITCH_GRE in makefile
ipv6: move ip6_dst_hoplimit() into core kernel
ipv6: move ip6_local_out into core kernel
ipv6: export a stub for IPv6 symbols used by vxlan
ipv6: export in6addr_loopback to modules
ipv6: do not call ndisc_send_rs() with write lock
vxlan: add ipv6 support
vxlan: add ipv6 route short circuit support
ipv6: move in6_dev_finish_destroy() into core kernel
vxlan: add ipv6 proxy support
ipv6: Add generic UDP Tunnel segmentation
net: unify skb_udp_tunnel_segment() and skb_udp6_tunnel_segment()
vxlan: fix flowi6_proto value
vxlan: include net/ip6_checksum.h for csum_ipv6_magic()
net: make snmp_mib_free static inline
Dan Aloni (1):
netconsole: avoid a crash with multiple sysfs writers
Dan Carpenter (12):
net: remove an unneeded check
iwlwifi: pcie: returning positive instead of negative
NFC: hci: Fix enable/disable confusion
rtnetlink: remove an unneeded test
ipip: dereferencing an ERR_PTR in ip_tunnel_init_net()
ipip: potential race in ip_tunnel_init_net()
qlcnic: underflow in qlcnic_validate_max_tx_rings()
net/fec: cleanup types in fec_get_mac()
caif: add a sanity check to the tty name
x25: add a sanity check parsing X.25 facilities
qlcnic: remove a stray semicolon
sfc: check for allocation failure
Daniel Borkmann (30):
net: sctp: trivial: update mailing list address
net: sctp: trivial: add uapi/linux/sctp.h into maintainers
net: netlink: minor: remove unused pointer in alloc_pg_vec
ipvs: ip_vs_sh: ip_vs_sh_get_port: check skb_header_pointer for NULL
net: sctp: convert sctp_checksum_disable module param into sctp sysctl
net: sctp: trivial: update bug report in header comment
net: ipv6: igmp6_event_query: use msecs_to_jiffies
net: ipv6: minor: *_start_timer: rather use unsigned long
net: ipv6: mcast: minor: use defines for rfc3810/8.1 lengths
net: tcp_probe: also include rcv_wnd next to snd_wnd
net: tcp_probe: kprobes: adapt jtcp_rcv_established signature
net: tcp_probe: add IPv6 support
net: sctp_probe: simplify code by using %pISc format specifier
net: tcp_probe: allow more advanced ingress filtering by mark
net: sctp: reorder sctp_globals to reduce cacheline usage
net: sctp: sctp_verify_init: clean up mandatory checks and add comment
net: packet: add randomized fanout scheduler
net: packet: use reciprocal_divide in fanout_demux_hash
net: packet: document available fanout policies
net: sctp: probe: allow more advanced ingress filtering by mark
net: tcp_probe: adapt tbuf size for recent changes
net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv
net: ipv6: mld: fix v1/v2 switchback timeout to rfc3810, 9.12.
net: ipv6: mld: clean up MLD_V1_SEEN macro
net: ipv6: mld: get rid of MLDV2_MRC and simplify calculation
net: ipv6: mld: implement RFC3810 MLDv2 mode only
net: ipv6: mld: similarly to MLDv2 have min max_delay of 1
net: ipv6: mld: refactor query processing into v1/v2 functions
net: ipv6: mld: introduce mld_{gq, ifc, dad}_stop_timer functions
net: ipv6: mld: document force_mld_version in ip-sysctl.txt
Daniel Mack (1):
net: ethernet: davinci_cpdma: export cpdma_chan_get_stats
Daniel Pieczko (1):
sfc: use MCDI epoch flag to improve MC reboot detection in the driver
Darren Hart (2):
pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32
pch_gbe: Add MinnowBoard support
Dave Jones (3):
bnx2x: Add missing braces in bnx2x:bnx2x_link_initialize
caif: Add missing braces to multiline if in cfctrl_linkup_request
tcp: Add missing braces to do_tcp_setsockopt
David Hauweele (1):
6lowpan: Fix fragmentation with link-local compressed addresses
David S. Miller (51):
Merge branch 'fec'
Merge branch 'tcp'
Merge branch 'team' ("add support for peer notifications and igmp rejoins for team")
Merge branch 'be2net'
Merge branch 'minnow/net-next' of git://git.infradead.org/users/dvhart/linux-2.6 into minnow
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net-next
Merge branch 'phys_port'
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net-next
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
Merge branch 'bond_rcu'
Merge branch 'qlcnic'
Merge branch 'eth_alen'
Merge branch 'bond_neigh_parms'
Merge git://git.kernel.org/.../davem/net
packet: Revert recent header parsing changes.
Revert "net: sctp: convert sctp_checksum_disable module param into sctp sysctl"
Merge branch 'for-davem' of git://git.kernel.org/.../linville/wireless-next
Merge branch 'x-netns'
Merge git://git.kernel.org/.../davem/net
Merge branch 'openvswitch_vxlan'
Merge branch '6lowpan'
Merge branch 'master' of git://git.kernel.org/.../pablo/nf-next
Revert "ipv6: fix checkpatch errors in net/ipv6/addrconf.c"
Merge branch 'tuntap'
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net-next
Merge branch 'master' of git://git.kernel.org/.../klassert/ipsec-next
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next into cpsw
Merge branch 'for-davem' of git://git.kernel.org/.../bwh/sfc-next
Merge branch 'cadence'
Merge git://git.kernel.org/.../davem/net
Merge branch 'for-davem' of git://git.kernel.org/.../bwh/sfc-next
Merge branch 'for-davem' of git://git.kernel.org/.../bwh/sfc-next
Merge branch 'master' of git://git.kernel.org/.../pablo/nf-next
Merge branch 'master' of git://git.kernel.org/.../jesse/openvswitch
Merge branch 'xen-netback'
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
Merge branch 'for-davem' of git://git.kernel.org/.../bwh/sfc-next
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net-next
Merge branch 'bond_vlan'
Merge branch 'for-davem' of git://git.kernel.org/.../bwh/sfc-next
Merge branch 'qlcnic'
Merge branch 'addr_assign_type'
Merge branch 'for-davem' of git://git.kernel.org/.../linville/wireless-next
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
Merge branch 'calxedaxgmac'
Merge branch 'master' of git://git.kernel.org/.../pablo/nf-next
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net-next
Merge branch 'enic'
netfilter: Fix build errors with xt_socket.c
Merge git://git.kernel.org/.../davem/net
David Spinadel (3):
iwlwifi: mvm: enable pre-scan passive to active
cfg80211: add wdev to testmode cmd
mac80211: add vif to testmode cmd
Dean Nelson (1):
e1000e: restore call to pci_clear_master()
Denis Kirjanov (3):
sis900: don't restart auto-negotiation each time after link resume.
sundance: Add netpoll support
sundance: Add myself as a maintainer
Djalal Harouni (1):
ath5k: debugfs: NULL-terminate strings
Dmitry Popov (1):
tcp: Remove unused tcpct declarations and comments
Don Skidmore (6):
ixgbe: fix fc autoneg ethtool reporting.
ixgbe: add new media type.
ixgbe: bump version number
ixgbe: add support for quad-port x520 adapter
ixgbe: fix incorrect limit value in ring transverse
ixgbe: cleanup some log messages
Dragos Foianu (2):
net/irda: fixed style issues in irttp
ipvs: fixed spacing at for statements
Duan Fugang-B38611 (1):
net: fec: fix the error to get the previous BD entry
Duan Jiong (1):
ipv6:introduce function to find route for redirect
Eddie Wai (3):
cnic: Reset tcp_flags during cnic_cm_create().
cnic: Update TCP options setup for iSCSI.
cnic: Add missing error checking for RAMROD_CMD_ID_CLOSE
Eliad Peller (5):
iwlwifi: fix some documentation typos
iwlwifi: pcie: some little cleanups
iwlwifi: mvm: add some missing cleanups in iwl_mvm_mac_add_interface
iwlwifi: mvm: use designated initialization for some arrays
iwlwifi: mvm: don't clear tbl->win mistakenly
Emil Tantilov (9):
ixgbe: fix semaphore lock for I2C read/writes on 82598
ixgbe: fix SFF data dumps of SFP+ modules
ixgbe: clear semaphore bits on timeouts
ixgbe: fix link test when connected to 1Gbps link partner
ixgbe: zero out mailbox buffer on init
ixgbe: fix SFF data dumps of SFP+ modules from an offset
ixgbe: add 1Gbps support for QSFP+
ixgbe: include QSFP PHY types in ixgbe_is_sfp()
ixgbe: add support for older QSFP active DA cables
Emmanuel Grumbach (8):
iwlwifi: pcie: don't disable L1 for newest NICs
iwlwifi: mvm: better handle several several vifs in BT Coex
iwlwifi: mvm: fix the ACK / CTS kill mask upon RSSI event
iwlwifi: mvm: don't allocate BT_COEX cmd on stack
iwlwifi: mvm: remove the default calibration values for 7000
iwlwifi: mvm: register vif debugfs for AP mode too
iwlwifi: mvm: remove obsolete flag in TX command API
iwlwifi: mvm: advertise support for DYNAMIC / STATIC SMPS
Eran Harary (1):
iwlwifi: mvm: fix debugfs restart if fw_restart is disabled
Eric Dumazet (16):
iwl3945: better skb management in rx path
net: add sk_stream_is_writeable() helper
tcp: TCP_NOTSENT_LOWAT socket option
netem: Introduce skb_orphan_partial() helper
net: skb_orphan() changes
net: add a temporary sanity check in skb_orphan()
fib_rules: reorder struct fib_rules fields
ax88179_178a: avoid copy of tx tcp packets
net: add SNMP counters tracking incoming ECN bits
af_unix: improve STREAM behavior with fragmented memory
net: attempt high order allocations in sock_alloc_send_pskb()
af_unix: fix bug on large send()
ipv4: raise IP_MAX_MTU to theoretical limit
tcp: TSO packets automatic sizing
pkt_sched: fq: Fair Queue packet scheduler
pkt_sched: fq: prefetch() fix
Eric Lapuyade (5):
NFC: Move nfc_fw_download_done() definition from private to public
NFC: pn544: i2c: Add firmware download mode power-on support
NFC: netlink: Add result of firmware operation to completion event
NFC: pn544: Add firmware operations hci ops
NFC: pn544: i2c: Add firmware download implementation for pn544
Eugenia Emantayev (2):
net/mlx4_en: Fix BlueFlame race
net/mlx4_en: Disable global flow control when PFC enabled
Eyal Shapira (6):
iwlwifi: remove duplicate rate scale init code
iwlwifi: mvm: remove traffic load monitoring in rs
iwlwifi: mvm: remove rate_scale_data debugfs entry
iwlwifi: mvm: remove unused fields of iwl_rs_rate_info
iwlwifi: mvm: remove MIMO3 from rate scale code
iwlwifi: mvm: remove unused param of rs_dbgfs_set_mcs
Eytan Lifshitz (2):
iwlwifi: mvm: add high temperature SKU thermal throttling parameters
iwlwifi: mvm: add support to the new FW time event API
Fabio Baltieri (1):
mac80211: use oneshot blink API for LED triggers
Fabio Estevam (9):
fec: Do not enable/disable optional clocks unconditionally
fec: Fix the order for enabling/disabling the clocks
fec: Enable/disable clk_ptp in suspend/resume
fec: Check the return value from clk_prepare_enable()
fec: Remove unneeded check in platform_get_resource()
fec: Use devm_request_irq()
can: flexcan: Use devm_ioremap_resource()
can: flexcan: Check the return value from clk_prepare_enable()
fec: Use NAPI_POLL_WEIGHT
Fan Du (3):
xfrm: Delete hold_timer when destroy policy
xfrm: Remove rebundant address family checking
xfrm: Make xfrm_state timer monotonic
Felix Fietkau (19):
ath9k: add utility functions for accessing tid queues
ath9k: split tid retry packets into a separate queue
ath9k: add function for getting the tx tid for a packet
ath9k: add CAB queue info to debugfs
ath9k: simplify ath_tx_form_aggr
ath9k: fix block ack window tracking check
ath9k: prepare queueing code for handling unaggregated traffic
ath9k: fix clearing expired A-MPDU subframes in tx completion
ath9k: always clear ps filter bit on new assoc
ath9k: use software queues for un-aggregated data packets
ath9k: improve tx scheduling fairness
ath9k: use software queueing for multicast traffic
ath9k: fix rx descriptor related race condition
ath9k: shrink a few data structures by reordering fields
ath9k: remove ath9k_sta_remove_debugfs
ath9k: simplify debugfs chainmask handling
ath9k: avoid accessing MRC registers on single-chain devices
ath9k: simplify ath_tid_drain
ath9k: reset buffer stale flag in ath_tx_get_tid_subframe
Florian Fainelli (2):
bridge: inherit slave devices needed_headroom
net: fix comment typo for __skb_alloc_pages()
Florian Westphal (8):
netfilter: connlabels: remove unneeded includes
netfilter: nf_queue: relax NFQA_CT attribute check
netfilter: tproxy: remove nf_tproxy_core, keep tw sk assigned to skb
netfilter: tproxy: remove nf_tproxy_core.h
netfilter: nf_conntrack: remove duplicate code in ctnetlink
netfilter: tproxy: fix build with IP6_NF_IPTABLES=n
netfilter: nf_conntrack: don't send destroy events from iterator
netfilter: ctnetlink: fix uninitialized variable
Francesco Fusco (1):
net: proc_fs: trivial: print UIDs as unsigned int
Franky Lin (4):
brcmfmac: abstract tx packet processing functions
brcmfmac: remove align from brcmf_bus structure
brcmfmac: streamline sdio bus header code
brcmfmac: use configurable sdio bus header length for tx packet
Fred Zhou (1):
ieee80211: add definition for 802.11ac information elements
Frédéric Dalleau (10):
Bluetooth: Use hci_connect_sco directly
Bluetooth: Remove unused mask parameter in sco_conn_defer_accept
Bluetooth: Add Bluetooth socket voice option
Bluetooth: Add constants for SCO airmode
Bluetooth: Use voice setting in deferred SCO connection request
Bluetooth: Parameters for outgoing SCO connections
Bluetooth: Add constants and macro declaration for transparent data
Bluetooth: Prevent transparent SCO on older devices
Bluetooth: Handle specific error for SCO connection fallback
Bluetooth: Add SCO connection fallback
Gabor Juhos (37):
rt2x00: rt2800lib: introduce rt2800_eeprom_word enum
rt2x00: rt2800lib: introduce local EEPROM access functions
rt2x00: rt2800lib: introduce rt2800_eeprom_read_from_array helper
rt2x00: rt2800lib: introduce rt2800_eeprom_word_index helper
rt2x00: rt2800lib: add EEPROM map for the RT3593 chipset
rt2x00: rt2800lib: add MAC register initialization for RT3593
rt2x00: rt2800lib: add BBP register initialization for RT3593
rt2x00: rt2800lib: add RFCSR register initialization for RT3593
rt2x00: rt2800lib: add BBP post initialization for RT3593
rt2x00: rt2800lib: add TX power configuration for RT3593
rt2x00: rt2800lib: fix BBP1_TX_ANTENNA field configuration for 3T devices
rt2x00: rt2800lib: fix antenna configuration for RT3593
rt2x00: rt2800lib: add rt2800_txpower_to_dev helper
rt2x00: rt2800lib: fix default TX power values for RT3593
rt2x00: rt2800lib: introduce rt2800_get_txmixer_gain_{24,5}g helpers
rt2x00: rt2800lib: hardcode TX mixer gain values for RT3593
rt2x00: rt2800lib: fix LNA_A[12] gain values for RT3593
rt2x00: rt2800lib: add default_power3 field for three-chain devices
rt2x00: rt2800lib: add rf_vals for RF3053
rt2x00: rt2800lib: add channel configuration for RF3053
rt2x00: rt2800lib: enable VCO recalibration for RF3053
rt2x00: rt2800lib: enable RF3053 support
rt2x00: rt2800lib: enable RT3593 support
rt2x00: rt2800usb: use correct [RT]XWI size for RT3593
rt2x00: rt2800usb: add USB device ID for Linksys AE3000
rt2x00: rt2800lib: introduce rt2800_get_txwi_rxwi_size helper
rt2x00: rt2800pci: fix AUX_CTRL register setup for RT3090/3390/3593/5592
rt2x00: rt2800: rename HW_BEACON_OFFSET macro
rt2x00: rt2800lib: pass beacon index to rt2800_clear_beacon_register
rt2x00: rt2800lib: fix frequency offset boundary calculation
rt2x00: rt2800lib: optimize frequency offset adjustment
rt2x00: rt2800lib: use a MCU command for frequency adjustment on USB devices
rt2x00: rt2800lib: use step-by-step frequency offset adjustment on MMIO devices
rt2x00: rt2800lib: move rt2800_adjust_freq_offset function
rt2x00: rt2800lib: adjust frequency offset for RF3053
rt2x00: rt2800lib: add rt2800_hw_beacon_base helper
rt2x00: rt2800lib: don't hardcode beacon offsets
Gerhard Sittig (4):
fs_enet: silence a build warning (unused variable)
fs_enet: cleanup clock API use
can: mscan: add a comment on reg to idx mapping
can: mscan: improve clock API use
Gianluca Anzolin (6):
Bluetooth: Take proper tty_struct references
Bluetooth: Remove the device from the list in the destructor
Bluetooth: Move the tty initialization and cleanup out of open/close
Bluetooth: Implement .activate, .shutdown and .carrier_raised methods
Bluetooth: Fix the reference counting of tty_port
Bluetooth: Purge the dlc->tx_queue to avoid circular dependency
Giuseppe CAVALLARO (1):
stmmac: remove useless csum flag
Greg Rose (1):
ixgbe: Retain VLAN filtering in promiscuous + VT mode
Gustavo Padovan (1):
Bluetooth: Add missing braces to an "else if"
Hannes Frederic Sowa (6):
ipv4, ipv6: send igmpv3/mld packets with TC_PRIO_CONTROL
tcp: add tcp_syncookies mode to allow unconditionally generation of syncookies
ipv6: fib6_rules should return exact return value
ipv6: make unsolicited report intervals configurable for mld
ipv6: drop fragmented ndisc packets by default (RFC 6980)
ipv6: fix null pointer dereference in __ip6addrlbl_add
Hante Meuleman (2):
brcmfmac: always use worker thread for tx data.
brcmfmac: no fws locking outside fws module.
Hauke Mehrtens (12):
bcma: add some more core names
bcma: make it possible to select SoC support without mips
bcma: add constants for new ARM based SoCs
bcma: return correct error code when bus scan failed
bcma: fix handling of big addrl
bgmac: make bgmac depend on bcm47xx
bcma: change max PCI read request size to 128
bcma: add method to power up and down the PCIe core by wifi driver
brcmsmac: use bcma PCIe up and down functions
bcma: do not export bcma_core_pci_extend_L1timer()
bcma: add bcma_core_pci_power_save()
b43: call PCIe up and down functions
Hila Gonen (1):
iwlwifi: mvm: Change beacon filtering command
Himanshu Madhani (6):
qlcnic: Update version to 5.2.45
qlcnic: Update version to 5.3.47
qlcnic: Multi Tx queue support for 82xx Series adapter.
qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter.
qlcnic: Enable diagnostic test for multiple Tx queues.
qlcnic: Update version to 5.3.48
Huawei Yang (2):
mwifiex: remove stop_net_dev_queue operation in AP forwarding
mwifiex: add tx info to skb when forming mgmt frame
Hyong-Youb Kim (1):
myri10ge: Add support for ndo_busy_poll
Ido Yariv (3):
iwlwifi: pcie: Refactor iwl_queue_space
iwlwifi: pcie: Refactor iwl_rxq_space
iwlwifi: pcie: Remove duplicate code from pcie irq handlers
Ilan Peer (1):
iwlwifi: mvm: Return on inconsistency in add interface
Inbal Hacohen (1):
iwlwifi: move dump_fh into common code
Ivan Vecera (1):
be2net: don't use dev_err when AER enabling fails
Jacob Keller (7):
PCI: expose pcie_link_speed and pcix_bus_speed arrays
PCI: move enum pcie_link_width into pci.h
PCI: Add function to obtain minimum link width and speed
ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth
ixgbe: fix lockdep annotation issue for ptp's work item
ixgbe: rename LL_EXTENDED_STATS to use queue instead of q
ixgbe: disable link when adapter goes down
Jason Wang (15):
tuntap: hardware vlan tx support
net: move iov_pages() to net/core/iovec.c
net: move zerocopy_sg_from_iovec() to net/core/datagram.c
net: use skb_fill_page_desc() in zerocopy_sg_from_iovec()
net: remove the useless comment in zerocopy_sg_from_iovec()
net: use release_pages() in zerocopy_sg_from_iovec()
net: use skb_copy_datagram_from_iovec() in zerocopy_sg_from_iovec()
vhost_net: make vhost_zerocopy_signal_used() return void
vhost_net: use vhost_add_used_and_signal_n() in vhost_zerocopy_signal_used()
vhost: switch to use vhost_add_used_n()
vhost_net: determine whether or not to use zerocopy at one time
vhost_net: poll vhost queue after marking DMA is done
vhost_net: correctly limit the max pending buffers
tuntap: purge socket error queue on detach
tuntap: orphan frags before trying to set tx timestamp
Jeff Kirsher (1):
Documentation/networking/: Update Intel wired LAN driver documentation
Jesper Dangaard Brouer (2):
netfilter: more strict TCP flag matching in SYNPROXY
netfilter: SYNPROXY: let unrelated packets continue
Jesse Gross (1):
openvswitch: Fix alignment of struct sw_flow_key.
Jingoo Han (47):
Bluetooth: replace strict_strtol() with kstrtol()
bna: Staticize local functions
be2net: Staticize local functions
net: micrel: Staticize local functions
net: mlx4: Staticize local functions
net: phy: micrel: Staticize ksz8873mll_read_status()
net: phy: mdio: add missing __iomem annotation
net: wireless: rt2x00: Staticize rt2x00queue_pause_queue_nocheck()
ethernet: moxa: remove unnecessary platform_set_drvdata()
ethernet: broadcom: remove unnecessary platform_set_drvdata()
net: ax88796: use dev_get_platdata()
net: bfin_mac: use dev_get_platdata()
net: au1000_eth: use dev_get_platdata()
net: bcm63xx_enet: use dev_get_platdata()
net: ep93xx_eth: use dev_get_platdata()
net: dm9000: use dev_get_platdata()
net: ethoc: use dev_get_platdata()
net: fec: use dev_get_platdata()
net: mv643xx_eth: use dev_get_platdata()
net: pxa168_eth: use dev_get_platdata()
net: ks8842: use dev_get_platdata()
net: ks8851-ml: use dev_get_platdata()
net: netx-eth: use dev_get_platdata()
net: sh_eth: use dev_get_platdata()
net: seeq: use dev_get_platdata()
net: smc91x: use dev_get_platdata()
net: smc911x: use dev_get_platdata()
net: smsc911x: use dev_get_platdata()
net: niu: use dev_get_platdata()
net: cpmac: use dev_get_platdata()
net: davinci_emac: use dev_get_platdata()
net: davinci_mdio: use dev_get_platdata()
net: tsi108: use dev_get_platdata()
net: w5300: use dev_get_platdata()
net: w5100: use dev_get_platdata()
net: ixp4xx_eth: use dev_get_platdata()
net: mdio-gpio: use dev_get_platdata()
net: mdio-mux-gpio: use dev_get_platdata()
net: at91_ether: use dev_get_platdata()
net: macb: use dev_get_platdata()
net: stmmac: use dev_get_platdata()
net: emac: use platform_{get,set}_drvdata()
net: sunhme: use platform_{get,set}_drvdata()
net: mdio-octeon: use platform_{get,set}_drvdata()
net: tulip: use pci_{get,set}_drvdata()
net: sunhme: use pci_{get,set}_drvdata()
net: netx-eth: remove unnecessary casting
Jiri Bohac (1):
ICMPv6: treat dest unreachable codes 5 and 6 as EACCES, not EPROTO
Jiri Pirko (7):
team: add peer notification
net: convert resend IGMP to notifier event
team: add support for sending multicast rejoins
net: add ndo to get id of physical port of the device
rtnl: export physical port id via RT netlink
net: export physical port id via sysfs
openvswitch:: link upper device for port devices
Jisheng Zhang (1):
net: mdio-sun4i: Convert to devm_* api
Jitendra Kalsaria (1):
qlcnic: Enhance diagnostic loopback error codes.
Joe Perches (17):
net: Remove extern from include/net/ scheduling prototypes
addrconf.h: Remove extern function prototypes
af_unix.h: Remove extern from function prototypes
af_rxrpc.h: Remove extern from function prototypes
arp/neighbour.h: Remove extern from function prototypes
ax25.h: Remove extern from function prototypes
cfg80211.h/mac80211.h: Remove extern from function prototypes
checksum: Remove extern from function prototypes
cls_cgroup.h netprio_cgroup.h: Remove extern from function prototypes
uapi: Convert some uses of 6 to ETH_ALEN
include: Convert ethernet mac address declarations to use ETH_ALEN
ethernet: Convert mac address uses of 6 to ETH_ALEN
drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent
drivers/net: Convert uses of compare_ether_addr to ether_addr_equal
llc: Use normal etherdevice.h tests
batman: Remove reference to compare_ether_addr
wireless: scan: Remove comment to compare_ether_addr
Joe Stringer (3):
net/sctp: Refactor SCTP skb checksum computation
net: Add NEXTHDR_SCTP to ipv6.h
openvswitch: Add SCTP support
Johan Almbladh (1):
mac80211: perform power save processing before decryption
Johan Hedberg (1):
Bluetooth: Fix getting SCO socket options in deferred state
Johannes Berg (31):
wireless: indent kernel-doc with tabs
mac80211: add per-chain signal information to radiotap
mac80211_hwsim: use ieee80211_free_txskb
mac80211_hwsim: claim uAPSD support
mac80211_hwsim: claim active monitor support
mac80211: make active monitor injection work w/ HW queue
iwlwifi: remove forward debugfs function declarations
iwlwifi: mvm: remove unneeded argument from iwl_mvm_tx_protection()
iwlwifi: pcie: make unused queue warning more readable
ath9k: make rfkill configurable
iwlwifi: dvm: remove P2P support
iwlwifi: mvm: reprobe device on firmware error during restart
iwlwifi: mvm: support six IPv6 addresses in D3
iwlwifi: mvm: assign quota per virtual interface
iwlwifi: mvm: split constants into separate file
iwlwifi: mvm: report per-chain signal to mac80211
iwlwifi: list Emmanuel in maintainers file
mac80211: add debugfs for driver-buffered TID bitmap
iwlwifi: pcie: fix resume when no opmode is present
iwlwifi: mvm: small cleanups in quota management code
iwlwifi: remove transport suspend/resume indirection
wireless: make TU conversion macros available
brcmfmac: use CFG80211_TESTMODE_CMD
nl80211: clean up CQM settings code
mac80211: add control port protocol TX control flag
iwlwifi: mvm: refactor resume from WoWLAN code
mac80211: add APIs to allow keeping connections after WoWLAN
mac80211: minstrel_ht: don't use control.flags in TX status path
mac80211: move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into drivers
mac80211: ignore (E)CSA in probe response frames
mac80211: fix change_interface queue assignments
John Greene (1):
brcmsmac: Further reduce log spam from tx phy messages
John W. Linville (19):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
Merge tag 'for-linville-20130730' of git://github.com/kvalo/ath6kl
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem
Merge branch 'for-linville' of git://github.com/kvalo/ath
Merge tag 'nfc-next-3.12-1' of git://git.kernel.org/.../sameo/nfc-next
brcmsmac: Fix WARNING caused by lack of calls to dma_mapping_error()
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
Merge branch 'master' of git://git.kernel.org/.../bluetooth/bluetooth-next
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
ath9k: ar9003_eeprom.c:3618 fix variable name typo
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211-next
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem
Jon Cooper (3):
sfc: Generalise packet hash lookup to support EF10 RX prefix
sfc: Allow event queue initialisation to fail
sfc: Prepare for RX scatter on EF10
Jon Mason (1):
icplus: Use netif_running to determine device state
Jonas Jensen (1):
net: Add MOXA ART SoCs ethernet driver
Joseph Gasparakis (1):
vxlan: Notify drivers for listening UDP port changes
Julia Lawall (2):
bcm63xx_enet: replace devm_request_and_ioremap by devm_ioremap_resource
drivers:net: delete premature free_irq
Justin Pettit (1):
openvswitch: Fix argument descriptions in vport.c.
Kalle Valo (2):
MAINTAINERS: add ath10k
MAINTAINERS: update ath6kl git location
Karl Beldan (1):
mac80211: report some VHT radiotap infos for tx status
Kirshenbaum Erez (1):
wil6210: Enable TCP/UDP checksum HW offload
Kouei Abe (2):
sh_eth: Fix cache invalidation omission of receive buffer
sh_eth: Enable Rx descriptor word 0 shift for r8a7790
Laura Mihaela Vasilescu (2):
igb: Add macro for size of RETA indirection table
igb: Expose RSS indirection table for ethtool
Laurence Evans (2):
sfc: PTP MCDI requests need to initialise periph ID field
sfc: Add a function pointer to abstract write of host time into NIC shared memory
Laurent Pinchart (1):
sh_eth: r8a7790: Handle the RFE (Receive FIFO overflow Error) interrupt
Li Zhang (1):
e1000e: Avoid kernel crash during shutdown
Libo Chen (19):
net: fsl_pq_mdio: use platform_{get,set}_drvdata()
net: ucc_geth: use platform_{get,set}_drvdata()
net: fec_mpc52xx_phy: use platform_{get,set}_drvdata()
net: sunbmac: use platform_{get,set}_drvdata()
net: sunhme: use platform_{get,set}_drvdata()
net: xilinx_emaclite: use platform_{get,set}_drvdata()
net: davinci_mdio: use platform_{get,set}_drvdata()
net: fsl_pq_mdio: remove unnecessary dev_set_drvdata()
net: ucc_geth: remove unnecessary dev_set_drvdata()
net: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata()
net: sunbmac: remove unnecessary dev_set_drvdata()
net: sunhme: remove unnecessary dev_set_drvdata()
net: xilinx_emaclite: remove unnecessary dev_set_drvdata()
net: davinci_mdio: remove unnecessary dev_set_drvdata()
net: emac: remove unnecessary dev_set_drvdata()
net: irda: pxaficp_ir: use platform_set_drvdata()
net: phy: mdio-octeon: use platform_set_drvdata()
can: at91_can: use platform_set_drvdata()
can: flexcan: use platform_set_drvdata()
Linus Lüssing (2):
bridge: prevent flooding IPv6 packets that do not have a listener
bridge: apply multicast snooping to IPv6 link-local, too
Liu Junliang (1):
USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support
Luciano Coelho (4):
iwlwifi: pcie: don't swallow error codes in iwl_trans_pcie_alloc()
iwlwifi: use a macro for default probe length
iwlwifi: Kconfig: fix help texts wrt 7260 and 3160 devices
iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()
Luis Henriques (1):
net: rfkill: Do not ignore errors from regulator_enable()
Lutz Jaenicke (1):
macvlan: fix typo in assignment
Manish Chopra (12):
qlcnic: Interrupt based driver firmware mailbox mechanism
qlcnic: Replace poll mode mailbox interface with interrupt based mailbox interface
qlcnic: Enable mailbox interface in poll mode when interrupts are not available
qlcnic: Reinitialize mailbox data structures after firmware reset
qlcnic: Flush mailbox command list when mailbox is not available
qlcnic: Fix driver initialization for 83xx adapters
qlcnic: Dump mailbox command data when a command times out
qlcnic: Enable support for 844X adapter
qlcnic: Add PVID support for 84xx adapters
qlcnic: Loopback Inter Driver Communication AEN handler
qlcnic: Enhance PVID handling for 84xx adapters
qlcnic: Remove inline keyword
Marcel Holtmann (2):
Bluetooth: Fix simple whitespace vs tab style issue
Bluetooth: Set different event mask for LE-only controllers
Mark Brown (2):
net: asix: Staticise non-exported symbols
net: asix: Move declaration of ax88172a_info to shared header
Mark Rustad (1):
ixgbe: Check return value on eeprom reads
Mark Schulte (2):
rtlwifi: rtl8192cu: fix function declaration header
rtlwifi: sparse warnings: cast to restricted type
Masami Ichikawa (1):
rt2800usb: Add WLI-UC-G300HP's Product ID.
Mathias Krause (2):
xfrm: constify mark argument of xfrm_find_acq()
af_key: constify lookup tables
Matthew Slattery (1):
sfc: Allocate NVRAM partition ID range for PHY images
Matti Gottlieb (4):
iwlwifi: mvm: sram hex dump on NIC error
iwlwifi: mvm: Enable user set TX power
iwlwifi: mvm: Add RX statistics debugfs entry
iwlwifi: introduce external debug level
Matus Ujhelyi (1):
net: cpsw: Add support for wake-on-lan for cpsw
Michael Chan (15):
cnic: Simplify netdev events handling.
cnic: Simplify cnic_release().
cnic: Update version to 2.5.17 and copyright year.
cnic, bnx2i: Fix bug on some bnx2x devices that don't support iSCSI
bnx2: Handle error condition in ->slot_reset()
bnx2: Use kernel APIs for WoL and power state changes.
bnx2: Refactor WoL setup into a separate function.
bnx2: Use SIMPLE_DEV_PM_OPS.
bnx2: Add pci shutdown handler.
bnx2: Update version to 2.2.4
cnic: Use CHIP_NUM macros from bnx2x.h
cnic: Redefine BNX2X_HW_CID using existing bnx2x macros
cnic: Eliminate CNIC_PORT macro and port_mode in local struct.
cnic: Eliminate local copy of pfid.
cnic: Update version to 2.5.18.
Michael S. Tsirkin (1):
virtio-net: put virtio net header inline with data
Michal Kazior (45):
ath10k: fix teardown ordering
ath10k: fix possible deadlock
ath10k: setup rts/frag thresholds upon vdev creation
ath10k: do not setup rts/frag thresholds for suspended interfaces
ath10k: remove ath10k_bus
ath10k: fix typo in define name
ath10k: silent warning in IBSS mode
ath10k: lower print level for a message
ath10k: provide errno if bmi read/write fails
ath10k: change function to take struct ath10k as arg
ath10k: rename hif callback
ath10k: embed HTC struct inside ath10k
ath10k: embed HTT struct inside ath10k
ath10k: improve locking
ath10k: abort scan properly if wmi_scan_stop fails
ath10k: add missing debug prints
ath10k: decouple pci start/stop logic
ath10k: decouple core start/stop logic
ath10k: allow deferred regd update
ath10k: reset BMI state upon init
ath10k: decouple suspend code
ath10k: move free_vdev_map initialization
ath10k: make sure all resources are freed upon ath10k_stop()
ath10k: defer hw setup to start/stop mac80211 hooks
ath10k: store firmware files in memory
ath10k: skip fw stats debugfs interface if device is down
ath10k: implement device recovery
ath10k: implement fw crash simulation command
ath10k: fix NULL dereference for injected packets
ath10k: create debugfs interface to trigger fw crash
ath10k: prevent HTC from being used after stopping
ath10k: don't reset HTC endpoints unnecessarily
ath10k: fix memleak in mac setup
ath10k: fix rts/fragmentation threshold setup
ath10k: improve tx throughput on slow machines
ath10k: detect the number of spatial streams supported by hw
ath10k: implement rx checksum offloading
ath10k: implement tx checksum offloading
ath10k: implement get_survey()
ath10k: prevent using invalid ringbuffer indexes
ath10k: make sure to use passive scan when n_ssids is 0
ath10k: advertise more conservative intf combinations
ath10k: zero arvif memory on add_interface()
ath10k: fix failpath in MSI-X setup
ath10k: fix device teardown
Michal Schmidt (1):
qlcnic: use standard NAPI weights
Mikel Astiz (3):
Bluetooth: Add HCI authentication capabilities macros
Bluetooth: Use defines in in hci_get_auth_req()
Bluetooth: Use defines instead of integer literals
Ming Lei (2):
USBNET: centralize computing of max rx/tx qlen
USBNET: increase max rx/tx qlen for improving USB3 thoughtput
Mitch A Williams (1):
igb: don't allow SR-IOV without MSI-X
Mohammed Shafi Shajakhan (1):
ath6kl: Fix invalid pointer access on fuzz testing with AP mode
Mugunthan V N (5):
drivers: net: cpsw: add support to show hw stats via ethtool
drivers: net: cpsw: Add support for set MAC address
drivers: net: cpsw: Add support for new CPSW IP version
drivers: net: cpsw: Add support for new CPSW IP version present in AM43xx SoC
drivers: net: cpsw: remove platform data header file of cpsw
Nathan Hintz (1):
netfilter: nf_defrag_ipv6.o included twice
Neel Patel (4):
drivers/net: enic: Move ethtool code to a separate file
drivers/net: enic: Adding support for Cisco Low Latency NIC
drivers/net: enic: Add an interface for USNIC to interact with firmware
drivers/net: enic: Generate notification of hardware crash
Nicolas Dichtel (12):
netfilter: export xt_rpfilter.h to userland
netfilter: export xt_HMARK.h to userland
dev: move skb_scrub_packet() after eth_type_trans()
ipv4 tunnels: use net_eq() helper to check netns
ipip: add x-netns support
ip6tnl: add x-netns support
ip6_tunnel: ensure to always have a link local address
iptunnels: remove net arg from iptunnel_xmit()
vxlan: remove net arg from vxlan[6]_xmit_skb()
skb: allow skb_scrub_packet() to be used by tunnels
tunnels: harmonize cleanup done on skb on xmit path
tunnels: harmonize cleanup done on skb on rx path
Nikolay Aleksandrov (3):
bonding: fix system hang due to fast igmp timer rescheduling
bonding: simplify broadcast_xmit function
bonding: factor out slave id tx code and simplify xmit paths
Nithin Sujir (7):
tg3: Remove incorrect switch to aux power
tg3: Allow NVRAM programming when interface is down
tg3: Implement the shutdown handler
tg3: Enable support for timesync gpio output
tg3: Fix UDP fragments treated as RMCP
tg3: Update version to 3.133
tg3: Don't turn off led on 5719 serdes port 0
Oleksij Rempel (1):
ath9k_htc: do not use bulk on EP3 and EP4
Oliver Hartkopp (1):
can: gw: add a per rule limitation of frame hops
Olivier Guiter (3):
NFC: pn533: Add extended information frame decoding support
NFC: pn533: Split large Tx frames in chunks
NFC: pn533: Store the correct frame size (normal vs ext)
Pablo Neira Ayuso (2):
netfilter: ctnetlink: refactor ctnetlink_create_expect
netfilter: nfnetlink_queue: allow to attach expectations to conntracks
Patrick McHardy (11):
netfilter: nf_conntrack: remove net_ratelimit() for LOG_INVALID()
netfilter: nf_conntrack: constify sk_buff argument to nf_ct_attach()
netfilter: nf_nat: fix locking in nf_nat_seq_adjust()
netfilter: nf_nat: change sequence number adjustments to 32 bits
netfilter: nf_nat: use per-conntrack locking for sequence number adjustments
netfilter: nf_conntrack: make sequence number adjustments usuable without NAT
net: syncookies: export cookie_v4_init_sequence/cookie_v4_check
netfilter: add SYNPROXY core/target
net: syncookies: export cookie_v6_init_sequence/cookie_v6_check
netfilter: add IPv6 SYNPROXY target
netfilter: synproxy_core: fix warning in __nf_ct_ext_add_length()
Paul Gortmaker (1):
Documentation: add networking/netdev-FAQ.txt
Pavel Emelyanov (4):
tun: Add ability to create tun device with given index
tun: Report whether the queue is attached or not
tun: Allow to skip filter on attach
tun: Get skfilter layout
Peter Wu (2):
r8169,sis190: remove unnecessary length check
r8169: fix invalid register dump
Petr Holasek (1):
ipv6: ipv6_create_tempaddr cleanup
Phil Oester (3):
netfilter: xt_addrtype: fix trivial typo
netfilter: ip[6]t_REJECT: tcp-reset using wrong MAC source if bridged
netfilter: xt_TCPMSS: correct return value in tcpmss_mangle_packet
Phil Sutter (3):
af_packet: when sending ethernet frames, parse header for skb->protocol
af_packet: fix for sending VLAN frames via packet_mmap
af_packet: simplify VLAN frame check in packet_snd
Pratik Pujar (4):
qlcnic: Add support for 84xx adapters to load firmware from file
qlcnic: Add AER callback handlers.
qlcnic: Add AER support for 83xx adapter
qlcnic: Restructuring of qlc_83xx_fw_info structure.
Pravin B Shelar (14):
netlink: Eliminate kmalloc in netlink dump operation.
vxlan: Restructure vxlan socket apis.
vxlan: Restructure vxlan receive.
vxlan: Add vxlan recv demux.
vxlan: Extend vxlan handlers for openvswitch.
vxlan: Factor out vxlan send api.
vxlan: Improve vxlan headroom calculation.
vxlan: Add tx-vlan offload support.
openvswitch: Add vxlan tunneling support.
openvswitch: Use RCU lock for flow dump operation.
openvswitch: Use RCU lock for dp dump operation.
openvswitch: Use non rcu hlist_del() flow table entry.
vxlan: Optimize vxlan rcv
vxlan: Fix kernel panic on device delete.
Rafał Miłecki (1):
ssb: drop BROKEN from SSB_SFLASH
Rami Rosen (3):
ipmr: change the prototype of ip_mr_forward().
ip6mr: change the prototype of ip6_mr_forward().
xfrm: remove irrelevant comment in xfrm_input().
Rasesh Mody (1):
bna: firmware update to 3.2.1.1
Richard Cochran (2):
net: Provide a generic socket error queue delivery method for Tx time stamps.
tun: Support software transmit time stamping.
Rob Herring (11):
net: calxedaxgmac: remove NETIF_F_FRAGLIST setting
net: calxedaxgmac: read correct field in xgmac_desc_get_buf_len
net: calxedaxgmac: fix race between xgmac_tx_complete and xgmac_tx_err
net: calxedaxgmac: fix possible skb free before tx complete
net: calxedaxgmac: update ring buffer tx_head after barriers
net: calxedaxgmac: fix race with tx queue stop/wake
net: calxedaxgmac: enable interrupts after napi_enable
net: calxedaxgmac: fix various errors in xgmac_set_rx_mode
net: calxedaxgmac: remove some unused statistic counters
net: calxedaxgmac: fix rx DMA mapping API size mismatches
net: calxedaxgmac: fix xgmac_xmit DMA mapping error handling
Sachin Kamat (2):
net: wan: sbni: Fix incorrect placement of __initdata
net: via-rhine: Fix incorrect placement of __initdata
Samuel Ortiz (12):
MAINTAINERS: Change the NFC subsystem status to Supported
NFC: Document secure element addition/removal netlink events
NFC: Define secure element connectivity and transaction events
NFC: pn533: Fix hardware busy loop when establishing the LLCP link
NFC: pn533: Fix the pn533 polling loop
NFC: pn533: Request System code from SENSF_REQ
NFC: pn533: Unconditionaly select the highest p2p bit rate
NFC: pn533: Enable AUTO RFCA
NFC: Fix SE discovery failure warning condition
NFC: Add a GET_SE netlink API
NFC: pn533: Add delay between each poll frame
NFC: pn533: Add some polling entropy
Sathya Perla (12):
be2net: fix MAC address modification for VF
be2net: allow VFs to program MAC and VLAN filters
be2net: fix pmac_id for BE3 VFs
be2net: refactor MAC-addr setup code
be2net: use SET/GET_MAC_LIST for SH-R
be2net: delete primary MAC address while unloading
be2net: update driver version
be2net: use EQ_CREATEv2 for SH-R
be2net: refactor be_get_resources() code
be2net: Fix be_cmd_if_create() to use MBOX if MCCQ is not created
be2net: refactor be_setup() to consolidate queue creation routines
be2net: implement ethtool set/get_channel hooks
Sean Cross (1):
net/phy: micrel: Add OF configuration support for ksz9021
Sergei Shtylyov (9):
SH7619: fix Ether support
SolutionEngine7724: fix Ether support
sh_eth: get register layout from 'struct sh_eth_cpu_data'
sh_eth: remove 'register_type' field from 'struct sh_eth_plat_data'
SH7619: fix typo in Ether platform data
SolutionEngine7724: fix typo in Ether platform data
sh_eth: no need to call ether_setup()
sh_eth: NAPI requires netif_receive_skb()
sh_eth: fix napi_{en|dis}able() calls racing against interrupts
Shahed Shaikh (4):
qlcnic: Implement ndo_get_phys_port_id for 82xx adapter
qlcnic: Use firmware recommended dump capture mask as default
qlcnic: Store firmware dump state in CAMRAM register
qlcnic: Update version to 5.3.50
Shuah Khan (1):
wireless: Convert mwifiex/pcie to dev_pm_ops from legacy pm_ops
Simon Horman (2):
sh_eth: add support for RMIIMODE register
sh_eth: Add support for r8a7790 SoC
Simon Wunderlich (29):
nl80211: enable HT overrides for ibss
mac80211: enable HT overrides for ibss
nl80211: add scan width to bss and scan request structs
mac80211/rc80211: add chandef to rate initialization
mac80211: fix timing for 5 MHz and 10 MHz channels
mac80211: add radiotap flag and handling for 5/10 MHz
mac80211: select and adjust bitrates according to channel mode
cfg80211/mac80211: get mandatory rates based on scan width
cfg80211/mac80211: use reduced txpower for 5 and 10 MHz
mac80211: allow scanning for 5/10 MHz channels in IBSS
mac80211: return if IBSS chandef can not be used
nl80211: allow 5 and 10 MHz channels for IBSS
mac80211: fix regression when initializing ibss wmm params
mac80211: fix off-by-one regression in ibss beacon generation
nl80211/cfg80211: add channel switch command
mac80211: add channel switch command and beacon callbacks
mac80211: fix ieee80211_sta_process_chanswitch for 5/10 MHz channels
mac80211: move ibss presp generation in own function
ath9k: always use SIFS times from OFDM for 5/10 MHz
ath9k: use chandef instead of channel_type
ath9k: report 5/10 MHz channels
ath9k: set 5/10 MHz supported channels and fix bitrate
ath9k: announce that ath9k supports 5/10 MHz
ath5k: report 5/10 MHz channels
ath5k: set 5/10 MHz supported channels and fix duration
ath5k: enable support for 5 MHz and 10 MHz channels
ath9k: enable CSA functionality in ath9k
batman-adv: set skb priority according to content
batman-adv: Start new development cycle
Solomon Peachy (3):
cw1200: Fix incorrect endianness annotation in a header field
cw1200: Display the correct default reference clock.
cw1200: When debug is enabled, display all wakeup conditions for the wait_event_interruptible_timeout() call.
Sonic Zhang (2):
driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set.
driver:stmmac: Adjust time stamp increase for 0.465 ns accurate only when Time stamp binary rollover is set.
Sony Chacko (1):
qlcnic: Add support for per port eswitch configuration
Stanislaw Gruszka (2):
iwl4965: better skb management in rx path
rt2800: fix wrong TX power compensation
Stefan Tomanek (3):
fib_rules: add .suppress operation
fib_rules: add route suppression based on ifgroup
fib_rules: fix suppressor names and default values
Stephen Rothwell (1):
pktgen: add needed include file
Steven La (1):
e1000e: balance semaphore put/get for 82573
Stone Piao (3):
mwifiex: discard deauth and disassoc event during WPS session
mwifiex: skip registering mgmt frame that has already registered
mwifiex: support to send deauth for P2P client
Sucheta Chakraborty (7):
qlcnic: Update version to 5.2.46.
qlcnic: dcb: Query adapter DCB capabilities.
qlcnic: dcb: Get DCB parameters from the adapter.
qlcnic: dcb: Register DCB AEN handler.
qlcnic: dcb: Add support for CEE Netlink interface.
qlcnic: Update version to 5.3.49.
qlcnic: Fix sparse warning.
Sujith Manoharan (61):
ath9k: Fix RTS threshold
ath9k: Move INI overrides to ar9003_hw_override_ini
ath9k: Add a HW flag for FCC
ath9k: Fix FastChannelChange for AR9462/AR9565
ath9k: Use correct channel when switching bands
ath9k: Program correct initvals for FCC
ath9k: Release the RF bus after setting board values
ath9k: Fix diversity combining for AR9285
ath9k: Add a debugfs file for antenna diversity
ath9k: Do a quick scan only when scan_not_start is true
ath9k: Use a subroutine to check for short scan
ath9k: Add ALT check for cards with GROUP-3 config
ath9k: Use a subroutine to try LNA switch
ath9k: Use a helper function for checking LNA options
ath9k: Simplify checks in quick_scan
ath9k: Use a subroutine to calculate ALT ratio
ath9k: Add statistics for antenna diversity
ath9k: Add information about antenna diversity
ath9k: Print LNA combining mode during init
ath9k: Fix antenna diversity for CUS198
ath9k: Cleanup WLAN/BT RX diversity
ath9k: Add a HW capability for WLAN/BT RX diversity
ath9k: Rename ath9k_hw_antctrl_shared_chain_lnadiv
ath9k: Enable WLAN/BT Ant Diversity for WB225/WB195
ath9k: Program HW for WB195 diversity
ath9k: Remove "shared_chain_lnadiv"
ath9k: Set SWCOM value for CUS198
ath9k: Support ANT diversity for WB225
ath9k: Remove ath_ant_comb_update()
ath9k: Fix antenna control init for AR9485
ath9k: Add more PCI IDs for WB225 cards
ath9k: Fix build failure
ath9k: Fix BTCOEX usage for RX diversity
ath9k: Run the LNA combining algorithm properly
ath9k: Use a subroutine to check for "mybeacon"
ath9k: Fix phy error handling for DFS
ath9k: Discard invalid frames early
ath9k: Fix RX crypto processing
ath9k: Fix TSF processing
ath9k: Reorder some functions
ath9k: Fix PHY error processing
ath9k: Fix RX debug statistics
ath9k: Fix RX packet counter
ath9k: Fix RX beacon processing
ath9k: Move the RX poll check to preprocess()
ath9k: Handle corrupt descriptors properly
ath9k: Fix error condition for corrupt descriptors
ath9k: Remove unused function argument
ath9k: Handle invalid RSSI
ath9k: Identify first subframe in an A-MPDU
ath9k: Optimize LNA check
ath9k: Use lockless variant to initialize RX fifo
ath9k: Add support for AR9485 1.2
ath9k: Add antenna diversity tweak for CUS198
ath9k: Add one more PCI ID for CUS198
ath9k: Fix ASPM for AR9462
ath9k: Fix ASPM workaround usage
ath9k: Fix TX poll work locking
ath9k: Fix DEBUG_FS dependency for ath9k
ath9k: Remove unused ANI commands
ath9k: Enable D3/L1 ASPM fix for AR9462
Thierry Escande (1):
NFC: Fix missing static declarations
Thomas Gleixner (1):
net: Make devnet_rename_seq static
Thomas Graf (5):
pktgen: Add UDPCSUM flag to support UDP checksums
pktgen: Use ip_send_check() to compute checksum
pktgen: Require CONFIG_INET due to use of IPv4 checksum function
ipv6: Remove redundant sk variable
ipv6: Don't depend on per socket memory for neighbour discovery messages
Thomas Huth (1):
virtio-net: Set RXCSUM feature if GUEST_CSUM is available
Thomas Petazzoni (4):
net: mvneta: move the RX and TX desc macros outside of the structs
net: mvneta: support big endian
net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
net: mvneta: implement ->ndo_do_ioctl() to support PHY ioctls
Thomas Richter (2):
vxlan fdb replace an existing entry
macvlan fdb replace support
Tim Gardner (1):
net: neighbour: Remove CONFIG_ARPD
Tobias Waldekranz (1):
mwifiex: add missing endian conversions
Todd Fujinaka (1):
igb: Don't look for a PBA in the iNVM when flashless
Tom Herbert (2):
flow_dissector: clean up IPIP case
flow_dissector: add support for IPPROTO_IPV6
Vasanthakumar Thiagarajan (1):
ath6kl: Fix race in heart beat polling
Vasundhara Volam (7):
be2net: Adding more speeds reported by get_settings
be2net: Do not call get_die_temperature cmd for VF
be2net: don't limit max MAC and VLAN counts
be2net: Fix displaying supported speeds for BE2
be2net: fixup log msgs for async events
be2net: Initialize "status" in be_cmd_get_die_temperature()
be2net: Fixup profile management routines
Veaceslav Falico (21):
neighbour: populate neigh_parms on alloc before calling ndo_neigh_setup
bonding: modify only neigh_parms owned by us
bonding: call slave_last_rx() only once per slave
bonding: add bond_time_in_interval() and use it for time comparison
bonding: remove locking from bond_set_rx_mode()
net: rename netdev_upper to netdev_adjacent
net: add lower_dev_list to net_device and make a full mesh
net: remove search_list from netdev_adjacent
net: add netdev_upper_get_next_dev_rcu(dev, iter)
net: add netdev_for_each_upper_dev_rcu()
bonding: use netdev_upper list in bond_vlan_used
bonding: make bond_arp_send_all use upper device list
bonding: convert bond_has_this_ip() to use upper devices
bonding: use vlan_uses_dev() in __bond_release_one()
bonding: split alb_send_learning_packets()
bonding: make alb_send_learning_packets() use upper dev list
bonding: remove vlan_list/current_alb_vlan
bonding: pr_debug instead of pr_warn in bond_arp_send_all
bonding: remove bond_vlan_used()
bonding: use rlb_client_info->vlan_id instead of ->tag
net: correctly interlink lower/upper devices
Vijay Subramanian (1):
tcp: Change return value of tcp_rcv_established()
Vineet Gupta (1):
ethernet/arc/arc_emac: Fix huge delays in large file copies
Vlad Yasevich (1):
net: sctp: Add rudimentary infrastructure to account for control chunks
Vladimir Kondratiev (9):
wil6210: Align WMI header with latest FW
wil6210: fix wrong index in wil_vring_free
wil6210: Optimize Tx completion
wil6210: Introduce struct for sw context
wil6210: fix subtle race in wil_tx_vring
wil6210: fix error path in wil_tx_vring
wil6210: drop -Werror compiler flag
wil6210: let IP stack re-check HW TCP/UDP csum errors
cfg80211: add flags to cfg80211_rx_mgmt()
Wang Sheng-Hui (2):
bonding: use pre-defined macro in bond_mode_name instead of magic number 0
vlan: cleanup the usage of vlan_dev_priv(dev)
Wei Liu (3):
xen-netback: remove page tracking facility
xen-netback: switch to NAPI + kthread 1:1 model
xen-netback: rename functions
Wei Yang (2):
e1000e: Remove duplicate assignment of default rx/tx ring size
e1000e: Use marco instead of digit for defining e1000_rx_desc_packet_split
Wei Yongjun (6):
tile: fix missing unlock on error in tile_net_open()
vxlan: using kfree_rcu() to simplify the code
moxa: fix missing unlock on error in moxart_mac_start_xmit()
bonding: fix error return code in bond_enslave()
mac80211_hwsim: fix error return code in init_mac80211_hwsim()
zd1201: fix error return code
Werner Almesberger (2):
icmpv6_filter: fix "_hdr" incorrectly being a pointer
icmpv6_filter: allow ICMPv6 messages with bodies < 4 bytes
William Manley (3):
net: igmp: Reduce Unsolicited report interval to 1s when using IGMPv3
net: igmp: Don't flush routing cache when force_igmp_version is modified
net: igmp: Allow user-space configuration of igmp unsolicited report interval
Wolfram Sang (1):
drivers/net/ethernet/stmicro/stmmac: don't check resource with devm_ioremap_resource
Xose Vazquez Perez (1):
wireless: rt2x00: rt2800usb: add RT3573 devices
Yevgeny Petrilin (1):
net/mlx4_core: Respond to operation request by firmware
Yijing Wang (5):
bnx2: clean up unnecessary MSI/MSI-X capability find
bnx2x: clean up unnecessary MSI/MSI-X capability find
myri10ge: clean up unnecessary MSI/MSI-X capability find
netxen: clean up unnecessary MSI/MSI-X capability find
tg3: clean up unnecessary MSI/MSI-X capability find
Yuchung Cheng (9):
tcp: consolidate SYNACK RTT sampling
tcp: prefer packet timing to TS-ECR for RTT
tcp: measure RTT from new SACK
tcp: use RTT from SACK for RTO
tcp: add server ip to encrypt cookie in fast open
tcp: reset reordering est. selectively on timeout
tcp: increase throughput when reordering is high
tcp: do not use cached RTT for RTT estimation
tcp: better comments for RTO initiallization
Yuval Mintz (1):
bnx2x: Revising locking scheme for MAC configuration
dingtianhong (6):
bonding: don't call slave_xxx_netpoll under spinlocks
bonding: bond_sysfs.c checkpatch cleanup
bonding: add rtnl protection for bonding_store_fail_over_mac
bonding: Fixed up a error "do not initialise statics to 0 or NULL" in bond_main.c
ipv6: convert the uses of ADBG and remove the superfluous parentheses
ipv6: fix checkpatch errors in net/ipv6/addrconf.c
fan.du (6):
net ipv6: Remove rebundant rt6i_nsiblings initialization
net: ipv6 eliminate parameter "int addrlen" in function fib6_add_1
net: split rt_genid for ipv4 and ipv6
ipv6: bump genid when delete/add address
sctp: Don't lookup dst if transport dst is still valid
sctp: Pack dst_cookie into 1st cacheline hole for 64bit host
govindarajulu.v (5):
driver/net: enic: Add multi tx support for enic
driver/net: enic: record q_number and rss_hash for skb
driver/net: enic: Try DMA 64 first, then failover to DMA
driver/net: enic: Exposing symbols for Cisco's low latency driver
driver/net: enic: update enic maintainers and driver
hayeswang (10):
net/usb/r8152: support aggregation
net/usb/r8152: enable tx checksum
net/usb/r8152: enable interrupt transfer
r8152: remove clearing the memory to zero for netdev priv
r8152: replace void * with struct r8152 *
r8152: replace lockflags with flags
r8152: adjust some duplicated code
r8152: move some declearation of variables
r8152: adjust tx_bottom function
r8152: add comments
nikolay@redhat.com (11):
bonding: remove bond_resend_igmp_join_requests read_unlock leftover
bonding: convert to list API and replace bond's custom list
bonding: remove unnecessary read_locks of curr_slave_lock
bonding: initial RCU conversion
bonding: change the bond's vlan syncing functions with the standard ones
bonding: unwind on bond_add_vlan failure
bonding: simplify and fix peer notification
bonding: trivial: remove outdated comment and braces
bonding: simplify bond_3ad_update_lacp_rate and use RTNL for sync
bonding: drop read_lock in bond_fix_features
bonding: drop read_lock in bond_compute_features
stephen hemminger (11):
bridge: cleanup netpoll code
team: cleanup netpoll clode
bond: cleanup netpoll code
bridge: fix rcu check warning in multicast port group
vxlan: fix rcu related warning
ip_tunnel: embed hash list head
pptp: fix sparse pointer warning
pptp: fix byte order warnings
qdisc: allow setting default queuing discipline
qdisc: make args to qdisc_create_default const
qdisc: fix build with !CONFIG_NET_SCHED
Documentation/DocBook/80211.tmpl | 1 +
.../devicetree/bindings/net/micrel-ksz9021.txt | 49 +
.../devicetree/bindings/net/moxa,moxart-mac.txt | 21 +
Documentation/devicetree/bindings/net/stmmac.txt | 5 +
Documentation/networking/00-INDEX | 2 +
Documentation/networking/e100.txt | 4 +-
Documentation/networking/e1000.txt | 12 +-
Documentation/networking/e1000e.txt | 16 +-
Documentation/networking/igb.txt | 67 +-
Documentation/networking/igbvf.txt | 8 +-
Documentation/networking/ip-sysctl.txt | 55 +
Documentation/networking/ixgb.txt | 14 +-
Documentation/networking/ixgbe.txt | 109 +-
Documentation/networking/ixgbevf.txt | 6 +-
Documentation/networking/netdev-FAQ.txt | 224 +
Documentation/networking/openvswitch.txt | 40 +
Documentation/networking/packet_mmap.txt | 8 +
Documentation/networking/sctp.txt | 5 +-
Documentation/networking/stmmac.txt | 3 +
Documentation/networking/tproxy.txt | 5 +-
Documentation/sysctl/net.txt | 13 +
MAINTAINERS | 14 +-
arch/arm/boot/dts/sama5d3xmb.dtsi | 8 +
arch/arm/mach-pxa/icontrol.c | 3 -
arch/arm/mach-pxa/zeus.c | 46 +-
arch/arm/mach-shmobile/board-armadillo800eva.c | 1 -
arch/arm/mach-shmobile/board-bockw.c | 1 -
arch/sh/boards/board-espt.c | 1 -
arch/sh/boards/board-sh7757lcr.c | 4 -
arch/sh/boards/mach-ecovec24/setup.c | 1 -
arch/sh/boards/mach-se/7724/setup.c | 3 +-
arch/sh/boards/mach-sh7763rdp/setup.c | 1 -
arch/sh/kernel/cpu/sh2/setup-sh7619.c | 11 +-
arch/tile/gxio/iorpc_mpipe.c | 66 +
arch/tile/gxio/iorpc_mpipe_info.c | 18 +
arch/tile/gxio/mpipe.c | 43 +-
arch/tile/include/gxio/iorpc_mpipe.h | 14 +-
arch/tile/include/gxio/iorpc_mpipe_info.h | 4 +
arch/tile/include/gxio/mpipe.h | 143 +-
arch/tile/include/hv/drv_mpipe_intf.h | 3 +
drivers/atm/he.c | 11 +-
drivers/atm/nicstar.c | 26 +-
drivers/bcma/Kconfig | 10 +-
drivers/bcma/driver_pci.c | 65 +-
drivers/bcma/driver_pci_host.c | 6 +
drivers/bcma/main.c | 2 +-
drivers/bcma/scan.c | 28 +-
drivers/bluetooth/btmrvl_debugfs.c | 6 +-
drivers/bluetooth/btmrvl_sdio.c | 4 +-
drivers/isdn/hardware/mISDN/hfcpci.c | 12 +-
drivers/net/bonding/bond_3ad.c | 52 +-
drivers/net/bonding/bond_alb.c | 144 +-
drivers/net/bonding/bond_alb.h | 3 -
drivers/net/bonding/bond_main.c | 961 ++--
drivers/net/bonding/bond_procfs.c | 12 +-
drivers/net/bonding/bond_sysfs.c | 90 +-
drivers/net/bonding/bonding.h | 96 +-
drivers/net/caif/caif_serial.c | 4 +-
drivers/net/can/at91_can.c | 2 +-
drivers/net/can/c_can/c_can_platform.c | 2 +-
drivers/net/can/flexcan.c | 83 +-
drivers/net/can/mcp251x.c | 98 +-
drivers/net/can/mscan/mpc5xxx_can.c | 23 +-
drivers/net/can/mscan/mscan.c | 25 +-
drivers/net/can/mscan/mscan.h | 3 +
drivers/net/ethernet/8390/Kconfig | 2 +-
drivers/net/ethernet/8390/ax88796.c | 6 +-
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/adi/bfin_mac.c | 6 +-
drivers/net/ethernet/aeroflex/greth.c | 12 +-
drivers/net/ethernet/amd/au1000_eth.c | 2 +-
drivers/net/ethernet/amd/pcnet32.c | 6 +-
drivers/net/ethernet/arc/emac_main.c | 4 +-
drivers/net/ethernet/broadcom/Kconfig | 2 +-
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 23 +-
drivers/net/ethernet/broadcom/bnx2.c | 317 +-
drivers/net/ethernet/broadcom/bnx2.h | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 39 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 106 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 11 +-
.../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 4 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 3 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 93 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 309 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h | 18 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 396 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 39 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 221 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.h | 41 +-
drivers/net/ethernet/broadcom/cnic.c | 189 +-
drivers/net/ethernet/broadcom/cnic.h | 69 +-
drivers/net/ethernet/broadcom/cnic_defs.h | 6 +-
drivers/net/ethernet/broadcom/cnic_if.h | 12 +-
drivers/net/ethernet/broadcom/tg3.c | 146 +-
drivers/net/ethernet/broadcom/tg3.h | 12 +-
drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 10 +-
drivers/net/ethernet/brocade/bna/cna.h | 4 +-
drivers/net/ethernet/cadence/at91_ether.c | 2 +-
drivers/net/ethernet/cadence/macb.c | 53 +-
drivers/net/ethernet/calxeda/xgmac.c | 195 +-
drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 +-
drivers/net/ethernet/cisco/enic/Makefile | 3 +-
drivers/net/ethernet/cisco/enic/enic.h | 55 +-
drivers/net/ethernet/cisco/enic/enic_api.c | 48 +
drivers/net/ethernet/cisco/enic/enic_api.h | 30 +
drivers/net/ethernet/cisco/enic/enic_dev.h | 1 +
drivers/net/ethernet/cisco/enic/enic_ethtool.c | 257 +
drivers/net/ethernet/cisco/enic/enic_main.c | 329 +-
drivers/net/ethernet/cisco/enic/enic_res.h | 9 +-
drivers/net/ethernet/cisco/enic/vnic_dev.c | 10 +
drivers/net/ethernet/cisco/enic/vnic_dev.h | 1 +
drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 176 +-
drivers/net/ethernet/cisco/enic/vnic_rq.c | 5 +-
drivers/net/ethernet/cisco/enic/vnic_rq.h | 5 +-
drivers/net/ethernet/cisco/enic/vnic_wq.c | 3 -
drivers/net/ethernet/cisco/enic/vnic_wq.h | 14 +-
drivers/net/ethernet/davicom/dm9000.c | 2 +-
drivers/net/ethernet/dec/tulip/de4x5.c | 2 +-
drivers/net/ethernet/dec/tulip/tulip_core.c | 8 +-
drivers/net/ethernet/dlink/sundance.c | 14 +
drivers/net/ethernet/emulex/benet/be.h | 76 +-
drivers/net/ethernet/emulex/benet/be_cmds.c | 503 +-
drivers/net/ethernet/emulex/benet/be_cmds.h | 97 +-
drivers/net/ethernet/emulex/benet/be_ethtool.c | 25 +
drivers/net/ethernet/emulex/benet/be_main.c | 777 +--
drivers/net/ethernet/emulex/benet/be_roce.c | 8 +-
drivers/net/ethernet/emulex/benet/be_roce.h | 4 +-
drivers/net/ethernet/ethoc.c | 4 +-
drivers/net/ethernet/faraday/ftgmac100.c | 7 +-
drivers/net/ethernet/faraday/ftmac100.c | 8 +-
drivers/net/ethernet/freescale/fec.h | 3 +
drivers/net/ethernet/freescale/fec_main.c | 245 +-
drivers/net/ethernet/freescale/fec_mpc52xx_phy.c | 4 +-
.../net/ethernet/freescale/fs_enet/fs_enet-main.c | 21 +-
drivers/net/ethernet/freescale/fsl_pq_mdio.c | 4 +-
drivers/net/ethernet/freescale/gianfar.c | 168 +-
drivers/net/ethernet/freescale/gianfar.h | 16 +-
drivers/net/ethernet/freescale/gianfar_ethtool.c | 74 +
drivers/net/ethernet/freescale/ucc_geth.c | 4 +-
drivers/net/ethernet/i825xx/sun3_82586.h | 4 +-
drivers/net/ethernet/ibm/emac/core.c | 12 +-
drivers/net/ethernet/ibm/emac/mal.c | 4 +-
drivers/net/ethernet/ibm/ibmveth.c | 4 +-
drivers/net/ethernet/ibm/ibmveth.h | 19 +-
drivers/net/ethernet/icplus/ipg.c | 2 +-
drivers/net/ethernet/intel/e100.c | 15 +-
drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 8 +-
drivers/net/ethernet/intel/e1000e/82571.c | 6 +
drivers/net/ethernet/intel/e1000e/e1000.h | 3 -
drivers/net/ethernet/intel/e1000e/ethtool.c | 107 +-
drivers/net/ethernet/intel/e1000e/hw.h | 11 +-
drivers/net/ethernet/intel/e1000e/ich8lan.c | 140 +-
drivers/net/ethernet/intel/e1000e/ich8lan.h | 6 +
drivers/net/ethernet/intel/e1000e/netdev.c | 130 +-
drivers/net/ethernet/intel/igb/e1000_82575.c | 198 +-
drivers/net/ethernet/intel/igb/e1000_defines.h | 42 +-
drivers/net/ethernet/intel/igb/e1000_hw.h | 3 +
drivers/net/ethernet/intel/igb/e1000_i210.c | 155 +-
drivers/net/ethernet/intel/igb/e1000_i210.h | 5 +-
drivers/net/ethernet/intel/igb/e1000_mac.c | 11 -
drivers/net/ethernet/intel/igb/e1000_nvm.c | 80 +-
drivers/net/ethernet/intel/igb/e1000_nvm.h | 1 +
drivers/net/ethernet/intel/igb/e1000_phy.c | 31 +-
drivers/net/ethernet/intel/igb/igb.h | 8 +
drivers/net/ethernet/intel/igb/igb_ethtool.c | 132 +-
drivers/net/ethernet/intel/igb/igb_main.c | 148 +-
drivers/net/ethernet/intel/igb/igb_ptp.c | 8 +-
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 7 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 34 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 321 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 157 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 8 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 133 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 180 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 542 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 46 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 12 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 105 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 14 +
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 +-
drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +-
drivers/net/ethernet/marvell/mvneta.c | 90 +-
drivers/net/ethernet/marvell/pxa168_eth.c | 21 +-
drivers/net/ethernet/mellanox/mlx4/cmd.c | 22 +-
drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 15 +-
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 177 +-
drivers/net/ethernet/mellanox/mlx4/eq.c | 9 +
drivers/net/ethernet/mellanox/mlx4/fw.c | 104 +
drivers/net/ethernet/mellanox/mlx4/fw.h | 1 +
drivers/net/ethernet/mellanox/mlx4/main.c | 35 +-
drivers/net/ethernet/mellanox/mlx4/mcg.c | 11 -
drivers/net/ethernet/mellanox/mlx4/mlx4.h | 13 +
drivers/net/ethernet/micrel/ks8842.c | 12 +-
drivers/net/ethernet/micrel/ks8851_mll.c | 4 +-
drivers/net/ethernet/moxa/Kconfig | 30 +
drivers/net/ethernet/moxa/Makefile | 5 +
drivers/net/ethernet/moxa/moxart_ether.c | 559 ++
drivers/net/ethernet/moxa/moxart_ether.h | 330 ++
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 213 +-
drivers/net/ethernet/netx-eth.c | 2 +-
drivers/net/ethernet/nuvoton/w90p910_ether.c | 15 +-
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h | 15 +
.../ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | 1 +
.../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 67 +-
.../net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c | 98 +
.../net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.h | 1 +
drivers/net/ethernet/pasemi/pasemi_mac.c | 20 +-
drivers/net/ethernet/pasemi/pasemi_mac.h | 2 +-
drivers/net/ethernet/qlogic/Kconfig | 11 +
drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 4 +-
.../net/ethernet/qlogic/netxen/netxen_nic_main.c | 8 +-
drivers/net/ethernet/qlogic/qlcnic/Makefile | 2 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 304 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 743 ++-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 50 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 292 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c | 40 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 237 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c | 1179 +++++
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 41 +
.../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 223 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 18 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h | 11 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 12 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 179 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 454 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 13 +-
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 165 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 21 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 19 +-
drivers/net/ethernet/qlogic/qlge/qlge.h | 2 +-
drivers/net/ethernet/realtek/r8169.c | 9 +-
drivers/net/ethernet/renesas/Kconfig | 2 +-
drivers/net/ethernet/renesas/sh_eth.c | 71 +-
drivers/net/ethernet/renesas/sh_eth.h | 10 +
drivers/net/ethernet/seeq/sgiseeq.c | 2 +-
drivers/net/ethernet/sfc/Kconfig | 9 +-
drivers/net/ethernet/sfc/Makefile | 7 +-
drivers/net/ethernet/sfc/bitfield.h | 8 +-
drivers/net/ethernet/sfc/ef10.c | 3043 +++++++++++
drivers/net/ethernet/sfc/ef10_regs.h | 415 ++
drivers/net/ethernet/sfc/efx.c | 500 +-
drivers/net/ethernet/sfc/efx.h | 129 +-
drivers/net/ethernet/sfc/enum.h | 10 +-
drivers/net/ethernet/sfc/ethtool.c | 399 +-
drivers/net/ethernet/sfc/falcon.c | 1171 ++++-
drivers/net/ethernet/sfc/falcon_boards.c | 4 +-
drivers/net/ethernet/sfc/falcon_xmac.c | 362 --
drivers/net/ethernet/sfc/farch.c | 2942 +++++++++++
drivers/net/ethernet/sfc/{regs.h => farch_regs.h} | 272 +-
drivers/net/ethernet/sfc/filter.c | 1274 -----
drivers/net/ethernet/sfc/filter.h | 238 +-
drivers/net/ethernet/sfc/io.h | 50 +-
drivers/net/ethernet/sfc/mcdi.c | 1262 +++--
drivers/net/ethernet/sfc/mcdi.h | 313 +-
drivers/net/ethernet/sfc/mcdi_mac.c | 130 -
drivers/net/ethernet/sfc/mcdi_mon.c | 274 +-
drivers/net/ethernet/sfc/mcdi_pcol.h | 5540 ++++++++++++++++++--
.../net/ethernet/sfc/{mcdi_phy.c => mcdi_port.c} | 345 +-
drivers/net/ethernet/sfc/mdio_10g.c | 2 +-
drivers/net/ethernet/sfc/mdio_10g.h | 2 +-
drivers/net/ethernet/sfc/mtd.c | 634 +--
drivers/net/ethernet/sfc/net_driver.h | 408 +-
drivers/net/ethernet/sfc/nic.c | 1928 +------
drivers/net/ethernet/sfc/nic.h | 539 +-
drivers/net/ethernet/sfc/phy.h | 19 +-
drivers/net/ethernet/sfc/ptp.c | 95 +-
drivers/net/ethernet/sfc/qt202x_phy.c | 4 +-
drivers/net/ethernet/sfc/rx.c | 176 +-
drivers/net/ethernet/sfc/selftest.c | 15 +-
drivers/net/ethernet/sfc/selftest.h | 4 +-
drivers/net/ethernet/sfc/siena.c | 711 ++-
drivers/net/ethernet/sfc/siena_sriov.c | 102 +-
drivers/net/ethernet/sfc/spi.h | 99 -
drivers/net/ethernet/sfc/tenxpress.c | 2 +-
drivers/net/ethernet/sfc/tx.c | 35 +-
drivers/net/ethernet/sfc/txc43128_phy.c | 2 +-
drivers/net/ethernet/sfc/vfdi.h | 2 +-
drivers/net/ethernet/sfc/workarounds.h | 22 +-
drivers/net/ethernet/sgi/meth.c | 5 +-
drivers/net/ethernet/sis/sis190.c | 3 -
drivers/net/ethernet/sis/sis900.c | 28 +-
drivers/net/ethernet/smsc/smc911x.c | 2 +-
drivers/net/ethernet/smsc/smc91x.c | 2 +-
drivers/net/ethernet/smsc/smsc911x.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 -
.../net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +-
.../net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 +-
drivers/net/ethernet/sun/niu.c | 8 +-
drivers/net/ethernet/sun/sunbmac.c | 4 +-
drivers/net/ethernet/sun/sunhme.c | 12 +-
drivers/net/ethernet/ti/cpmac.c | 6 +-
drivers/net/ethernet/ti/cpsw.c | 263 +-
.../net/ethernet/ti}/cpsw.h | 12 +-
drivers/net/ethernet/ti/davinci_cpdma.c | 1 +
drivers/net/ethernet/ti/davinci_emac.c | 2 +-
drivers/net/ethernet/ti/davinci_mdio.c | 7 +-
drivers/net/ethernet/tile/Kconfig | 11 +
drivers/net/ethernet/tile/tilegx.c | 1116 ++--
drivers/net/ethernet/tile/tilepro.c | 241 +-
drivers/net/ethernet/tundra/tsi108_eth.c | 10 +-
drivers/net/ethernet/via/via-rhine.c | 2 +-
drivers/net/ethernet/via/via-velocity.c | 20 +
drivers/net/ethernet/wiznet/w5100.c | 2 +-
drivers/net/ethernet/wiznet/w5300.c | 2 +-
drivers/net/ethernet/xilinx/ll_temac_main.c | 12 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 14 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 4 +-
drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +-
drivers/net/fddi/defxx.c | 6 +-
drivers/net/irda/ali-ircc.c | 8 +-
drivers/net/irda/nsc-ircc.c | 8 +-
drivers/net/irda/pxaficp_ir.c | 2 +-
drivers/net/irda/smsc-ircc2.c | 8 +-
drivers/net/irda/via-ircc.c | 8 +-
drivers/net/irda/w83977af_ir.c | 8 +-
drivers/net/macvlan.c | 7 +-
drivers/net/macvtap.c | 105 +-
drivers/net/netconsole.c | 13 +-
drivers/net/phy/mdio-gpio.c | 2 +-
drivers/net/phy/mdio-mux-gpio.c | 2 +-
drivers/net/phy/mdio-mux-mmioreg.c | 2 +-
drivers/net/phy/mdio-octeon.c | 4 +-
drivers/net/phy/mdio-sun4i.c | 18 +-
drivers/net/phy/micrel.c | 105 +-
drivers/net/ppp/pptp.c | 12 +-
drivers/net/team/team.c | 203 +-
drivers/net/tun.c | 223 +-
drivers/net/usb/Kconfig | 8 +
drivers/net/usb/Makefile | 1 +
drivers/net/usb/asix.h | 2 +
drivers/net/usb/asix_devices.c | 5 +-
drivers/net/usb/ax88172a.c | 8 +-
drivers/net/usb/ax88179_178a.c | 24 +-
drivers/net/usb/qmi_wwan.c | 2 +-
drivers/net/usb/r8152.c | 845 ++-
drivers/net/usb/sr9700.c | 560 ++
drivers/net/usb/sr9700.h | 173 +
drivers/net/usb/usbnet.c | 58 +-
drivers/net/virtio_net.c | 44 +-
drivers/net/vmxnet3/vmxnet3_drv.c | 211 +-
drivers/net/vmxnet3/vmxnet3_int.h | 10 +-
drivers/net/vxlan.c | 1308 ++++-
drivers/net/wan/sbni.c | 2 +-
drivers/net/wireless/airo.c | 2 +-
drivers/net/wireless/ath/ath.h | 2 +-
drivers/net/wireless/ath/ath10k/bmi.c | 12 +-
drivers/net/wireless/ath/ath10k/bmi.h | 1 +
drivers/net/wireless/ath/ath10k/ce.c | 7 +-
drivers/net/wireless/ath/ath10k/core.c | 321 +-
drivers/net/wireless/ath/ath10k/core.h | 58 +-
drivers/net/wireless/ath/ath10k/debug.c | 87 +-
drivers/net/wireless/ath/ath10k/hif.h | 49 +-
drivers/net/wireless/ath/ath10k/htc.c | 61 +-
drivers/net/wireless/ath/ath10k/htc.h | 8 +-
drivers/net/wireless/ath/ath10k/htt.c | 27 +-
drivers/net/wireless/ath/ath10k/htt.h | 3 +-
drivers/net/wireless/ath/ath10k/htt_rx.c | 43 +-
drivers/net/wireless/ath/ath10k/htt_tx.c | 14 +-
drivers/net/wireless/ath/ath10k/mac.c | 488 +-
drivers/net/wireless/ath/ath10k/mac.h | 1 +
drivers/net/wireless/ath/ath10k/pci.c | 356 +-
drivers/net/wireless/ath/ath10k/pci.h | 15 +-
drivers/net/wireless/ath/ath10k/wmi.c | 127 +-
drivers/net/wireless/ath/ath10k/wmi.h | 24 +
drivers/net/wireless/ath/ath5k/ath5k.h | 1 +
drivers/net/wireless/ath/ath5k/base.c | 59 +-
drivers/net/wireless/ath/ath5k/base.h | 2 +-
drivers/net/wireless/ath/ath5k/debug.c | 24 +-
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +-
drivers/net/wireless/ath/ath5k/pcu.c | 2 +
drivers/net/wireless/ath/ath5k/qcu.c | 25 +-
drivers/net/wireless/ath/ath6kl/init.c | 3 +
drivers/net/wireless/ath/ath6kl/main.c | 3 +
drivers/net/wireless/ath/ath6kl/testmode.c | 3 +-
drivers/net/wireless/ath/ath6kl/testmode.h | 7 +-
drivers/net/wireless/ath/ath6kl/wmi.c | 7 +-
drivers/net/wireless/ath/ath9k/Kconfig | 12 +-
drivers/net/wireless/ath/ath9k/ani.c | 3 -
drivers/net/wireless/ath/ath9k/ani.h | 13 +-
drivers/net/wireless/ath/ath9k/antenna.c | 672 +--
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 -
drivers/net/wireless/ath/ath9k/ar9002_hw.c | 29 +-
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 67 +
drivers/net/wireless/ath/ath9k/ar9002_phy.h | 10 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 31 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 2 +
drivers/net/wireless/ath/ath9k/ar9003_hw.c | 39 +-
drivers/net/wireless/ath/ath9k/ar9003_mac.c | 1 +
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 190 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 7 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 68 +-
drivers/net/wireless/ath/ath9k/beacon.c | 21 +
drivers/net/wireless/ath/ath9k/common.c | 67 +-
drivers/net/wireless/ath/ath9k/common.h | 3 +-
drivers/net/wireless/ath/ath9k/debug.c | 310 +-
drivers/net/wireless/ath/ath9k/debug.h | 33 +-
drivers/net/wireless/ath/ath9k/eeprom_4k.c | 19 +
drivers/net/wireless/ath/ath9k/hif_usb.c | 38 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 5 +-
drivers/net/wireless/ath/ath9k/hw-ops.h | 11 +-
drivers/net/wireless/ath/ath9k/hw.c | 115 +-
drivers/net/wireless/ath/ath9k/hw.h | 11 +-
drivers/net/wireless/ath/ath9k/init.c | 68 +-
drivers/net/wireless/ath/ath9k/link.c | 2 +-
drivers/net/wireless/ath/ath9k/mac.c | 4 +-
drivers/net/wireless/ath/ath9k/mac.h | 2 +
drivers/net/wireless/ath/ath9k/main.c | 45 +-
drivers/net/wireless/ath/ath9k/pci.c | 157 +-
drivers/net/wireless/ath/ath9k/phy.h | 7 +
drivers/net/wireless/ath/ath9k/rc.c | 11 +-
drivers/net/wireless/ath/ath9k/recv.c | 494 +-
drivers/net/wireless/ath/ath9k/reg.h | 6 +-
drivers/net/wireless/ath/ath9k/xmit.c | 533 +-
drivers/net/wireless/ath/carl9170/rx.c | 4 +-
drivers/net/wireless/ath/wil6210/Makefile | 3 -
drivers/net/wireless/ath/wil6210/debugfs.c | 4 +-
drivers/net/wireless/ath/wil6210/netdev.c | 2 +
drivers/net/wireless/ath/wil6210/trace.h | 22 +-
drivers/net/wireless/ath/wil6210/txrx.c | 160 +-
drivers/net/wireless/ath/wil6210/txrx.h | 20 +-
drivers/net/wireless/ath/wil6210/wil6210.h | 27 +-
drivers/net/wireless/ath/wil6210/wmi.c | 22 +-
drivers/net/wireless/b43/dma.c | 6 +-
drivers/net/wireless/b43/main.c | 14 +
drivers/net/wireless/b43legacy/dma.c | 7 +-
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 16 +-
.../net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 1 -
drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 31 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h | 8 +-
.../net/wireless/brcm80211/brcmfmac/dhd_linux.c | 279 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 481 +-
drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 4 +
.../net/wireless/brcm80211/brcmfmac/fwil_types.h | 21 +
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 228 +-
drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 4 +-
.../net/wireless/brcm80211/brcmfmac/sdio_host.h | 2 +-
drivers/net/wireless/brcm80211/brcmfmac/usb.c | 1 -
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 65 +-
drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | 21 -
drivers/net/wireless/brcm80211/brcmsmac/aiutils.h | 3 -
drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +-
drivers/net/wireless/brcm80211/brcmsmac/dma.c | 15 +-
drivers/net/wireless/brcm80211/brcmsmac/main.c | 16 +-
.../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 399 +-
.../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.c | 405 +-
.../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.h | 1 +
drivers/net/wireless/cw1200/bh.c | 4 +-
drivers/net/wireless/cw1200/main.c | 2 +-
drivers/net/wireless/cw1200/wsm.h | 2 +-
drivers/net/wireless/hostap/hostap_hw.c | 2 +-
drivers/net/wireless/hostap/hostap_main.c | 6 +-
drivers/net/wireless/iwlegacy/3945-rs.c | 1 +
drivers/net/wireless/iwlegacy/3945.c | 31 +-
drivers/net/wireless/iwlegacy/4965-mac.c | 18 +-
drivers/net/wireless/iwlegacy/4965-rs.c | 1 +
drivers/net/wireless/iwlwifi/Kconfig | 30 +-
drivers/net/wireless/iwlwifi/dvm/agn.h | 6 -
drivers/net/wireless/iwlwifi/dvm/debugfs.c | 15 -
drivers/net/wireless/iwlwifi/dvm/dev.h | 7 -
drivers/net/wireless/iwlwifi/dvm/mac80211.c | 172 +-
drivers/net/wireless/iwlwifi/dvm/main.c | 62 -
drivers/net/wireless/iwlwifi/dvm/rs.c | 6 +-
drivers/net/wireless/iwlwifi/dvm/rxon.c | 6 +-
drivers/net/wireless/iwlwifi/dvm/scan.c | 105 +-
drivers/net/wireless/iwlwifi/dvm/tx.c | 21 +-
drivers/net/wireless/iwlwifi/iwl-7000.c | 11 +
drivers/net/wireless/iwlwifi/iwl-config.h | 4 +
drivers/net/wireless/iwlwifi/iwl-debug.h | 2 +
drivers/net/wireless/iwlwifi/iwl-devtrace.h | 7 +-
drivers/net/wireless/iwlwifi/iwl-drv.c | 10 +-
drivers/net/wireless/iwlwifi/iwl-fw.h | 24 +-
drivers/net/wireless/iwlwifi/iwl-io.c | 67 +
drivers/net/wireless/iwlwifi/iwl-io.h | 3 +
drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 8 +-
drivers/net/wireless/iwlwifi/iwl-op-mode.h | 4 +-
drivers/net/wireless/iwlwifi/iwl-trans.h | 25 +-
drivers/net/wireless/iwlwifi/mvm/Makefile | 2 +-
drivers/net/wireless/iwlwifi/mvm/bt-coex.c | 162 +-
drivers/net/wireless/iwlwifi/mvm/constants.h | 80 +
drivers/net/wireless/iwlwifi/mvm/d3.c | 217 +-
drivers/net/wireless/iwlwifi/mvm/debugfs.c | 271 +-
drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h | 49 +-
drivers/net/wireless/iwlwifi/mvm/fw-api-power.h | 147 +-
drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h | 5 +-
drivers/net/wireless/iwlwifi/mvm/fw-api-tx.h | 2 -
drivers/net/wireless/iwlwifi/mvm/fw-api.h | 255 +-
drivers/net/wireless/iwlwifi/mvm/fw.c | 55 -
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 3 +-
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 82 +-
drivers/net/wireless/iwlwifi/mvm/mvm.h | 112 +-
drivers/net/wireless/iwlwifi/mvm/ops.c | 58 +-
drivers/net/wireless/iwlwifi/mvm/power.c | 383 +-
drivers/net/wireless/iwlwifi/mvm/power_legacy.c | 319 ++
drivers/net/wireless/iwlwifi/mvm/quota.c | 27 +-
drivers/net/wireless/iwlwifi/mvm/rs.c | 653 +--
drivers/net/wireless/iwlwifi/mvm/rs.h | 80 +-
drivers/net/wireless/iwlwifi/mvm/rx.c | 158 +-
drivers/net/wireless/iwlwifi/mvm/scan.c | 2 +
drivers/net/wireless/iwlwifi/mvm/sta.c | 3 +-
drivers/net/wireless/iwlwifi/mvm/time-event.c | 103 +-
drivers/net/wireless/iwlwifi/mvm/tt.c | 32 +-
drivers/net/wireless/iwlwifi/mvm/tx.c | 13 +-
drivers/net/wireless/iwlwifi/mvm/utils.c | 23 +
drivers/net/wireless/iwlwifi/pcie/drv.c | 30 +-
drivers/net/wireless/iwlwifi/pcie/internal.h | 1 -
drivers/net/wireless/iwlwifi/pcie/rx.c | 45 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 144 +-
drivers/net/wireless/iwlwifi/pcie/tx.c | 60 +-
drivers/net/wireless/libertas/mesh.c | 2 +-
drivers/net/wireless/mac80211_hwsim.c | 15 +-
drivers/net/wireless/mwifiex/11n.c | 16 +-
drivers/net/wireless/mwifiex/11n_aggr.c | 7 +-
drivers/net/wireless/mwifiex/cfg80211.c | 177 +-
drivers/net/wireless/mwifiex/cfp.c | 42 +-
drivers/net/wireless/mwifiex/decl.h | 12 +-
drivers/net/wireless/mwifiex/fw.h | 72 +-
drivers/net/wireless/mwifiex/ie.c | 2 +-
drivers/net/wireless/mwifiex/init.c | 15 +-
drivers/net/wireless/mwifiex/ioctl.h | 43 +-
drivers/net/wireless/mwifiex/join.c | 1 +
drivers/net/wireless/mwifiex/main.c | 110 +-
drivers/net/wireless/mwifiex/main.h | 11 +-
drivers/net/wireless/mwifiex/pcie.c | 39 +-
drivers/net/wireless/mwifiex/scan.c | 63 +-
drivers/net/wireless/mwifiex/sdio.c | 219 +-
drivers/net/wireless/mwifiex/sta_cmd.c | 77 +-
drivers/net/wireless/mwifiex/sta_cmdresp.c | 4 +-
drivers/net/wireless/mwifiex/sta_event.c | 10 +
drivers/net/wireless/mwifiex/sta_ioctl.c | 11 +-
drivers/net/wireless/mwifiex/sta_rx.c | 49 +
drivers/net/wireless/mwifiex/uap_cmd.c | 130 +-
drivers/net/wireless/mwifiex/uap_txrx.c | 70 +-
drivers/net/wireless/mwifiex/usb.c | 58 +-
drivers/net/wireless/mwifiex/util.c | 4 +-
drivers/net/wireless/mwifiex/wmm.c | 16 +-
drivers/net/wireless/rt2x00/Kconfig | 6 +
drivers/net/wireless/rt2x00/rt2800.h | 279 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 1655 +++++-
drivers/net/wireless/rt2x00/rt2800lib.h | 4 +
drivers/net/wireless/rt2x00/rt2800pci.c | 19 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 43 +-
drivers/net/wireless/rt2x00/rt2x00.h | 1 +
drivers/net/wireless/rt2x00/rt2x00dev.c | 4 +-
drivers/net/wireless/rt2x00/rt2x00queue.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180/dev.c | 6 +-
drivers/net/wireless/rtl818x/rtl8180/grf5101.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180/grf5101.h | 2 +-
drivers/net/wireless/rtl818x/rtl8180/max2820.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180/max2820.h | 2 +-
drivers/net/wireless/rtl818x/rtl8180/rtl8225.c | 4 +-
drivers/net/wireless/rtl818x/rtl8180/sa2400.c | 2 +-
drivers/net/wireless/rtl818x/rtl8180/sa2400.h | 2 +-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 6 +-
drivers/net/wireless/rtl818x/rtl8187/rtl8187.h | 4 +-
drivers/net/wireless/rtl818x/rtl8187/rtl8225.c | 4 +-
drivers/net/wireless/rtl818x/rtl8187/rtl8225.h | 4 +-
drivers/net/wireless/rtl818x/rtl818x.h | 4 +-
drivers/net/wireless/rtlwifi/base.c | 2 +-
drivers/net/wireless/rtlwifi/ps.c | 18 +-
drivers/net/wireless/rtlwifi/rc.c | 1 +
drivers/net/wireless/rtlwifi/rtl8188ee/trx.c | 9 +-
drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +
drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 -
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c | 20 +-
drivers/net/wireless/ti/wlcore/main.c | 13 +-
drivers/net/wireless/ti/wlcore/testmode.c | 3 +-
drivers/net/wireless/ti/wlcore/testmode.h | 3 +-
drivers/net/wireless/zd1201.c | 8 +-
drivers/net/xen-netback/common.h | 150 +-
drivers/net/xen-netback/interface.c | 135 +-
drivers/net/xen-netback/netback.c | 833 +--
drivers/nfc/nfcsim.c | 6 +-
drivers/nfc/pn533.c | 389 +-
drivers/nfc/pn544/i2c.c | 360 +-
drivers/nfc/pn544/mei.c | 2 +-
drivers/nfc/pn544/pn544.c | 20 +-
drivers/nfc/pn544/pn544.h | 7 +-
drivers/pci/pci.c | 43 +
drivers/pci/pci.h | 3 +
drivers/pci/probe.c | 4 +-
drivers/scsi/bnx2i/57xx_iscsi_hsi.h | 12 +-
drivers/scsi/bnx2i/bnx2i_init.c | 12 +-
drivers/ssb/Kconfig | 2 +-
drivers/ssb/driver_chipcommon_sflash.c | 8 +-
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 2 +-
drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 2 +-
.../rtl8187se/ieee80211/ieee80211_softmac.c | 2 +-
.../rtl8187se/ieee80211/ieee80211_softmac_wx.c | 2 +-
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c | 2 +-
drivers/staging/rtl8187se/r8180.h | 2 +-
drivers/staging/rtl8187se/r8180_93cx6.h | 2 +-
drivers/staging/rtl8187se/r8180_core.c | 4 +-
drivers/staging/rtl8187se/r8180_hw.h | 2 +-
drivers/staging/rtl8187se/r8180_rtl8225.h | 2 +-
drivers/staging/rtl8187se/r8180_rtl8225z2.c | 2 +-
drivers/staging/rtl8187se/r8180_wx.c | 2 +-
drivers/staging/rtl8187se/r8180_wx.h | 2 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_eeprom.h | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_pci.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_pci.h | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/rtl_ps.h | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_debug.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 2 +-
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +-
drivers/staging/rtl8192e/rtllib_tx.c | 2 +-
drivers/staging/rtl8192u/authors | 2 +-
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
.../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +-
.../rtl8192u/ieee80211/ieee80211_softmac_wx.c | 2 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 2 +-
drivers/staging/rtl8192u/r8180_93cx6.c | 2 +-
drivers/staging/rtl8192u/r8180_93cx6.h | 2 +-
drivers/staging/rtl8192u/r8180_pm.c | 2 +-
drivers/staging/rtl8192u/r8180_pm.h | 2 +-
drivers/staging/rtl8192u/r8190_rtl8256.h | 2 +-
drivers/staging/rtl8192u/r8192U.h | 2 +-
drivers/staging/rtl8192u/r8192U_core.c | 2 +-
drivers/staging/rtl8192u/r8192U_hw.h | 2 +-
drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
drivers/staging/rtl8192u/r8192U_wx.h | 2 +-
drivers/staging/vt6655/hostap.c | 2 +-
drivers/staging/vt6655/ioctl.c | 2 +-
drivers/staging/vt6655/wpactl.c | 2 +-
drivers/vhost/net.c | 92 +-
drivers/vhost/vhost.c | 56 +-
include/linux/bcma/bcma.h | 17 +
include/linux/bcma/bcma_driver_pci.h | 24 +-
include/linux/can/platform/mcp251x.h | 15 +-
include/linux/dm9000.h | 4 +-
include/linux/dma-mapping.h | 5 +-
include/linux/etherdevice.h | 15 +
include/linux/fs_enet_pd.h | 6 +-
include/linux/ieee80211.h | 72 +-
include/linux/if_team.h | 14 +-
include/linux/igmp.h | 1 -
include/linux/ipv6.h | 3 +
include/linux/mlx4/cmd.h | 1 +
include/linux/mlx4/device.h | 12 +-
include/linux/mlx4/qp.h | 5 +-
include/linux/mv643xx_eth.h | 3 +-
include/linux/netdevice.h | 54 +-
include/linux/netfilter.h | 15 +-
include/linux/pci.h | 15 +
include/linux/pci_hotplug.h | 13 -
include/linux/platform_data/brcmfmac-sdio.h | 6 +
include/linux/sh_eth.h | 10 +-
include/linux/skbuff.h | 19 +-
include/linux/smsc911x.h | 3 +-
include/linux/socket.h | 2 +
include/linux/stmmac.h | 1 +
include/linux/tcp.h | 2 +-
include/linux/usb/usbnet.h | 3 +
include/linux/uwb/spec.h | 5 +-
include/media/tveeprom.h | 4 +-
include/net/9p/transport.h | 3 -
include/net/act_api.h | 60 +-
include/net/addrconf.h | 180 +-
include/net/af_rxrpc.h | 35 +-
include/net/af_unix.h | 17 +-
{net/vmw_vsock => include/net}/af_vsock.h | 0
include/net/arp.h | 30 +-
include/net/ax25.h | 215 +-
include/net/bluetooth/bluetooth.h | 8 +
include/net/bluetooth/hci.h | 7 +
include/net/bluetooth/hci_core.h | 10 +-
include/net/bluetooth/sco.h | 1 +
include/net/cfg80211.h | 239 +-
include/net/checksum.h | 10 +-
include/net/cls_cgroup.h | 2 +-
include/net/dst.h | 12 +-
include/net/fib_rules.h | 14 +-
include/net/ieee80211_radiotap.h | 4 +
include/net/if_inet6.h | 9 +-
include/net/ip.h | 12 +-
include/net/ip6_route.h | 2 -
include/net/ip6_tunnel.h | 2 +-
include/net/ip_tunnels.h | 11 +-
include/net/ipv6.h | 3 +
include/net/irda/irlan_common.h | 3 +-
include/net/llc_if.h | 30 -
include/net/mac80211.h | 192 +-
include/net/mld.h | 51 +-
include/net/ndisc.h | 5 +
include/net/neighbour.h | 98 +-
include/net/net_namespace.h | 37 +-
include/net/netfilter/nf_conntrack.h | 9 +-
include/net/netfilter/nf_conntrack_extend.h | 6 +
include/net/netfilter/nf_conntrack_l4proto.h | 7 -
include/net/netfilter/nf_conntrack_seqadj.h | 51 +
include/net/netfilter/nf_conntrack_synproxy.h | 77 +
include/net/netfilter/nf_nat.h | 10 -
include/net/netfilter/nf_nat_helper.h | 19 -
include/net/netfilter/nf_tproxy_core.h | 210 -
include/net/netfilter/nfnetlink_queue.h | 8 +
include/net/netns/ipv4.h | 1 +
include/net/netns/ipv6.h | 1 +
include/net/netprio_cgroup.h | 2 +-
include/net/nfc/nfc.h | 3 +
include/net/pkt_cls.h | 42 +-
include/net/pkt_sched.h | 53 +-
include/net/sch_generic.h | 54 +-
include/net/sctp/auth.h | 8 +-
include/net/sctp/checksum.h | 23 +-
include/net/sctp/command.h | 18 +-
include/net/sctp/constants.h | 8 +-
include/net/sctp/sctp.h | 10 +-
include/net/sctp/sm.h | 8 +-
include/net/sctp/structs.h | 29 +-
include/net/sctp/tsnmap.h | 8 +-
include/net/sctp/ulpevent.h | 8 +-
include/net/sctp/ulpqueue.h | 8 +-
include/net/sock.h | 29 +-
include/net/tcp.h | 44 +-
include/net/udp.h | 1 +
{net/vmw_vsock => include/net}/vsock_addr.h | 0
include/net/vxlan.h | 40 +
include/net/xfrm.h | 2 +-
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/can/gw.h | 9 +-
include/uapi/linux/dn.h | 3 +-
include/uapi/linux/fib_rules.h | 4 +-
include/uapi/linux/icmpv6.h | 2 +
include/uapi/linux/if_bridge.h | 3 +-
include/uapi/linux/if_link.h | 3 +
include/uapi/linux/if_packet.h | 1 +
include/uapi/linux/if_pppox.h | 2 +-
include/uapi/linux/if_tun.h | 6 +
include/uapi/linux/in.h | 49 +-
include/uapi/linux/in6.h | 36 +-
include/uapi/linux/ip.h | 2 +
include/uapi/linux/ipv6.h | 3 +
include/uapi/linux/libc-compat.h | 103 +
include/uapi/linux/netfilter/Kbuild | 2 +
include/uapi/linux/netfilter/nf_conntrack_common.h | 3 +-
include/uapi/linux/netfilter/nfnetlink_conntrack.h | 15 +-
include/uapi/linux/netfilter/nfnetlink_queue.h | 1 +
include/{ => uapi}/linux/netfilter/xt_HMARK.h | 0
include/uapi/linux/netfilter/xt_SYNPROXY.h | 16 +
include/{ => uapi}/linux/netfilter/xt_rpfilter.h | 0
include/uapi/linux/netfilter_bridge/ebt_802_3.h | 5 +-
include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h | 3 +-
include/uapi/linux/nfc.h | 20 +
include/uapi/linux/nl80211.h | 199 +-
include/uapi/linux/openvswitch.h | 26 +-
include/uapi/linux/pkt_sched.h | 41 +
include/uapi/linux/sctp.h | 2 +-
include/uapi/linux/snmp.h | 4 +
include/uapi/linux/tcp.h | 1 +
include/uapi/linux/virtio_net.h | 6 +-
include/uapi/linux/wimax/i2400m.h | 4 +-
net/8021q/vlan.c | 13 +-
net/8021q/vlan_dev.c | 8 +-
net/9p/client.c | 9 +-
net/9p/trans_rdma.c | 11 -
net/Kconfig | 2 +-
net/appletalk/atalk_proc.c | 2 +-
net/batman-adv/bat_iv_ogm.c | 32 +-
net/batman-adv/gateway_client.c | 27 +
net/batman-adv/gateway_client.h | 1 +
net/batman-adv/icmp_socket.c | 1 +
net/batman-adv/main.c | 58 +
net/batman-adv/main.h | 5 +-
net/batman-adv/routing.c | 20 +-
net/batman-adv/send.c | 1 -
net/batman-adv/soft-interface.c | 2 +
net/batman-adv/sysfs.c | 4 +
net/batman-adv/translation-table.c | 5 +
net/batman-adv/unicast.c | 2 +
net/batman-adv/vis.c | 2 +
net/bluetooth/hci_conn.c | 62 +-
net/bluetooth/hci_core.c | 14 +-
net/bluetooth/hci_event.c | 29 +-
net/bluetooth/hidp/core.c | 40 +-
net/bluetooth/l2cap_core.c | 3 +-
net/bluetooth/rfcomm/tty.c | 271 +-
net/bluetooth/sco.c | 85 +-
net/bridge/br_device.c | 12 +-
net/bridge/br_if.c | 6 +-
net/bridge/br_mdb.c | 6 +-
net/bridge/br_multicast.c | 17 +-
net/bridge/br_notify.c | 5 +
net/bridge/br_private.h | 22 +-
net/caif/cfctrl.c | 3 +-
net/can/gw.c | 35 +-
net/ceph/messenger.c | 2 +-
net/core/datagram.c | 72 +
net/core/dev.c | 371 +-
net/core/fib_rules.c | 25 +
net/core/flow_dissector.c | 6 +-
net/core/iovec.c | 24 +
net/core/neighbour.c | 2 -
net/core/net-sysfs.c | 22 +
net/core/pktgen.c | 61 +-
net/core/rtnetlink.c | 29 +-
net/core/skbuff.c | 19 +-
net/core/sock.c | 166 +-
net/core/stream.c | 2 +-
net/core/sysctl_net_core.c | 30 +-
net/dccp/proto.c | 4 +-
net/dsa/slave.c | 2 +-
net/ieee802154/6lowpan.c | 286 +-
net/ieee802154/6lowpan.h | 20 +-
net/ipv4/Kconfig | 16 -
net/ipv4/af_inet.c | 12 -
net/ipv4/arp.c | 2 -
net/ipv4/devinet.c | 17 +-
net/ipv4/fib_rules.c | 25 +
net/ipv4/igmp.c | 80 +-
net/ipv4/ip_gre.c | 4 +-
net/ipv4/ip_input.c | 8 +
net/ipv4/ip_tunnel.c | 71 +-
net/ipv4/ip_tunnel_core.c | 10 +-
net/ipv4/ip_vti.c | 528 +-
net/ipv4/ipip.c | 3 +-
net/ipv4/ipmr.c | 18 +-
net/ipv4/netfilter/Kconfig | 13 +
net/ipv4/netfilter/Makefile | 1 +
net/ipv4/netfilter/ipt_MASQUERADE.c | 2 +-
net/ipv4/netfilter/ipt_REJECT.c | 21 +-
net/ipv4/netfilter/ipt_SYNPROXY.c | 476 ++
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 7 +-
net/ipv4/ping.c | 2 +-
net/ipv4/proc.c | 7 +-
net/ipv4/raw.c | 2 +-
net/ipv4/route.c | 24 +-
net/ipv4/syncookies.c | 29 +-
net/ipv4/sysctl_net_ipv4.c | 17 +
net/ipv4/tcp.c | 46 +-
net/ipv4/tcp_fastopen.c | 13 +-
net/ipv4/tcp_input.c | 201 +-
net/ipv4/tcp_ipv4.c | 32 +-
net/ipv4/tcp_metrics.c | 42 +-
net/ipv4/tcp_minisocks.c | 8 +-
net/ipv4/tcp_output.c | 5 +-
net/ipv4/tcp_probe.c | 87 +-
net/ipv4/udp.c | 18 +-
net/ipv6/addrconf.c | 165 +-
net/ipv6/addrconf_core.c | 50 +
net/ipv6/addrlabel.c | 48 +-
net/ipv6/af_inet6.c | 15 +
net/ipv6/ah6.c | 2 +-
net/ipv6/datagram.c | 2 +-
net/ipv6/esp6.c | 2 +-
net/ipv6/fib6_rules.c | 37 +-
net/ipv6/icmp.c | 12 +-
net/ipv6/ip6_fib.c | 16 +-
net/ipv6/ip6_gre.c | 14 +-
net/ipv6/ip6_input.c | 6 +-
net/ipv6/ip6_offload.c | 4 +-
net/ipv6/ip6_output.c | 25 -
net/ipv6/ip6_tunnel.c | 46 +-
net/ipv6/ip6mr.c | 14 +-
net/ipv6/ipcomp6.c | 2 +-
net/ipv6/mcast.c | 289 +-
net/ipv6/ndisc.c | 45 +-
net/ipv6/netfilter/Kconfig | 13 +
net/ipv6/netfilter/Makefile | 3 +-
net/ipv6/netfilter/ip6t_MASQUERADE.c | 2 +-
net/ipv6/netfilter/ip6t_REJECT.c | 20 +-
net/ipv6/netfilter/ip6t_SYNPROXY.c | 499 ++
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 7 +-
net/ipv6/output_core.c | 48 +
net/ipv6/proc.c | 4 +
net/ipv6/raw.c | 9 +-
net/ipv6/route.c | 105 +-
net/ipv6/sit.c | 15 +-
net/ipv6/syncookies.c | 25 +-
net/ipv6/tcp_ipv6.c | 15 +-
net/ipv6/udp_offload.c | 105 +-
net/ipx/ipx_proc.c | 2 +-
net/irda/irttp.c | 50 +-
net/key/af_key.c | 14 +-
net/llc/af_llc.c | 6 +-
net/llc/llc_conn.c | 6 +-
net/llc/llc_proc.c | 2 +-
net/llc/llc_sap.c | 4 +-
net/mac80211/cfg.c | 247 +-
net/mac80211/chan.c | 58 +
net/mac80211/debugfs_sta.c | 9 +
net/mac80211/driver-ops.h | 13 +
net/mac80211/ht.c | 53 +-
net/mac80211/ibss.c | 356 +-
net/mac80211/ieee80211_i.h | 70 +-
net/mac80211/iface.c | 30 +-
net/mac80211/key.c | 154 +-
net/mac80211/led.c | 19 +-
net/mac80211/led.h | 4 +-
net/mac80211/main.c | 18 +-
net/mac80211/mesh.c | 10 +-
net/mac80211/mesh_plink.c | 2 +-
net/mac80211/mlme.c | 118 +-
net/mac80211/rate.c | 69 +-
net/mac80211/rate.h | 22 +-
net/mac80211/rc80211_minstrel.c | 33 +-
net/mac80211/rc80211_minstrel_ht.c | 17 +-
net/mac80211/rc80211_pid_algo.c | 1 +
net/mac80211/rx.c | 504 +-
net/mac80211/scan.c | 72 +-
net/mac80211/status.c | 90 +-
net/mac80211/trace.h | 26 +
net/mac80211/tx.c | 122 +-
net/mac80211/util.c | 218 +-
net/netfilter/Kconfig | 26 +-
net/netfilter/Makefile | 6 +-
net/netfilter/core.c | 7 +-
net/netfilter/ipvs/ip_vs_lblcr.c | 8 +-
net/netfilter/ipvs/ip_vs_proto_sctp.c | 23 +-
net/netfilter/ipvs/ip_vs_sh.c | 6 +
net/netfilter/nf_conntrack_core.c | 89 +-
net/netfilter/nf_conntrack_labels.c | 4 -
net/netfilter/nf_conntrack_netlink.c | 384 +-
net/netfilter/nf_conntrack_proto.c | 4 +-
net/netfilter/nf_conntrack_proto_tcp.c | 36 +-
net/netfilter/nf_conntrack_seqadj.c | 238 +
net/netfilter/nf_nat_core.c | 22 +-
net/netfilter/nf_nat_helper.c | 230 +-
net/netfilter/nf_nat_proto_sctp.c | 8 +-
net/netfilter/nf_nat_sip.c | 3 +-
net/netfilter/nf_synproxy_core.c | 432 ++
net/netfilter/nf_tproxy_core.c | 62 -
net/netfilter/nfnetlink_queue_core.c | 11 +-
net/netfilter/nfnetlink_queue_ct.c | 23 +-
net/netfilter/xt_TCPMSS.c | 2 +-
net/netfilter/xt_TPROXY.c | 169 +-
net/netfilter/xt_addrtype.c | 2 +-
net/netfilter/xt_socket.c | 66 +-
net/netlink/af_netlink.c | 101 +-
net/netlink/af_netlink.h | 3 +-
net/nfc/core.c | 22 +-
net/nfc/hci/core.c | 2 +-
net/nfc/netlink.c | 95 +-
net/nfc/nfc.h | 5 +-
net/openvswitch/Kconfig | 14 +
net/openvswitch/Makefile | 9 +-
net/openvswitch/actions.c | 45 +-
net/openvswitch/datapath.c | 176 +-
net/openvswitch/datapath.h | 6 +
net/openvswitch/flow.c | 1486 ++++--
net/openvswitch/flow.h | 89 +-
net/openvswitch/vport-gre.c | 7 +-
net/openvswitch/vport-netdev.c | 20 +-
net/openvswitch/vport-vxlan.c | 204 +
net/openvswitch/vport.c | 6 +-
net/openvswitch/vport.h | 1 +
net/packet/af_packet.c | 65 +-
net/phonet/socket.c | 2 +-
net/rfkill/rfkill-regulator.c | 8 +-
net/sched/Kconfig | 14 +
net/sched/Makefile | 1 +
net/sched/sch_api.c | 53 +
net/sched/sch_fq.c | 793 +++
net/sched/sch_generic.c | 20 +-
net/sched/sch_mq.c | 2 +-
net/sched/sch_mqprio.c | 2 +-
net/sched/sch_netem.c | 5 +-
net/sctp/associola.c | 8 +-
net/sctp/auth.c | 8 +-
net/sctp/bind_addr.c | 8 +-
net/sctp/chunk.c | 12 +-
net/sctp/command.c | 8 +-
net/sctp/debug.c | 8 +-
net/sctp/endpointola.c | 8 +-
net/sctp/input.c | 18 +-
net/sctp/inqueue.c | 8 +-
net/sctp/ipv6.c | 10 +-
net/sctp/objcnt.c | 8 +-
net/sctp/output.c | 8 +-
net/sctp/outqueue.c | 8 +-
net/sctp/primitive.c | 8 +-
net/sctp/probe.c | 27 +-
net/sctp/proc.c | 12 +-
net/sctp/protocol.c | 10 +-
net/sctp/sm_make_chunk.c | 133 +-
net/sctp/sm_sideeffect.c | 8 +-
net/sctp/sm_statefuns.c | 8 +-
net/sctp/sm_statetable.c | 8 +-
net/sctp/socket.c | 8 +-
net/sctp/ssnmap.c | 8 +-
net/sctp/sysctl.c | 8 +-
net/sctp/transport.c | 8 +-
net/sctp/tsnmap.c | 8 +-
net/sctp/ulpevent.c | 8 +-
net/sctp/ulpqueue.c | 8 +-
net/sunrpc/svcsock.c | 2 +-
net/sunrpc/xprtsock.c | 2 +-
net/unix/af_unix.c | 70 +-
net/vmw_vsock/af_vsock.c | 3 +-
net/vmw_vsock/vmci_transport.c | 2 +-
net/vmw_vsock/vmci_transport.h | 4 +-
net/vmw_vsock/vsock_addr.c | 3 +-
net/wireless/core.c | 9 +
net/wireless/core.h | 2 +
net/wireless/mesh.c | 5 +-
net/wireless/mlme.c | 4 +-
net/wireless/nl80211.c | 560 +-
net/wireless/nl80211.h | 4 +-
net/wireless/rdev-ops.h | 17 +-
net/wireless/scan.c | 35 +-
net/wireless/trace.h | 53 +-
net/wireless/util.c | 14 +-
net/x25/x25_facilities.c | 4 +
net/xfrm/xfrm_policy.c | 12 +-
net/xfrm/xfrm_state.c | 15 +-
security/selinux/include/xfrm.h | 7 +-
1021 files changed, 56787 insertions(+), 23977 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/micrel-ksz9021.txt
create mode 100644 Documentation/devicetree/bindings/net/moxa,moxart-mac.txt
create mode 100644 Documentation/networking/netdev-FAQ.txt
create mode 100644 drivers/net/ethernet/cisco/enic/enic_api.c
create mode 100644 drivers/net/ethernet/cisco/enic/enic_api.h
create mode 100644 drivers/net/ethernet/cisco/enic/enic_ethtool.c
create mode 100644 drivers/net/ethernet/moxa/Kconfig
create mode 100644 drivers/net/ethernet/moxa/Makefile
create mode 100644 drivers/net/ethernet/moxa/moxart_ether.c
create mode 100644 drivers/net/ethernet/moxa/moxart_ether.h
create mode 100644 drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c
create mode 100644 drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h
create mode 100644 drivers/net/ethernet/sfc/ef10.c
create mode 100644 drivers/net/ethernet/sfc/ef10_regs.h
delete mode 100644 drivers/net/ethernet/sfc/falcon_xmac.c
create mode 100644 drivers/net/ethernet/sfc/farch.c
rename drivers/net/ethernet/sfc/{regs.h => farch_regs.h} (92%)
delete mode 100644 drivers/net/ethernet/sfc/filter.c
delete mode 100644 drivers/net/ethernet/sfc/mcdi_mac.c
rename drivers/net/ethernet/sfc/{mcdi_phy.c => mcdi_port.c} (73%)
delete mode 100644 drivers/net/ethernet/sfc/spi.h
rename {include/linux/platform_data => drivers/net/ethernet/ti}/cpsw.h (86%)
create mode 100644 drivers/net/usb/sr9700.c
create mode 100644 drivers/net/usb/sr9700.h
create mode 100644 drivers/net/wireless/iwlwifi/mvm/constants.h
create mode 100644 drivers/net/wireless/iwlwifi/mvm/power_legacy.c
rename {net/vmw_vsock => include/net}/af_vsock.h (100%)
create mode 100644 include/net/netfilter/nf_conntrack_seqadj.h
create mode 100644 include/net/netfilter/nf_conntrack_synproxy.h
delete mode 100644 include/net/netfilter/nf_tproxy_core.h
rename {net/vmw_vsock => include/net}/vsock_addr.h (100%)
create mode 100644 include/net/vxlan.h
create mode 100644 include/uapi/linux/libc-compat.h
rename include/{ => uapi}/linux/netfilter/xt_HMARK.h (100%)
create mode 100644 include/uapi/linux/netfilter/xt_SYNPROXY.h
rename include/{ => uapi}/linux/netfilter/xt_rpfilter.h (100%)
create mode 100644 net/ipv4/netfilter/ipt_SYNPROXY.c
create mode 100644 net/ipv6/netfilter/ip6t_SYNPROXY.c
create mode 100644 net/netfilter/nf_conntrack_seqadj.c
create mode 100644 net/netfilter/nf_synproxy_core.c
delete mode 100644 net/netfilter/nf_tproxy_core.c
create mode 100644 net/openvswitch/vport-vxlan.c
create mode 100644 net/sched/sch_fq.c
^ permalink raw reply
* Re: [PATCHv2] am33xx: cpsw: default to ethernet hwaddr from efuse if not defined in dt
From: Peter Korsgaard @ 2013-09-05 21:08 UTC (permalink / raw)
To: Olof Johansson
Cc: Matt Porter, Mark Jackson, Tony Lindgren, Mugunthan V N,
linux-omap, Network Development,
devicetree-discuss@lists.ozlabs.org, hvaibhav, Richard Cochran,
Kevin Hilman, michal.bachraty, michal.bachraty
In-Reply-To: <CAOesGMj7t4WAGtcE+PUau0OhANoGNdokCHpUoNF2t+hs+83iCg@mail.gmail.com>
>>>>> "Olof" == Olof Johansson <olof@lixom.net> writes:
>> Tested-by: Matt Porter <matt.porter@linaro.org>
>>
>> Kevin or Olof: can you apply? Seems to be continuing no response after
>> Ack back in January.
Olof> I have no idea what the patch is, it's no longer in the email. Can you
Olof> resend it, please?
Sure, one moment.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [PATCH net-next] tcp: fix no cwnd growth after timeout
From: Yuchung Cheng @ 2013-09-05 22:36 UTC (permalink / raw)
To: davem, ncardwell, edumazet; +Cc: netdev, Yuchung Cheng
In commit 0f7cc9a3 "tcp: increase throughput when reordering is high",
it only allows cwnd to increase in Open state. This mistakenly disables
slow start after timeout (CA_Loss). Moreover cwnd won't grow if the
state moves from Disorder to Open later in tcp_fastretrans_alert().
Therefore the correct logic should be to allow cwnd to grow as long
as the data is received in order in Open, Loss, or even Disorder state.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
---
net/ipv4/tcp_input.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 1969e16..894bc17 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3162,16 +3162,14 @@ static inline bool tcp_may_raise_cwnd(const struct sock *sk, const int flag)
/* If reordering is high then always grow cwnd whenever data is
* delivered regardless of its ordering. Otherwise stay conservative
- * and only grow cwnd on in-order delivery in Open state, and retain
- * cwnd in Disordered state (RFC5681). A stretched ACK with
+ * and only grow cwnd on in-order delivery (RFC5681). A stretched ACK w/
* new SACK or ECE mark may first advance cwnd here and later reduce
* cwnd in tcp_fastretrans_alert() based on more states.
*/
if (tcp_sk(sk)->reordering > sysctl_tcp_reordering)
return flag & FLAG_FORWARD_PROGRESS;
- return inet_csk(sk)->icsk_ca_state == TCP_CA_Open &&
- flag & FLAG_DATA_ACKED;
+ return flag & FLAG_DATA_ACKED;
}
/* Check that window update is acceptable.
--
1.8.4
^ permalink raw reply related
* Re: r8169 OOPSen in rtl_rx
From: Francois Romieu @ 2013-09-05 23:09 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: nic_swsd, netdev
In-Reply-To: <20130905152026.GB31370@twins.programming.kicks-ass.net>
Peter Zijlstra <peterz@infradead.org> :
[...]
> Yay, it triggered..
Bingo.
Can you display the whole descriptor entry (opts1 and opts2) and its
index (cur_rx) when abnormal packets are detected ?
We can always check the packet size but I'd welcome some more specific
pattern in the remaining bits of the descriptor.
Btw, you may try to revert aee77e4accbeb2c86b1d294cd84fec4a12dde3bd
("r8169: use unlimited DMA burst for TX") and see if it changes the
Rx / Tx balance. It would only be a bandaid though.
--
Ueimor
^ permalink raw reply
* Re: [E1000-devel] [net-next v4 7/8] i40e: sysfs and debugfs interfaces
From: John Fastabend @ 2013-09-05 23:38 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Nelson, Shannon, Kirsher, Jeffrey T,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Brandeburg, Jesse, gospo@redhat.com, davem@davemloft.net,
sassmann@redhat.com
In-Reply-To: <20130905113259.55ad2ad2@nehalam.linuxnetplumber.net>
On 9/5/2013 11:32 AM, Stephen Hemminger wrote:
[...]
>
> IMHO attributes are a nice way of handling the VSI attributes since they
> seem hardware specific. Not sure how to do the right thing with switching.
> Should it look like Macvlan, bridge, VXLAN, or something else.
I think if you add a new rtnl link type call it "VSI" then it looks very
similar to a macvlan which has been offloaded. Additionally you get all
the fdb and ndo ops that already exist for free.
I proposed something similar here,
http://comments.gmane.org/gmane.linux.network/237617
although as Ben pointed out I screwed up the implementation. I'll work
on updating this to submit when net-next opens again.
.John
^ permalink raw reply
* Re: [PATCH net-next] tcp: fix no cwnd growth after timeout
From: Neal Cardwell @ 2013-09-05 23:56 UTC (permalink / raw)
To: Yuchung Cheng; +Cc: David Miller, Eric Dumazet, Netdev
In-Reply-To: <1378420569-12370-1-git-send-email-ycheng@google.com>
On Thu, Sep 5, 2013 at 6:36 PM, Yuchung Cheng <ycheng@google.com> wrote:
> In commit 0f7cc9a3 "tcp: increase throughput when reordering is high",
> it only allows cwnd to increase in Open state. This mistakenly disables
> slow start after timeout (CA_Loss). Moreover cwnd won't grow if the
> state moves from Disorder to Open later in tcp_fastretrans_alert().
>
> Therefore the correct logic should be to allow cwnd to grow as long
> as the data is received in order in Open, Loss, or even Disorder state.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply
* [PATCH] net: stmmac: fix bad merge conflict resolution
From: Olof Johansson @ 2013-09-06 1:01 UTC (permalink / raw)
To: torvalds
Cc: davem, netdev, linux-kernel, linux-arm-kernel, akpm,
Olof Johansson
In-Reply-To: <20130905.163725.106795517693348522.davem@davemloft.net>
Merge commit 06c54055bebf919249aa1eb68312887c3cfe77b4 did a bad conflict
resolution accidentally leaving out a closing brace. Add it back.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
This breaks a handful of defconfigs on ARM, so it'd be good to see it
applied pretty quickly. Thanks!
-Olof
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 7a00720..51c9069 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -87,6 +87,7 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
if (plat->force_thresh_dma_mode) {
plat->force_sf_dma_mode = 0;
pr_warn("force_sf_dma_mode is ignored if force_thresh_dma_mode is set.");
+ }
return 0;
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH] cxgb4: remove workqueue when driver registration fails
From: Wei Yang @ 2013-09-06 1:32 UTC (permalink / raw)
To: dm, netdev; +Cc: davem, Wei Yang
When driver registration fails, we need to clean up the resources allocated
before. cxgb4 missed to destroy the workqueue allocated at the very beginning.
This patch destroies the workqueue when registration fails.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 5a3256b..1dde5a3 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -5868,8 +5868,11 @@ static int __init cxgb4_init_module(void)
pr_warn("could not create debugfs entry, continuing\n");
ret = pci_register_driver(&cxgb4_driver);
- if (ret < 0)
+ if (ret < 0) {
debugfs_remove(cxgb4_debugfs_root);
+ destroy_workqueue(workq);
+ }
return ret;
}
--
1.7.1
^ permalink raw reply related
* Re: [PATCH net-next v3 1/6] bonding: simplify and use RCU protection for 3ad xmit path
From: Ding Tianhong @ 2013-09-06 1:41 UTC (permalink / raw)
To: Veaceslav Falico
Cc: Jay Vosburgh, Andy Gospodarek, David S. Miller,
Nikolay Aleksandrov, Netdev
In-Reply-To: <20130905134258.GB26163@redhat.com>
On 2013/9/5 21:42, Veaceslav Falico wrote:
> On Thu, Sep 05, 2013 at 03:48:44PM +0800, Ding Tianhong wrote:
>> The commit 278b20837511776dc9d5f6ee1c7fabd5479838bb
>> (bonding: initial RCU conversion) has convert the roundrobin, active-backup,
>> broadcast and xor xmit path to rcu protection, the performance will be better
>> for these mode, so this time, convert xmit path for 3ad mode.
>>
>> Suggested-by: Nikolay Aleksandrov <nikolay@redhat.com>
>> Suggested-by: Veaceslav Falico <vfalico@redhat.com>
>> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
>> Signed-off-by: Wang Yufen <wangyufen@huawei.com>
>> Cc: Nikolay Aleksandrov <nikolay@redhat.com>
>> Cc: Veaceslav Falico <vfalico@redhat.com>
>> ---
>> drivers/net/bonding/bond_3ad.c | 32 ++++++++++++++------------------
>> drivers/net/bonding/bonding.h | 32 +++++++++++++++++++++++++++++++-
>> 2 files changed, 45 insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
>> index 0d8f427..13f1deb 100644
>> --- a/drivers/net/bonding/bond_3ad.c
>> +++ b/drivers/net/bonding/bond_3ad.c
>> @@ -143,7 +143,7 @@ static inline struct bonding *__get_bond_by_port(struct port *port)
>> */
>> static inline struct port *__get_first_port(struct bonding *bond)
>> {
>> - struct slave *first_slave = bond_first_slave(bond);
>> + struct slave *first_slave = bond_first_slave_rcu(bond);
>>
>> return first_slave ? &(SLAVE_AD_INFO(first_slave).port) : NULL;
>> }
>> @@ -163,7 +163,7 @@ static inline struct port *__get_next_port(struct port *port)
>> // If there's no bond for this port, or this is the last slave
>> if (bond == NULL)
>> return NULL;
>> - slave_next = bond_next_slave(bond, slave);
>> + slave_next = bond_next_slave_rcu(bond, slave);
>> if (!slave_next || bond_is_first_slave(bond, slave_next))
>> return NULL;
>>
>> @@ -2417,16 +2417,14 @@ int bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info)
>>
>> int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
>> {
>> - struct slave *slave, *start_at;
>> struct bonding *bond = netdev_priv(dev);
>> + struct slave *slave;
>> int slave_agg_no;
>> int slaves_in_agg;
>> int agg_id;
>> - int i;
>> struct ad_info ad_info;
>> int res = 1;
>>
>> - read_lock(&bond->lock);
>> if (__bond_3ad_get_active_agg_info(bond, &ad_info)) {
>> pr_debug("%s: Error: __bond_3ad_get_active_agg_info failed\n",
>> dev->name);
>> @@ -2444,13 +2442,17 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
>>
>> slave_agg_no = bond->xmit_hash_policy(skb, slaves_in_agg);
>>
>> - bond_for_each_slave(bond, slave) {
>> + bond_for_each_slave_rcu(bond, slave) {
>> struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator;
>>
>> if (agg && (agg->aggregator_identifier == agg_id)) {
>> - slave_agg_no--;
>> - if (slave_agg_no < 0)
>> - break;
>> + if (--slave_agg_no < 0) {
>> + if (SLAVE_IS_OK(slave)) {
>> + res = bond_dev_queue_xmit(bond,
>> + skb, slave->dev);
>> + goto out;
>> + }
>> + }
>> }
>> }
>>
>> @@ -2460,23 +2462,17 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
>> goto out;
>> }
>>
>> - start_at = slave;
>> -
>> - bond_for_each_slave_from(bond, slave, i, start_at) {
>> - int slave_agg_id = 0;
>> + bond_for_each_slave_rcu(bond, slave) {
>> struct aggregator *agg = SLAVE_AD_INFO(slave).port.aggregator;
>>
>> - if (agg)
>> - slave_agg_id = agg->aggregator_identifier;
>> -
>> - if (SLAVE_IS_OK(slave) && agg && (slave_agg_id == agg_id)) {
>> + if (SLAVE_IS_OK(slave) && agg &&
>> + agg->aggregator_identifier == agg_id) {
>> res = bond_dev_queue_xmit(bond, skb, slave->dev);
>> break;
>> }
>> }
>>
>> out:
>> - read_unlock(&bond->lock);
>> if (res) {
>> /* no suitable interface, frame not sent */
>> kfree_skb(skb);
>> diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
>> index f7ab161..f013b12 100644
>> --- a/drivers/net/bonding/bonding.h
>> +++ b/drivers/net/bonding/bonding.h
>> @@ -74,13 +74,34 @@
>> /* slave list primitives */
>> #define bond_to_slave(ptr) list_entry(ptr, struct slave, list)
>>
>> +/* slave list primitives, Caller must hold rcu_read_lock */
>> +#define bond_to_slave_rcu(ptr) list_entry_rcu(ptr, struct slave, list)
>> +
>> +/* bond_is_empty return NULL if slave list is empty*/
>> +#define bond_is_empty(bond) \
>> + (list_empty(&(bond)->slave_list))
>> +
>> +/* bond_is_empty_rcu return NULL if slave list is empty*/
>> +#define bond_is_empty_rcu(bond) \
>> + (!list_first_or_null_rcu(&(bond)->slave_list, struct slave, list))
>> +
>> /* IMPORTANT: bond_first/last_slave can return NULL in case of an empty list */
>> #define bond_first_slave(bond) \
>> list_first_entry_or_null(&(bond)->slave_list, struct slave, list)
>> #define bond_last_slave(bond) \
>> - (list_empty(&(bond)->slave_list) ? NULL : \
>> + (bond_is_empty(bond) ? NULL : \
>> bond_to_slave((bond)->slave_list.prev))
>>
>> +/**
>> + * IMPORTANT: bond_first/last_slave_rcu can return NULL in case of an empty list
>> + * Caller must hold rcu_read_lock
>> + */
>> +#define bond_first_slave_rcu(bond) \
>> + list_first_or_null_rcu(&(bond)->slave_list, struct slave, list)
>> +#define bond_last_slave_rcu(bond) \
>> + (bond_is_empty_rcu(bond) ? NULL : \
>> + bond_to_slave_rcu((bond)->slave_list.prev))
>
> Really?
>
> No. Again - take a look at list_first_or_null_rcu. And its comments.
>
> I'm sorry that I'm acting that negatively... But if that gets accepted -
> I'll have days of nightmares.
>
> Try to understand how RCU works, please, before sending patches using it.
>
After careful consideration and review the code, I find my problem and agree you,
thanks for your patient guidance, I will fix it as soon as possible.
>> +
>> #define bond_is_first_slave(bond, pos) ((pos)->list.prev == &(bond)->slave_list)
>> #define bond_is_last_slave(bond, pos) ((pos)->list.next == &(bond)->slave_list)
>>
>> @@ -93,6 +114,15 @@
>> (bond_is_first_slave(bond, pos) ? bond_last_slave(bond) : \
>> bond_to_slave((pos)->list.prev))
>>
>> +/* Since bond_first/last_slave_rcu can return NULL, these can return NULL too */
>> +#define bond_next_slave_rcu(bond, pos) \
>> + (bond_is_last_slave(bond, pos) ? bond_first_slave_rcu(bond) : \
>> + bond_to_slave_rcu((pos)->list.next))
>> +
>> +#define bond_prev_slave_rcu(bond, pos) \
>> + (bond_is_first_slave(bond, pos) ? bond_last_slave_rcu(bond) : \
>> + bond_to_slave_rcu((pos)->list.prev))
>> +
>> /**
>> * bond_for_each_slave_from - iterate the slaves list from a starting point
>> * @bond: the bond holding this list.
>> --
>> 1.8.2.1
>>
>>
>>
>
> .
>
^ permalink raw reply
* Re: Intel igb module command line configuration in kernel sources
From: Andrew Davidoff @ 2013-09-06 2:31 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev
In-Reply-To: <1378391039.3159.1.camel@bwh-desktop.uk.level5networks.com>
On Thu, Sep 5, 2013 at 10:23 AM, Ben Hutchings
<bhutchings@solarflare.com> wrote:
>
> I don't know what you're specifically interested in, but a lot of this
> should be configurable using ethtool.
>
> Module parameters for device-specific settings are deprecated.
Hi Ben,
Thank you for your reply. I am specifically talking about RSS (receive
side scaling). I got word from the e1000-devel list (sorry I didn't
see it first) that, if I understood correctly, indicates ethtool
cannot yet handle RSS for igb, but that it's being worked on.
Thanks again.
Andy
>
> Ben.
>
> --
> Ben Hutchings, Staff Engineer, Solarflare
> Not speaking for my employer; that's the marketing department's job.
> They asked us to note that Solarflare product names are trademarked.
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [RFC Patch net-next] ipv6: do not allow ipv6 module to be removed
From: Cong Wang @ 2013-09-06 2:52 UTC (permalink / raw)
To: David Miller; +Cc: netdev, yoshfuji, stephen
In-Reply-To: <20130905.140604.2263717213507575570.davem@davemloft.net>
On Thu, 2013-09-05 at 14:06 -0400, David Miller wrote:
> From: Cong Wang <amwang@redhat.com>
> Date: Wed, 4 Sep 2013 17:12:50 +0800
>
> > There was some bug report on ipv6 module removal path before.
> > Also, as Stephen pointed out, after vxlan module gets ipv6 support,
> > the ipv6 stub it used is not safe against this module removal either.
> > So, let's just remove inet6_exit() so that ipv6 module will not be
> > able to be unloaded.
> >
> > Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> > Cc: Stephen Hemminger <stephen@networkplumber.org>
> > Cc: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Cong Wang <amwang@redhat.com>
>
> I think we should make an effort to make ipv6 unloadable. If you
> believe little effort is being put into this now, even less will
> be expended if I apply a patch like this one.
>
> And this patch has a lot of problems, you aren't removing all of
> the functions which will be completely unused.
They are still used in the cleanup path of inet6_init() as well, can't
be removed completely.
Thanks!
^ permalink raw reply
* Re: [PATCH] net: stmmac: fix bad merge conflict resolution
From: David Miller @ 2013-09-06 2:58 UTC (permalink / raw)
To: olof; +Cc: torvalds, netdev, linux-kernel, linux-arm-kernel, akpm
In-Reply-To: <1378429301-19964-1-git-send-email-olof@lixom.net>
From: Olof Johansson <olof@lixom.net>
Date: Thu, 5 Sep 2013 18:01:41 -0700
> Merge commit 06c54055bebf919249aa1eb68312887c3cfe77b4 did a bad conflict
> resolution accidentally leaving out a closing brace. Add it back.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>
> This breaks a handful of defconfigs on ARM, so it'd be good to see it
> applied pretty quickly. Thanks!
Looks like Linus applied this, thanks Olof.
^ permalink raw reply
* Re: [RFC Patch net-next] ipv6: do not allow ipv6 module to be removed
From: David Miller @ 2013-09-06 2:58 UTC (permalink / raw)
To: amwang; +Cc: netdev, yoshfuji, stephen
In-Reply-To: <1378435971.969.6.camel@cr0>
From: Cong Wang <amwang@redhat.com>
Date: Fri, 06 Sep 2013 10:52:51 +0800
> On Thu, 2013-09-05 at 14:06 -0400, David Miller wrote:
>> And this patch has a lot of problems, you aren't removing all of
>> the functions which will be completely unused.
>
> They are still used in the cleanup path of inet6_init() as well, can't
> be removed completely.
Good point.
^ permalink raw reply
* RE: [E1000-devel] [net-next v4 7/8] i40e: sysfs and debugfs interfaces
From: Nelson, Shannon @ 2013-09-06 3:09 UTC (permalink / raw)
To: David Miller, Brandeburg, Jesse
Cc: stephen@networkplumber.org, Kirsher, Jeffrey T,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
gospo@redhat.com, sassmann@redhat.com
In-Reply-To: <20130905.003757.50136071703836331.davem@davemloft.net>
> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Wednesday, September 04, 2013 9:38 PM
> To: Brandeburg, Jesse
> Cc: Nelson, Shannon; stephen@networkplumber.org; Kirsher, Jeffrey T;
> e1000-devel@lists.sourceforge.net; netdev@vger.kernel.org;
> gospo@redhat.com; sassmann@redhat.com
> Subject: Re: [E1000-devel] [net-next v4 7/8] i40e: sysfs and debugfs
> interfaces
>
> From: "Brandeburg, Jesse" <jesse.brandeburg@intel.com>
> Date: Thu, 5 Sep 2013 04:08:39 +0000
>
> > On Wed, 2013-09-04 at 23:19 -0400, David Miller wrote:
> >> You will fix the problems people are reporting with this patch series
> >> before I apply it.
> >
> > Okay, the quickest path to that might be to drop the sysfs patch for
> > now. If that is acceptable I will re-spin the patches tonight.
>
> You're just going to ask me to add the sysfs code later, just make
> the appropriate fixes.
>
> Thanks.
After some discussion with Stephen and a few others internally, it doesn't look like there's any easy resolution to the i40e sysfs problems so for now we're going to leave that module out of our submission. Yes, we may want to bring it back in the future, but not until we've had a chance to work through the fundamental problems and come up with an interface that will be more generic, usable, and acceptable by other similar drivers.
Thanks,
sln
^ permalink raw reply
* Re: [PATCH] net: stmmac: fix bad merge conflict resolution
From: Stephen Rothwell @ 2013-09-06 4:19 UTC (permalink / raw)
To: David Miller; +Cc: olof, torvalds, netdev, linux-kernel, linux-arm-kernel, akpm
In-Reply-To: <20130905.225817.700066425182547791.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Hi all,
On Thu, 05 Sep 2013 22:58:17 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
>
> From: Olof Johansson <olof@lixom.net>
> Date: Thu, 5 Sep 2013 18:01:41 -0700
>
> > Merge commit 06c54055bebf919249aa1eb68312887c3cfe77b4 did a bad conflict
> > resolution accidentally leaving out a closing brace. Add it back.
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> > ---
> >
> > This breaks a handful of defconfigs on ARM, so it'd be good to see it
> > applied pretty quickly. Thanks!
>
> Looks like Linus applied this, thanks Olof.
And I cherry-picked it into linux-next for today.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: bnx2x: VF RSS support
From: Eric Dumazet @ 2013-09-06 4:21 UTC (permalink / raw)
To: David Miller; +Cc: ariele, netdev, eilong
In-Reply-To: <20130905.124540.1074524380635734466.davem@davemloft.net>
On Thu, 2013-09-05 at 12:45 -0400, David Miller wrote:
> From: "Ariel Elior" <ariele@broadcom.com>
> Date: Wed, 4 Sep 2013 14:09:20 +0300
>
> > This patch series adds the capability for VF functions to use multiple queues
> > and Receive / Transmit side scaling.
> >
> > Patch #1 enhances the PF's side database to allow for multiple queues per PF
> > and configure the HW appropriately, and the PF side of the VF PF channel
> > message for configuring the RSS.
> >
> > Patch #2 adds to the VF side the ability to request multiple queues, and if
> > obtained to configure RSS for them over the VF PF channel.
>
> Series applied, thanks.
Hmmm
CC [M] drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.o
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c: In function 'bnx2x_rss':
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:2021:3: error: implicit declaration of function 'bnx2x_vfpf_config_rss' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[6]: *** [drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.o] Error 1
make[5]: *** [drivers/net/ethernet/broadcom/bnx2x] Error 2
make[4]: *** [drivers/net/ethernet/broadcom] Error 2
make[3]: *** [drivers/net/ethernet] Error 2
make[2]: *** [drivers/net] Error 2
make[1]: *** [drivers] Error 2
^ permalink raw reply
* Re: [PATCH] ethernet/arc/arc_emac: optimize the Tx/Tx-reclaim paths a bit
From: Vineet Gupta @ 2013-09-06 4:24 UTC (permalink / raw)
To: David Miller
Cc: netdev@vger.kernel.org, Alexey.Brodkin@synopsys.com,
romieu@fr.zoreil.com, linux-kernel@vger.kernel.org,
arc-linux-dev@synopsys.com
In-Reply-To: <20130905.142436.685399325201245026.davem@davemloft.net>
Hi David,
On 09/05/2013 11:54 PM, David Miller wrote:
> From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
> Date: Wed, 4 Sep 2013 18:33:11 +0530
>
>> This came out of staring at code due to recent performance fix.
>>
>> * TX BD reclaim can call netif_wake_queue() once, outside the loop if
>> one/more BDs were freed, NO need to do this each iteration.
>>
>> * TX need not look at next BD to stop the netif queue. It rather be done
>> in the next tx call, when it actually fails as the queue seldom gets
>> full but the check nevertheless needs to be done for each packet Tx.
>> Profiled this under heavy traffic (big tar file cp, LMBench betworking
>> tests) and saw not a single hit to that code.
>>
>> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> You should keep the check in the transmit queueing code as a BUG check,
> almost every driver has code of the form (using NIU as an example):
>
> if (niu_tx_avail(rp) <= (skb_shinfo(skb)->nr_frags + 1)) {
> netif_tx_stop_queue(txq);
> dev_err(np->device, "%s: BUG! Tx ring full when queue awake!\n", dev->name);
> rp->tx_errors++;
> return NETDEV_TX_BUSY;
> }
>
> and arc_emac should too.
>
> Otherwise queue management bugs are incredibly hard to diagnose.
>
> I'm not applying this patch.
The check is already there for current BD. What I removed was checking for next BD
too (please see below). IMHO this is useless since it will be done in next
iteration anyways. In my tests, the next check never got hit, so it was waste of
cycles.
static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
{
if (unlikely((le32_to_cpu(*info) & OWN_MASK) == FOR_EMAC)) {
netif_stop_queue(ndev);
return NETDEV_TX_BUSY;
}
...
*txbd_curr = (*txbd_curr + 1) % TX_BD_NUM;
- /* Get "info" of the next BD */
- info = &priv->txbd[*txbd_curr].info;
-
- /* Check if if Tx BD ring is full - next BD is still owned by EMAC */
- if (unlikely((le32_to_cpu(*info) & OWN_MASK) == FOR_EMAC))
- netif_stop_queue(ndev);
OTOH, I do see a slight stats update issue - if the queue is stopped (but pkt not
dropped) we are failing to increment tx_errors. But that would be a separate patch.
-Vineet
^ permalink raw reply
* Re: bnx2x: VF RSS support
From: Eric Dumazet @ 2013-09-06 4:26 UTC (permalink / raw)
To: David Miller; +Cc: ariele, netdev, eilong
In-Reply-To: <1378441293.31445.1.camel@edumazet-glaptop>
On Thu, 2013-09-05 at 21:21 -0700, Eric Dumazet wrote:
> On Thu, 2013-09-05 at 12:45 -0400, David Miller wrote:
> > From: "Ariel Elior" <ariele@broadcom.com>
> > Date: Wed, 4 Sep 2013 14:09:20 +0300
> >
> > > This patch series adds the capability for VF functions to use multiple queues
> > > and Receive / Transmit side scaling.
> > >
> > > Patch #1 enhances the PF's side database to allow for multiple queues per PF
> > > and configure the HW appropriately, and the PF side of the VF PF channel
> > > message for configuring the RSS.
> > >
> > > Patch #2 adds to the VF side the ability to request multiple queues, and if
> > > obtained to configure RSS for them over the VF PF channel.
> >
> > Series applied, thanks.
>
> Hmmm
>
> CC [M] drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.o
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c: In function 'bnx2x_rss':
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:2021:3: error: implicit declaration of function 'bnx2x_vfpf_config_rss' [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[6]: *** [drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.o] Error 1
> make[5]: *** [drivers/net/ethernet/broadcom/bnx2x] Error 2
> make[4]: *** [drivers/net/ethernet/broadcom] Error 2
> make[3]: *** [drivers/net/ethernet] Error 2
> make[2]: *** [drivers/net] Error 2
> make[1]: *** [drivers] Error 2
>
root@edumazet-glaptop:/usr/src/net-next# grep BNX2 .config
CONFIG_SCSI_BNX2_ISCSI=m
CONFIG_SCSI_BNX2X_FCOE=m
CONFIG_BNX2=m
CONFIG_BNX2X=m
# CONFIG_BNX2X_SRIOV is not set
^ permalink raw reply
* Re: [GLIBC Patch v2] inet: avoid redefinition of some structs in kernel
From: Carlos O'Donell @ 2013-09-06 4:52 UTC (permalink / raw)
To: Mike Frysinger
Cc: libc-alpha, Cong Wang, netdev, David S. Miller, Thomas Backlund,
YOSHIFUJI Hideaki
In-Reply-To: <201308260126.06626.vapier@gentoo.org>
On 08/26/2013 01:26 AM, Mike Frysinger wrote:
> On Thursday 15 August 2013 05:28:11 Cong Wang wrote:
>> From: Carlos O'Donell <carlos@redhat.com>
>>
>> - Synchronize linux's `include/uapi/linux/in6.h'
>> with glibc's `inet/netinet/in.h'.
>> - Synchronize glibc's `inet/netinet/in.h with linux's
>> `include/uapi/linux/in6.h'.
>> - Allow including the headers in either other.
>> - First header included defines the structures and macros.
>>
>> Notes:
>> - You want netinet/in.h to include bits/in.h as early as possible,
>> but it needs in_addr so define in_addr early.
>> - You want bits/in.h included as early as possible so you can use
>> the linux specific code to define __USE_KERNEL_DEFS based on
>> the _UAPI_* macro definition and use those to cull in.h.
>> - glibc was missing IPPROTO_MH, added here.
>
> can we get something better documented here in a central location ? having
> the names laid out in a git commit message and in a few leaf headers does not
> lend itself to being easily discoverable.
Care to suggest something?
Cheers,
Carlos.
^ permalink raw reply
* Re: [PATCH] ethernet/arc/arc_emac: optimize the Tx/Tx-reclaim paths a bit
From: David Miller @ 2013-09-06 5:03 UTC (permalink / raw)
To: Vineet.Gupta1; +Cc: netdev, Alexey.Brodkin, romieu, linux-kernel, arc-linux-dev
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075141D3B@IN01WEMBXA.internal.synopsys.com>
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Date: Fri, 6 Sep 2013 04:24:39 +0000
> On 09/05/2013 11:54 PM, David Miller wrote:
>> You should keep the check in the transmit queueing code as a BUG check,
>> almost every driver has code of the form (using NIU as an example):
...
>> Otherwise queue management bugs are incredibly hard to diagnose.
>>
>> I'm not applying this patch.
>
> The check is already there for current BD. What I removed was checking for next BD
> too (please see below). IMHO this is useless since it will be done in next
> iteration anyways. In my tests, the next check never got hit, so it was waste of
> cycles.
>
> static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
> {
> if (unlikely((le32_to_cpu(*info) & OWN_MASK) == FOR_EMAC)) {
> netif_stop_queue(ndev);
> return NETDEV_TX_BUSY;
> }
>
> ...
> *txbd_curr = (*txbd_curr + 1) % TX_BD_NUM;
>
> - /* Get "info" of the next BD */
> - info = &priv->txbd[*txbd_curr].info;
> -
> - /* Check if if Tx BD ring is full - next BD is still owned by EMAC */
> - if (unlikely((le32_to_cpu(*info) & OWN_MASK) == FOR_EMAC))
> - netif_stop_queue(ndev);
>
> OTOH, I do see a slight stats update issue - if the queue is stopped (but pkt not
> dropped) we are failing to increment tx_errors. But that would be a separate patch.
It is exactly the correct thing to do. The driver should _NEVER_
return NETDEV_TX_BUSY under normal circumstances. The queue should
always be stopped by the ->ndo_start_xmit() method when it fills the
queue.
Again, when ->ndo_start_xmit() is invoked, it should never see the
queue full. When that happens it is a bug.
You are deleting exactly the correct part of this function, what it is
doing right now is precisely the correct way to manage netif queue
state.
The only valid change you can make here is to make the:
if (unlikely((le32_to_cpu(*info) & OWN_MASK) == FOR_EMAC)) {
netif_stop_queue(ndev);
return NETDEV_TX_BUSY;
}
print out an error message and increment tx_errors.
^ permalink raw reply
* Re: [Patch net-next v2] net: sync some IP headers with glibc
From: Carlos O'Donell @ 2013-09-06 5:19 UTC (permalink / raw)
To: David Miller; +Cc: amwang, netdev, tmb, libc-alpha, yoshfuji
In-Reply-To: <20130904.131351.1326721513428082697.davem@davemloft.net>
On 09/04/2013 01:13 PM, David Miller wrote:
> From: Cong Wang <amwang@redhat.com>
> Date: Thu, 15 Aug 2013 17:28:10 +0800
>
>> Solution:
>> =========
>>
>> - Synchronize linux's `include/uapi/linux/in6.h'
>> with glibc's `inet/netinet/in.h'.
>> - Synchronize glibc's `inet/netinet/in.h with linux's
>> `include/uapi/linux/in6.h'.
>> - Allow including the headers in either other.
>> - First header included defines the structures and macros.
>
> Applied, thanks for being so patient. I want to spend the past few
> weeks making sure this is the right way to handle all of this and
> now I am confident that it is.
Pushed into 2.19.
If you compile glibc with old non-UAPI kernel headers then this code
never triggers and glibc continues to redefine the structures and we
have the same problem as always.
If you compile glibc with new UPAI kernel headers, but without the
kernel side patch, you fix the build issues only in one order of
inclusion i.e. linux header then glibc header. Thus previously your
application didn't compile, now it does, but without the kernel
side patch some of the constants glibc define may be missing. At that
point you need to file a bug against the kernel you are using and
request they add the missing constants (or add them yourself).
If you compile glibc with new UAPI kernel headers, and those headers
have the kernel side patch then everything works in any inclusion order
and the defined constants are the superset of those defined in both
implementations.
Note:
- It could have been possible with more added complexity to handle
the case where the kernel headers have not been patched. I deemed
that because the code never originally compiled that it was fine
to continue not compiling in that intermediate state and only support
the final state as a complete solution. Feel free to disagree.
commit 6c82a2f8d7c8e21e39237225c819f182ae438db3
Author: Carlos O'Donell <carlos@redhat.com>
Date: Fri Sep 6 01:02:30 2013 -0400
Coordinate IPv6 definitions for Linux and glibc
This change synchronizes the glibc headers with the Linux kernel
headers and arranges to coordinate the definition of structures
already defined the Linux kernel UAPI headers.
It is now safe to include glibc's netinet/in.h or Linux's linux/in6.h
in any order in a userspace application and you will get the same
ABI. The ABI is guaranteed by UAPI and glibc.
Cheers,
Carlos.
^ permalink raw reply
* [net-next 2/8] i40e: transmit, receive, and NAPI
From: Jeff Kirsher @ 2013-09-06 5:43 UTC (permalink / raw)
To: davem; +Cc: e1000-devel, netdev, Jesse Brandeburg, gospo, sassmann
In-Reply-To: <1378446228-13815-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
This patch contains the transmit, receive, and NAPI routines, as well
as ancillary routines.
This file is code that is (will be) shared between the VF and PF
drivers.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
CC: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
CC: e1000-devel@lists.sourceforge.net
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
v1: this is the initial submittal
v2: changes due to netdev feedback, including:
remove memory allocation error messages (stack does for us)
inherit enc_features
v3:
more tabs/spaces fixes
v4:
sparse fixes
indentation/whitespace fixes
__func__ removal
v5:
no parens around return
i40e_atr cleanup
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1817 +++++++++++++++++++++++++++
1 file changed, 1817 insertions(+)
create mode 100644 drivers/net/ethernet/intel/i40e/i40e_txrx.c
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
new file mode 100644
index 0000000..bb2fa5e
--- /dev/null
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -0,0 +1,1817 @@
+/*******************************************************************************
+ *
+ * Intel Ethernet Controller XL710 Family Linux Driver
+ * Copyright(c) 2013 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * The full GNU General Public License is included in this distribution in
+ * the file called "COPYING".
+ *
+ * Contact Information:
+ * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+ * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+ *
+ ******************************************************************************/
+
+#include "i40e.h"
+
+static inline __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
+ u32 td_tag)
+{
+ return cpu_to_le64(I40E_TX_DESC_DTYPE_DATA |
+ ((u64)td_cmd << I40E_TXD_QW1_CMD_SHIFT) |
+ ((u64)td_offset << I40E_TXD_QW1_OFFSET_SHIFT) |
+ ((u64)size << I40E_TXD_QW1_TX_BUF_SZ_SHIFT) |
+ ((u64)td_tag << I40E_TXD_QW1_L2TAG1_SHIFT));
+}
+
+/**
+ * i40e_program_fdir_filter - Program a Flow Director filter
+ * @fdir_input: Packet data that will be filter parameters
+ * @pf: The pf pointer
+ * @add: True for add/update, False for remove
+ **/
+i40e_status i40e_program_fdir_filter(struct i40e_fdir_data *fdir_data,
+ struct i40e_pf *pf, bool add)
+{
+ struct i40e_filter_program_desc *fdir_desc;
+ struct i40e_tx_buffer *tx_buf;
+ struct i40e_tx_desc *tx_desc;
+ struct i40e_ring *tx_ring;
+ struct i40e_vsi *vsi;
+ struct device *dev;
+ dma_addr_t dma;
+ u32 td_cmd = 0;
+ u16 i;
+
+ /* find existing FDIR VSI */
+ vsi = NULL;
+ for (i = 0; i < pf->hw.func_caps.num_vsis; i++)
+ if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR)
+ vsi = pf->vsi[i];
+ if (!vsi)
+ return I40E_ERR_CONFIG;
+
+ tx_ring = &vsi->tx_rings[0];
+ dev = tx_ring->dev;
+
+ dma = dma_map_single(dev, fdir_data->raw_packet,
+ I40E_FDIR_MAX_RAW_PACKET_LOOKUP, DMA_TO_DEVICE);
+ if (dma_mapping_error(dev, dma))
+ goto dma_fail;
+
+ /* grab the next descriptor */
+ fdir_desc = I40E_TX_FDIRDESC(tx_ring, tx_ring->next_to_use);
+ tx_buf = &tx_ring->tx_bi[tx_ring->next_to_use];
+ tx_ring->next_to_use++;
+ if (tx_ring->next_to_use == tx_ring->count)
+ tx_ring->next_to_use = 0;
+
+ fdir_desc->qindex_flex_ptype_vsi = cpu_to_le32((fdir_data->q_index
+ << I40E_TXD_FLTR_QW0_QINDEX_SHIFT)
+ & I40E_TXD_FLTR_QW0_QINDEX_MASK);
+
+ fdir_desc->qindex_flex_ptype_vsi |= cpu_to_le32((fdir_data->flex_off
+ << I40E_TXD_FLTR_QW0_FLEXOFF_SHIFT)
+ & I40E_TXD_FLTR_QW0_FLEXOFF_MASK);
+
+ fdir_desc->qindex_flex_ptype_vsi |= cpu_to_le32((fdir_data->pctype
+ << I40E_TXD_FLTR_QW0_PCTYPE_SHIFT)
+ & I40E_TXD_FLTR_QW0_PCTYPE_MASK);
+
+ /* Use LAN VSI Id if not programmed by user */
+ if (fdir_data->dest_vsi == 0)
+ fdir_desc->qindex_flex_ptype_vsi |=
+ cpu_to_le32((pf->vsi[pf->lan_vsi]->id)
+ << I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT);
+ else
+ fdir_desc->qindex_flex_ptype_vsi |=
+ cpu_to_le32((fdir_data->dest_vsi
+ << I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT)
+ & I40E_TXD_FLTR_QW0_DEST_VSI_MASK);
+
+ fdir_desc->dtype_cmd_cntindex =
+ cpu_to_le32(I40E_TX_DESC_DTYPE_FILTER_PROG);
+
+ if (add)
+ fdir_desc->dtype_cmd_cntindex |= cpu_to_le32(
+ I40E_FILTER_PROGRAM_DESC_PCMD_ADD_UPDATE
+ << I40E_TXD_FLTR_QW1_PCMD_SHIFT);
+ else
+ fdir_desc->dtype_cmd_cntindex |= cpu_to_le32(
+ I40E_FILTER_PROGRAM_DESC_PCMD_REMOVE
+ << I40E_TXD_FLTR_QW1_PCMD_SHIFT);
+
+ fdir_desc->dtype_cmd_cntindex |= cpu_to_le32((fdir_data->dest_ctl
+ << I40E_TXD_FLTR_QW1_DEST_SHIFT)
+ & I40E_TXD_FLTR_QW1_DEST_MASK);
+
+ fdir_desc->dtype_cmd_cntindex |= cpu_to_le32(
+ (fdir_data->fd_status << I40E_TXD_FLTR_QW1_FD_STATUS_SHIFT)
+ & I40E_TXD_FLTR_QW1_FD_STATUS_MASK);
+
+ if (fdir_data->cnt_index != 0) {
+ fdir_desc->dtype_cmd_cntindex |=
+ cpu_to_le32(I40E_TXD_FLTR_QW1_CNT_ENA_MASK);
+ fdir_desc->dtype_cmd_cntindex |=
+ cpu_to_le32((fdir_data->cnt_index
+ << I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT)
+ & I40E_TXD_FLTR_QW1_CNTINDEX_MASK);
+ }
+
+ fdir_desc->fd_id = cpu_to_le32(fdir_data->fd_id);
+
+ /* Now program a dummy descriptor */
+ tx_desc = I40E_TX_DESC(tx_ring, tx_ring->next_to_use);
+ tx_buf = &tx_ring->tx_bi[tx_ring->next_to_use];
+ tx_ring->next_to_use++;
+ if (tx_ring->next_to_use == tx_ring->count)
+ tx_ring->next_to_use = 0;
+
+ tx_desc->buffer_addr = cpu_to_le64(dma);
+ td_cmd = I40E_TX_DESC_CMD_EOP |
+ I40E_TX_DESC_CMD_RS |
+ I40E_TX_DESC_CMD_DUMMY;
+
+ tx_desc->cmd_type_offset_bsz =
+ build_ctob(td_cmd, 0, I40E_FDIR_MAX_RAW_PACKET_LOOKUP, 0);
+
+ /* Mark the data descriptor to be watched */
+ tx_buf->next_to_watch = tx_desc;
+
+ /* Force memory writes to complete before letting h/w
+ * know there are new descriptors to fetch. (Only
+ * applicable for weak-ordered memory model archs,
+ * such as IA-64).
+ */
+ wmb();
+
+ writel(tx_ring->next_to_use, tx_ring->tail);
+ return 0;
+
+dma_fail:
+ return -1;
+}
+
+/**
+ * i40e_fd_handle_status - check the Programming Status for FD
+ * @rx_ring: the Rx ring for this descriptor
+ * @qw: the descriptor data
+ * @prog_id: the id originally used for programming
+ *
+ * This is used to verify if the FD programming or invalidation
+ * requested by SW to the HW is successful or not and take actions accordingly.
+ **/
+static void i40e_fd_handle_status(struct i40e_ring *rx_ring, u32 qw, u8 prog_id)
+{
+ struct pci_dev *pdev = rx_ring->vsi->back->pdev;
+ u32 error;
+
+ error = (qw & I40E_RX_PROG_STATUS_DESC_QW1_ERROR_MASK) >>
+ I40E_RX_PROG_STATUS_DESC_QW1_ERROR_SHIFT;
+
+ /* for now just print the Status */
+ dev_info(&pdev->dev, "FD programming id %02x, Status %08x\n",
+ prog_id, error);
+}
+
+/**
+ * i40e_unmap_tx_resource - Release a Tx buffer
+ * @ring: the ring that owns the buffer
+ * @tx_buffer: the buffer to free
+ **/
+static inline void i40e_unmap_tx_resource(struct i40e_ring *ring,
+ struct i40e_tx_buffer *tx_buffer)
+{
+ if (tx_buffer->dma) {
+ if (tx_buffer->tx_flags & I40E_TX_FLAGS_MAPPED_AS_PAGE)
+ dma_unmap_page(ring->dev,
+ tx_buffer->dma,
+ tx_buffer->length,
+ DMA_TO_DEVICE);
+ else
+ dma_unmap_single(ring->dev,
+ tx_buffer->dma,
+ tx_buffer->length,
+ DMA_TO_DEVICE);
+ }
+ tx_buffer->dma = 0;
+ tx_buffer->time_stamp = 0;
+}
+
+/**
+ * i40e_clean_tx_ring - Free any empty Tx buffers
+ * @tx_ring: ring to be cleaned
+ **/
+void i40e_clean_tx_ring(struct i40e_ring *tx_ring)
+{
+ struct i40e_tx_buffer *tx_buffer;
+ unsigned long bi_size;
+ u16 i;
+
+ /* ring already cleared, nothing to do */
+ if (!tx_ring->tx_bi)
+ return;
+
+ /* Free all the Tx ring sk_buffs */
+ for (i = 0; i < tx_ring->count; i++) {
+ tx_buffer = &tx_ring->tx_bi[i];
+ i40e_unmap_tx_resource(tx_ring, tx_buffer);
+ if (tx_buffer->skb)
+ dev_kfree_skb_any(tx_buffer->skb);
+ tx_buffer->skb = NULL;
+ }
+
+ bi_size = sizeof(struct i40e_tx_buffer) * tx_ring->count;
+ memset(tx_ring->tx_bi, 0, bi_size);
+
+ /* Zero out the descriptor ring */
+ memset(tx_ring->desc, 0, tx_ring->size);
+
+ tx_ring->next_to_use = 0;
+ tx_ring->next_to_clean = 0;
+}
+
+/**
+ * i40e_free_tx_resources - Free Tx resources per queue
+ * @tx_ring: Tx descriptor ring for a specific queue
+ *
+ * Free all transmit software resources
+ **/
+void i40e_free_tx_resources(struct i40e_ring *tx_ring)
+{
+ i40e_clean_tx_ring(tx_ring);
+ kfree(tx_ring->tx_bi);
+ tx_ring->tx_bi = NULL;
+
+ if (tx_ring->desc) {
+ dma_free_coherent(tx_ring->dev, tx_ring->size,
+ tx_ring->desc, tx_ring->dma);
+ tx_ring->desc = NULL;
+ }
+}
+
+/**
+ * i40e_get_tx_pending - how many tx descriptors not processed
+ * @tx_ring: the ring of descriptors
+ *
+ * Since there is no access to the ring head register
+ * in XL710, we need to use our local copies
+ **/
+static u32 i40e_get_tx_pending(struct i40e_ring *ring)
+{
+ u32 ntu = ((ring->next_to_clean <= ring->next_to_use)
+ ? ring->next_to_use
+ : ring->next_to_use + ring->count);
+ return ntu - ring->next_to_clean;
+}
+
+/**
+ * i40e_check_tx_hang - Is there a hang in the Tx queue
+ * @tx_ring: the ring of descriptors
+ **/
+static bool i40e_check_tx_hang(struct i40e_ring *tx_ring)
+{
+ u32 tx_pending = i40e_get_tx_pending(tx_ring);
+ bool ret = false;
+
+ clear_check_for_tx_hang(tx_ring);
+
+ /* Check for a hung queue, but be thorough. This verifies
+ * that a transmit has been completed since the previous
+ * check AND there is at least one packet pending. The
+ * ARMED bit is set to indicate a potential hang. The
+ * bit is cleared if a pause frame is received to remove
+ * false hang detection due to PFC or 802.3x frames. By
+ * requiring this to fail twice we avoid races with
+ * PFC clearing the ARMED bit and conditions where we
+ * run the check_tx_hang logic with a transmit completion
+ * pending but without time to complete it yet.
+ */
+ if ((tx_ring->tx_stats.tx_done_old == tx_ring->tx_stats.packets) &&
+ tx_pending) {
+ /* make sure it is true for two checks in a row */
+ ret = test_and_set_bit(__I40E_HANG_CHECK_ARMED,
+ &tx_ring->state);
+ } else {
+ /* update completed stats and disarm the hang check */
+ tx_ring->tx_stats.tx_done_old = tx_ring->tx_stats.packets;
+ clear_bit(__I40E_HANG_CHECK_ARMED, &tx_ring->state);
+ }
+
+ return ret;
+}
+
+/**
+ * i40e_clean_tx_irq - Reclaim resources after transmit completes
+ * @tx_ring: tx ring to clean
+ * @budget: how many cleans we're allowed
+ *
+ * Returns true if there's any budget left (e.g. the clean is finished)
+ **/
+static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
+{
+ u16 i = tx_ring->next_to_clean;
+ struct i40e_tx_buffer *tx_buf;
+ struct i40e_tx_desc *tx_desc;
+ unsigned int total_packets = 0;
+ unsigned int total_bytes = 0;
+
+ tx_buf = &tx_ring->tx_bi[i];
+ tx_desc = I40E_TX_DESC(tx_ring, i);
+
+ for (; budget; budget--) {
+ struct i40e_tx_desc *eop_desc;
+
+ eop_desc = tx_buf->next_to_watch;
+
+ /* if next_to_watch is not set then there is no work pending */
+ if (!eop_desc)
+ break;
+
+ /* if the descriptor isn't done, no work yet to do */
+ if (!(eop_desc->cmd_type_offset_bsz &
+ cpu_to_le64(I40E_TX_DESC_DTYPE_DESC_DONE)))
+ break;
+
+ /* count the packet as being completed */
+ tx_ring->tx_stats.completed++;
+ tx_buf->next_to_watch = NULL;
+ tx_buf->time_stamp = 0;
+
+ /* set memory barrier before eop_desc is verified */
+ rmb();
+
+ do {
+ i40e_unmap_tx_resource(tx_ring, tx_buf);
+
+ /* clear dtype status */
+ tx_desc->cmd_type_offset_bsz &=
+ ~cpu_to_le64(I40E_TXD_QW1_DTYPE_MASK);
+
+ if (likely(tx_desc == eop_desc)) {
+ eop_desc = NULL;
+
+ dev_kfree_skb_any(tx_buf->skb);
+ tx_buf->skb = NULL;
+
+ total_bytes += tx_buf->bytecount;
+ total_packets += tx_buf->gso_segs;
+ }
+
+ tx_buf++;
+ tx_desc++;
+ i++;
+ if (unlikely(i == tx_ring->count)) {
+ i = 0;
+ tx_buf = tx_ring->tx_bi;
+ tx_desc = I40E_TX_DESC(tx_ring, 0);
+ }
+ } while (eop_desc);
+ }
+
+ tx_ring->next_to_clean = i;
+ tx_ring->tx_stats.bytes += total_bytes;
+ tx_ring->tx_stats.packets += total_packets;
+ tx_ring->q_vector->tx.total_bytes += total_bytes;
+ tx_ring->q_vector->tx.total_packets += total_packets;
+ if (check_for_tx_hang(tx_ring) && i40e_check_tx_hang(tx_ring)) {
+ /* schedule immediate reset if we believe we hung */
+ dev_info(tx_ring->dev, "Detected Tx Unit Hang\n"
+ " VSI <%d>\n"
+ " Tx Queue <%d>\n"
+ " next_to_use <%x>\n"
+ " next_to_clean <%x>\n",
+ tx_ring->vsi->seid,
+ tx_ring->queue_index,
+ tx_ring->next_to_use, i);
+ dev_info(tx_ring->dev, "tx_bi[next_to_clean]\n"
+ " time_stamp <%lx>\n"
+ " jiffies <%lx>\n",
+ tx_ring->tx_bi[i].time_stamp, jiffies);
+
+ netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
+
+ dev_info(tx_ring->dev,
+ "tx hang detected on queue %d, resetting adapter\n",
+ tx_ring->queue_index);
+
+ tx_ring->netdev->netdev_ops->ndo_tx_timeout(tx_ring->netdev);
+
+ /* the adapter is about to reset, no point in enabling stuff */
+ return true;
+ }
+
+#define TX_WAKE_THRESHOLD (DESC_NEEDED * 2)
+ if (unlikely(total_packets && netif_carrier_ok(tx_ring->netdev) &&
+ (I40E_DESC_UNUSED(tx_ring) >= TX_WAKE_THRESHOLD))) {
+ /* Make sure that anybody stopping the queue after this
+ * sees the new next_to_clean.
+ */
+ smp_mb();
+ if (__netif_subqueue_stopped(tx_ring->netdev,
+ tx_ring->queue_index) &&
+ !test_bit(__I40E_DOWN, &tx_ring->vsi->state)) {
+ netif_wake_subqueue(tx_ring->netdev,
+ tx_ring->queue_index);
+ ++tx_ring->tx_stats.restart_queue;
+ }
+ }
+
+ return budget > 0;
+}
+
+/**
+ * i40e_set_new_dynamic_itr - Find new ITR level
+ * @rc: structure containing ring performance data
+ *
+ * Stores a new ITR value based on packets and byte counts during
+ * the last interrupt. The advantage of per interrupt computation
+ * is faster updates and more accurate ITR for the current traffic
+ * pattern. Constants in this function were computed based on
+ * theoretical maximum wire speed and thresholds were set based on
+ * testing data as well as attempting to minimize response time
+ * while increasing bulk throughput.
+ **/
+static void i40e_set_new_dynamic_itr(struct i40e_ring_container *rc)
+{
+ enum i40e_latency_range new_latency_range = rc->latency_range;
+ u32 new_itr = rc->itr;
+ int bytes_per_int;
+
+ if (rc->total_packets == 0 || !rc->itr)
+ return;
+
+ /* simple throttlerate management
+ * 0-10MB/s lowest (100000 ints/s)
+ * 10-20MB/s low (20000 ints/s)
+ * 20-1249MB/s bulk (8000 ints/s)
+ */
+ bytes_per_int = rc->total_bytes / rc->itr;
+ switch (rc->itr) {
+ case I40E_LOWEST_LATENCY:
+ if (bytes_per_int > 10)
+ new_latency_range = I40E_LOW_LATENCY;
+ break;
+ case I40E_LOW_LATENCY:
+ if (bytes_per_int > 20)
+ new_latency_range = I40E_BULK_LATENCY;
+ else if (bytes_per_int <= 10)
+ new_latency_range = I40E_LOWEST_LATENCY;
+ break;
+ case I40E_BULK_LATENCY:
+ if (bytes_per_int <= 20)
+ rc->latency_range = I40E_LOW_LATENCY;
+ break;
+ }
+
+ switch (new_latency_range) {
+ case I40E_LOWEST_LATENCY:
+ new_itr = I40E_ITR_100K;
+ break;
+ case I40E_LOW_LATENCY:
+ new_itr = I40E_ITR_20K;
+ break;
+ case I40E_BULK_LATENCY:
+ new_itr = I40E_ITR_8K;
+ break;
+ default:
+ break;
+ }
+
+ if (new_itr != rc->itr) {
+ /* do an exponential smoothing */
+ new_itr = (10 * new_itr * rc->itr) /
+ ((9 * new_itr) + rc->itr);
+ rc->itr = new_itr & I40E_MAX_ITR;
+ }
+
+ rc->total_bytes = 0;
+ rc->total_packets = 0;
+}
+
+/**
+ * i40e_update_dynamic_itr - Adjust ITR based on bytes per int
+ * @q_vector: the vector to adjust
+ **/
+static void i40e_update_dynamic_itr(struct i40e_q_vector *q_vector)
+{
+ u16 vector = q_vector->vsi->base_vector + q_vector->v_idx;
+ struct i40e_hw *hw = &q_vector->vsi->back->hw;
+ u32 reg_addr;
+ u16 old_itr;
+
+ reg_addr = I40E_PFINT_ITRN(I40E_RX_ITR, vector - 1);
+ old_itr = q_vector->rx.itr;
+ i40e_set_new_dynamic_itr(&q_vector->rx);
+ if (old_itr != q_vector->rx.itr)
+ wr32(hw, reg_addr, q_vector->rx.itr);
+
+ reg_addr = I40E_PFINT_ITRN(I40E_TX_ITR, vector - 1);
+ old_itr = q_vector->tx.itr;
+ i40e_set_new_dynamic_itr(&q_vector->tx);
+ if (old_itr != q_vector->tx.itr)
+ wr32(hw, reg_addr, q_vector->tx.itr);
+
+ i40e_flush(hw);
+}
+
+/**
+ * i40e_clean_programming_status - clean the programming status descriptor
+ * @rx_ring: the rx ring that has this descriptor
+ * @rx_desc: the rx descriptor written back by HW
+ *
+ * Flow director should handle FD_FILTER_STATUS to check its filter programming
+ * status being successful or not and take actions accordingly. FCoE should
+ * handle its context/filter programming/invalidation status and take actions.
+ *
+ **/
+static void i40e_clean_programming_status(struct i40e_ring *rx_ring,
+ union i40e_rx_desc *rx_desc)
+{
+ u64 qw;
+ u8 id;
+
+ qw = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
+ id = (qw & I40E_RX_PROG_STATUS_DESC_QW1_PROGID_MASK) >>
+ I40E_RX_PROG_STATUS_DESC_QW1_PROGID_SHIFT;
+
+ if (id == I40E_RX_PROG_STATUS_DESC_FD_FILTER_STATUS)
+ i40e_fd_handle_status(rx_ring, qw, id);
+}
+
+/**
+ * i40e_setup_tx_descriptors - Allocate the Tx descriptors
+ * @tx_ring: the tx ring to set up
+ *
+ * Return 0 on success, negative on error
+ **/
+int i40e_setup_tx_descriptors(struct i40e_ring *tx_ring)
+{
+ struct device *dev = tx_ring->dev;
+ int bi_size;
+
+ if (!dev)
+ return -ENOMEM;
+
+ bi_size = sizeof(struct i40e_tx_buffer) * tx_ring->count;
+ tx_ring->tx_bi = kzalloc(bi_size, GFP_KERNEL);
+ if (!tx_ring->tx_bi)
+ goto err;
+
+ /* round up to nearest 4K */
+ tx_ring->size = tx_ring->count * sizeof(struct i40e_tx_desc);
+ tx_ring->size = ALIGN(tx_ring->size, 4096);
+ tx_ring->desc = dma_alloc_coherent(dev, tx_ring->size,
+ &tx_ring->dma, GFP_KERNEL);
+ if (!tx_ring->desc) {
+ dev_info(dev, "Unable to allocate memory for the Tx descriptor ring, size=%d\n",
+ tx_ring->size);
+ goto err;
+ }
+
+ tx_ring->next_to_use = 0;
+ tx_ring->next_to_clean = 0;
+ return 0;
+
+err:
+ kfree(tx_ring->tx_bi);
+ tx_ring->tx_bi = NULL;
+ return -ENOMEM;
+}
+
+/**
+ * i40e_clean_rx_ring - Free Rx buffers
+ * @rx_ring: ring to be cleaned
+ **/
+void i40e_clean_rx_ring(struct i40e_ring *rx_ring)
+{
+ struct device *dev = rx_ring->dev;
+ struct i40e_rx_buffer *rx_bi;
+ unsigned long bi_size;
+ u16 i;
+
+ /* ring already cleared, nothing to do */
+ if (!rx_ring->rx_bi)
+ return;
+
+ /* Free all the Rx ring sk_buffs */
+ for (i = 0; i < rx_ring->count; i++) {
+ rx_bi = &rx_ring->rx_bi[i];
+ if (rx_bi->dma) {
+ dma_unmap_single(dev,
+ rx_bi->dma,
+ rx_ring->rx_buf_len,
+ DMA_FROM_DEVICE);
+ rx_bi->dma = 0;
+ }
+ if (rx_bi->skb) {
+ dev_kfree_skb(rx_bi->skb);
+ rx_bi->skb = NULL;
+ }
+ if (rx_bi->page) {
+ if (rx_bi->page_dma) {
+ dma_unmap_page(dev,
+ rx_bi->page_dma,
+ PAGE_SIZE / 2,
+ DMA_FROM_DEVICE);
+ rx_bi->page_dma = 0;
+ }
+ __free_page(rx_bi->page);
+ rx_bi->page = NULL;
+ rx_bi->page_offset = 0;
+ }
+ }
+
+ bi_size = sizeof(struct i40e_rx_buffer) * rx_ring->count;
+ memset(rx_ring->rx_bi, 0, bi_size);
+
+ /* Zero out the descriptor ring */
+ memset(rx_ring->desc, 0, rx_ring->size);
+
+ rx_ring->next_to_clean = 0;
+ rx_ring->next_to_use = 0;
+}
+
+/**
+ * i40e_free_rx_resources - Free Rx resources
+ * @rx_ring: ring to clean the resources from
+ *
+ * Free all receive software resources
+ **/
+void i40e_free_rx_resources(struct i40e_ring *rx_ring)
+{
+ i40e_clean_rx_ring(rx_ring);
+ kfree(rx_ring->rx_bi);
+ rx_ring->rx_bi = NULL;
+
+ if (rx_ring->desc) {
+ dma_free_coherent(rx_ring->dev, rx_ring->size,
+ rx_ring->desc, rx_ring->dma);
+ rx_ring->desc = NULL;
+ }
+}
+
+/**
+ * i40e_setup_rx_descriptors - Allocate Rx descriptors
+ * @rx_ring: Rx descriptor ring (for a specific queue) to setup
+ *
+ * Returns 0 on success, negative on failure
+ **/
+int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring)
+{
+ struct device *dev = rx_ring->dev;
+ int bi_size;
+
+ bi_size = sizeof(struct i40e_rx_buffer) * rx_ring->count;
+ rx_ring->rx_bi = kzalloc(bi_size, GFP_KERNEL);
+ if (!rx_ring->rx_bi)
+ goto err;
+
+ /* Round up to nearest 4K */
+ rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
+ ? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
+ : rx_ring->count * sizeof(union i40e_32byte_rx_desc);
+ rx_ring->size = ALIGN(rx_ring->size, 4096);
+ rx_ring->desc = dma_alloc_coherent(dev, rx_ring->size,
+ &rx_ring->dma, GFP_KERNEL);
+
+ if (!rx_ring->desc) {
+ dev_info(dev, "Unable to allocate memory for the Rx descriptor ring, size=%d\n",
+ rx_ring->size);
+ goto err;
+ }
+
+ rx_ring->next_to_clean = 0;
+ rx_ring->next_to_use = 0;
+
+ return 0;
+err:
+ kfree(rx_ring->rx_bi);
+ rx_ring->rx_bi = NULL;
+ return -ENOMEM;
+}
+
+/**
+ * i40e_release_rx_desc - Store the new tail and head values
+ * @rx_ring: ring to bump
+ * @val: new head index
+ **/
+static inline void i40e_release_rx_desc(struct i40e_ring *rx_ring, u32 val)
+{
+ rx_ring->next_to_use = val;
+ /* Force memory writes to complete before letting h/w
+ * know there are new descriptors to fetch. (Only
+ * applicable for weak-ordered memory model archs,
+ * such as IA-64).
+ */
+ wmb();
+ writel(val, rx_ring->tail);
+}
+
+/**
+ * i40e_alloc_rx_buffers - Replace used receive buffers; packet split
+ * @rx_ring: ring to place buffers on
+ * @cleaned_count: number of buffers to replace
+ **/
+void i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count)
+{
+ u16 i = rx_ring->next_to_use;
+ union i40e_rx_desc *rx_desc;
+ struct i40e_rx_buffer *bi;
+ struct sk_buff *skb;
+
+ /* do nothing if no valid netdev defined */
+ if (!rx_ring->netdev || !cleaned_count)
+ return;
+
+ while (cleaned_count--) {
+ rx_desc = I40E_RX_DESC(rx_ring, i);
+ bi = &rx_ring->rx_bi[i];
+ skb = bi->skb;
+
+ if (!skb) {
+ skb = netdev_alloc_skb_ip_align(rx_ring->netdev,
+ rx_ring->rx_buf_len);
+ if (!skb) {
+ rx_ring->rx_stats.alloc_rx_buff_failed++;
+ goto no_buffers;
+ }
+ /* initialize queue mapping */
+ skb_record_rx_queue(skb, rx_ring->queue_index);
+ bi->skb = skb;
+ }
+
+ if (!bi->dma) {
+ bi->dma = dma_map_single(rx_ring->dev,
+ skb->data,
+ rx_ring->rx_buf_len,
+ DMA_FROM_DEVICE);
+ if (dma_mapping_error(rx_ring->dev, bi->dma)) {
+ rx_ring->rx_stats.alloc_rx_buff_failed++;
+ bi->dma = 0;
+ goto no_buffers;
+ }
+ }
+
+ if (ring_is_ps_enabled(rx_ring)) {
+ if (!bi->page) {
+ bi->page = alloc_page(GFP_ATOMIC);
+ if (!bi->page) {
+ rx_ring->rx_stats.alloc_rx_page_failed++;
+ goto no_buffers;
+ }
+ }
+
+ if (!bi->page_dma) {
+ /* use a half page if we're re-using */
+ bi->page_offset ^= PAGE_SIZE / 2;
+ bi->page_dma = dma_map_page(rx_ring->dev,
+ bi->page,
+ bi->page_offset,
+ PAGE_SIZE / 2,
+ DMA_FROM_DEVICE);
+ if (dma_mapping_error(rx_ring->dev,
+ bi->page_dma)) {
+ rx_ring->rx_stats.alloc_rx_page_failed++;
+ bi->page_dma = 0;
+ goto no_buffers;
+ }
+ }
+
+ /* Refresh the desc even if buffer_addrs didn't change
+ * because each write-back erases this info.
+ */
+ rx_desc->read.pkt_addr = cpu_to_le64(bi->page_dma);
+ rx_desc->read.hdr_addr = cpu_to_le64(bi->dma);
+ } else {
+ rx_desc->read.pkt_addr = cpu_to_le64(bi->dma);
+ rx_desc->read.hdr_addr = 0;
+ }
+ i++;
+ if (i == rx_ring->count)
+ i = 0;
+ }
+
+no_buffers:
+ if (rx_ring->next_to_use != i)
+ i40e_release_rx_desc(rx_ring, i);
+}
+
+/**
+ * i40e_receive_skb - Send a completed packet up the stack
+ * @rx_ring: rx ring in play
+ * @skb: packet to send up
+ * @vlan_tag: vlan tag for packet
+ **/
+static void i40e_receive_skb(struct i40e_ring *rx_ring,
+ struct sk_buff *skb, u16 vlan_tag)
+{
+ struct i40e_q_vector *q_vector = rx_ring->q_vector;
+ struct i40e_vsi *vsi = rx_ring->vsi;
+ u64 flags = vsi->back->flags;
+
+ if (vlan_tag & VLAN_VID_MASK)
+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
+
+ if (flags & I40E_FLAG_IN_NETPOLL)
+ netif_rx(skb);
+ else
+ napi_gro_receive(&q_vector->napi, skb);
+}
+
+/**
+ * i40e_rx_checksum - Indicate in skb if hw indicated a good cksum
+ * @vsi: the VSI we care about
+ * @skb: skb currently being received and modified
+ * @rx_status: status value of last descriptor in packet
+ * @rx_error: error value of last descriptor in packet
+ **/
+static inline void i40e_rx_checksum(struct i40e_vsi *vsi,
+ struct sk_buff *skb,
+ u32 rx_status,
+ u32 rx_error)
+{
+ skb->ip_summed = CHECKSUM_NONE;
+
+ /* Rx csum enabled and ip headers found? */
+ if (!(vsi->netdev->features & NETIF_F_RXCSUM &&
+ rx_status & (1 << I40E_RX_DESC_STATUS_L3L4P_SHIFT)))
+ return;
+
+ /* IP or L4 checksum error */
+ if (rx_error & ((1 << I40E_RX_DESC_ERROR_IPE_SHIFT) |
+ (1 << I40E_RX_DESC_ERROR_L4E_SHIFT))) {
+ vsi->back->hw_csum_rx_error++;
+ return;
+ }
+
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
+}
+
+/**
+ * i40e_rx_hash - returns the hash value from the Rx descriptor
+ * @ring: descriptor ring
+ * @rx_desc: specific descriptor
+ **/
+static inline u32 i40e_rx_hash(struct i40e_ring *ring,
+ union i40e_rx_desc *rx_desc)
+{
+ if (ring->netdev->features & NETIF_F_RXHASH) {
+ if ((le64_to_cpu(rx_desc->wb.qword1.status_error_len) >>
+ I40E_RX_DESC_STATUS_FLTSTAT_SHIFT) &
+ I40E_RX_DESC_FLTSTAT_RSS_HASH)
+ return le32_to_cpu(rx_desc->wb.qword0.hi_dword.rss);
+ }
+ return 0;
+}
+
+/**
+ * i40e_clean_rx_irq - Reclaim resources after receive completes
+ * @rx_ring: rx ring to clean
+ * @budget: how many cleans we're allowed
+ *
+ * Returns true if there's any budget left (e.g. the clean is finished)
+ **/
+static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
+{
+ unsigned int total_rx_bytes = 0, total_rx_packets = 0;
+ u16 rx_packet_len, rx_header_len, rx_sph, rx_hbo;
+ u16 cleaned_count = I40E_DESC_UNUSED(rx_ring);
+ const int current_node = numa_node_id();
+ struct i40e_vsi *vsi = rx_ring->vsi;
+ u16 i = rx_ring->next_to_clean;
+ union i40e_rx_desc *rx_desc;
+ u32 rx_error, rx_status;
+ u64 qword;
+
+ rx_desc = I40E_RX_DESC(rx_ring, i);
+ qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
+ rx_status = (qword & I40E_RXD_QW1_STATUS_MASK)
+ >> I40E_RXD_QW1_STATUS_SHIFT;
+
+ while (rx_status & (1 << I40E_RX_DESC_STATUS_DD_SHIFT)) {
+ union i40e_rx_desc *next_rxd;
+ struct i40e_rx_buffer *rx_bi;
+ struct sk_buff *skb;
+ u16 vlan_tag;
+ if (i40e_rx_is_programming_status(qword)) {
+ i40e_clean_programming_status(rx_ring, rx_desc);
+ I40E_RX_NEXT_DESC_PREFETCH(rx_ring, i, next_rxd);
+ goto next_desc;
+ }
+ rx_bi = &rx_ring->rx_bi[i];
+ skb = rx_bi->skb;
+ prefetch(skb->data);
+
+ rx_packet_len = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK)
+ >> I40E_RXD_QW1_LENGTH_PBUF_SHIFT;
+ rx_header_len = (qword & I40E_RXD_QW1_LENGTH_HBUF_MASK)
+ >> I40E_RXD_QW1_LENGTH_HBUF_SHIFT;
+ rx_sph = (qword & I40E_RXD_QW1_LENGTH_SPH_MASK)
+ >> I40E_RXD_QW1_LENGTH_SPH_SHIFT;
+
+ rx_error = (qword & I40E_RXD_QW1_ERROR_MASK)
+ >> I40E_RXD_QW1_ERROR_SHIFT;
+ rx_hbo = rx_error & (1 << I40E_RX_DESC_ERROR_HBO_SHIFT);
+ rx_error &= ~(1 << I40E_RX_DESC_ERROR_HBO_SHIFT);
+
+ rx_bi->skb = NULL;
+
+ /* This memory barrier is needed to keep us from reading
+ * any other fields out of the rx_desc until we know the
+ * STATUS_DD bit is set
+ */
+ rmb();
+
+ /* Get the header and possibly the whole packet
+ * If this is an skb from previous receive dma will be 0
+ */
+ if (rx_bi->dma) {
+ u16 len;
+
+ if (rx_hbo)
+ len = I40E_RX_HDR_SIZE;
+ else if (rx_sph)
+ len = rx_header_len;
+ else if (rx_packet_len)
+ len = rx_packet_len; /* 1buf/no split found */
+ else
+ len = rx_header_len; /* split always mode */
+
+ skb_put(skb, len);
+ dma_unmap_single(rx_ring->dev,
+ rx_bi->dma,
+ rx_ring->rx_buf_len,
+ DMA_FROM_DEVICE);
+ rx_bi->dma = 0;
+ }
+
+ /* Get the rest of the data if this was a header split */
+ if (ring_is_ps_enabled(rx_ring) && rx_packet_len) {
+
+ skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
+ rx_bi->page,
+ rx_bi->page_offset,
+ rx_packet_len);
+
+ skb->len += rx_packet_len;
+ skb->data_len += rx_packet_len;
+ skb->truesize += rx_packet_len;
+
+ if ((page_count(rx_bi->page) == 1) &&
+ (page_to_nid(rx_bi->page) == current_node))
+ get_page(rx_bi->page);
+ else
+ rx_bi->page = NULL;
+
+ dma_unmap_page(rx_ring->dev,
+ rx_bi->page_dma,
+ PAGE_SIZE / 2,
+ DMA_FROM_DEVICE);
+ rx_bi->page_dma = 0;
+ }
+ I40E_RX_NEXT_DESC_PREFETCH(rx_ring, i, next_rxd);
+
+ if (unlikely(
+ !(rx_status & (1 << I40E_RX_DESC_STATUS_EOF_SHIFT)))) {
+ struct i40e_rx_buffer *next_buffer;
+
+ next_buffer = &rx_ring->rx_bi[i];
+
+ if (ring_is_ps_enabled(rx_ring)) {
+ rx_bi->skb = next_buffer->skb;
+ rx_bi->dma = next_buffer->dma;
+ next_buffer->skb = skb;
+ next_buffer->dma = 0;
+ }
+ rx_ring->rx_stats.non_eop_descs++;
+ goto next_desc;
+ }
+
+ /* ERR_MASK will only have valid bits if EOP set */
+ if (unlikely(rx_error & (1 << I40E_RX_DESC_ERROR_RXE_SHIFT))) {
+ dev_kfree_skb_any(skb);
+ goto next_desc;
+ }
+
+ skb->rxhash = i40e_rx_hash(rx_ring, rx_desc);
+ i40e_rx_checksum(vsi, skb, rx_status, rx_error);
+
+ /* probably a little skewed due to removing CRC */
+ total_rx_bytes += skb->len;
+ total_rx_packets++;
+
+ skb->protocol = eth_type_trans(skb, rx_ring->netdev);
+ vlan_tag = rx_status & (1 << I40E_RX_DESC_STATUS_L2TAG1P_SHIFT)
+ ? le16_to_cpu(rx_desc->wb.qword0.lo_dword.l2tag1)
+ : 0;
+ i40e_receive_skb(rx_ring, skb, vlan_tag);
+
+ rx_ring->netdev->last_rx = jiffies;
+ budget--;
+next_desc:
+ rx_desc->wb.qword1.status_error_len = 0;
+ if (!budget)
+ break;
+
+ cleaned_count++;
+ /* return some buffers to hardware, one at a time is too slow */
+ if (cleaned_count >= I40E_RX_BUFFER_WRITE) {
+ i40e_alloc_rx_buffers(rx_ring, cleaned_count);
+ cleaned_count = 0;
+ }
+
+ /* use prefetched values */
+ rx_desc = next_rxd;
+ qword = le64_to_cpu(rx_desc->wb.qword1.status_error_len);
+ rx_status = (qword & I40E_RXD_QW1_STATUS_MASK)
+ >> I40E_RXD_QW1_STATUS_SHIFT;
+ }
+
+ rx_ring->next_to_clean = i;
+ rx_ring->rx_stats.packets += total_rx_packets;
+ rx_ring->rx_stats.bytes += total_rx_bytes;
+ rx_ring->q_vector->rx.total_packets += total_rx_packets;
+ rx_ring->q_vector->rx.total_bytes += total_rx_bytes;
+
+ if (cleaned_count)
+ i40e_alloc_rx_buffers(rx_ring, cleaned_count);
+
+ return budget > 0;
+}
+
+/**
+ * i40e_napi_poll - NAPI polling Rx/Tx cleanup routine
+ * @napi: napi struct with our devices info in it
+ * @budget: amount of work driver is allowed to do this pass, in packets
+ *
+ * This function will clean all queues associated with a q_vector.
+ *
+ * Returns the amount of work done
+ **/
+int i40e_napi_poll(struct napi_struct *napi, int budget)
+{
+ struct i40e_q_vector *q_vector =
+ container_of(napi, struct i40e_q_vector, napi);
+ struct i40e_vsi *vsi = q_vector->vsi;
+ bool clean_complete = true;
+ int budget_per_ring;
+ int i;
+
+ if (test_bit(__I40E_DOWN, &vsi->state)) {
+ napi_complete(napi);
+ return 0;
+ }
+
+ /* We attempt to distribute budget to each Rx queue fairly, but don't
+ * allow the budget to go below 1 because that would exit polling early.
+ * Since the actual Tx work is minimal, we can give the Tx a larger
+ * budget and be more aggressive about cleaning up the Tx descriptors.
+ */
+ budget_per_ring = max(budget/q_vector->num_ringpairs, 1);
+ for (i = 0; i < q_vector->num_ringpairs; i++) {
+ clean_complete &= i40e_clean_tx_irq(q_vector->tx.ring[i],
+ vsi->work_limit);
+ clean_complete &= i40e_clean_rx_irq(q_vector->rx.ring[i],
+ budget_per_ring);
+ }
+
+ /* If work not completed, return budget and polling will return */
+ if (!clean_complete)
+ return budget;
+
+ /* Work is done so exit the polling mode and re-enable the interrupt */
+ napi_complete(napi);
+ if (ITR_IS_DYNAMIC(vsi->rx_itr_setting) ||
+ ITR_IS_DYNAMIC(vsi->tx_itr_setting))
+ i40e_update_dynamic_itr(q_vector);
+
+ if (!test_bit(__I40E_DOWN, &vsi->state)) {
+ if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
+ i40e_irq_dynamic_enable(vsi,
+ q_vector->v_idx + vsi->base_vector);
+ } else {
+ struct i40e_hw *hw = &vsi->back->hw;
+ /* We re-enable the queue 0 cause, but
+ * don't worry about dynamic_enable
+ * because we left it on for the other
+ * possible interrupts during napi
+ */
+ u32 qval = rd32(hw, I40E_QINT_RQCTL(0));
+ qval |= I40E_QINT_RQCTL_CAUSE_ENA_MASK;
+ wr32(hw, I40E_QINT_RQCTL(0), qval);
+
+ qval = rd32(hw, I40E_QINT_TQCTL(0));
+ qval |= I40E_QINT_TQCTL_CAUSE_ENA_MASK;
+ wr32(hw, I40E_QINT_TQCTL(0), qval);
+ i40e_flush(hw);
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * i40e_atr - Add a Flow Director ATR filter
+ * @tx_ring: ring to add programming descriptor to
+ * @skb: send buffer
+ * @flags: send flags
+ * @protocol: wire protocol
+ **/
+static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
+ u32 flags, __be16 protocol)
+{
+ struct i40e_filter_program_desc *fdir_desc;
+ struct i40e_pf *pf = tx_ring->vsi->back;
+ union {
+ unsigned char *network;
+ struct iphdr *ipv4;
+ struct ipv6hdr *ipv6;
+ } hdr;
+ struct tcphdr *th;
+ unsigned int hlen;
+ u32 flex_ptype, dtype_cmd;
+
+ /* make sure ATR is enabled */
+ if (!(pf->flags & I40E_FLAG_FDIR_ATR_ENABLED))
+ return;
+
+ /* if sampling is disabled do nothing */
+ if (!tx_ring->atr_sample_rate)
+ return;
+
+ tx_ring->atr_count++;
+
+ /* snag network header to get L4 type and address */
+ hdr.network = skb_network_header(skb);
+
+ /* Currently only IPv4/IPv6 with TCP is supported */
+ if (protocol == htons(ETH_P_IP)) {
+ if (hdr.ipv4->protocol != IPPROTO_TCP)
+ return;
+
+ /* access ihl as a u8 to avoid unaligned access on ia64 */
+ hlen = (hdr.network[0] & 0x0F) << 2;
+ } else if (protocol == htons(ETH_P_IPV6)) {
+ if (hdr.ipv6->nexthdr != IPPROTO_TCP)
+ return;
+
+ hlen = sizeof(struct ipv6hdr);
+ } else {
+ return;
+ }
+
+ th = (struct tcphdr *)(hdr.network + hlen);
+
+ /* sample on all syn/fin packets or once every atr sample rate */
+ if (!th->fin && !th->syn && (tx_ring->atr_count < tx_ring->atr_sample_rate))
+ return;
+
+ tx_ring->atr_count = 0;
+
+ /* grab the next descriptor */
+ fdir_desc = I40E_TX_FDIRDESC(tx_ring, tx_ring->next_to_use);
+ tx_ring->next_to_use++;
+ if (tx_ring->next_to_use == tx_ring->count)
+ tx_ring->next_to_use = 0;
+
+ flex_ptype = (tx_ring->queue_index << I40E_TXD_FLTR_QW0_QINDEX_SHIFT) &
+ I40E_TXD_FLTR_QW0_QINDEX_MASK;
+ flex_ptype |= (protocol == htons(ETH_P_IP)) ?
+ (I40E_FILTER_PCTYPE_NONF_IPV4_TCP <<
+ I40E_TXD_FLTR_QW0_PCTYPE_SHIFT) :
+ (I40E_FILTER_PCTYPE_NONF_IPV6_TCP <<
+ I40E_TXD_FLTR_QW0_PCTYPE_SHIFT);
+
+ flex_ptype |= tx_ring->vsi->id << I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT;
+
+ dtype_cmd = I40E_TX_DESC_DTYPE_FILTER_PROG;
+
+ dtype_cmd |= th->fin ?
+ (I40E_FILTER_PROGRAM_DESC_PCMD_REMOVE <<
+ I40E_TXD_FLTR_QW1_PCMD_SHIFT) :
+ (I40E_FILTER_PROGRAM_DESC_PCMD_ADD_UPDATE <<
+ I40E_TXD_FLTR_QW1_PCMD_SHIFT);
+
+ dtype_cmd |= I40E_FILTER_PROGRAM_DESC_DEST_DIRECT_PACKET_QINDEX <<
+ I40E_TXD_FLTR_QW1_DEST_SHIFT;
+
+ dtype_cmd |= I40E_FILTER_PROGRAM_DESC_FD_STATUS_FD_ID <<
+ I40E_TXD_FLTR_QW1_FD_STATUS_SHIFT;
+
+ fdir_desc->qindex_flex_ptype_vsi = cpu_to_le32(flex_ptype);
+ fdir_desc->dtype_cmd_cntindex = cpu_to_le32(dtype_cmd);
+}
+
+#define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS)
+/**
+ * i40e_tx_prepare_vlan_flags - prepare generic TX VLAN tagging flags for HW
+ * @skb: send buffer
+ * @tx_ring: ring to send buffer on
+ * @flags: the tx flags to be set
+ *
+ * Checks the skb and set up correspondingly several generic transmit flags
+ * related to VLAN tagging for the HW, such as VLAN, DCB, etc.
+ *
+ * Returns error code indicate the frame should be dropped upon error and the
+ * otherwise returns 0 to indicate the flags has been set properly.
+ **/
+static int i40e_tx_prepare_vlan_flags(struct sk_buff *skb,
+ struct i40e_ring *tx_ring,
+ u32 *flags)
+{
+ __be16 protocol = skb->protocol;
+ u32 tx_flags = 0;
+
+ /* if we have a HW VLAN tag being added, default to the HW one */
+ if (vlan_tx_tag_present(skb)) {
+ tx_flags |= vlan_tx_tag_get(skb) << I40E_TX_FLAGS_VLAN_SHIFT;
+ tx_flags |= I40E_TX_FLAGS_HW_VLAN;
+ /* else if it is a SW VLAN, check the next protocol and store the tag */
+ } else if (protocol == __constant_htons(ETH_P_8021Q)) {
+ struct vlan_hdr *vhdr, _vhdr;
+ vhdr = skb_header_pointer(skb, ETH_HLEN, sizeof(_vhdr), &_vhdr);
+ if (!vhdr)
+ return -EINVAL;
+
+ protocol = vhdr->h_vlan_encapsulated_proto;
+ tx_flags |= ntohs(vhdr->h_vlan_TCI) << I40E_TX_FLAGS_VLAN_SHIFT;
+ tx_flags |= I40E_TX_FLAGS_SW_VLAN;
+ }
+
+ /* Insert 802.1p priority into VLAN header */
+ if ((tx_ring->vsi->back->flags & I40E_FLAG_DCB_ENABLED) &&
+ ((tx_flags & (I40E_TX_FLAGS_HW_VLAN | I40E_TX_FLAGS_SW_VLAN)) ||
+ (skb->priority != TC_PRIO_CONTROL))) {
+ tx_flags &= ~I40E_TX_FLAGS_VLAN_PRIO_MASK;
+ tx_flags |= (skb->priority & 0x7) <<
+ I40E_TX_FLAGS_VLAN_PRIO_SHIFT;
+ if (tx_flags & I40E_TX_FLAGS_SW_VLAN) {
+ struct vlan_ethhdr *vhdr;
+ if (skb_header_cloned(skb) &&
+ pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
+ return -ENOMEM;
+ vhdr = (struct vlan_ethhdr *)skb->data;
+ vhdr->h_vlan_TCI = htons(tx_flags >>
+ I40E_TX_FLAGS_VLAN_SHIFT);
+ } else {
+ tx_flags |= I40E_TX_FLAGS_HW_VLAN;
+ }
+ }
+ *flags = tx_flags;
+ return 0;
+}
+
+/**
+ * i40e_tx_csum - is checksum offload requested
+ * @tx_ring: ptr to the ring to send
+ * @skb: ptr to the skb we're sending
+ * @tx_flags: the collected send information
+ * @protocol: the send protocol
+ *
+ * Returns true if checksum offload is requested
+ **/
+static bool i40e_tx_csum(struct i40e_ring *tx_ring, struct sk_buff *skb,
+ u32 tx_flags, __be16 protocol)
+{
+ if ((skb->ip_summed != CHECKSUM_PARTIAL) &&
+ !(tx_flags & I40E_TX_FLAGS_TXSW)) {
+ if (!(tx_flags & I40E_TX_FLAGS_HW_VLAN))
+ return false;
+ }
+
+ return skb->ip_summed == CHECKSUM_PARTIAL;
+}
+
+/**
+ * i40e_tso - set up the tso context descriptor
+ * @tx_ring: ptr to the ring to send
+ * @skb: ptr to the skb we're sending
+ * @tx_flags: the collected send information
+ * @protocol: the send protocol
+ * @hdr_len: ptr to the size of the packet header
+ * @cd_tunneling: ptr to context descriptor bits
+ *
+ * Returns 0 if no TSO can happen, 1 if tso is going, or error
+ **/
+static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
+ u32 tx_flags, __be16 protocol, u8 *hdr_len,
+ u64 *cd_type_cmd_tso_mss, u32 *cd_tunneling)
+{
+ u32 cd_cmd, cd_tso_len, cd_mss;
+ struct tcphdr *tcph;
+ struct iphdr *iph;
+ u32 l4len;
+ int err;
+ struct ipv6hdr *ipv6h;
+
+ if (!skb_is_gso(skb))
+ return 0;
+
+ if (skb_header_cloned(skb)) {
+ err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
+ if (err)
+ return err;
+ }
+
+ if (protocol == __constant_htons(ETH_P_IP)) {
+ iph = skb->encapsulation ? inner_ip_hdr(skb) : ip_hdr(skb);
+ tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb);
+ iph->tot_len = 0;
+ iph->check = 0;
+ tcph->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr,
+ 0, IPPROTO_TCP, 0);
+ } else if (skb_is_gso_v6(skb)) {
+
+ ipv6h = skb->encapsulation ? inner_ipv6_hdr(skb)
+ : ipv6_hdr(skb);
+ tcph = skb->encapsulation ? inner_tcp_hdr(skb) : tcp_hdr(skb);
+ ipv6h->payload_len = 0;
+ tcph->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr,
+ 0, IPPROTO_TCP, 0);
+ }
+
+ l4len = skb->encapsulation ? inner_tcp_hdrlen(skb) : tcp_hdrlen(skb);
+ *hdr_len = (skb->encapsulation
+ ? (skb_inner_transport_header(skb) - skb->data)
+ : skb_transport_offset(skb)) + l4len;
+
+ /* find the field values */
+ cd_cmd = I40E_TX_CTX_DESC_TSO;
+ cd_tso_len = skb->len - *hdr_len;
+ cd_mss = skb_shinfo(skb)->gso_size;
+ *cd_type_cmd_tso_mss |= ((u64)cd_cmd << I40E_TXD_CTX_QW1_CMD_SHIFT)
+ | ((u64)cd_tso_len
+ << I40E_TXD_CTX_QW1_TSO_LEN_SHIFT)
+ | ((u64)cd_mss << I40E_TXD_CTX_QW1_MSS_SHIFT);
+ return 1;
+}
+
+/**
+ * i40e_tx_enable_csum - Enable Tx checksum offloads
+ * @skb: send buffer
+ * @tx_flags: Tx flags currently set
+ * @td_cmd: Tx descriptor command bits to set
+ * @td_offset: Tx descriptor header offsets to set
+ * @cd_tunneling: ptr to context desc bits
+ **/
+static void i40e_tx_enable_csum(struct sk_buff *skb, u32 tx_flags,
+ u32 *td_cmd, u32 *td_offset,
+ struct i40e_ring *tx_ring,
+ u32 *cd_tunneling)
+{
+ struct ipv6hdr *this_ipv6_hdr;
+ unsigned int this_tcp_hdrlen;
+ struct iphdr *this_ip_hdr;
+ u32 network_hdr_len;
+ u8 l4_hdr = 0;
+
+ if (skb->encapsulation) {
+ network_hdr_len = skb_inner_network_header_len(skb);
+ this_ip_hdr = inner_ip_hdr(skb);
+ this_ipv6_hdr = inner_ipv6_hdr(skb);
+ this_tcp_hdrlen = inner_tcp_hdrlen(skb);
+
+ if (tx_flags & I40E_TX_FLAGS_IPV4) {
+
+ if (tx_flags & I40E_TX_FLAGS_TSO) {
+ *cd_tunneling |= I40E_TX_CTX_EXT_IP_IPV4;
+ ip_hdr(skb)->check = 0;
+ } else {
+ *cd_tunneling |=
+ I40E_TX_CTX_EXT_IP_IPV4_NO_CSUM;
+ }
+ } else if (tx_flags & I40E_TX_FLAGS_IPV6) {
+ if (tx_flags & I40E_TX_FLAGS_TSO) {
+ *cd_tunneling |= I40E_TX_CTX_EXT_IP_IPV6;
+ ip_hdr(skb)->check = 0;
+ } else {
+ *cd_tunneling |=
+ I40E_TX_CTX_EXT_IP_IPV4_NO_CSUM;
+ }
+ }
+
+ /* Now set the ctx descriptor fields */
+ *cd_tunneling |= (skb_network_header_len(skb) >> 2) <<
+ I40E_TXD_CTX_QW0_EXT_IPLEN_SHIFT |
+ I40E_TXD_CTX_UDP_TUNNELING |
+ ((skb_inner_network_offset(skb) -
+ skb_transport_offset(skb)) >> 1) <<
+ I40E_TXD_CTX_QW0_NATLEN_SHIFT;
+
+ } else {
+ network_hdr_len = skb_network_header_len(skb);
+ this_ip_hdr = ip_hdr(skb);
+ this_ipv6_hdr = ipv6_hdr(skb);
+ this_tcp_hdrlen = tcp_hdrlen(skb);
+ }
+
+ /* Enable IP checksum offloads */
+ if (tx_flags & I40E_TX_FLAGS_IPV4) {
+ l4_hdr = this_ip_hdr->protocol;
+ /* the stack computes the IP header already, the only time we
+ * need the hardware to recompute it is in the case of TSO.
+ */
+ if (tx_flags & I40E_TX_FLAGS_TSO) {
+ *td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV4_CSUM;
+ this_ip_hdr->check = 0;
+ } else {
+ *td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV4;
+ }
+ /* Now set the td_offset for IP header length */
+ *td_offset = (network_hdr_len >> 2) <<
+ I40E_TX_DESC_LENGTH_IPLEN_SHIFT;
+ } else if (tx_flags & I40E_TX_FLAGS_IPV6) {
+ l4_hdr = this_ipv6_hdr->nexthdr;
+ *td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV6;
+ /* Now set the td_offset for IP header length */
+ *td_offset = (network_hdr_len >> 2) <<
+ I40E_TX_DESC_LENGTH_IPLEN_SHIFT;
+ }
+ /* words in MACLEN + dwords in IPLEN + dwords in L4Len */
+ *td_offset |= (skb_network_offset(skb) >> 1) <<
+ I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
+
+ /* Enable L4 checksum offloads */
+ switch (l4_hdr) {
+ case IPPROTO_TCP:
+ /* enable checksum offloads */
+ *td_cmd |= I40E_TX_DESC_CMD_L4T_EOFT_TCP;
+ *td_offset |= (this_tcp_hdrlen >> 2) <<
+ I40E_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
+ break;
+ case IPPROTO_SCTP:
+ /* enable SCTP checksum offload */
+ *td_cmd |= I40E_TX_DESC_CMD_L4T_EOFT_SCTP;
+ *td_offset |= (sizeof(struct sctphdr) >> 2) <<
+ I40E_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
+ break;
+ case IPPROTO_UDP:
+ /* enable UDP checksum offload */
+ *td_cmd |= I40E_TX_DESC_CMD_L4T_EOFT_UDP;
+ *td_offset |= (sizeof(struct udphdr) >> 2) <<
+ I40E_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * i40e_create_tx_ctx Build the Tx context descriptor
+ * @tx_ring: ring to create the descriptor on
+ * @cd_type_cmd_tso_mss: Quad Word 1
+ * @cd_tunneling: Quad Word 0 - bits 0-31
+ * @cd_l2tag2: Quad Word 0 - bits 32-63
+ **/
+static void i40e_create_tx_ctx(struct i40e_ring *tx_ring,
+ const u64 cd_type_cmd_tso_mss,
+ const u32 cd_tunneling, const u32 cd_l2tag2)
+{
+ struct i40e_tx_context_desc *context_desc;
+
+ if (!cd_type_cmd_tso_mss && !cd_tunneling && !cd_l2tag2)
+ return;
+
+ /* grab the next descriptor */
+ context_desc = I40E_TX_CTXTDESC(tx_ring, tx_ring->next_to_use);
+ tx_ring->next_to_use++;
+ if (tx_ring->next_to_use == tx_ring->count)
+ tx_ring->next_to_use = 0;
+
+ /* cpu_to_le32 and assign to struct fields */
+ context_desc->tunneling_params = cpu_to_le32(cd_tunneling);
+ context_desc->l2tag2 = cpu_to_le16(cd_l2tag2);
+ context_desc->type_cmd_tso_mss = cpu_to_le64(cd_type_cmd_tso_mss);
+}
+
+/**
+ * i40e_tx_map - Build the Tx descriptor
+ * @tx_ring: ring to send buffer on
+ * @skb: send buffer
+ * @first: first buffer info buffer to use
+ * @tx_flags: collected send information
+ * @hdr_len: size of the packet header
+ * @td_cmd: the command field in the descriptor
+ * @td_offset: offset for checksum or crc
+ **/
+static void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
+ struct i40e_tx_buffer *first, u32 tx_flags,
+ const u8 hdr_len, u32 td_cmd, u32 td_offset)
+{
+ struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[0];
+ unsigned int data_len = skb->data_len;
+ unsigned int size = skb_headlen(skb);
+ struct device *dev = tx_ring->dev;
+ u32 paylen = skb->len - hdr_len;
+ u16 i = tx_ring->next_to_use;
+ struct i40e_tx_buffer *tx_bi;
+ struct i40e_tx_desc *tx_desc;
+ u32 buf_offset = 0;
+ u32 td_tag = 0;
+ dma_addr_t dma;
+ u16 gso_segs;
+
+ dma = dma_map_single(dev, skb->data, size, DMA_TO_DEVICE);
+ if (dma_mapping_error(dev, dma))
+ goto dma_error;
+
+ if (tx_flags & I40E_TX_FLAGS_HW_VLAN) {
+ td_cmd |= I40E_TX_DESC_CMD_IL2TAG1;
+ td_tag = (tx_flags & I40E_TX_FLAGS_VLAN_MASK) >>
+ I40E_TX_FLAGS_VLAN_SHIFT;
+ }
+
+ tx_desc = I40E_TX_DESC(tx_ring, i);
+ for (;;) {
+ while (size > I40E_MAX_DATA_PER_TXD) {
+ tx_desc->buffer_addr = cpu_to_le64(dma + buf_offset);
+ tx_desc->cmd_type_offset_bsz =
+ build_ctob(td_cmd, td_offset,
+ I40E_MAX_DATA_PER_TXD, td_tag);
+
+ buf_offset += I40E_MAX_DATA_PER_TXD;
+ size -= I40E_MAX_DATA_PER_TXD;
+
+ tx_desc++;
+ i++;
+ if (i == tx_ring->count) {
+ tx_desc = I40E_TX_DESC(tx_ring, 0);
+ i = 0;
+ }
+ }
+
+ tx_bi = &tx_ring->tx_bi[i];
+ tx_bi->length = buf_offset + size;
+ tx_bi->tx_flags = tx_flags;
+ tx_bi->dma = dma;
+
+ tx_desc->buffer_addr = cpu_to_le64(dma + buf_offset);
+ tx_desc->cmd_type_offset_bsz = build_ctob(td_cmd, td_offset,
+ size, td_tag);
+
+ if (likely(!data_len))
+ break;
+
+ size = skb_frag_size(frag);
+ data_len -= size;
+ buf_offset = 0;
+ tx_flags |= I40E_TX_FLAGS_MAPPED_AS_PAGE;
+
+ dma = skb_frag_dma_map(dev, frag, 0, size, DMA_TO_DEVICE);
+ if (dma_mapping_error(dev, dma))
+ goto dma_error;
+
+ tx_desc++;
+ i++;
+ if (i == tx_ring->count) {
+ tx_desc = I40E_TX_DESC(tx_ring, 0);
+ i = 0;
+ }
+
+ frag++;
+ }
+
+ tx_desc->cmd_type_offset_bsz |=
+ cpu_to_le64((u64)I40E_TXD_CMD << I40E_TXD_QW1_CMD_SHIFT);
+
+ i++;
+ if (i == tx_ring->count)
+ i = 0;
+
+ tx_ring->next_to_use = i;
+
+ if (tx_flags & (I40E_TX_FLAGS_TSO | I40E_TX_FLAGS_FSO))
+ gso_segs = skb_shinfo(skb)->gso_segs;
+ else
+ gso_segs = 1;
+
+ /* multiply data chunks by size of headers */
+ tx_bi->bytecount = paylen + (gso_segs * hdr_len);
+ tx_bi->gso_segs = gso_segs;
+ tx_bi->skb = skb;
+
+ /* set the timestamp and next to watch values */
+ first->time_stamp = jiffies;
+ first->next_to_watch = tx_desc;
+
+ /* Force memory writes to complete before letting h/w
+ * know there are new descriptors to fetch. (Only
+ * applicable for weak-ordered memory model archs,
+ * such as IA-64).
+ */
+ wmb();
+
+ writel(i, tx_ring->tail);
+ return;
+
+dma_error:
+ dev_info(dev, "TX DMA map failed\n");
+
+ /* clear dma mappings for failed tx_bi map */
+ for (;;) {
+ tx_bi = &tx_ring->tx_bi[i];
+ i40e_unmap_tx_resource(tx_ring, tx_bi);
+ if (tx_bi == first)
+ break;
+ if (i == 0)
+ i = tx_ring->count;
+ i--;
+ }
+
+ dev_kfree_skb_any(skb);
+
+ tx_ring->next_to_use = i;
+}
+
+/**
+ * __i40e_maybe_stop_tx - 2nd level check for tx stop conditions
+ * @tx_ring: the ring to be checked
+ * @size: the size buffer we want to assure is available
+ *
+ * Returns -EBUSY if a stop is needed, else 0
+ **/
+static inline int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
+{
+ netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
+ smp_mb();
+
+ /* Check again in a case another CPU has just made room available. */
+ if (likely(I40E_DESC_UNUSED(tx_ring) < size))
+ return -EBUSY;
+
+ /* A reprieve! - use start_queue because it doesn't call schedule */
+ netif_start_subqueue(tx_ring->netdev, tx_ring->queue_index);
+ ++tx_ring->tx_stats.restart_queue;
+ return 0;
+}
+
+/**
+ * i40e_maybe_stop_tx - 1st level check for tx stop conditions
+ * @tx_ring: the ring to be checked
+ * @size: the size buffer we want to assure is available
+ *
+ * Returns 0 if stop is not needed
+ **/
+static int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
+{
+ if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
+ return 0;
+ return __i40e_maybe_stop_tx(tx_ring, size);
+}
+
+/**
+ * i40e_xmit_descriptor_count - calculate number of tx descriptors needed
+ * @skb: send buffer
+ * @tx_ring: ring to send buffer on
+ *
+ * Returns number of data descriptors needed for this skb. Returns 0 to indicate
+ * there is not enough descriptors available in this ring since we need at least
+ * one descriptor.
+ **/
+static int i40e_xmit_descriptor_count(struct sk_buff *skb,
+ struct i40e_ring *tx_ring)
+{
+#if PAGE_SIZE > I40E_MAX_DATA_PER_TXD
+ unsigned int f;
+#endif
+ int count = 0;
+
+ /* need: 1 descriptor per page * PAGE_SIZE/I40E_MAX_DATA_PER_TXD,
+ * + 1 desc for skb_head_len/I40E_MAX_DATA_PER_TXD,
+ * + 2 desc gap to keep tail from touching head,
+ * + 1 desc for context descriptor,
+ * otherwise try next time
+ */
+#if PAGE_SIZE > I40E_MAX_DATA_PER_TXD
+ for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
+ count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
+#else
+ count += skb_shinfo(skb)->nr_frags;
+#endif
+ count += TXD_USE_COUNT(skb_headlen(skb));
+ if (i40e_maybe_stop_tx(tx_ring, count + 3)) {
+ tx_ring->tx_stats.tx_busy++;
+ return 0;
+ }
+ return count;
+}
+
+/**
+ * i40e_xmit_frame_ring - Sends buffer on Tx ring
+ * @skb: send buffer
+ * @tx_ring: ring to send buffer on
+ *
+ * Returns NETDEV_TX_OK if sent, else an error code
+ **/
+static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
+ struct i40e_ring *tx_ring)
+{
+ u64 cd_type_cmd_tso_mss = I40E_TX_DESC_DTYPE_CONTEXT;
+ u32 cd_tunneling = 0, cd_l2tag2 = 0;
+ struct i40e_tx_buffer *first;
+ u32 td_offset = 0;
+ u32 tx_flags = 0;
+ __be16 protocol;
+ u32 td_cmd = 0;
+ u8 hdr_len = 0;
+ int tso;
+ if (0 == i40e_xmit_descriptor_count(skb, tx_ring))
+ return NETDEV_TX_BUSY;
+
+ /* prepare the xmit flags */
+ if (i40e_tx_prepare_vlan_flags(skb, tx_ring, &tx_flags))
+ goto out_drop;
+
+ /* obtain protocol of skb */
+ protocol = skb->protocol;
+
+ /* record the location of the first descriptor for this packet */
+ first = &tx_ring->tx_bi[tx_ring->next_to_use];
+
+ /* setup IPv4/IPv6 offloads */
+ if (protocol == __constant_htons(ETH_P_IP))
+ tx_flags |= I40E_TX_FLAGS_IPV4;
+ else if (protocol == __constant_htons(ETH_P_IPV6))
+ tx_flags |= I40E_TX_FLAGS_IPV6;
+
+ tso = i40e_tso(tx_ring, skb, tx_flags, protocol, &hdr_len,
+ &cd_type_cmd_tso_mss, &cd_tunneling);
+
+ if (tso < 0)
+ goto out_drop;
+ else if (tso)
+ tx_flags |= I40E_TX_FLAGS_TSO;
+
+ skb_tx_timestamp(skb);
+
+ /* Always offload the checksum, since it's in the data descriptor */
+ if (i40e_tx_csum(tx_ring, skb, tx_flags, protocol))
+ tx_flags |= I40E_TX_FLAGS_CSUM;
+
+ /* always enable offload insertion */
+ td_cmd |= I40E_TX_DESC_CMD_ICRC;
+
+ if (tx_flags & I40E_TX_FLAGS_CSUM)
+ i40e_tx_enable_csum(skb, tx_flags, &td_cmd, &td_offset,
+ tx_ring, &cd_tunneling);
+
+ i40e_create_tx_ctx(tx_ring, cd_type_cmd_tso_mss,
+ cd_tunneling, cd_l2tag2);
+
+ /* Add Flow Director ATR if it's enabled.
+ *
+ * NOTE: this must always be directly before the data descriptor.
+ */
+ i40e_atr(tx_ring, skb, tx_flags, protocol);
+
+ i40e_tx_map(tx_ring, skb, first, tx_flags, hdr_len,
+ td_cmd, td_offset);
+
+ i40e_maybe_stop_tx(tx_ring, DESC_NEEDED);
+
+ return NETDEV_TX_OK;
+
+out_drop:
+ dev_kfree_skb_any(skb);
+ return NETDEV_TX_OK;
+}
+
+/**
+ * i40e_lan_xmit_frame - Selects the correct VSI and Tx queue to send buffer
+ * @skb: send buffer
+ * @netdev: network interface device structure
+ *
+ * Returns NETDEV_TX_OK if sent, else an error code
+ **/
+netdev_tx_t i40e_lan_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_ring *tx_ring = &vsi->tx_rings[skb->queue_mapping];
+
+ /* hardware can't handle really short frames, hardware padding works
+ * beyond this point
+ */
+ if (unlikely(skb->len < I40E_MIN_TX_LEN)) {
+ if (skb_pad(skb, I40E_MIN_TX_LEN - skb->len))
+ return NETDEV_TX_OK;
+ skb->len = I40E_MIN_TX_LEN;
+ skb_set_tail_pointer(skb, I40E_MIN_TX_LEN);
+ }
+
+ return i40e_xmit_frame_ring(skb, tx_ring);
+}
--
1.8.3.1
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related
* [net-next 3/8] i40e: driver ethtool core
From: Jeff Kirsher @ 2013-09-06 5:43 UTC (permalink / raw)
To: davem; +Cc: e1000-devel, netdev, Jesse Brandeburg, gospo, sassmann
In-Reply-To: <1378446228-13815-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
This patch contains the ethtool interface and implementation.
The goal in this patch series is minimal functionality while not
including much in the way of "set support."
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
CC: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
CC: e1000-devel@lists.sourceforge.net
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
v1: this is the initial submittal
v2: changes due to first round of netdev feedback, including:
remove unimplemented ethtool skeleton functions
as per bwh, use better stats naming like tx-N
don't report stats we won't change
remove buggy static variable
don't force n_len
don't double buffer in get_drvinfo
use strlcpy
don't use hacks for old kernels
use some simplifying macros
use rtnl_link_stats64
report correct speeds
v3:
more tabs/spaces fixes
void function needs no return
variable i could be init'd in declaration
v4:
indentation/whitespace fixes
__func__ removal
use tcp flow spec for filter programming
v5:
snprintf
fix speed setting
const'ify
small bug fix for adding filters
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1452 ++++++++++++++++++++++++
1 file changed, 1452 insertions(+)
create mode 100644 drivers/net/ethernet/intel/i40e/i40e_ethtool.c
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
new file mode 100644
index 0000000..b730484
--- /dev/null
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -0,0 +1,1452 @@
+/*******************************************************************************
+ *
+ * Intel Ethernet Controller XL710 Family Linux Driver
+ * Copyright(c) 2013 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * The full GNU General Public License is included in this distribution in
+ * the file called "COPYING".
+ *
+ * Contact Information:
+ * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+ * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+ *
+ ******************************************************************************/
+
+/* ethtool support for i40e */
+
+#include "i40e.h"
+#include "i40e_diag.h"
+
+struct i40e_stats {
+ char stat_string[ETH_GSTRING_LEN];
+ int sizeof_stat;
+ int stat_offset;
+};
+
+#define I40E_STAT(_type, _name, _stat) { \
+ .stat_string = _name, \
+ .sizeof_stat = FIELD_SIZEOF(_type, _stat), \
+ .stat_offset = offsetof(_type, _stat) \
+}
+#define I40E_NETDEV_STAT(_net_stat) \
+ I40E_STAT(struct net_device_stats, #_net_stat, _net_stat)
+#define I40E_PF_STAT(_name, _stat) \
+ I40E_STAT(struct i40e_pf, _name, _stat)
+#define I40E_VSI_STAT(_name, _stat) \
+ I40E_STAT(struct i40e_vsi, _name, _stat)
+
+static const struct i40e_stats i40e_gstrings_net_stats[] = {
+ I40E_NETDEV_STAT(rx_packets),
+ I40E_NETDEV_STAT(tx_packets),
+ I40E_NETDEV_STAT(rx_bytes),
+ I40E_NETDEV_STAT(tx_bytes),
+ I40E_NETDEV_STAT(rx_errors),
+ I40E_NETDEV_STAT(tx_errors),
+ I40E_NETDEV_STAT(rx_dropped),
+ I40E_NETDEV_STAT(tx_dropped),
+ I40E_NETDEV_STAT(multicast),
+ I40E_NETDEV_STAT(collisions),
+ I40E_NETDEV_STAT(rx_length_errors),
+ I40E_NETDEV_STAT(rx_crc_errors),
+};
+
+/* These PF_STATs might look like duplicates of some NETDEV_STATs,
+ * but they are separate. This device supports Virtualization, and
+ * as such might have several netdevs supporting VMDq and FCoE going
+ * through a single port. The NETDEV_STATs are for individual netdevs
+ * seen at the top of the stack, and the PF_STATs are for the physical
+ * function at the bottom of the stack hosting those netdevs.
+ *
+ * The PF_STATs are appended to the netdev stats only when ethtool -S
+ * is queried on the base PF netdev, not on the VMDq or FCoE netdev.
+ */
+static struct i40e_stats i40e_gstrings_stats[] = {
+ I40E_PF_STAT("rx_bytes", stats.eth.rx_bytes),
+ I40E_PF_STAT("tx_bytes", stats.eth.tx_bytes),
+ I40E_PF_STAT("rx_errors", stats.eth.rx_errors),
+ I40E_PF_STAT("tx_errors", stats.eth.tx_errors),
+ I40E_PF_STAT("rx_dropped", stats.eth.rx_discards),
+ I40E_PF_STAT("tx_dropped", stats.eth.tx_discards),
+ I40E_PF_STAT("tx_dropped_link_down", stats.tx_dropped_link_down),
+ I40E_PF_STAT("crc_errors", stats.crc_errors),
+ I40E_PF_STAT("illegal_bytes", stats.illegal_bytes),
+ I40E_PF_STAT("mac_local_faults", stats.mac_local_faults),
+ I40E_PF_STAT("mac_remote_faults", stats.mac_remote_faults),
+ I40E_PF_STAT("rx_length_errors", stats.rx_length_errors),
+ I40E_PF_STAT("link_xon_rx", stats.link_xon_rx),
+ I40E_PF_STAT("link_xoff_rx", stats.link_xoff_rx),
+ I40E_PF_STAT("link_xon_tx", stats.link_xon_tx),
+ I40E_PF_STAT("link_xoff_tx", stats.link_xoff_tx),
+ I40E_PF_STAT("rx_size_64", stats.rx_size_64),
+ I40E_PF_STAT("rx_size_127", stats.rx_size_127),
+ I40E_PF_STAT("rx_size_255", stats.rx_size_255),
+ I40E_PF_STAT("rx_size_511", stats.rx_size_511),
+ I40E_PF_STAT("rx_size_1023", stats.rx_size_1023),
+ I40E_PF_STAT("rx_size_1522", stats.rx_size_1522),
+ I40E_PF_STAT("rx_size_big", stats.rx_size_big),
+ I40E_PF_STAT("tx_size_64", stats.tx_size_64),
+ I40E_PF_STAT("tx_size_127", stats.tx_size_127),
+ I40E_PF_STAT("tx_size_255", stats.tx_size_255),
+ I40E_PF_STAT("tx_size_511", stats.tx_size_511),
+ I40E_PF_STAT("tx_size_1023", stats.tx_size_1023),
+ I40E_PF_STAT("tx_size_1522", stats.tx_size_1522),
+ I40E_PF_STAT("tx_size_big", stats.tx_size_big),
+ I40E_PF_STAT("rx_undersize", stats.rx_undersize),
+ I40E_PF_STAT("rx_fragments", stats.rx_fragments),
+ I40E_PF_STAT("rx_oversize", stats.rx_oversize),
+ I40E_PF_STAT("rx_jabber", stats.rx_jabber),
+ I40E_PF_STAT("VF_admin_queue_requests", vf_aq_requests),
+};
+
+#define I40E_QUEUE_STATS_LEN(n) \
+ ((((struct i40e_netdev_priv *)netdev_priv((n)))->vsi->num_queue_pairs + \
+ ((struct i40e_netdev_priv *)netdev_priv((n)))->vsi->num_queue_pairs) * 2)
+#define I40E_GLOBAL_STATS_LEN ARRAY_SIZE(i40e_gstrings_stats)
+#define I40E_NETDEV_STATS_LEN ARRAY_SIZE(i40e_gstrings_net_stats)
+#define I40E_VSI_STATS_LEN(n) (I40E_NETDEV_STATS_LEN + \
+ I40E_QUEUE_STATS_LEN((n)))
+#define I40E_PFC_STATS_LEN ( \
+ (FIELD_SIZEOF(struct i40e_pf, stats.priority_xoff_rx) + \
+ FIELD_SIZEOF(struct i40e_pf, stats.priority_xon_rx) + \
+ FIELD_SIZEOF(struct i40e_pf, stats.priority_xoff_tx) + \
+ FIELD_SIZEOF(struct i40e_pf, stats.priority_xon_tx) + \
+ FIELD_SIZEOF(struct i40e_pf, stats.priority_xon_2_xoff)) \
+ / sizeof(u64))
+#define I40E_PF_STATS_LEN(n) (I40E_GLOBAL_STATS_LEN + \
+ I40E_PFC_STATS_LEN + \
+ I40E_VSI_STATS_LEN((n)))
+
+enum i40e_ethtool_test_id {
+ I40E_ETH_TEST_REG = 0,
+ I40E_ETH_TEST_EEPROM,
+ I40E_ETH_TEST_INTR,
+ I40E_ETH_TEST_LOOPBACK,
+ I40E_ETH_TEST_LINK,
+};
+
+static const char i40e_gstrings_test[][ETH_GSTRING_LEN] = {
+ "Register test (offline)",
+ "Eeprom test (offline)",
+ "Interrupt test (offline)",
+ "Loopback test (offline)",
+ "Link test (on/offline)"
+};
+
+#define I40E_TEST_LEN (sizeof(i40e_gstrings_test) / ETH_GSTRING_LEN)
+
+/**
+ * i40e_get_settings - Get Link Speed and Duplex settings
+ * @netdev: network interface device structure
+ * @ecmd: ethtool command
+ *
+ * Reports speed/duplex settings based on media_type
+ **/
+static int i40e_get_settings(struct net_device *netdev,
+ struct ethtool_cmd *ecmd)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+ struct i40e_hw *hw = &pf->hw;
+ struct i40e_link_status *hw_link_info = &hw->phy.link_info;
+ bool link_up = hw_link_info->link_info & I40E_AQ_LINK_UP;
+ u32 link_speed = hw_link_info->link_speed;
+
+ /* hardware is either in 40G mode or 10G mode
+ * NOTE: this section initializes supported and advertising
+ */
+ switch (hw_link_info->phy_type) {
+ case I40E_PHY_TYPE_40GBASE_CR4:
+ case I40E_PHY_TYPE_40GBASE_CR4_CU:
+ ecmd->supported = SUPPORTED_40000baseCR4_Full;
+ ecmd->advertising = ADVERTISED_40000baseCR4_Full;
+ break;
+ case I40E_PHY_TYPE_40GBASE_KR4:
+ ecmd->supported = SUPPORTED_40000baseKR4_Full;
+ ecmd->advertising = ADVERTISED_40000baseKR4_Full;
+ break;
+ case I40E_PHY_TYPE_40GBASE_SR4:
+ ecmd->supported = SUPPORTED_40000baseSR4_Full;
+ ecmd->advertising = ADVERTISED_40000baseSR4_Full;
+ break;
+ case I40E_PHY_TYPE_40GBASE_LR4:
+ ecmd->supported = SUPPORTED_40000baseLR4_Full;
+ ecmd->advertising = ADVERTISED_40000baseLR4_Full;
+ break;
+ case I40E_PHY_TYPE_10GBASE_KX4:
+ ecmd->supported = SUPPORTED_10000baseKX4_Full;
+ ecmd->advertising = ADVERTISED_10000baseKX4_Full;
+ break;
+ case I40E_PHY_TYPE_10GBASE_KR:
+ ecmd->supported = SUPPORTED_10000baseKR_Full;
+ ecmd->advertising = ADVERTISED_10000baseKR_Full;
+ break;
+ case I40E_PHY_TYPE_10GBASE_T:
+ default:
+ ecmd->supported = SUPPORTED_10000baseT_Full;
+ ecmd->advertising = ADVERTISED_10000baseT_Full;
+ break;
+ }
+
+ /* for now just say autoneg all the time */
+ ecmd->supported |= SUPPORTED_Autoneg;
+
+ if (hw->phy.media_type == I40E_MEDIA_TYPE_BACKPLANE) {
+ ecmd->supported |= SUPPORTED_Backplane;
+ ecmd->advertising |= ADVERTISED_Backplane;
+ ecmd->port = PORT_NONE;
+ } else if (hw->phy.media_type == I40E_MEDIA_TYPE_BASET) {
+ ecmd->supported |= SUPPORTED_TP;
+ ecmd->advertising |= ADVERTISED_TP;
+ ecmd->port = PORT_TP;
+ } else {
+ ecmd->supported |= SUPPORTED_FIBRE;
+ ecmd->advertising |= ADVERTISED_FIBRE;
+ ecmd->port = PORT_FIBRE;
+ }
+
+ ecmd->transceiver = XCVR_EXTERNAL;
+
+ if (link_up) {
+ switch (link_speed) {
+ case I40E_LINK_SPEED_40GB:
+ /* need a SPEED_40000 in ethtool.h */
+ ethtool_cmd_speed_set(ecmd, 40000);
+ break;
+ case I40E_LINK_SPEED_10GB:
+ ethtool_cmd_speed_set(ecmd, SPEED_10000);
+ break;
+ default:
+ break;
+ }
+ ecmd->duplex = DUPLEX_FULL;
+ } else {
+ ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN);
+ ecmd->duplex = DUPLEX_UNKNOWN;
+ }
+
+ return 0;
+}
+
+
+/**
+ * i40e_get_pauseparam - Get Flow Control status
+ * Return tx/rx-pause status
+ **/
+static void i40e_get_pauseparam(struct net_device *netdev,
+ struct ethtool_pauseparam *pause)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+ struct i40e_hw *hw = &pf->hw;
+ struct i40e_link_status *hw_link_info = &hw->phy.link_info;
+
+ pause->autoneg =
+ ((hw_link_info->an_info & I40E_AQ_AN_COMPLETED) ?
+ AUTONEG_ENABLE : AUTONEG_DISABLE);
+
+ pause->rx_pause = 0;
+ pause->tx_pause = 0;
+ if (hw_link_info->an_info & I40E_AQ_LINK_PAUSE_RX)
+ pause->rx_pause = 1;
+ if (hw_link_info->an_info & I40E_AQ_LINK_PAUSE_TX)
+ pause->tx_pause = 1;
+}
+
+static u32 i40e_get_msglevel(struct net_device *netdev)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+
+ return pf->msg_enable;
+}
+
+static void i40e_set_msglevel(struct net_device *netdev, u32 data)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+
+ if (I40E_DEBUG_USER & data)
+ pf->hw.debug_mask = data;
+ pf->msg_enable = data;
+}
+
+static int i40e_get_regs_len(struct net_device *netdev)
+{
+ int reg_count = 0;
+ int i;
+
+ for (i = 0; i40e_reg_list[i].offset != 0; i++)
+ reg_count += i40e_reg_list[i].elements;
+
+ return reg_count * sizeof(u32);
+}
+
+static void i40e_get_regs(struct net_device *netdev, struct ethtool_regs *regs,
+ void *p)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+ struct i40e_hw *hw = &pf->hw;
+ u32 *reg_buf = p;
+ int i, j, ri;
+ u32 reg;
+
+ /* Tell ethtool which driver-version-specific regs output we have.
+ *
+ * At some point, if we have ethtool doing special formatting of
+ * this data, it will rely on this version number to know how to
+ * interpret things. Hence, this needs to be updated if/when the
+ * diags register table is changed.
+ */
+ regs->version = 1;
+
+ /* loop through the diags reg table for what to print */
+ ri = 0;
+ for (i = 0; i40e_reg_list[i].offset != 0; i++) {
+ for (j = 0; j < i40e_reg_list[i].elements; j++) {
+ reg = i40e_reg_list[i].offset
+ + (j * i40e_reg_list[i].stride);
+ reg_buf[ri++] = rd32(hw, reg);
+ }
+ }
+
+}
+
+static int i40e_get_eeprom(struct net_device *netdev,
+ struct ethtool_eeprom *eeprom, u8 *bytes)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_hw *hw = &np->vsi->back->hw;
+ int first_word, last_word;
+ u16 i, eeprom_len;
+ u16 *eeprom_buff;
+ int ret_val = 0;
+
+ if (eeprom->len == 0)
+ return -EINVAL;
+
+ eeprom->magic = hw->vendor_id | (hw->device_id << 16);
+
+ first_word = eeprom->offset >> 1;
+ last_word = (eeprom->offset + eeprom->len - 1) >> 1;
+ eeprom_len = last_word - first_word + 1;
+
+ eeprom_buff = kmalloc(sizeof(u16) * eeprom_len, GFP_KERNEL);
+ if (!eeprom_buff)
+ return -ENOMEM;
+
+ ret_val = i40e_read_nvm_buffer(hw, first_word, &eeprom_len,
+ eeprom_buff);
+ if (eeprom_len == 0) {
+ kfree(eeprom_buff);
+ return -EACCES;
+ }
+
+ /* Device's eeprom is always little-endian, word addressable */
+ for (i = 0; i < eeprom_len; i++)
+ le16_to_cpus(&eeprom_buff[i]);
+
+ memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 1), eeprom->len);
+ kfree(eeprom_buff);
+
+ return ret_val;
+}
+
+static int i40e_get_eeprom_len(struct net_device *netdev)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_hw *hw = &np->vsi->back->hw;
+
+ return hw->nvm.sr_size * 2;
+}
+
+static void i40e_get_drvinfo(struct net_device *netdev,
+ struct ethtool_drvinfo *drvinfo)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+
+ strlcpy(drvinfo->driver, i40e_driver_name, sizeof(drvinfo->driver));
+ strlcpy(drvinfo->version, i40e_driver_version_str,
+ sizeof(drvinfo->version));
+ strlcpy(drvinfo->fw_version, i40e_fw_version_str(&pf->hw),
+ sizeof(drvinfo->fw_version));
+ strlcpy(drvinfo->bus_info, pci_name(pf->pdev),
+ sizeof(drvinfo->bus_info));
+}
+
+static void i40e_get_ringparam(struct net_device *netdev,
+ struct ethtool_ringparam *ring)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+ struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
+
+ ring->rx_max_pending = I40E_MAX_NUM_DESCRIPTORS;
+ ring->tx_max_pending = I40E_MAX_NUM_DESCRIPTORS;
+ ring->rx_mini_max_pending = 0;
+ ring->rx_jumbo_max_pending = 0;
+ ring->rx_pending = vsi->rx_rings[0].count;
+ ring->tx_pending = vsi->tx_rings[0].count;
+ ring->rx_mini_pending = 0;
+ ring->rx_jumbo_pending = 0;
+}
+
+static int i40e_set_ringparam(struct net_device *netdev,
+ struct ethtool_ringparam *ring)
+{
+ struct i40e_ring *tx_rings = NULL, *rx_rings = NULL;
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+ u32 new_rx_count, new_tx_count;
+ int i, err = 0;
+
+ if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
+ return -EINVAL;
+
+ new_tx_count = clamp_t(u32, ring->tx_pending,
+ I40E_MIN_NUM_DESCRIPTORS,
+ I40E_MAX_NUM_DESCRIPTORS);
+ new_tx_count = ALIGN(new_tx_count, I40E_REQ_DESCRIPTOR_MULTIPLE);
+
+ new_rx_count = clamp_t(u32, ring->rx_pending,
+ I40E_MIN_NUM_DESCRIPTORS,
+ I40E_MAX_NUM_DESCRIPTORS);
+ new_rx_count = ALIGN(new_rx_count, I40E_REQ_DESCRIPTOR_MULTIPLE);
+
+ /* if nothing to do return success */
+ if ((new_tx_count == vsi->tx_rings[0].count) &&
+ (new_rx_count == vsi->rx_rings[0].count))
+ return 0;
+
+ while (test_and_set_bit(__I40E_CONFIG_BUSY, &pf->state))
+ usleep_range(1000, 2000);
+
+ if (!netif_running(vsi->netdev)) {
+ /* simple case - set for the next time the netdev is started */
+ for (i = 0; i < vsi->num_queue_pairs; i++) {
+ vsi->tx_rings[i].count = new_tx_count;
+ vsi->rx_rings[i].count = new_rx_count;
+ }
+ goto done;
+ }
+
+ /* We can't just free everything and then setup again,
+ * because the ISRs in MSI-X mode get passed pointers
+ * to the Tx and Rx ring structs.
+ */
+
+ /* alloc updated Tx resources */
+ if (new_tx_count != vsi->tx_rings[0].count) {
+ netdev_info(netdev,
+ "Changing Tx descriptor count from %d to %d.\n",
+ vsi->tx_rings[0].count, new_tx_count);
+ tx_rings = kcalloc(vsi->alloc_queue_pairs,
+ sizeof(struct i40e_ring), GFP_KERNEL);
+ if (!tx_rings) {
+ err = -ENOMEM;
+ goto done;
+ }
+
+ for (i = 0; i < vsi->num_queue_pairs; i++) {
+ /* clone ring and setup updated count */
+ tx_rings[i] = vsi->tx_rings[i];
+ tx_rings[i].count = new_tx_count;
+ err = i40e_setup_tx_descriptors(&tx_rings[i]);
+ if (err) {
+ while (i) {
+ i--;
+ i40e_free_tx_resources(&tx_rings[i]);
+ }
+ kfree(tx_rings);
+ tx_rings = NULL;
+
+ goto done;
+ }
+ }
+ }
+
+ /* alloc updated Rx resources */
+ if (new_rx_count != vsi->rx_rings[0].count) {
+ netdev_info(netdev,
+ "Changing Rx descriptor count from %d to %d\n",
+ vsi->rx_rings[0].count, new_rx_count);
+ rx_rings = kcalloc(vsi->alloc_queue_pairs,
+ sizeof(struct i40e_ring), GFP_KERNEL);
+ if (!rx_rings) {
+ err = -ENOMEM;
+ goto free_tx;
+ }
+
+ for (i = 0; i < vsi->num_queue_pairs; i++) {
+ /* clone ring and setup updated count */
+ rx_rings[i] = vsi->rx_rings[i];
+ rx_rings[i].count = new_rx_count;
+ err = i40e_setup_rx_descriptors(&rx_rings[i]);
+ if (err) {
+ while (i) {
+ i--;
+ i40e_free_rx_resources(&rx_rings[i]);
+ }
+ kfree(rx_rings);
+ rx_rings = NULL;
+
+ goto free_tx;
+ }
+ }
+ }
+
+ /* Bring interface down, copy in the new ring info,
+ * then restore the interface
+ */
+ i40e_down(vsi);
+
+ if (tx_rings) {
+ for (i = 0; i < vsi->num_queue_pairs; i++) {
+ i40e_free_tx_resources(&vsi->tx_rings[i]);
+ vsi->tx_rings[i] = tx_rings[i];
+ }
+ kfree(tx_rings);
+ tx_rings = NULL;
+ }
+
+ if (rx_rings) {
+ for (i = 0; i < vsi->num_queue_pairs; i++) {
+ i40e_free_rx_resources(&vsi->rx_rings[i]);
+ vsi->rx_rings[i] = rx_rings[i];
+ }
+ kfree(rx_rings);
+ rx_rings = NULL;
+ }
+
+ i40e_up(vsi);
+
+free_tx:
+ /* error cleanup if the Rx allocations failed after getting Tx */
+ if (tx_rings) {
+ for (i = 0; i < vsi->num_queue_pairs; i++)
+ i40e_free_tx_resources(&tx_rings[i]);
+ kfree(tx_rings);
+ tx_rings = NULL;
+ }
+
+done:
+ clear_bit(__I40E_CONFIG_BUSY, &pf->state);
+
+ return err;
+}
+
+static int i40e_get_sset_count(struct net_device *netdev, int sset)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+
+ switch (sset) {
+ case ETH_SS_TEST:
+ return I40E_TEST_LEN;
+ case ETH_SS_STATS:
+ if (vsi == pf->vsi[pf->lan_vsi])
+ return I40E_PF_STATS_LEN(netdev);
+ else
+ return I40E_VSI_STATS_LEN(netdev);
+ default:
+ return -EOPNOTSUPP;
+ }
+}
+
+static void i40e_get_ethtool_stats(struct net_device *netdev,
+ struct ethtool_stats *stats, u64 *data)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+ int i = 0;
+ char *p;
+ int j;
+ struct rtnl_link_stats64 *net_stats = i40e_get_vsi_stats_struct(vsi);
+
+ i40e_update_stats(vsi);
+
+ for (j = 0; j < I40E_NETDEV_STATS_LEN; j++) {
+ p = (char *)net_stats + i40e_gstrings_net_stats[j].stat_offset;
+ data[i++] = (i40e_gstrings_net_stats[j].sizeof_stat ==
+ sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
+ }
+ for (j = 0; j < vsi->num_queue_pairs; j++) {
+ data[i++] = vsi->tx_rings[j].tx_stats.packets;
+ data[i++] = vsi->tx_rings[j].tx_stats.bytes;
+ }
+ for (j = 0; j < vsi->num_queue_pairs; j++) {
+ data[i++] = vsi->rx_rings[j].rx_stats.packets;
+ data[i++] = vsi->rx_rings[j].rx_stats.bytes;
+ }
+ if (vsi == pf->vsi[pf->lan_vsi]) {
+ for (j = 0; j < I40E_GLOBAL_STATS_LEN; j++) {
+ p = (char *)pf + i40e_gstrings_stats[j].stat_offset;
+ data[i++] = (i40e_gstrings_stats[j].sizeof_stat ==
+ sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
+ }
+ for (j = 0; j < I40E_MAX_USER_PRIORITY; j++) {
+ data[i++] = pf->stats.priority_xon_tx[j];
+ data[i++] = pf->stats.priority_xoff_tx[j];
+ }
+ for (j = 0; j < I40E_MAX_USER_PRIORITY; j++) {
+ data[i++] = pf->stats.priority_xon_rx[j];
+ data[i++] = pf->stats.priority_xoff_rx[j];
+ }
+ for (j = 0; j < I40E_MAX_USER_PRIORITY; j++)
+ data[i++] = pf->stats.priority_xon_2_xoff[j];
+ }
+}
+
+static void i40e_get_strings(struct net_device *netdev, u32 stringset,
+ u8 *data)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+ char *p = (char *)data;
+ int i;
+
+ switch (stringset) {
+ case ETH_SS_TEST:
+ for (i = 0; i < I40E_TEST_LEN; i++) {
+ memcpy(data, i40e_gstrings_test[i], ETH_GSTRING_LEN);
+ data += ETH_GSTRING_LEN;
+ }
+ break;
+ case ETH_SS_STATS:
+ for (i = 0; i < I40E_NETDEV_STATS_LEN; i++) {
+ snprintf(p, ETH_GSTRING_LEN, "%s",
+ i40e_gstrings_net_stats[i].stat_string);
+ p += ETH_GSTRING_LEN;
+ }
+ for (i = 0; i < vsi->num_queue_pairs; i++) {
+ snprintf(p, ETH_GSTRING_LEN, "tx-%u.tx_packets", i);
+ p += ETH_GSTRING_LEN;
+ snprintf(p, ETH_GSTRING_LEN, "tx-%u.tx_bytes", i);
+ p += ETH_GSTRING_LEN;
+ }
+ for (i = 0; i < vsi->num_queue_pairs; i++) {
+ snprintf(p, ETH_GSTRING_LEN, "rx-%u.rx_packets", i);
+ p += ETH_GSTRING_LEN;
+ snprintf(p, ETH_GSTRING_LEN, "rx-%u.rx_bytes", i);
+ p += ETH_GSTRING_LEN;
+ }
+ if (vsi == pf->vsi[pf->lan_vsi]) {
+ for (i = 0; i < I40E_GLOBAL_STATS_LEN; i++) {
+ snprintf(p, ETH_GSTRING_LEN, "port.%s",
+ i40e_gstrings_stats[i].stat_string);
+ p += ETH_GSTRING_LEN;
+ }
+ for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
+ snprintf(p, ETH_GSTRING_LEN,
+ "port.tx_priority_%u_xon", i);
+ p += ETH_GSTRING_LEN;
+ snprintf(p, ETH_GSTRING_LEN,
+ "port.tx_priority_%u_xoff", i);
+ p += ETH_GSTRING_LEN;
+ }
+ for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
+ snprintf(p, ETH_GSTRING_LEN,
+ "port.rx_priority_%u_xon", i);
+ p += ETH_GSTRING_LEN;
+ snprintf(p, ETH_GSTRING_LEN,
+ "port.rx_priority_%u_xoff", i);
+ p += ETH_GSTRING_LEN;
+ }
+ for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
+ snprintf(p, ETH_GSTRING_LEN,
+ "port.rx_priority_%u_xon_2_xoff", i);
+ p += ETH_GSTRING_LEN;
+ }
+ }
+ /* BUG_ON(p - data != I40E_STATS_LEN * ETH_GSTRING_LEN); */
+ break;
+ }
+}
+
+static int i40e_get_ts_info(struct net_device *dev,
+ struct ethtool_ts_info *info)
+{
+ return ethtool_op_get_ts_info(dev, info);
+}
+
+static int i40e_link_test(struct i40e_pf *pf, u64 *data)
+{
+ bool link_up;
+
+ link_up = i40e_get_link_status(&pf->hw);
+ if (link_up)
+ *data = 0;
+ else
+ *data = 1;
+
+ return *data;
+}
+
+static int i40e_reg_test(struct i40e_pf *pf, u64 *data)
+{
+ i40e_status ret;
+
+ ret = i40e_diag_reg_test(&pf->hw);
+ *data = ret;
+
+ return ret;
+}
+
+static int i40e_eeprom_test(struct i40e_pf *pf, u64 *data)
+{
+ i40e_status ret;
+
+ ret = i40e_diag_eeprom_test(&pf->hw);
+ *data = ret;
+
+ return ret;
+}
+
+static int i40e_intr_test(struct i40e_pf *pf, u64 *data)
+{
+ *data = I40E_ERR_NOT_IMPLEMENTED;
+
+ return *data;
+}
+
+static int i40e_loopback_test(struct i40e_pf *pf, u64 *data)
+{
+ *data = I40E_ERR_NOT_IMPLEMENTED;
+
+ return *data;
+}
+
+static void i40e_diag_test(struct net_device *netdev,
+ struct ethtool_test *eth_test, u64 *data)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+
+ set_bit(__I40E_TESTING, &pf->state);
+ if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
+ /* Offline tests */
+
+ netdev_info(netdev, "offline testing starting\n");
+
+ /* Link test performed before hardware reset
+ * so autoneg doesn't interfere with test result
+ */
+ netdev_info(netdev, "link test starting\n");
+ if (i40e_link_test(pf, &data[I40E_ETH_TEST_LINK]))
+ eth_test->flags |= ETH_TEST_FL_FAILED;
+
+ netdev_info(netdev, "register test starting\n");
+ if (i40e_reg_test(pf, &data[I40E_ETH_TEST_REG]))
+ eth_test->flags |= ETH_TEST_FL_FAILED;
+
+ i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));
+ netdev_info(netdev, "eeprom test starting\n");
+ if (i40e_eeprom_test(pf, &data[I40E_ETH_TEST_EEPROM]))
+ eth_test->flags |= ETH_TEST_FL_FAILED;
+
+ i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));
+ netdev_info(netdev, "interrupt test starting\n");
+ if (i40e_intr_test(pf, &data[I40E_ETH_TEST_INTR]))
+ eth_test->flags |= ETH_TEST_FL_FAILED;
+
+ i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));
+ netdev_info(netdev, "loopback test starting\n");
+ if (i40e_loopback_test(pf, &data[I40E_ETH_TEST_LOOPBACK]))
+ eth_test->flags |= ETH_TEST_FL_FAILED;
+
+ } else {
+ netdev_info(netdev, "online test starting\n");
+ /* Online tests */
+ if (i40e_link_test(pf, &data[I40E_ETH_TEST_LINK]))
+ eth_test->flags |= ETH_TEST_FL_FAILED;
+
+ /* Offline only tests, not run in online; pass by default */
+ data[I40E_ETH_TEST_REG] = 0;
+ data[I40E_ETH_TEST_EEPROM] = 0;
+ data[I40E_ETH_TEST_INTR] = 0;
+ data[I40E_ETH_TEST_LOOPBACK] = 0;
+
+ clear_bit(__I40E_TESTING, &pf->state);
+ }
+}
+
+static void i40e_get_wol(struct net_device *netdev,
+ struct ethtool_wolinfo *wol)
+{
+ wol->supported = 0;
+ wol->wolopts = 0;
+}
+
+static int i40e_nway_reset(struct net_device *netdev)
+{
+ /* restart autonegotiation */
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+ struct i40e_hw *hw = &pf->hw;
+ i40e_status ret = 0;
+
+ ret = i40e_aq_set_link_restart_an(hw, NULL);
+ if (ret != I40E_SUCCESS)
+ netdev_info(netdev, "link restart failed, aq_err=%d\n",
+ pf->hw.aq.asq_last_status);
+
+ return ret;
+}
+
+static int i40e_set_phys_id(struct net_device *netdev,
+ enum ethtool_phys_id_state state)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_pf *pf = np->vsi->back;
+ struct i40e_hw *hw = &pf->hw;
+ int blink_freq = 2;
+
+ switch (state) {
+ case ETHTOOL_ID_ACTIVE:
+ pf->led_status = i40e_led_get(hw);
+ return blink_freq;
+ case ETHTOOL_ID_ON:
+ i40e_led_set(hw, 0xF);
+ break;
+ case ETHTOOL_ID_OFF:
+ i40e_led_set(hw, 0x0);
+ break;
+ case ETHTOOL_ID_INACTIVE:
+ i40e_led_set(hw, pf->led_status);
+ break;
+ }
+
+ return 0;
+}
+
+/* NOTE: i40e hardware uses a conversion factor of 2 for Interrupt
+ * Throttle Rate (ITR) ie. ITR(1) = 2us ITR(10) = 20 us, and also
+ * 125us (8000 interrupts per second) == ITR(62)
+ */
+
+static int i40e_get_coalesce(struct net_device *netdev,
+ struct ethtool_coalesce *ec)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+
+ ec->tx_max_coalesced_frames_irq = vsi->work_limit;
+ ec->rx_max_coalesced_frames_irq = vsi->work_limit;
+
+ if (ITR_IS_DYNAMIC(vsi->rx_itr_setting))
+ ec->rx_coalesce_usecs = 1;
+ else
+ ec->rx_coalesce_usecs = vsi->rx_itr_setting;
+
+ if (ITR_IS_DYNAMIC(vsi->tx_itr_setting))
+ ec->tx_coalesce_usecs = 1;
+ else
+ ec->tx_coalesce_usecs = vsi->tx_itr_setting;
+
+ return 0;
+}
+
+static int i40e_set_coalesce(struct net_device *netdev,
+ struct ethtool_coalesce *ec)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_q_vector *q_vector;
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+ struct i40e_hw *hw = &pf->hw;
+ u16 vector;
+ int i;
+
+ if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq)
+ vsi->work_limit = ec->tx_max_coalesced_frames_irq;
+
+ switch (ec->rx_coalesce_usecs) {
+ case 0:
+ vsi->rx_itr_setting = 0;
+ break;
+ case 1:
+ vsi->rx_itr_setting = (I40E_ITR_DYNAMIC |
+ ITR_REG_TO_USEC(I40E_ITR_RX_DEF));
+ break;
+ default:
+ if ((ec->rx_coalesce_usecs < (I40E_MIN_ITR << 1)) ||
+ (ec->rx_coalesce_usecs > (I40E_MAX_ITR << 1)))
+ return -EINVAL;
+ vsi->rx_itr_setting = ec->rx_coalesce_usecs;
+ break;
+ }
+
+ switch (ec->tx_coalesce_usecs) {
+ case 0:
+ vsi->tx_itr_setting = 0;
+ break;
+ case 1:
+ vsi->tx_itr_setting = (I40E_ITR_DYNAMIC |
+ ITR_REG_TO_USEC(I40E_ITR_TX_DEF));
+ break;
+ default:
+ if ((ec->tx_coalesce_usecs < (I40E_MIN_ITR << 1)) ||
+ (ec->tx_coalesce_usecs > (I40E_MAX_ITR << 1)))
+ return -EINVAL;
+ vsi->tx_itr_setting = ec->tx_coalesce_usecs;
+ break;
+ }
+
+ vector = vsi->base_vector;
+ q_vector = vsi->q_vectors;
+ for (i = 0; i < vsi->num_q_vectors; i++, vector++, q_vector++) {
+ q_vector->rx.itr = ITR_TO_REG(vsi->rx_itr_setting);
+ wr32(hw, I40E_PFINT_ITRN(0, vector - 1), q_vector->rx.itr);
+ q_vector->tx.itr = ITR_TO_REG(vsi->tx_itr_setting);
+ wr32(hw, I40E_PFINT_ITRN(1, vector - 1), q_vector->tx.itr);
+ i40e_flush(hw);
+ }
+
+ return 0;
+}
+
+/**
+ * i40e_get_rss_hash_opts - Get RSS hash Input Set for each flow type
+ * @pf: pointer to the physical function struct
+ * @cmd: ethtool rxnfc command
+ *
+ * Returns Success if the flow is supported, else Invalid Input.
+ **/
+static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)
+{
+ cmd->data = 0;
+
+ /* Report default options for RSS on i40e */
+ switch (cmd->flow_type) {
+ case TCP_V4_FLOW:
+ case UDP_V4_FLOW:
+ cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+ /* fall through to add IP fields */
+ case SCTP_V4_FLOW:
+ case AH_ESP_V4_FLOW:
+ case AH_V4_FLOW:
+ case ESP_V4_FLOW:
+ case IPV4_FLOW:
+ cmd->data |= RXH_IP_SRC | RXH_IP_DST;
+ break;
+ case TCP_V6_FLOW:
+ case UDP_V6_FLOW:
+ cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+ /* fall through to add IP fields */
+ case SCTP_V6_FLOW:
+ case AH_ESP_V6_FLOW:
+ case AH_V6_FLOW:
+ case ESP_V6_FLOW:
+ case IPV6_FLOW:
+ cmd->data |= RXH_IP_SRC | RXH_IP_DST;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+/**
+ * i40e_get_rxnfc - command to get RX flow classification rules
+ * @netdev: network interface device structure
+ * @cmd: ethtool rxnfc command
+ *
+ * Returns Success if the command is supported.
+ **/
+static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
+ u32 *rule_locs)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+ int ret = -EOPNOTSUPP;
+
+ switch (cmd->cmd) {
+ case ETHTOOL_GRXRINGS:
+ cmd->data = vsi->alloc_queue_pairs;
+ ret = 0;
+ break;
+ case ETHTOOL_GRXFH:
+ ret = i40e_get_rss_hash_opts(pf, cmd);
+ break;
+ case ETHTOOL_GRXCLSRLCNT:
+ ret = 0;
+ break;
+ case ETHTOOL_GRXCLSRULE:
+ ret = 0;
+ break;
+ case ETHTOOL_GRXCLSRLALL:
+ cmd->data = 500;
+ ret = 0;
+ default:
+ break;
+ }
+
+ return ret;
+}
+
+/**
+ * i40e_set_rss_hash_opt - Enable/Disable flow types for RSS hash
+ * @pf: pointer to the physical function struct
+ * @cmd: ethtool rxnfc command
+ *
+ * Returns Success if the flow input set is supported.
+ **/
+static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
+{
+ struct i40e_hw *hw = &pf->hw;
+ u64 hena = (u64)rd32(hw, I40E_PFQF_HENA(0)) |
+ ((u64)rd32(hw, I40E_PFQF_HENA(1)) << 32);
+
+ /* RSS does not support anything other than hashing
+ * to queues on src and dst IPs and ports
+ */
+ if (nfc->data & ~(RXH_IP_SRC | RXH_IP_DST |
+ RXH_L4_B_0_1 | RXH_L4_B_2_3))
+ return -EINVAL;
+
+ /* We need at least the IP SRC and DEST fields for hashing */
+ if (!(nfc->data & RXH_IP_SRC) ||
+ !(nfc->data & RXH_IP_DST))
+ return -EINVAL;
+
+ switch (nfc->flow_type) {
+ case TCP_V4_FLOW:
+ switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
+ case 0:
+ hena &= ~((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP);
+ break;
+ case (RXH_L4_B_0_1 | RXH_L4_B_2_3):
+ hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP);
+ break;
+ default:
+ return -EINVAL;
+ }
+ break;
+ case TCP_V6_FLOW:
+ switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
+ case 0:
+ hena &= ~((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP);
+ break;
+ case (RXH_L4_B_0_1 | RXH_L4_B_2_3):
+ hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP);
+ break;
+ default:
+ return -EINVAL;
+ }
+ break;
+ case UDP_V4_FLOW:
+ switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
+ case 0:
+ hena &=
+ ~(((u64)1 << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4));
+ break;
+ case (RXH_L4_B_0_1 | RXH_L4_B_2_3):
+ hena |=
+ (((u64)1 << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4));
+ break;
+ default:
+ return -EINVAL;
+ }
+ break;
+ case UDP_V6_FLOW:
+ switch (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
+ case 0:
+ hena &=
+ ~(((u64)1 << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6));
+ break;
+ case (RXH_L4_B_0_1 | RXH_L4_B_2_3):
+ hena |=
+ (((u64)1 << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP) |
+ ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6));
+ break;
+ default:
+ return -EINVAL;
+ }
+ break;
+ case AH_ESP_V4_FLOW:
+ case AH_V4_FLOW:
+ case ESP_V4_FLOW:
+ case SCTP_V4_FLOW:
+ if ((nfc->data & RXH_L4_B_0_1) ||
+ (nfc->data & RXH_L4_B_2_3))
+ return -EINVAL;
+ hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER);
+ break;
+ case AH_ESP_V6_FLOW:
+ case AH_V6_FLOW:
+ case ESP_V6_FLOW:
+ case SCTP_V6_FLOW:
+ if ((nfc->data & RXH_L4_B_0_1) ||
+ (nfc->data & RXH_L4_B_2_3))
+ return -EINVAL;
+ hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER);
+ break;
+ case IPV4_FLOW:
+ hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) |
+ ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4);
+ break;
+ case IPV6_FLOW:
+ hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) |
+ ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ wr32(hw, I40E_PFQF_HENA(0), (u32)hena);
+ wr32(hw, I40E_PFQF_HENA(1), (u32)(hena >> 32));
+ i40e_flush(hw);
+
+ return 0;
+}
+
+#define IP_HEADER_OFFSET 14
+/**
+ * i40e_add_del_fdir_udpv4 - Add/Remove UDPv4 Flow Director filters for
+ * a specific flow spec
+ * @vsi: pointer to the targeted VSI
+ * @fd_data: the flow director data required from the FDir descriptor
+ * @ethtool_rx_flow_spec: the flow spec
+ * @add: true adds a filter, false removes it
+ *
+ * Returns 0 if the filters were successfully added or removed
+ **/
+static i40e_status i40e_add_del_fdir_udpv4(struct i40e_vsi *vsi,
+ struct i40e_fdir_data *fd_data,
+ struct ethtool_rx_flow_spec *fsp, bool add)
+{
+ struct i40e_pf *pf = vsi->back;
+ struct udphdr *udp;
+ struct iphdr *ip;
+ bool err = false;
+ i40e_status ret;
+ int i;
+
+ ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET);
+ udp = (struct udphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET
+ + sizeof(struct iphdr));
+
+ ip->saddr = fsp->h_u.tcp_ip4_spec.ip4src;
+ ip->daddr = fsp->h_u.tcp_ip4_spec.ip4dst;
+ udp->source = fsp->h_u.tcp_ip4_spec.psrc;
+ udp->dest = fsp->h_u.tcp_ip4_spec.pdst;
+
+ for (i = I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP;
+ i <= I40E_FILTER_PCTYPE_NONF_IPV4_UDP; i++) {
+ fd_data->pctype = i;
+ ret = i40e_program_fdir_filter(fd_data, pf, add);
+
+ if (ret != I40E_SUCCESS) {
+ dev_info(&pf->pdev->dev,
+ "Filter command send failed for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ err = true;
+ } else {
+ dev_info(&pf->pdev->dev,
+ "Filter OK for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ }
+ }
+
+ return err ? -EOPNOTSUPP : I40E_SUCCESS;
+}
+
+/**
+ * i40e_add_del_fdir_tcpv4 - Add/Remove TCPv4 Flow Director filters for
+ * a specific flow spec
+ * @vsi: pointer to the targeted VSI
+ * @fd_data: the flow director data required from the FDir descriptor
+ * @ethtool_rx_flow_spec: the flow spec
+ * @add: true adds a filter, false removes it
+ *
+ * Returns 0 if the filters were successfully added or removed
+ **/
+static i40e_status i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi,
+ struct i40e_fdir_data *fd_data,
+ struct ethtool_rx_flow_spec *fsp, bool add)
+{
+ struct i40e_pf *pf = vsi->back;
+ struct tcphdr *tcp;
+ struct iphdr *ip;
+ bool err = false;
+ i40e_status ret;
+
+ ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET);
+ tcp = (struct tcphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET
+ + sizeof(struct iphdr));
+
+ ip->daddr = fsp->h_u.tcp_ip4_spec.ip4dst;
+ tcp->dest = fsp->h_u.tcp_ip4_spec.pdst;
+
+ fd_data->pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN;
+ ret = i40e_program_fdir_filter(fd_data, pf, add);
+
+ if (ret != I40E_SUCCESS) {
+ dev_info(&pf->pdev->dev,
+ "Filter command send failed for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ err = true;
+ } else {
+ dev_info(&pf->pdev->dev, "Filter OK for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ }
+
+ ip->saddr = fsp->h_u.tcp_ip4_spec.ip4src;
+ tcp->source = fsp->h_u.tcp_ip4_spec.psrc;
+
+ fd_data->pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
+
+ ret = i40e_program_fdir_filter(fd_data, pf, add);
+ if (ret != I40E_SUCCESS) {
+ dev_info(&pf->pdev->dev,
+ "Filter command send failed for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ err = true;
+ } else {
+ dev_info(&pf->pdev->dev, "Filter OK for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ }
+
+ return err ? -EOPNOTSUPP : I40E_SUCCESS;
+}
+
+
+/**
+ * i40e_add_del_fdir_sctpv4 - Add/Remove SCTPv4 Flow Director filters for
+ * a specific flow spec
+ * @vsi: pointer to the targeted VSI
+ * @fd_data: the flow director data required from the FDir descriptor
+ * @ethtool_rx_flow_spec: the flow spec
+ * @add: true adds a filter, false removes it
+ *
+ * Returns I40E_SUCCESS if the filters were successfully added or removed
+ **/
+static i40e_status i40e_add_del_fdir_sctpv4(struct i40e_vsi *vsi,
+ struct i40e_fdir_data *fd_data,
+ struct ethtool_rx_flow_spec *fsp, bool add)
+{
+ return -EOPNOTSUPP;
+}
+
+/**
+ * i40e_add_del_fdir_ipv4 - Add/Remove IPv4 Flow Director filters for
+ * a specific flow spec
+ * @vsi: pointer to the targeted VSI
+ * @fd_data: the flow director data required for the FDir descriptor
+ * @fsp: the ethtool flow spec
+ * @add: true adds a filter, false removes it
+ *
+ * Returns I40E_SUCCESS if the filters were successfully added or removed
+ **/
+static i40e_status i40e_add_del_fdir_ipv4(struct i40e_vsi *vsi,
+ struct i40e_fdir_data *fd_data,
+ struct ethtool_rx_flow_spec *fsp, bool add)
+{
+ struct i40e_pf *pf = vsi->back;
+ struct iphdr *ip;
+ bool err = false;
+ i40e_status ret;
+ int i;
+
+ ip = (struct iphdr *)(fd_data->raw_packet + IP_HEADER_OFFSET);
+
+ ip->saddr = fsp->h_u.usr_ip4_spec.ip4src;
+ ip->daddr = fsp->h_u.usr_ip4_spec.ip4dst;
+ ip->protocol = fsp->h_u.usr_ip4_spec.proto;
+
+ for (i = I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
+ i <= I40E_FILTER_PCTYPE_FRAG_IPV4; i++) {
+ fd_data->pctype = i;
+ ret = i40e_program_fdir_filter(fd_data, pf, add);
+
+ if (ret != I40E_SUCCESS) {
+ dev_info(&pf->pdev->dev,
+ "Filter command send failed for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ err = true;
+ } else {
+ dev_info(&pf->pdev->dev,
+ "Filter OK for PCTYPE %d (ret = %d)\n",
+ fd_data->pctype, ret);
+ }
+ }
+
+ return err ? -EOPNOTSUPP : I40E_SUCCESS;
+}
+
+/**
+ * i40e_add_del_fdir_ethtool - Add/Remove Flow Director filters for
+ * a specific flow spec based on their protocol
+ * @vsi: pointer to the targeted VSI
+ * @cmd: command to get or set RX flow classification rules
+ * @add: true adds a filter, false removes it
+ *
+ * Returns 0 if the filters were successfully added or removed
+ **/
+static int i40e_add_del_fdir_ethtool(struct i40e_vsi *vsi,
+ struct ethtool_rxnfc *cmd, bool add)
+{
+ struct i40e_fdir_data fd_data;
+ i40e_status ret = -EINVAL;
+ struct i40e_pf *pf;
+ struct ethtool_rx_flow_spec *fsp =
+ (struct ethtool_rx_flow_spec *)&cmd->fs;
+
+ if (!vsi)
+ return -EINVAL;
+
+ pf = vsi->back;
+
+ if ((fsp->ring_cookie != RX_CLS_FLOW_DISC) &&
+ (fsp->ring_cookie >= vsi->num_queue_pairs))
+ return -EINVAL;
+
+ /* Populate the Flow Director that we have at the moment
+ * and allocate the raw packet buffer for the calling functions
+ */
+ fd_data.raw_packet = kzalloc(I40E_FDIR_MAX_RAW_PACKET_LOOKUP,
+ GFP_KERNEL);
+
+ if (!fd_data.raw_packet) {
+ dev_info(&pf->pdev->dev, "Could not allocate memory\n");
+ return -ENOMEM;
+ }
+
+ fd_data.q_index = fsp->ring_cookie;
+ fd_data.flex_off = 0;
+ fd_data.pctype = 0;
+ fd_data.dest_vsi = vsi->id;
+ fd_data.dest_ctl = 0;
+ fd_data.fd_status = 0;
+ fd_data.cnt_index = 0;
+ fd_data.fd_id = 0;
+
+ switch (fsp->flow_type & ~FLOW_EXT) {
+ case TCP_V4_FLOW:
+ ret = i40e_add_del_fdir_tcpv4(vsi, &fd_data, fsp, add);
+ break;
+ case UDP_V4_FLOW:
+ ret = i40e_add_del_fdir_udpv4(vsi, &fd_data, fsp, add);
+ break;
+ case SCTP_V4_FLOW:
+ ret = i40e_add_del_fdir_sctpv4(vsi, &fd_data, fsp, add);
+ break;
+ case IPV4_FLOW:
+ ret = i40e_add_del_fdir_ipv4(vsi, &fd_data, fsp, add);
+ break;
+ case IP_USER_FLOW:
+ switch (fsp->h_u.usr_ip4_spec.proto) {
+ case IPPROTO_TCP:
+ ret = i40e_add_del_fdir_tcpv4(vsi, &fd_data, fsp, add);
+ break;
+ case IPPROTO_UDP:
+ ret = i40e_add_del_fdir_udpv4(vsi, &fd_data, fsp, add);
+ break;
+ case IPPROTO_SCTP:
+ ret = i40e_add_del_fdir_sctpv4(vsi, &fd_data, fsp, add);
+ break;
+ default:
+ ret = i40e_add_del_fdir_ipv4(vsi, &fd_data, fsp, add);
+ break;
+ }
+ break;
+ default:
+ dev_info(&pf->pdev->dev, "Could not specify spec type\n");
+ ret = -EINVAL;
+ }
+
+ kfree(fd_data.raw_packet);
+ fd_data.raw_packet = NULL;
+
+ return ret;
+}
+/**
+ * i40e_set_rxnfc - command to set RX flow classification rules
+ * @netdev: network interface device structure
+ * @cmd: ethtool rxnfc command
+ *
+ * Returns Success if the command is supported.
+ **/
+static int i40e_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+ struct i40e_pf *pf = vsi->back;
+ int ret = -EOPNOTSUPP;
+
+ switch (cmd->cmd) {
+ case ETHTOOL_SRXFH:
+ ret = i40e_set_rss_hash_opt(pf, cmd);
+ break;
+ case ETHTOOL_SRXCLSRLINS:
+ ret = i40e_add_del_fdir_ethtool(vsi, cmd, true);
+ break;
+ case ETHTOOL_SRXCLSRLDEL:
+ ret = i40e_add_del_fdir_ethtool(vsi, cmd, false);
+ break;
+ default:
+ break;
+ }
+
+ return ret;
+}
+
+static const struct ethtool_ops i40e_ethtool_ops = {
+ .get_settings = i40e_get_settings,
+ .get_drvinfo = i40e_get_drvinfo,
+ .get_regs_len = i40e_get_regs_len,
+ .get_regs = i40e_get_regs,
+ .nway_reset = i40e_nway_reset,
+ .get_link = ethtool_op_get_link,
+ .get_wol = i40e_get_wol,
+ .get_eeprom_len = i40e_get_eeprom_len,
+ .get_eeprom = i40e_get_eeprom,
+ .get_ringparam = i40e_get_ringparam,
+ .set_ringparam = i40e_set_ringparam,
+ .get_pauseparam = i40e_get_pauseparam,
+ .get_msglevel = i40e_get_msglevel,
+ .set_msglevel = i40e_set_msglevel,
+ .get_rxnfc = i40e_get_rxnfc,
+ .set_rxnfc = i40e_set_rxnfc,
+ .self_test = i40e_diag_test,
+ .get_strings = i40e_get_strings,
+ .set_phys_id = i40e_set_phys_id,
+ .get_sset_count = i40e_get_sset_count,
+ .get_ethtool_stats = i40e_get_ethtool_stats,
+ .get_coalesce = i40e_get_coalesce,
+ .set_coalesce = i40e_set_coalesce,
+ .get_ts_info = i40e_get_ts_info,
+};
+
+void i40e_set_ethtool_ops(struct net_device *netdev)
+{
+ SET_ETHTOOL_OPS(netdev, &i40e_ethtool_ops);
+}
--
1.8.3.1
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related
* [net-next 4/8] i40e: driver core headers
From: Jeff Kirsher @ 2013-09-06 5:43 UTC (permalink / raw)
To: davem; +Cc: e1000-devel, netdev, Jesse Brandeburg, gospo, sassmann
In-Reply-To: <1378446228-13815-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
This patch contains the main driver header files, containing
structures and data types specific to the linux driver.
i40e_osdep.h contains some code that helps us adapt our OS agnostic code to
Linux.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
CC: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
CC: e1000-devel@lists.sourceforge.net
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
v1: this is the initial submittal
v2: address upstream comments
debug print function converted to macro
constification
remove block_tx_timeout debug code
use rtnl_link_stats64
address HIGHDMA and pci_using_dac comments
compile on s390
v3:
minor cleanups
v4:
remove un-necessary externs
whitespace/tabs/bracket fixups
XPS support
v5:
no significant changes
---
drivers/net/ethernet/intel/i40e/i40e.h | 566 +++++++++++++++++++++++++++
drivers/net/ethernet/intel/i40e/i40e_osdep.h | 86 ++++
drivers/net/ethernet/intel/i40e/i40e_txrx.h | 259 ++++++++++++
3 files changed, 911 insertions(+)
create mode 100644 drivers/net/ethernet/intel/i40e/i40e.h
create mode 100644 drivers/net/ethernet/intel/i40e/i40e_osdep.h
create mode 100644 drivers/net/ethernet/intel/i40e/i40e_txrx.h
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
new file mode 100644
index 0000000..1744c44
--- /dev/null
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -0,0 +1,566 @@
+/*******************************************************************************
+ *
+ * Intel Ethernet Controller XL710 Family Linux Driver
+ * Copyright(c) 2013 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * The full GNU General Public License is included in this distribution in
+ * the file called "COPYING".
+ *
+ * Contact Information:
+ * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+ * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+ *
+ ******************************************************************************/
+
+#ifndef _I40E_H_
+#define _I40E_H_
+
+#include <net/tcp.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/aer.h>
+#include <linux/netdevice.h>
+#include <linux/ioport.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/string.h>
+#include <linux/in.h>
+#include <linux/ip.h>
+#include <linux/tcp.h>
+#include <linux/sctp.h>
+#include <linux/pkt_sched.h>
+#include <linux/ipv6.h>
+#include <linux/version.h>
+#include <net/checksum.h>
+#include <net/ip6_checksum.h>
+#include <linux/ethtool.h>
+#include <linux/if_vlan.h>
+#include "i40e_type.h"
+#include "i40e_prototype.h"
+#include "i40e_virtchnl.h"
+#include "i40e_virtchnl_pf.h"
+#include "i40e_txrx.h"
+
+/* Useful i40e defaults */
+#define I40E_BASE_PF_SEID 16
+#define I40E_BASE_VSI_SEID 512
+#define I40E_BASE_VEB_SEID 288
+#define I40E_MAX_VEB 16
+
+#define I40E_MAX_NUM_DESCRIPTORS 4096
+#define I40E_MAX_REGISTER 0x0038FFFF
+#define I40E_DEFAULT_NUM_DESCRIPTORS 512
+#define I40E_REQ_DESCRIPTOR_MULTIPLE 32
+#define I40E_MIN_NUM_DESCRIPTORS 64
+#define I40E_MIN_MSIX 2
+#define I40E_DEFAULT_NUM_VMDQ_VSI 8 /* max 256 VSIs */
+#define I40E_DEFAULT_QUEUES_PER_VMDQ 2 /* max 16 qps */
+#define I40E_DEFAULT_QUEUES_PER_VF 4
+#define I40E_DEFAULT_QUEUES_PER_TC 1 /* should be a power of 2 */
+#define I40E_FDIR_RING 0
+#define I40E_FDIR_RING_COUNT 32
+#define I40E_MAX_AQ_BUF_SIZE 4096
+#define I40E_AQ_LEN 32
+#define I40E_AQ_WORK_LIMIT 16
+#define I40E_MAX_USER_PRIORITY 8
+#define I40E_DEFAULT_MSG_ENABLE 4
+
+#define I40E_NVM_VERSION_LO_SHIFT 0
+#define I40E_NVM_VERSION_LO_MASK (0xf << I40E_NVM_VERSION_LO_SHIFT)
+#define I40E_NVM_VERSION_MID_SHIFT 4
+#define I40E_NVM_VERSION_MID_MASK (0xff << I40E_NVM_VERSION_MID_SHIFT)
+#define I40E_NVM_VERSION_HI_SHIFT 12
+#define I40E_NVM_VERSION_HI_MASK (0xf << I40E_NVM_VERSION_HI_SHIFT)
+
+/* magic for getting defines into strings */
+#define STRINGIFY(foo) #foo
+#define XSTRINGIFY(bar) STRINGIFY(bar)
+
+#ifndef ARCH_HAS_PREFETCH
+#define prefetch(X)
+#endif
+
+#define I40E_RX_DESC(R, i) \
+ ((ring_is_16byte_desc_enabled(R)) \
+ ? (union i40e_32byte_rx_desc *) \
+ (&(((union i40e_16byte_rx_desc *)((R)->desc))[i])) \
+ : (&(((union i40e_32byte_rx_desc *)((R)->desc))[i])))
+#define I40E_TX_DESC(R, i) \
+ (&(((struct i40e_tx_desc *)((R)->desc))[i]))
+#define I40E_TX_CTXTDESC(R, i) \
+ (&(((struct i40e_tx_context_desc *)((R)->desc))[i]))
+#define I40E_TX_FDIRDESC(R, i) \
+ (&(((struct i40e_filter_program_desc *)((R)->desc))[i]))
+
+/* default to trying for four seconds */
+#define I40E_TRY_LINK_TIMEOUT (4 * HZ)
+
+/* driver state flags */
+enum i40e_state_t {
+ __I40E_TESTING,
+ __I40E_CONFIG_BUSY,
+ __I40E_CONFIG_DONE,
+ __I40E_DOWN,
+ __I40E_NEEDS_RESTART,
+ __I40E_SERVICE_SCHED,
+ __I40E_ADMINQ_EVENT_PENDING,
+ __I40E_MDD_EVENT_PENDING,
+ __I40E_VFLR_EVENT_PENDING,
+ __I40E_RESET_RECOVERY_PENDING,
+ __I40E_RESET_INTR_RECEIVED,
+ __I40E_REINIT_REQUESTED,
+ __I40E_PF_RESET_REQUESTED,
+ __I40E_CORE_RESET_REQUESTED,
+ __I40E_GLOBAL_RESET_REQUESTED,
+ __I40E_FILTER_OVERFLOW_PROMISC,
+};
+
+enum i40e_interrupt_policy {
+ I40E_INTERRUPT_BEST_CASE,
+ I40E_INTERRUPT_MEDIUM,
+ I40E_INTERRUPT_LOWEST
+};
+
+struct i40e_lump_tracking {
+ u16 num_entries;
+ u16 search_hint;
+ u16 list[0];
+#define I40E_PILE_VALID_BIT 0x8000
+};
+
+#define I40E_DEFAULT_ATR_SAMPLE_RATE 20
+#define I40E_FDIR_MAX_RAW_PACKET_LOOKUP 512
+struct i40e_fdir_data {
+ u16 q_index;
+ u8 flex_off;
+ u8 pctype;
+ u16 dest_vsi;
+ u8 dest_ctl;
+ u8 fd_status;
+ u16 cnt_index;
+ u32 fd_id;
+ u8 *raw_packet;
+};
+
+#define I40E_DCB_PRIO_TYPE_STRICT 0
+#define I40E_DCB_PRIO_TYPE_ETS 1
+#define I40E_DCB_STRICT_PRIO_CREDITS 127
+#define I40E_MAX_USER_PRIORITY 8
+/* DCB per TC information data structure */
+struct i40e_tc_info {
+ u16 qoffset; /* Queue offset from base queue */
+ u16 qcount; /* Total Queues */
+ u8 netdev_tc; /* Netdev TC index if netdev associated */
+};
+
+/* TC configuration data structure */
+struct i40e_tc_configuration {
+ u8 numtc; /* Total number of enabled TCs */
+ u8 enabled_tc; /* TC map */
+ struct i40e_tc_info tc_info[I40E_MAX_TRAFFIC_CLASS];
+};
+
+/* struct that defines the Ethernet device */
+struct i40e_pf {
+ struct pci_dev *pdev;
+ struct i40e_hw hw;
+ unsigned long state;
+ unsigned long link_check_timeout;
+ struct msix_entry *msix_entries;
+ u16 num_msix_entries;
+ bool fc_autoneg_status;
+
+ u16 eeprom_version;
+ u16 num_vmdq_vsis; /* num vmdq pools this pf has set up */
+ u16 num_vmdq_qps; /* num queue pairs per vmdq pool */
+ u16 num_vmdq_msix; /* num queue vectors per vmdq pool */
+ u16 num_req_vfs; /* num vfs requested for this vf */
+ u16 num_vf_qps; /* num queue pairs per vf */
+ u16 num_tc_qps; /* num queue pairs per TC */
+ u16 num_lan_qps; /* num lan queues this pf has set up */
+ u16 num_lan_msix; /* num queue vectors for the base pf vsi */
+ u16 rss_size; /* num queues in the RSS array */
+ u16 rss_size_max; /* HW defined max RSS queues */
+ u16 fdir_pf_filter_count; /* num of guaranteed filters for this PF */
+ u8 atr_sample_rate;
+
+ enum i40e_interrupt_policy int_policy;
+ u16 rx_itr_default;
+ u16 tx_itr_default;
+ u16 msg_enable;
+ char misc_int_name[IFNAMSIZ + 9];
+ u16 adminq_work_limit; /* num of admin receive queue desc to process */
+ int service_timer_period;
+ struct timer_list service_timer;
+ struct work_struct service_task;
+
+ u64 flags;
+#define I40E_FLAG_RX_CSUM_ENABLED (u64)(1 << 1)
+#define I40E_FLAG_MSI_ENABLED (u64)(1 << 2)
+#define I40E_FLAG_MSIX_ENABLED (u64)(1 << 3)
+#define I40E_FLAG_RX_1BUF_ENABLED (u64)(1 << 4)
+#define I40E_FLAG_RX_PS_ENABLED (u64)(1 << 5)
+#define I40E_FLAG_RSS_ENABLED (u64)(1 << 6)
+#define I40E_FLAG_MQ_ENABLED (u64)(1 << 7)
+#define I40E_FLAG_VMDQ_ENABLED (u64)(1 << 8)
+#define I40E_FLAG_FDIR_REQUIRES_REINIT (u64)(1 << 9)
+#define I40E_FLAG_NEED_LINK_UPDATE (u64)(1 << 10)
+#define I40E_FLAG_IN_NETPOLL (u64)(1 << 13)
+#define I40E_FLAG_16BYTE_RX_DESC_ENABLED (u64)(1 << 14)
+#define I40E_FLAG_CLEAN_ADMINQ (u64)(1 << 15)
+#define I40E_FLAG_FILTER_SYNC (u64)(1 << 16)
+#define I40E_FLAG_PROCESS_MDD_EVENT (u64)(1 << 18)
+#define I40E_FLAG_PROCESS_VFLR_EVENT (u64)(1 << 19)
+#define I40E_FLAG_SRIOV_ENABLED (u64)(1 << 20)
+#define I40E_FLAG_DCB_ENABLED (u64)(1 << 21)
+#define I40E_FLAG_FDIR_ENABLED (u64)(1 << 22)
+#define I40E_FLAG_FDIR_ATR_ENABLED (u64)(1 << 23)
+#define I40E_FLAG_MFP_ENABLED (u64)(1 << 27)
+
+ u16 num_tx_queues;
+ u16 num_rx_queues;
+
+ bool stat_offsets_loaded;
+ struct i40e_hw_port_stats stats;
+ struct i40e_hw_port_stats stats_offsets;
+ u32 tx_timeout_count;
+ u32 tx_timeout_recovery_level;
+ unsigned long tx_timeout_last_recovery;
+ u32 hw_csum_rx_error;
+ u32 led_status;
+ u16 corer_count; /* Core reset count */
+ u16 globr_count; /* Global reset count */
+ u16 empr_count; /* EMP reset count */
+ u16 pfr_count; /* PF reset count */
+
+ struct mutex switch_mutex;
+ u16 lan_vsi; /* our default LAN VSI */
+ u16 lan_veb; /* initial relay, if exists */
+#define I40E_NO_VEB 0xffff
+#define I40E_NO_VSI 0xffff
+ u16 next_vsi; /* Next unallocated VSI - 0-based! */
+ struct i40e_vsi **vsi;
+ struct i40e_veb *veb[I40E_MAX_VEB];
+
+ struct i40e_lump_tracking *qp_pile;
+ struct i40e_lump_tracking *irq_pile;
+
+ /* switch config info */
+ u16 pf_seid;
+ u16 main_vsi_seid;
+ u16 mac_seid;
+ struct i40e_aqc_get_switch_config_data *sw_config;
+ struct kobject *switch_kobj;
+#ifdef CONFIG_DEBUG_FS
+ struct dentry *i40e_dbg_pf;
+#endif /* CONFIG_DEBUG_FS */
+
+ /* sr-iov config info */
+ struct i40e_vf *vf;
+ int num_alloc_vfs; /* actual number of VFs allocated */
+ u32 vf_aq_requests;
+
+ /* DCBx/DCBNL capability for PF that indicates
+ * whether DCBx is managed by firmware or host
+ * based agent (LLDPAD). Also, indicates what
+ * flavor of DCBx protocol (IEEE/CEE) is supported
+ * by the device. For now we're supporting IEEE
+ * mode only.
+ */
+ u16 dcbx_cap;
+
+ u32 fcoe_hmc_filt_num;
+ u32 fcoe_hmc_cntx_num;
+ struct i40e_filter_control_settings filter_settings;
+};
+
+struct i40e_mac_filter {
+ struct list_head list;
+ u8 macaddr[ETH_ALEN];
+#define I40E_VLAN_ANY -1
+ s16 vlan;
+ u8 counter; /* number of instances of this filter */
+ bool is_vf; /* filter belongs to a VF */
+ bool is_netdev; /* filter belongs to a netdev */
+ bool changed; /* filter needs to be sync'd to the HW */
+};
+
+struct i40e_veb {
+ struct i40e_pf *pf;
+ u16 idx;
+ u16 veb_idx; /* index of VEB parent */
+ u16 seid;
+ u16 uplink_seid;
+ u16 stats_idx; /* index of VEB parent */
+ u8 enabled_tc;
+ u16 flags;
+ u16 bw_limit;
+ u8 bw_max_quanta;
+ bool is_abs_credits;
+ u8 bw_tc_share_credits[I40E_MAX_TRAFFIC_CLASS];
+ u16 bw_tc_limit_credits[I40E_MAX_TRAFFIC_CLASS];
+ u8 bw_tc_max_quanta[I40E_MAX_TRAFFIC_CLASS];
+ struct kobject *kobj;
+ bool stat_offsets_loaded;
+ struct i40e_eth_stats stats;
+ struct i40e_eth_stats stats_offsets;
+};
+
+/* struct that defines a VSI, associated with a dev */
+struct i40e_vsi {
+ struct net_device *netdev;
+ unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
+ bool netdev_registered;
+ bool stat_offsets_loaded;
+
+ u32 current_netdev_flags;
+ unsigned long state;
+#define I40E_VSI_FLAG_FILTER_CHANGED (1<<0)
+#define I40E_VSI_FLAG_VEB_OWNER (1<<1)
+ unsigned long flags;
+
+ struct list_head mac_filter_list;
+
+ /* VSI stats */
+ struct rtnl_link_stats64 net_stats;
+ struct rtnl_link_stats64 net_stats_offsets;
+ struct i40e_eth_stats eth_stats;
+ struct i40e_eth_stats eth_stats_offsets;
+ u32 tx_restart;
+ u32 tx_busy;
+ u32 rx_buf_failed;
+ u32 rx_page_failed;
+
+ /* These are arrays of rings, allocated at run-time */
+ struct i40e_ring *rx_rings;
+ struct i40e_ring *tx_rings;
+
+ u16 work_limit;
+ /* high bit set means dynamic, use accessor routines to read/write.
+ * hardware only supports 2us resolution for the ITR registers.
+ * these values always store the USER setting, and must be converted
+ * before programming to a register.
+ */
+ u16 rx_itr_setting;
+ u16 tx_itr_setting;
+
+ u16 max_frame;
+ u16 rx_hdr_len;
+ u16 rx_buf_len;
+ u8 dtype;
+
+ /* List of q_vectors allocated to this VSI */
+ struct i40e_q_vector *q_vectors;
+ int num_q_vectors;
+ int base_vector;
+
+ u16 seid; /* HW index of this VSI (absolute index) */
+ u16 id; /* VSI number */
+ u16 uplink_seid;
+
+ u16 base_queue; /* vsi's first queue in hw array */
+ u16 alloc_queue_pairs; /* Allocated Tx/Rx queues */
+ u16 num_queue_pairs; /* Used tx and rx pairs */
+ u16 num_desc;
+ enum i40e_vsi_type type; /* VSI type, e.g., LAN, FCoE, etc */
+ u16 vf_id; /* Virtual function ID for SRIOV VSIs */
+
+ struct i40e_tc_configuration tc_config;
+ struct i40e_aqc_vsi_properties_data info;
+
+ /* VSI BW limit (absolute across all TCs) */
+ u16 bw_limit; /* VSI BW Limit (0 = disabled) */
+ u8 bw_max_quanta; /* Max Quanta when BW limit is enabled */
+
+ /* Relative TC credits across VSIs */
+ u8 bw_ets_share_credits[I40E_MAX_TRAFFIC_CLASS];
+ /* TC BW limit credits within VSI */
+ u16 bw_ets_limit_credits[I40E_MAX_TRAFFIC_CLASS];
+ /* TC BW limit max quanta within VSI */
+ u8 bw_ets_max_quanta[I40E_MAX_TRAFFIC_CLASS];
+
+ struct i40e_pf *back; /* Backreference to associated PF */
+ u16 idx; /* index in pf->vsi[] */
+ u16 veb_idx; /* index of VEB parent */
+ struct kobject *kobj; /* sysfs object */
+
+
+ /* VSI specific handlers */
+ irqreturn_t (*irq_handler)(int irq, void *data);
+} ____cacheline_internodealigned_in_smp;
+
+struct i40e_netdev_priv {
+ struct i40e_vsi *vsi;
+};
+
+/* struct that defines an interrupt vector */
+struct i40e_q_vector {
+ struct i40e_vsi *vsi;
+
+ u16 v_idx; /* index in the vsi->q_vector array. */
+ u16 reg_idx; /* register index of the interrupt */
+
+ struct napi_struct napi;
+
+ struct i40e_ring_container rx;
+ struct i40e_ring_container tx;
+
+ u8 num_ringpairs; /* total number of ring pairs in vector */
+
+ char name[IFNAMSIZ + 9];
+ cpumask_t affinity_mask;
+} ____cacheline_internodealigned_in_smp;
+
+/* lan device */
+struct i40e_device {
+ struct list_head list;
+ struct i40e_pf *pf;
+};
+
+/**
+ * i40e_fw_version_str - format the FW and NVM version strings
+ * @hw: ptr to the hardware info
+ **/
+static inline char *i40e_fw_version_str(struct i40e_hw *hw)
+{
+ static char buf[32];
+
+ snprintf(buf, sizeof(buf),
+ "f%d.%d a%d.%d n%02d.%02d.%02d e%08x",
+ hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
+ hw->aq.api_maj_ver, hw->aq.api_min_ver,
+ (hw->nvm.version & I40E_NVM_VERSION_HI_MASK)
+ >> I40E_NVM_VERSION_HI_SHIFT,
+ (hw->nvm.version & I40E_NVM_VERSION_MID_MASK)
+ >> I40E_NVM_VERSION_MID_SHIFT,
+ (hw->nvm.version & I40E_NVM_VERSION_LO_MASK)
+ >> I40E_NVM_VERSION_LO_SHIFT,
+ hw->nvm.eetrack);
+
+ return buf;
+}
+
+/**
+ * i40e_netdev_to_pf: Retrieve the PF struct for given netdev
+ * @netdev: the corresponding netdev
+ *
+ * Return the PF struct for the given netdev
+ **/
+static inline struct i40e_pf *i40e_netdev_to_pf(struct net_device *netdev)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+
+ return vsi->back;
+}
+
+static inline void i40e_vsi_setup_irqhandler(struct i40e_vsi *vsi,
+ irqreturn_t (*irq_handler)(int, void *))
+{
+ vsi->irq_handler = irq_handler;
+}
+
+/**
+ * i40e_rx_is_programming_status - check for programming status descriptor
+ * @qw: the first quad word of the program status descriptor
+ *
+ * The value of in the descriptor length field indicate if this
+ * is a programming status descriptor for flow director or FCoE
+ * by the value of I40E_RX_PROG_STATUS_DESC_LENGTH, otherwise
+ * it is a packet descriptor.
+ **/
+static inline bool i40e_rx_is_programming_status(u64 qw)
+{
+ return I40E_RX_PROG_STATUS_DESC_LENGTH ==
+ (qw >> I40E_RX_PROG_STATUS_DESC_LENGTH_SHIFT);
+}
+
+/* needed by i40e_ethtool.c */
+int i40e_up(struct i40e_vsi *vsi);
+void i40e_down(struct i40e_vsi *vsi);
+extern const char i40e_driver_name[];
+extern const char i40e_driver_version_str[];
+void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags);
+void i40e_update_stats(struct i40e_vsi *vsi);
+void i40e_update_eth_stats(struct i40e_vsi *vsi);
+struct rtnl_link_stats64 *i40e_get_vsi_stats_struct(struct i40e_vsi *vsi);
+s32 i40e_fetch_switch_configuration(struct i40e_pf *pf,
+ bool printconfig);
+
+/* needed by i40e_main.c */
+void i40e_add_fdir_filter(struct i40e_fdir_data fdir_data,
+ struct i40e_ring *tx_ring);
+void i40e_add_remove_filter(struct i40e_fdir_data fdir_data,
+ struct i40e_ring *tx_ring);
+void i40e_update_fdir_filter(struct i40e_fdir_data fdir_data,
+ struct i40e_ring *tx_ring);
+i40e_status i40e_program_fdir_filter(struct i40e_fdir_data *fdir_data,
+ struct i40e_pf *pf, bool add);
+
+void i40e_set_ethtool_ops(struct net_device *netdev);
+struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi,
+ u8 *macaddr, s16 vlan,
+ bool is_vf, bool is_netdev);
+void i40e_del_filter(struct i40e_vsi *vsi, u8 *macaddr, s16 vlan,
+ bool is_vf, bool is_netdev);
+i40e_status i40e_sync_vsi_filters(struct i40e_vsi *vsi);
+i40e_status __i40e_sync_vsi_filters_locked(struct i40e_vsi *);
+struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,
+ u16 uplink, u32 param1);
+s32 i40e_vsi_release(struct i40e_vsi *vsi);
+struct i40e_vsi *i40e_vsi_lookup(struct i40e_pf *pf, enum i40e_vsi_type type,
+ struct i40e_vsi *start_vsi);
+struct i40e_veb *i40e_veb_setup(struct i40e_pf *pf, u16 flags, u16 uplink_seid,
+ u16 downlink_seid, u8 enabled_tc);
+s32 i40e_veb_release(struct i40e_veb *veb);
+
+i40e_status i40e_sys_add_vsi(struct i40e_vsi *vsi);
+void i40e_sys_del_vsi(struct i40e_vsi *vsi);
+i40e_status i40e_sys_add_veb(struct i40e_veb *veb);
+void i40e_sys_del_veb(struct i40e_veb *veb);
+i40e_status i40e_sys_init(struct i40e_pf *pf);
+void i40e_sys_exit(struct i40e_pf *pf);
+i40e_status i40e_vsi_add_pvid(struct i40e_vsi *vsi, u16 vid);
+i40e_status i40e_vsi_remove_pvid(struct i40e_vsi *vsi);
+void i40e_vsi_reset_stats(struct i40e_vsi *vsi);
+void i40e_pf_reset_stats(struct i40e_pf *pf);
+#ifdef CONFIG_DEBUG_FS
+void i40e_dbg_pf_init(struct i40e_pf *pf);
+void i40e_dbg_pf_exit(struct i40e_pf *pf);
+void i40e_dbg_init(void);
+void i40e_dbg_exit(void);
+#else
+static inline void i40e_dbg_pf_init(struct i40e_pf *pf) {}
+static inline void i40e_dbg_pf_exit(struct i40e_pf *pf) {}
+static inline void i40e_dbg_init(void) {}
+static inline void i40e_dbg_exit(void) {}
+#endif /* CONFIG_DEBUG_FS*/
+void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector);
+int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
+void i40e_vlan_stripping_disable(struct i40e_vsi *vsi);
+int i40e_vsi_add_vlan(struct i40e_vsi *vsi, s16 vid);
+int i40e_vsi_kill_vlan(struct i40e_vsi *vsi, s16 vid);
+i40e_status i40e_put_mac_in_vlan(struct i40e_vsi *vsi, u8 *macaddr,
+ bool is_vf, bool is_netdev);
+bool i40e_is_vsi_in_vlan(struct i40e_vsi *vsi);
+struct i40e_mac_filter *i40e_find_mac(struct i40e_vsi *vsi, u8 *macaddr,
+ bool is_vf, bool is_netdev);
+void i40e_vlan_stripping_enable(struct i40e_vsi *vsi);
+
+#endif /* _I40E_H_ */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_osdep.h b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
new file mode 100644
index 0000000..3ec064c
--- /dev/null
+++ b/drivers/net/ethernet/intel/i40e/i40e_osdep.h
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ *
+ * Intel Ethernet Controller XL710 Family Linux Driver
+ * Copyright(c) 2013 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * The full GNU General Public License is included in this distribution in
+ * the file called "COPYING".
+ *
+ * Contact Information:
+ * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+ * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+ *
+ ******************************************************************************/
+
+#ifndef _I40E_OSDEP_H_
+#define _I40E_OSDEP_H_
+
+#include <linux/types.h>
+#include <linux/if_ether.h>
+#include <linux/if_vlan.h>
+#include <linux/tcp.h>
+#include <linux/pci.h>
+#include <linux/highuid.h>
+
+/* get readq/writeq support for 32 bit kernels, use the low-first version */
+#include <asm-generic/io-64-nonatomic-lo-hi.h>
+
+/* File to be the magic between shared code and
+ * actual OS primitives
+ */
+
+#define hw_dbg(hw, S, A...) do {} while (0)
+
+#define wr32(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
+#define rd32(a, reg) readl((a)->hw_addr + (reg))
+
+#define wr64(a, reg, value) writeq((value), ((a)->hw_addr + (reg)))
+#define rd64(a, reg) readq((a)->hw_addr + (reg))
+#define i40e_flush(a) readl((a)->hw_addr + I40E_GLGEN_STAT)
+
+/* memory allocation tracking */
+struct i40e_dma_mem {
+ void *va;
+ dma_addr_t pa;
+ u32 size;
+} __packed;
+
+#define i40e_allocate_dma_mem(h, m, unused, s, a) \
+ i40e_allocate_dma_mem_d(h, m, s, a)
+#define i40e_free_dma_mem(h, m) i40e_free_dma_mem_d(h, m)
+
+struct i40e_virt_mem {
+ void *va;
+ u32 size;
+} __packed;
+
+#define i40e_allocate_virt_mem(h, m, s) i40e_allocate_virt_mem_d(h, m, s)
+#define i40e_free_virt_mem(h, m) i40e_free_virt_mem_d(h, m)
+
+#define i40e_debug(h, m, s, ...) \
+do { \
+ if (((m) & (h)->debug_mask)) \
+ pr_info("i40e %02x.%x " s, \
+ (h)->bus.device, (h)->bus.func, \
+ ##__VA_ARGS__); \
+} while (0)
+
+
+#define i40e_memset(a, b, c, d) memset((a), (b), (c))
+#define i40e_memcpy(a, b, c, d) memcpy((a), (b), (c))
+
+typedef enum i40e_status_code i40e_status;
+#endif /* _I40E_OSDEP_H_ */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
new file mode 100644
index 0000000..549a6b4
--- /dev/null
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -0,0 +1,259 @@
+/*******************************************************************************
+ *
+ * Intel Ethernet Controller XL710 Family Linux Driver
+ * Copyright(c) 2013 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * The full GNU General Public License is included in this distribution in
+ * the file called "COPYING".
+ *
+ * Contact Information:
+ * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+ * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+ *
+ ******************************************************************************/
+
+/* Interrupt Throttling and Rate Limiting (storm control) Goodies */
+
+#define I40E_MAX_ITR 0x07FF
+#define I40E_MIN_ITR 0x0001
+#define I40E_ITR_USEC_RESOLUTION 2
+#define I40E_MAX_IRATE 0x03F
+#define I40E_MIN_IRATE 0x001
+#define I40E_IRATE_USEC_RESOLUTION 4
+#define I40E_ITR_100K 0x0005
+#define I40E_ITR_20K 0x0019
+#define I40E_ITR_8K 0x003E
+#define I40E_ITR_4K 0x007A
+#define I40E_ITR_RX_DEF I40E_ITR_8K
+#define I40E_ITR_TX_DEF I40E_ITR_4K
+#define I40E_ITR_DYNAMIC 0x8000 /* use top bit as a flag */
+#define I40E_MIN_INT_RATE 250 /* ~= 1000000 / (I40E_MAX_ITR * 2) */
+#define I40E_MAX_INT_RATE 500000 /* == 1000000 / (I40E_MIN_ITR * 2) */
+#define I40E_DEFAULT_IRQ_WORK 256
+#define ITR_TO_REG(setting) ((setting & ~I40E_ITR_DYNAMIC) >> 1)
+#define ITR_IS_DYNAMIC(setting) (!!(setting & I40E_ITR_DYNAMIC))
+#define ITR_REG_TO_USEC(itr_reg) (itr_reg << 1)
+
+#define I40E_QUEUE_END_OF_LIST 0x7FF
+
+#define I40E_ITR_NONE 3
+#define I40E_RX_ITR 0
+#define I40E_TX_ITR 1
+#define I40E_PE_ITR 2
+/* Supported Rx Buffer Sizes */
+#define I40E_RXBUFFER_512 512 /* Used for packet split */
+#define I40E_RXBUFFER_2048 2048
+#define I40E_RXBUFFER_3072 3072 /* For FCoE MTU of 2158 */
+#define I40E_RXBUFFER_4096 4096
+#define I40E_RXBUFFER_8192 8192
+#define I40E_MAX_RXBUFFER 9728 /* largest size for single descriptor */
+
+/* NOTE: netdev_alloc_skb reserves up to 64 bytes, NET_IP_ALIGN means we
+ * reserve 2 more, and skb_shared_info adds an additional 384 bytes more,
+ * this adds up to 512 bytes of extra data meaning the smallest allocation
+ * we could have is 1K.
+ * i.e. RXBUFFER_512 --> size-1024 slab
+ */
+#define I40E_RX_HDR_SIZE I40E_RXBUFFER_512
+
+/* How many Rx Buffers do we bundle into one write to the hardware ? */
+#define I40E_RX_BUFFER_WRITE 16 /* Must be power of 2 */
+#define I40E_RX_NEXT_DESC(r, i, n) \
+ do { \
+ (i)++; \
+ if ((i) == (r)->count) \
+ i = 0; \
+ (n) = I40E_RX_DESC((r), (i)); \
+ } while (0)
+
+#define I40E_RX_NEXT_DESC_PREFETCH(r, i, n) \
+ do { \
+ I40E_RX_NEXT_DESC((r), (i), (n)); \
+ prefetch((n)); \
+ } while (0)
+
+#define i40e_rx_desc i40e_32byte_rx_desc
+
+#define I40E_MIN_TX_LEN 17
+#define I40E_MAX_DATA_PER_TXD 16383 /* aka 16kB - 1 */
+
+/* Tx Descriptors needed, worst case */
+#define TXD_USE_COUNT(S) DIV_ROUND_UP((S), I40E_MAX_DATA_PER_TXD)
+#define DESC_NEEDED ((MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE)) + 4)
+
+#define I40E_TX_FLAGS_CSUM (u32)(1)
+#define I40E_TX_FLAGS_HW_VLAN (u32)(1 << 1)
+#define I40E_TX_FLAGS_SW_VLAN (u32)(1 << 2)
+#define I40E_TX_FLAGS_TSO (u32)(1 << 3)
+#define I40E_TX_FLAGS_IPV4 (u32)(1 << 4)
+#define I40E_TX_FLAGS_IPV6 (u32)(1 << 5)
+#define I40E_TX_FLAGS_FCCRC (u32)(1 << 6)
+#define I40E_TX_FLAGS_FSO (u32)(1 << 7)
+#define I40E_TX_FLAGS_TXSW (u32)(1 << 8)
+#define I40E_TX_FLAGS_MAPPED_AS_PAGE (u32)(1 << 9)
+#define I40E_TX_FLAGS_VLAN_MASK 0xffff0000
+#define I40E_TX_FLAGS_VLAN_PRIO_MASK 0xe0000000
+#define I40E_TX_FLAGS_VLAN_PRIO_SHIFT 29
+#define I40E_TX_FLAGS_VLAN_SHIFT 16
+
+struct i40e_tx_buffer {
+ struct sk_buff *skb;
+ dma_addr_t dma;
+ unsigned long time_stamp;
+ u16 length;
+ u32 tx_flags;
+ struct i40e_tx_desc *next_to_watch;
+ unsigned int bytecount;
+ u16 gso_segs;
+ u8 mapped_as_page;
+};
+
+struct i40e_rx_buffer {
+ struct sk_buff *skb;
+ dma_addr_t dma;
+ struct page *page;
+ dma_addr_t page_dma;
+ unsigned int page_offset;
+};
+
+struct i40e_tx_queue_stats {
+ u64 packets;
+ u64 bytes;
+ u64 restart_queue;
+ u64 tx_busy;
+ u64 completed;
+ u64 tx_done_old;
+};
+
+struct i40e_rx_queue_stats {
+ u64 packets;
+ u64 bytes;
+ u64 non_eop_descs;
+ u64 alloc_rx_page_failed;
+ u64 alloc_rx_buff_failed;
+};
+
+enum i40e_ring_state_t {
+ __I40E_TX_FDIR_INIT_DONE,
+ __I40E_TX_XPS_INIT_DONE,
+ __I40E_TX_DETECT_HANG,
+ __I40E_HANG_CHECK_ARMED,
+ __I40E_RX_PS_ENABLED,
+ __I40E_RX_LRO_ENABLED,
+ __I40E_RX_16BYTE_DESC_ENABLED,
+};
+
+#define ring_is_ps_enabled(ring) \
+ test_bit(__I40E_RX_PS_ENABLED, &(ring)->state)
+#define set_ring_ps_enabled(ring) \
+ set_bit(__I40E_RX_PS_ENABLED, &(ring)->state)
+#define clear_ring_ps_enabled(ring) \
+ clear_bit(__I40E_RX_PS_ENABLED, &(ring)->state)
+#define check_for_tx_hang(ring) \
+ test_bit(__I40E_TX_DETECT_HANG, &(ring)->state)
+#define set_check_for_tx_hang(ring) \
+ set_bit(__I40E_TX_DETECT_HANG, &(ring)->state)
+#define clear_check_for_tx_hang(ring) \
+ clear_bit(__I40E_TX_DETECT_HANG, &(ring)->state)
+#define ring_is_lro_enabled(ring) \
+ test_bit(__I40E_RX_LRO_ENABLED, &(ring)->state)
+#define set_ring_lro_enabled(ring) \
+ set_bit(__I40E_RX_LRO_ENABLED, &(ring)->state)
+#define clear_ring_lro_enabled(ring) \
+ clear_bit(__I40E_RX_LRO_ENABLED, &(ring)->state)
+#define ring_is_16byte_desc_enabled(ring) \
+ test_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)
+#define set_ring_16byte_desc_enabled(ring) \
+ set_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)
+#define clear_ring_16byte_desc_enabled(ring) \
+ clear_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)
+
+/* struct that defines a descriptor ring, associated with a VSI */
+struct i40e_ring {
+ void *desc; /* Descriptor ring memory */
+ struct device *dev; /* Used for DMA mapping */
+ struct net_device *netdev; /* netdev ring maps to */
+ union {
+ struct i40e_tx_buffer *tx_bi;
+ struct i40e_rx_buffer *rx_bi;
+ };
+ unsigned long state;
+ u16 queue_index; /* Queue number of ring */
+ u8 dcb_tc; /* Traffic class of ring */
+ u8 __iomem *tail;
+
+ u16 count; /* Number of descriptors */
+ u16 reg_idx; /* HW register index of the ring */
+ u16 rx_hdr_len;
+ u16 rx_buf_len;
+ u8 dtype;
+#define I40E_RX_DTYPE_NO_SPLIT 0
+#define I40E_RX_DTYPE_SPLIT_ALWAYS 1
+#define I40E_RX_DTYPE_HEADER_SPLIT 2
+ u8 hsplit;
+#define I40E_RX_SPLIT_L2 0x1
+#define I40E_RX_SPLIT_IP 0x2
+#define I40E_RX_SPLIT_TCP_UDP 0x4
+#define I40E_RX_SPLIT_SCTP 0x8
+
+ /* used in interrupt processing */
+ u16 next_to_use;
+ u16 next_to_clean;
+
+ u8 atr_sample_rate;
+ u8 atr_count;
+
+ bool ring_active; /* is ring online or not */
+
+ /* stats structs */
+ union {
+ struct i40e_tx_queue_stats tx_stats;
+ struct i40e_rx_queue_stats rx_stats;
+ };
+
+ unsigned int size; /* length of descriptor ring in bytes */
+ dma_addr_t dma; /* physical address of ring */
+
+ struct i40e_vsi *vsi; /* Backreference to associated VSI */
+ struct i40e_q_vector *q_vector; /* Backreference to associated vector */
+} ____cacheline_internodealigned_in_smp;
+
+enum i40e_latency_range {
+ I40E_LOWEST_LATENCY = 0,
+ I40E_LOW_LATENCY = 1,
+ I40E_BULK_LATENCY = 2,
+};
+
+struct i40e_ring_container {
+#define I40E_MAX_RINGPAIR_PER_VECTOR 8
+ /* array of pointers to rings */
+ struct i40e_ring *ring[I40E_MAX_RINGPAIR_PER_VECTOR];
+ unsigned int total_bytes; /* total bytes processed this int */
+ unsigned int total_packets; /* total packets processed this int */
+ u16 count;
+ enum i40e_latency_range latency_range;
+ u16 itr;
+};
+
+void i40e_alloc_rx_buffers(struct i40e_ring *rxr, u16 cleaned_count);
+netdev_tx_t i40e_lan_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
+void i40e_clean_tx_ring(struct i40e_ring *tx_ring);
+void i40e_clean_rx_ring(struct i40e_ring *rx_ring);
+int i40e_setup_tx_descriptors(struct i40e_ring *tx_ring);
+int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring);
+void i40e_free_tx_resources(struct i40e_ring *tx_ring);
+void i40e_free_rx_resources(struct i40e_ring *rx_ring);
+int i40e_napi_poll(struct napi_struct *napi, int budget);
--
1.8.3.1
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox