Jon Paul Maloy [Mon, 9 Mar 2015 18:44:13 +0000 (14:44 -0400)]
tipc: Add Ying Xue to TIPC maintainers list
We remove Allan Stephens, who has moved on to other tasks, from
the TIPC maintainers list. He is replaced by Ying Xue, who has
been doing the maintenance on behalf of WindRiver since almost
three years.
Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Mon, 9 Mar 2015 18:14:37 +0000 (13:14 -0500)]
net: Remove protocol from struct dst_ops
After my change to neigh_hh_init to obtain the protocol from the
neigh_table there are no more users of protocol in struct dst_ops.
Remove the protocol field from dst_ops and all of it's initializers.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 Mar 2015 20:04:53 +0000 (16:04 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates 2015-03-09
This series contains updates to i40e and i40evf.
Greg cleans up some "hello world" strings which were left around from
early development.
Shannon modifies the drive to make sure the sizeof() calls are taking
the size of the actual struct that we care about. Also updates the
NVMUpdate read/write so that it is less noisy when logging. This was
because the NVMUpdate tool does not necessarily know the ReadOnly map of
the current NVM image, and must try reading and writing words that may be
protected. This generates an error out of the Firmware request that the
driver logs. Unfortunately, this ended up spitting out hundreds of
bogus read/write error messages. If a user wants the noisy logging,
the change can be overridden by enabling the NVM update debugging.
Mitch fixes a possible deadlock issue where if a reset occurred when the
netdev is closed, the reset task will hang in napi_disable. Added
ethtool RSS support as suggested by Ben Hutchings.
Jesse fixes a bug introduced in the force writeback code, where the
interrupt rate was set to 0 (maximum) by accident. The driver must
correctly set the NOITR fields to avoid IT update as a side effect
of triggering the software interrupt.
I provided a simple cleanup to make the use of PF/VF consistent, which
was reported by Joe Perches.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 Mar 2015 19:58:21 +0000 (15:58 -0400)]
Merge git://git./linux/kernel/git/pablo/nf-next
Pablo Neira Ayuso says:
====================
Netfilter updates for net-next
The following patchset contains Netfilter updates for your net-next
tree. Basically, improvements for the packet rejection infrastructure,
deprecation of CLUSTERIP, cleanups for nf_tables and some untangling for
br_netfilter. More specifically they are:
1) Send packet to reset flow if checksum is valid, from Florian Westphal.
2) Fix nf_tables reject bridge from the input chain, also from Florian.
3) Deprecate the CLUSTERIP target, the cluster match supersedes it in
functionality and it's known to have problems.
4) A couple of cleanups for nf_tables rule tracing infrastructure, from
Patrick McHardy.
5) Another cleanup to place transaction declarations at the bottom of
nf_tables.h, also from Patrick.
6) Consolidate Kconfig dependencies wrt. NF_TABLES.
7) Limit table names to 32 bytes in nf_tables.
8) mac header copying in bridge netfilter is already required when
calling ip_fragment(), from Florian Westphal.
9) move nf_bridge_update_protocol() to br_netfilter.c, also from
Florian.
10) Small refactor in br_netfilter in the transmission path, again from
Florian.
11) Move br_nf_pre_routing_finish_bridge_slow() to br_netfilter.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Geert Uytterhoeven [Mon, 9 Mar 2015 11:54:48 +0000 (12:54 +0100)]
mpls: Spelling: s/conceved/conceived/, s/as/a/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Erik Hugne [Mon, 9 Mar 2015 09:43:42 +0000 (10:43 +0100)]
tipc: fix inconsistent signal handling regression
Commit
9bbb4ecc6819 ("tipc: standardize recvmsg routine") changed
the sleep/wakeup behaviour for sockets entering recv() or accept().
In this process the order of reporting -EAGAIN/-EINTR was reversed.
This caused problems with wrong errno being reported back if the
timeout expires. The same problem happens if the socket is
nonblocking and recv()/accept() is called when the process have
pending signals. If there is no pending data read or connections to
accept, -EINTR will be returned instead of -EAGAIN.
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Reported-by László Benedek <laszlo.benedek@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 9 Mar 2015 19:38:35 +0000 (15:38 -0400)]
Merge tag 'iwlwifi-next-for-kalle-2015-03-07' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next
fix compilation when DEBUGFS isn't set
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko [Mon, 9 Mar 2015 09:26:24 +0000 (10:26 +0100)]
switchdev: use gpl variant of symbol export
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Erik Hugne [Mon, 9 Mar 2015 09:19:31 +0000 (10:19 +0100)]
tipc: sparse: fix htons conversion warnings
Commit
d0f91938bede ("tipc: add ip/udp media type") introduced
some new sparse warnings. Clean them up.
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Fri, 6 Mar 2015 19:47:59 +0000 (11:47 -0800)]
net_sched: destroy proto tp when all filters are gone
Kernel automatically creates a tp for each
(kind, protocol, priority) tuple, which has handle 0,
when we add a new filter, but it still is left there
after we remove our own, unless we don't specify the
handle (literally means all the filters under
the tuple). For example this one is left:
# tc filter show dev eth0
filter parent 8001: protocol arp pref 49152 basic
The user-space is hard to clean up these for kernel
because filters like u32 are organized in a complex way.
So kernel is responsible to remove it after all filters
are gone. Each type of filter has its own way to
store the filters, so each type has to provide its
way to check if all filters are gone.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jamal Hadi Salim<jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mitch A Williams [Thu, 5 Mar 2015 04:14:40 +0000 (04:14 +0000)]
i40e: add ethtool RSS support
Add support for setting the RSS hash table and hash key through ethtool.
This patch incorporates suggestions from Ben Hutchings
<ben.hutchings@codethink.co.uk>.
Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Catherine Sullivan [Fri, 27 Feb 2015 09:18:37 +0000 (09:18 +0000)]
i40e/i40evf: Bump i40e/i40evf version
Bump PF version to 1.2.37 and VF version to 1.2.25
Change-ID: I0287a750408250dc055c03e1f744fd5f0caefd68
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Fri, 27 Feb 2015 09:18:36 +0000 (09:18 +0000)]
i40e: add MAC printing to debugfs dump VSI
Print the LAN, SAN, and Port MACs for the VSI if debugfs command
dump VSI is used on the PF's VSI.
Example output:
[260221.871244] i40e 0000:04:00.0: MAC address: 68:05:ca:26:15:e0 SAN MAC: 00:00:00:00:02:00 Port MAC: 68:05:ca:26:15:e3
Change-ID: I0b393113dfb5ee7ff4f9e5227e4177885f0cc15e
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Pablo Neira Ayuso [Mon, 9 Mar 2015 11:30:12 +0000 (12:30 +0100)]
netfilter: bridge: move DNAT helper to br_netfilter
Only one caller, there is no need to keep this in a header.
Move it to br_netfilter.c where this belongs to.
Based on patch from Florian Westphal.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Florian Westphal [Wed, 4 Mar 2015 23:52:36 +0000 (00:52 +0100)]
netfilter: bridge: refactor conditional in br_nf_dev_queue_xmit
simpilifies followup patch that re-works brnf ip_fragment handling.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Florian Westphal [Wed, 4 Mar 2015 23:52:34 +0000 (00:52 +0100)]
netfilter: bridge: move nf_bridge_update_protocol to where its used
no need to keep it in a header file.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Florian Westphal [Wed, 4 Mar 2015 23:52:33 +0000 (00:52 +0100)]
bridge: move mac header copying into br_netfilter
The mac header only has to be copied back into the skb for
fragments generated by ip_fragment(), which only happens
for bridge forwarded packets with nf-call-iptables=1 && active nf_defrag.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Jeff Kirsher [Fri, 27 Feb 2015 09:18:34 +0000 (09:18 +0000)]
i40e: Fix inconsistent use of PF/VF vs pf/vf
Joe Perches pointed out that we were inconsistent in the use of
PF vs pf or VF vs vf in our driver code. Since acronyms are usually
capitalized to denote that it is an acronym, changed all references to
be consistent throughout the code.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Fri, 27 Feb 2015 09:18:33 +0000 (09:18 +0000)]
i40e: tame the nvmupdate read and write complaints
The NVMUpdate tool doesn't necessarily know the ReadOnly map of the current
NVM image, and must try reading and writing words that may be protected.
This generates an error out of the Firmware request that the driver logs.
Unfortunately, this ends up spitting out hundreds of bogus read and write
error message that looks rather messy.
This patch checks the error type and under normal conditions will not print
the typical read and write errors during NVMUpdate. This can be overridden
by enabling the NVM update debugging. This results in a much less messy log
file, and likely many fewer customer support questions.
Change-ID: Id4ff2e9048c523b0ff503aa5ab181b025ec948ea
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jesse Brandeburg [Fri, 27 Feb 2015 09:18:32 +0000 (09:18 +0000)]
i40e/i40evf: fix accidental write to ITR registers
Fix a bug introduced in the force writeback code, where the interrupt
rate was set to 0 (maximum) by accident.
The driver must correctly set the NOITR fields to avoid ITR update
as a side effect of triggering the software interrupt.
Change-ID: I290851ae04ef3811c43aab5ee33242029f26c1a3
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Mitch Williams [Fri, 27 Feb 2015 09:18:31 +0000 (09:18 +0000)]
i40vf: don't stop me now
If a reset occurs when the netdev is closed, the reset task will hang in
napi_disable, causing deadlocks and general grumpiness.
Check to make sure the device is actually running before stopping
everything. This allows the reset task to complete and have a real good
time.
Change-ID: Iaaea84acbcb9b3810c216b14c3326e4287b75b58
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Fri, 27 Feb 2015 09:18:30 +0000 (09:18 +0000)]
i40e: future proof some sizeof calls
Make sure the sizeof() calls are taking the size of the actual struct
that we care about. By using the pointer variable, we'll always get
the right struct size, even if the variable type changes sometime in
the future.
Change-ID: Id5858f883cf42447365ea3733080d7714f975bce
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Greg Rose [Fri, 27 Feb 2015 09:18:29 +0000 (09:18 +0000)]
i40e: Remove "hello world" strings from i40e driver
While using the Linux "strings" command I found these two strings in the
driver. There's no need for them and they're kinda silly.
Change-ID: I4e19b02983d48b631e9a9979f49790492845f221
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Boris BREZILLON [Sat, 7 Mar 2015 06:37:06 +0000 (07:37 +0100)]
net/macb: Update DT bindings documentation
Add missing "cdns,at91sam9260-macb", "atmel,sama5d3-gem" and
"atmel,sama5d4-gem" compatible strings.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Sat, 7 Mar 2015 04:49:12 +0000 (20:49 -0800)]
ethernet: codespell comment spelling fixes
To test a checkpatch spelling patch, I ran codespell against
drivers/net/ethernet/.
$ git ls-files drivers/net/ethernet/ | \
while read file ; do \
codespell -w $file; \
done
I removed a false positive in e1000_hw.h
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dinh Nguyen [Fri, 6 Mar 2015 23:48:28 +0000 (17:48 -0600)]
net: stmmac: make reset control an optional requirement
Not having a reset control line to the ethernet controller should not be a
hard failure. Instead, add support for deferred probing and just print out
a debug statement.
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
CC: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 Mar 2015 23:30:31 +0000 (19:30 -0400)]
Merge branch 'mpls-next'
Eric W. Biederman says:
====================
mpls: Minor fixes and cleanups
This is a bunch of small changes that have come out of the discussions
of the mpls code and the automated tests that people run against things.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Sat, 7 Mar 2015 22:25:56 +0000 (16:25 -0600)]
neigh: Use neigh table index for neigh_packet_xmit
Remove a little bit of unnecessary work when transmitting a packet with
neigh_packet_xmit. Use the neighbour table index not the address family
as a parameter.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Sat, 7 Mar 2015 22:24:23 +0000 (16:24 -0600)]
mpls: Fix the openvswitch select of NET_MPLS_GSO
Fix the OPENVSWITCH Kconfig option and old Kconfigs by having
OPENVSWITCH select both NET_MPLS_GSO and MPLSO.
A Kbuild test robot reported that when NET_MPLS_GSO is selected by
OPENVSWITCH the generated .config is broken because MPLS is not
selected.
Cc: Simon Horman <horms@verge.net.au>
Fixes:
cec9166ca4e mpls: Refactor how the mpls module is built
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Sat, 7 Mar 2015 22:23:23 +0000 (16:23 -0600)]
mpls: Correct the ttl decrement.
According to RFC3032 section 2.4.2 packets with an outgoing
ttl of 0 MUST NOT be forwarded. According to section 2.4.1
an outgoing TTL of 0 comes from an incomming TTL <= 1.
Therefore any packets that is received with a ttl <= 1 should
not have it's ttl decremented and forwarded.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Sat, 7 Mar 2015 22:22:40 +0000 (16:22 -0600)]
mpls: Better error code for unsupported option.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Sat, 7 Mar 2015 22:21:56 +0000 (16:21 -0600)]
mpls: Cleanup the rcu usage in the code.
Sparse was generating a lot of warnings mostly from missing annotations
in the code. Add missing annotations and in a few cases tweak the code
for performance by moving work before loops.
This also fixes a problematic ommision of rcu_assign_pointer and
rcu_dereference.
Hopefully with complete rcu annotations any new rcu errors will stick
out like a sore thumb.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Sat, 7 Mar 2015 22:19:41 +0000 (16:19 -0600)]
mpls: Fix the kzalloc argument order in mpls_rt_alloc
*Blink* I got the argument order wrong to kzalloc and the
code was working properly when tested. *Blink*
Fix that.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
stephen hemminger [Sun, 8 Mar 2015 18:48:49 +0000 (11:48 -0700)]
neterion: remove reference to ifconfig
Remove reference to obsolete ifconfig command.
MTU can be changed with ip command instead.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 Mar 2015 03:36:12 +0000 (22:36 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates 2015-03-07
This series contains updates to i40e and i40evf only.
Most notably, Greg provides the patch to remove the dreaded configfs
changes in the driver.
Shannon cleans up a sparse warning by simply straighting out the code
so it is less convoluted. Fixes an issue where the vector allocation
was trying too hard to save vectors for VMDq, to the point of not giving
the PF enough when in a tight situation, such as an NPAR partition.
Changed the driver to make sure that the PF will get all the queues and
vectors it wants to fill out its destiny. Cleans up reporting to only
print the port and VEB stats if it is the first partition of a
multiplexed port.
Catherine cleans up some duplicated code by simply removing the duplicate
code.
Kamil cleans up the driver by removing an un-needed endian conversion
because it is already done by a register read function.
Jesse fixes a variable width of a datatype, where a u16 should have been
a u32. Also cleans up debug_read_register() to resolve some sparse
warnings. Updates the driver to use prefetch() to get the next Tx
descriptor, like in ixgbe, to improve performance.
Akeem moves around code to enable/disable loopback so that other non-SRIOV
supported driver functions can take advantage of the changes.
Anjali cleans up the logging for adding/deleting FD-SB filters, since
ethtool shows all the filters on an interface. Updates the driver to
use l4_tunnel type generically to keep code flow simple. Simplifies
the RSS code since the driver initializes the rss_size_max in sw_init.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Guenter Roeck [Sat, 7 Mar 2015 06:23:52 +0000 (22:23 -0800)]
net: dsa: mv88e6352: Add support for EEE
Enable EEE support for MV88E6352.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guenter Roeck [Sat, 7 Mar 2015 06:23:51 +0000 (22:23 -0800)]
net: dsa: mv88e6xxx: Add EEE support
EEE configuration is similar for the various MV88E6xxx chips.
Add generic support for it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Petri Gynther [Fri, 6 Mar 2015 21:45:00 +0000 (13:45 -0800)]
net: bcmgenet: rework Rx queue init
In preparation for supporting multiple Rx queues:
1. Move the initialization of priv->num_rx_bds, priv->rx_bds, and
priv->rx_cbs from bcmgenet_init_rx_ring() to bcmgenet_init_dma()
since they are not specific to a single Rx queue. Mimics the Tx
init model where priv->num_tx_bds, priv->tx_bds, and priv->tx_cbs
are initialized in bcmgenet_init_dma().
2. Program DMA_MBUF_DONE_THRESH = 1 so that future Rx queues Q0-Q15
will get per-packet Rx interrupt.
3. Group DMA_START_ADDR, RDMA_READ_PTR, RDMA_WRITE_PTR, and DMA_END_ADDR
initialization together. Mimics the Tx init model.
4. There is 1-to-1 mapping between RxCBs and RxBDs.
Precalculate RxCB->bd_addr so that it can be used in the future.
Signed-off-by: Petri Gynther <pgynther@google.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 8 Mar 2015 03:31:56 +0000 (22:31 -0500)]
Merge branch 'macb-next'
Merge branch 'macb-next'
Boris Brezillon says:
====================
net/macb: merge at91_ether driver into macb driver
The rm9200 boards use the dedicated at91_ether driver instead of the
regular macb driver.
Both the macb and at91_ether drivers can be compiled as separated
modules.
Since the at91_ether driver uses code from the macb driver, at91_ether.ko
depends on macb.ko.
However the macb.ko module always fails to load on rm9200 boards: the
macb_probe() function expects a hclk clock which doesn't exist on rm9200.
Then the at91_ether.ko can't be loaded in turn due to unresolved
dependencies.
This series of patches fix this issue by merging at91_ether into macb.
Patch 1 is fixing a problem that might happen when enabling ARM
multi-platform suppot.
Changes since v3:
- move "net: macb: remove #if defined(CONFIG_ARCH_AT91) sections" patch
into this series to avoid dependency on other patch series.
Changes since v2:
- rebase after changed brought by commit "net: macb: remove #if
defined(CONFIG_ARCH_AT91) sections"
Changes since v1:
- rework probe functions to share common probing logic
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Cyrille Pitchen [Sat, 7 Mar 2015 06:23:32 +0000 (07:23 +0100)]
net/macb: merge at91_ether driver into macb driver
macb and at91_ether drivers can be compiled as modules, but the at91_ether
driver use some functions and variables defined in the macb one, thus
creating a dependency on the macb driver.
Since these drivers are sharing the same logic we can easily merge
at91_ether into macb.
In order to factorize common probing logic we've added an ->init() function
to struct macb_config (the structure associated with the compatible
string), and moved macb specific init code from macb_probe to macb_init.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cyrille Pitchen [Sat, 7 Mar 2015 06:23:31 +0000 (07:23 +0100)]
net/macb: unify clock management
Most of the functions from the Common Clk Framework handle NULL pointer as
input argument.
Since the TX clock is optional, we now set tx_clk to NULL value
instead of ERR_PTR(-ENOENT) when this clock is not available. This simplifies
the clock management and avoid the need to test tx_clk value.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Boris BREZILLON [Sat, 7 Mar 2015 06:23:30 +0000 (07:23 +0100)]
net: macb: remove #if defined(CONFIG_ARCH_AT91) sections
With multi platform support those sections could lead to unexpected
behavior if both ARCH_AT91 and another ARM SoC using the MACB IP are
selected.
Add two new capabilities to encode the default MII mode and the presence
of a CLKEN bit in USRIO register.
Then define the appropriate config for IPs embedded in at91 SoCs.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Boris BREZILLON [Sat, 7 Mar 2015 06:23:29 +0000 (07:23 +0100)]
ARM: at91/dt: fix macb compatible strings
Some at91 SoCs embed a 10/100 Mbit Ethernet IP, that is based on the
at91sam9260 SoC.
Fix at91 DTs accordingly.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Emmanuel Grumbach [Sat, 7 Mar 2015 17:35:37 +0000 (19:35 +0200)]
iwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set
The commits below broke compilation when
CONFIG_IWLWIFI_DEBUGFS is not set.
FIx that.
Fixes:
ddf89ab10a93 ("iwlwifi: mvm: allow to force the Rx chains from debugfs")
Fixes:
9d761fd8a583 ("iwlwifi: mvm: add trigger for firmware dump upon missed beacons")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Greg Rose [Fri, 6 Mar 2015 01:41:07 +0000 (01:41 +0000)]
i40e: Strip configfs code
The use of configfs is not allowed in network drivers. Strip the code that
uses it.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Sravanthi Tangeda [Fri, 27 Feb 2015 09:15:33 +0000 (09:15 +0000)]
i40e/i40evf: Bump version
Bump i40e to 1.2.12 and i40evf to 1.2.6.
Change-ID: I641871da3a9abd396b28eda5744a4d68493c1400
Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jesse Brandeburg [Fri, 27 Feb 2015 09:15:31 +0000 (09:15 +0000)]
i40e/i40evf: enable prefetch of Tx descriptors during cleanup
Performance can be improved a bit by imitating ixgbe and using
prefetch to get us the next Tx descriptor.
Change-ID: Ice7ffd4cd0ce87c35295059bdb7972a7f53723aa
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Anjali Singhai Jain [Fri, 27 Feb 2015 09:15:30 +0000 (09:15 +0000)]
i40e: Simplify code for rss_size_max config
We initialize the pf->rss_size_max in sw_init now
and hence this code can be simplified.
Change-ID: I1a7abc837604a40bc65e6c6b21190b909ed6bb21
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Anjali Singhai Jain [Fri, 27 Feb 2015 09:15:29 +0000 (09:15 +0000)]
i40e/i40evf: Simplify tunnel selection logic
Use l4_tunnel type generically to keep code flow simple.
Change-ID: Ic52287e3b1ca4204e6b6e13431890c1a6ae9c422
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Anjali Singhai Jain [Fri, 27 Feb 2015 09:15:28 +0000 (09:15 +0000)]
i40e: FD filters flush policy changes
Since GLQF_FDCNT_0 register now has the right offset, use it to simplify our
FD flush flow.
If the filter add error happens to be for SB we just auto disable SB.
If filter error happens to be for ATR, auto disable ATR and mark
the state to FD_FLUSH_REQUESTED. Which gets cleared when flush completes.
If we are entering flush too quickly (< 30 seconds) and we have quite
a few SB rules, its time to disable ATR for good. Since SB + ATR rules
is most likely making the FD table unstable.
ATR can be re-enabled by turning ntuple off (ethtool -K ntuple off)
and will remain off after turning ntuple on till it gets unstable again.
Change-ID: I2154a2e0a5d44851a2f0eb8731e2f1d4a4d1acbc
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Anjali Singhai Jain [Fri, 27 Feb 2015 09:15:27 +0000 (09:15 +0000)]
i40e: Avoid logs while adding/deleting FD-SB filters
It is not necessary to print FD filter add/delete log with
normal debug settings because ethtool -n ethx shows all the FD-SB
filters on an interface. The log can still be turned on through higher
debug levels and it will continue to print a log if there was an error
in the add/delete process.
Change-ID: I67db2baf49e2075d2f537de40f7895e5b02cd610
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Fri, 27 Feb 2015 09:15:26 +0000 (09:15 +0000)]
i40e: print port stats only on partition 1
Only print the port and veb stats if this is the first partition
of a multiplexed port.
Change-ID: I7ce0c323cdee5cfd2e54d8bea5b0b9102987e671
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Akeem G Abodunrin [Fri, 27 Feb 2015 09:15:25 +0000 (09:15 +0000)]
i40e: Move code to enable/disable Loopback to the main file
Since changes made to enable or disable loopback for all VSIs, not only SR-IOV
or PCIOV, then it became necessary to move the associated functions to main
file - so that other non-SRIOV supported driver can take advantage of the
changes.
Change-ID: I59a49fd23a6136acda5e16f8d1e5ac7fd9c5fc05
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Fri, 27 Feb 2015 09:15:24 +0000 (09:15 +0000)]
i40e: rework vector reservation
The initial problem solved here is that the vector allocation was trying
too hard to save vectors for VMDq, to the point of not giving the PF enough
when in a tight situation such as an NPAR partition. This change makes
sure that the PF will get all the queues and vectors it wants to fill
out its destiny. Essentially, nothing is specially reserved for VMDq,
it simply gets whatever is left after the PF, FCoE, and FD sideband get
what they want.
Additionally, the calculations for the reservations were harder to follow
than necessary, so I've made it more straight forward.
Change-ID: I99b384f104535b686c690b8ef0a787559485c8d4
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jesse Brandeburg [Fri, 27 Feb 2015 09:15:23 +0000 (09:15 +0000)]
i40e: clean up debug_read_register
There were some additional spaces and strange (double swapping) logic
in this function that I started looking at because sparse was warning.
This fixes the sparse warning and fixes up the other issues.
Change-ID: I72a91a4197cd45921602649040e6bd25e5f17c0a
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Jesse Brandeburg [Fri, 27 Feb 2015 09:15:22 +0000 (09:15 +0000)]
i40e: store msg_enable in the right size
The kernel returns a u32 for netif_msg_init, and we were storing
it in a u16. Fix the width of the datatype.
Change-ID: I4b23326e5707c91cd59325c5a1ccb2ba7a3974fc
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Kamil Krawczyk [Fri, 27 Feb 2015 09:15:21 +0000 (09:15 +0000)]
i40e: Remove unneeded conversion
Remove LE16 to CPU endianes conversion from i40e_read_nvm_word_srctl
function, as it's already done by register read function.
Change-ID: I739f0f20a9b8e18223e54c0ca5443e63d75da878
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Catherine Sullivan [Fri, 27 Feb 2015 09:15:20 +0000 (09:15 +0000)]
i40e: Remove duplicate code
This series of code was repeated twice, remove one of them.
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Shannon Nelson [Fri, 27 Feb 2015 09:15:19 +0000 (09:15 +0000)]
i40e/i40evf: Refactor i40e_debug_aq and make some functions static
A sparse complaint in i40e_debug_aq in a funky buffer write goes away by
straightening out the code out to something less convoluted.
Also fix some other sparse warnings while we are at it, making some
functions static and using NULL instead of 0.
Change-ID: I93907534fe1f1f675830774b3d14ecf1c6ffc9a0
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Scott Feldman [Fri, 6 Mar 2015 23:54:52 +0000 (15:54 -0800)]
rocker: sparse: fix dynamic allocation on stack warning
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 23:54:51 +0000 (15:54 -0800)]
rocker: quiet sparce endianess warnings
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Reviewed-by: Jonathan Toppins <jtoppins@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Borkmann [Thu, 5 Mar 2015 22:27:51 +0000 (23:27 +0100)]
ebpf: bpf_map_*: fix linker error on avr32 and openrisc arch
Fengguang reported, that on openrisc and avr32 architectures, we
get the following linker errors on *_defconfig builds that have
no bpf syscall support:
net/built-in.o:(.rodata+0x1cd0): undefined reference to `bpf_map_lookup_elem_proto'
net/built-in.o:(.rodata+0x1cd4): undefined reference to `bpf_map_update_elem_proto'
net/built-in.o:(.rodata+0x1cd8): undefined reference to `bpf_map_delete_elem_proto'
Fix it up by providing built-in weak definitions of the symbols,
so they can be overridden when the syscall is enabled. I think
the issue might be that gcc is not able to optimize all that away.
This patch fixes the linker errors for me, tested with Fengguang's
make.cross [1] script.
[1] https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Fixes:
d4052c4aea0c ("ebpf: remove CONFIG_BPF_SYSCALL ifdefs in socket filter code")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Thu, 5 Mar 2015 21:47:48 +0000 (13:47 -0800)]
net: gro: remove obsolete code from skb_gro_receive()
Some drivers use copybreak to copy tiny frames into smaller skb,
and this smaller skb might not have skb->head_frag set for various
reasons.
skb_gro_receive() currently doesn't allow to aggregate the smaller skb
into the previous GRO packet if this GRO packet has at least 2 MSS in
it.
Following workload easily demonstrates the problem.
netperf -t TCP_RR -H target -- -r 3000,3000
(tcpdump shows one GRO packet with 2 MSS, plus one additional packet of
104 bytes that should have been appended.)
It turns out that we can remove code from skb_gro_receive(), because
commit
8a29111c7ca6 ("net: gro: allow to build full sized skb") and its
followups removed the assumption that a GRO packet with a frag_list had
to have an empty head.
Removing this code allows the aggregation of the last (incomplete) frame
in some RPC workloads. Note that tcp_gro_receive() already takes care of
forcing a flush if necessary, including this case.
If we want to avoid using frag_list in the first place (in forwarding
workloads for example, as the outgoing NIC is generally not able to cope
with skbs having a frag_list), we need to address this separately.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Thu, 5 Mar 2015 17:48:46 +0000 (20:48 +0300)]
ax25: remove unneeded NULL test in ax_xmit()
We get a static checker warning here on devel kernels:
drivers/net/hamradio/mkiss.c:560 ax_xmit()
warn: variable dereferenced before check 'skb' (see line 532)
It turns out that the NULL check can be deleted.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 7 Mar 2015 02:50:07 +0000 (21:50 -0500)]
Merge branch 'mlx4-qcn'
Or Gerlitz says:
====================
Add QCN support to the DCB NL layer
This series from Shani Michaeli adds support for the IEEE QCN attribute
to the kernel DCB NL stack, and implementation in the mlx4 driver which
programs the firmware according to the admin directives.
changes from V0:
- applied feedback from John and added his acked-by to patch #1
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Shani Michaeli [Thu, 5 Mar 2015 18:16:13 +0000 (20:16 +0200)]
net/mlx4_en: Add QCN parameters and statistics handling
Implement the IEEE DCB handlers for set/get QCN parameters and
statistics reading per TC.
Signed-off-by: Shani Michaeli <shanim@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Shani Michaeli [Thu, 5 Mar 2015 18:16:12 +0000 (20:16 +0200)]
net/mlx4_core: Add basic elements for QCN
Add device capability, firmware command opcode and etc prior elements
needed for QCN suppprt. Disable SRIOV VF view/access for QCN is disabled.
While here, remove a redundant offset definition into the
QUERY_DEV_CAP mailbox.
Signed-off-by: Shani Michaeli <shanim@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Shani Michaeli [Thu, 5 Mar 2015 18:16:11 +0000 (20:16 +0200)]
net/dcb: Add IEEE QCN attribute
As specified in 802.1Qau spec. Add this optional attribute to the
DCB netlink layer. To allow for application to use the new attribute,
NIC drivers should implement and register the callbacks ieee_getqcn,
ieee_setqcn and ieee_getqcnstats.
The QCN attribute holds a set of parameters for management, and
a set of statistics to provide informative data on Congestion-Control
defined by this spec.
Signed-off-by: Shani Michaeli <shanim@mellanox.com>
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 20:49:35 +0000 (15:49 -0500)]
Merge branch 'fib_trie-next'
Alexander Duyck says:
====================
The rest of the FIB patches (add key_vector to fib_table)
This patch series is the rest of what I had originally planned for this kernel
release. It adds a structure called key_vector which is embedded within
every tnode, leaf, and the trie root itself. By doing this we can navigate
from any point within the trie to any other point fairly quickly and
avoiding NULL pointer checks in the case of a backtrace. As a result we
can pipeline things a bit further since we don't have to worry about
dereferencing NULL in a backtrace. This can amount to significant savings
on a long backtrace.
I decided to drop the up-level code as that conflicts with combining the
main and local tries. I have one patch as an RFC that currently combines
the tries however it still needs some work as we have to split the local
and main tries in the event of custom rules being defined. As such we are
probably going to be doing some more hacking on fib_table_flush_external as
that will also need to flush the local entries from the main trie and place
them back in the local trie.
v2: Rebased on the switchdev FIB offload work
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:52 +0000 (09:54 -0800)]
fib_trie: Add key vector to root, return parent key_vector in resize
This change makes it so that the root of the trie contains a key_vector, by
doing this we make room to essentially collapse the entire trie by at least
one cache line as we can store the information about the tnode or leaf that
is pointed to in the root.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:46 +0000 (09:54 -0800)]
fib_trie: Move parent from key_vector to tnode
This change pulls the parent pointer from the key_vector and places it in
the tnode structure.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:39 +0000 (09:54 -0800)]
fib_trie: Pull empty_children and full_children into tnode
This pulls the information about the child array out of the key_vector and
places it in the tnode since that is where it is needed.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:33 +0000 (09:54 -0800)]
fib_trie: Move rcu from key_vector to tnode, add accessors.
RCU is only needed once for the entire node, not once per key_vector so we
can pull that out and move it to the tnode structure.
In addition add accessors to be used inside the RCU functions so that we
can more easily get from the key vector to either the tnode or the trie
pointers.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:27 +0000 (09:54 -0800)]
fib_trie: Add tnode struct as a container for fields not needed in key_vector
This change pulls the fields not explicitly needed in the key_vector and
placed them in the new tnode structure. By doing this we will eventually
be able to reduce the key_vector down to 16 bytes on 64 bit systems, and
12 bytes on 32 bit systems.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:21 +0000 (09:54 -0800)]
fib_trie: Rename tnode_child_length to child_length
We are now checking the length of a key_vector instead of a tnode so it
makes sense to probably just rename this to child_length since it would
probably even be applicable to a leaf.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:14 +0000 (09:54 -0800)]
fib_trie: replace tnode_get_child functions with get_child macros
I am replacing the tnode_get_child call with get_child since we are
techically pulling the child out of a key_vector now and not a tnode.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:08 +0000 (09:54 -0800)]
fib_trie: Rename tnode to key_vector
Rename the tnode to key_vector. The key_vector will be the eventual
container for all of the information needed by either a leaf or a tnode.
The final result should be much smaller than the 40 bytes currently needed
for either one.
This also updates the trie struct so that it contains an array of size 1 of
tnode pointers. This is to bring the structure more inline with how an
actual tnode itself is configured.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:54:02 +0000 (09:54 -0800)]
fib_trie: Return pointer to tnode pointer in resize/inflate/halve
Resize related functions now all return a pointer to the pointer that
references the object that was resized.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 6 Mar 2015 17:53:56 +0000 (09:53 -0800)]
fib_trie: Minor cleanups to fib_table_flush_external
This change just does a couple of minor cleanups on
fib_table_flush_external. Specifically it addresses the fact that resize
was being called even though nothing was being removed from the table, and
it drops an unecessary indent since we could just call continue on the
inverse of the fi && flag check.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Punnaiah Choudary Kalluri [Fri, 6 Mar 2015 17:29:12 +0000 (18:29 +0100)]
net: macb: Fix multi queue support for xilinx ZynqMP
ZynqMP soc has single interrupt for all the queue events. So,
passing the IRQF_SHARED flag for interrupt registration call.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Punnaiah Choudary Kalluri [Fri, 6 Mar 2015 17:29:11 +0000 (18:29 +0100)]
net: macb: Include multi queue support for xilinx ZynqMP ethernet version
Include multi queue support for the ethernet IP version in xilinx ZynqMP
SoC.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 20:46:08 +0000 (15:46 -0500)]
Merge tag 'wireless-drivers-next-for-davem-2015-03-06' of git://git./linux/kernel/git/kvalo/wireless-drivers-next
Major changes:
brcmfmac:
* sdio improvements
* add a debugfs file so users can provide us all the revinfo we could
ask for
iwlwifi:
* add triggers for firmware dump collection
* remove support for -9.ucode
* new statitics API
* rate control improvements
ath9k:
* add per-vif TX power capability
* BT coexistance fixes
ath10k:
* qca6174: enable STA transmit beamforming (TxBF) support
* disable multi-vif power save by default
bcma:
* enable support for PCIe Gen 2 host devices
Signed-off-by: David S. Miller <davem@davemloft.net>
Willem de Bruijn [Fri, 6 Mar 2015 16:44:28 +0000 (11:44 -0500)]
fib: make netdev_switch_fib_ipv4_abort in header file static inline
When building without CONFIG_NET_SWITCHDEV,
netdev_switch_fib_ipv4_abort is defined in the header file. It must
be static inline to avoid build failure at link time.
Fixes:
8e05fd7166c6 ("fib: hook IPv4 fib for hardware offload")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Shearman [Fri, 6 Mar 2015 10:47:00 +0000 (10:47 +0000)]
mpls: Properly validate RTA_VIA payload length
If the nla length is less than 2 then the nla data could be accessed
beyond the accessible bounds. So ensure that the nla is big enough to
at least read the via_family before doing so. Replace magic value of
2.
Fixes:
03c0566542f4 ("mpls: Basic support for adding and removing routes")
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 20:13:47 +0000 (15:13 -0500)]
Merge branch 'bcmgenet-next'
Petri Gynther says:
====================
net: bcmgenet: preparation for multiple Rx queues
Three small patches in preparation for supporting multiple Rx queues:
1. set hw_params->rx_queues = 0
2. adjust the call to alloc_etherdev_mqs()
3. add GENET_Q16_RX_BD_CNT and hw_params->rx_bds_per_q
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Petri Gynther [Fri, 6 Mar 2015 01:40:14 +0000 (17:40 -0800)]
net: bcmgenet: add GENET_Q16_RX_BD_CNT and hw_params->rx_bds_per_q
In preparation for supporting multiple Rx queues, add GENET_Q16_RX_BD_CNT
and hw_params->rx_bds_per_q.
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Petri Gynther [Fri, 6 Mar 2015 01:40:12 +0000 (17:40 -0800)]
net: bcmgenet: adjust the call to alloc_etherdev_mqs()
In preparation for supporting multiple Rx queues, adjust the call to
alloc_etherdev_mqs() to allow max GENET_MAX_MQ_CNT + 1 Rx queues.
The actual number of Rx queues in use is correctly adjusted with:
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Petri Gynther [Fri, 6 Mar 2015 01:40:10 +0000 (17:40 -0800)]
net: bcmgenet: set hw_params->rx_queues = 0
bcmgenet driver doesn't yet support multiple Rx queues.
Set hw_params->rx_queues = 0 accordingly.
The default Rx queue (Q16) is still created and operational.
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 20:01:07 +0000 (15:01 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:
====================
Intel Wired LAN Driver Updates 2015-03-06
This series contains updates to e1000, e1000e and igb.
Yanir provides updates to e1000e based on the patches provided by John
Linville. First updates the code comment to better describe the changes
and the impact on the driver. Second removed calls to ioremap/unmap for
i219 since this is only relevant to older hardware only. Starting with
i219, the NVM will not be mapped to its one BAR but to a address region
in another bar.
Alex Duyck provides two fixes for igb, first fixes a compile warning
where a variable may be used uninitialized, so Alex initializes it.
Second fixes an issue where all of the pin register values were having
to be pushed onto the stack each time the function was called, so to
avoid this, Alex made them static const so that they should only need
to be allocated once and we can avoid all the instructions to get them
onto the stack.
Eliezer found an issue in e1000 where we needed to be calling
netif_carrier_off earlier in the down() to prevent the stack from
queuing more packets to the interface.
Sabrina Dubroca resolved a potential race condition by adding a
dummy allocator. There was a race condition between e1000_change_mtu()
cleanups and netpoll, when changing the MTU across jumbo sizes.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 6 Mar 2015 19:57:46 +0000 (14:57 -0500)]
Merge branch 'pmtu-probe'
Fan Du says:
====================
Improvements for TCP PMTU
This patchset performs some improvements and enhancement
for current TCP PMTU as per RFC4821 with the aim to find
optimal mms size quickly, and also be adaptive to route
changes like enlarged path MTU. Then TCP PMTU could be
used to probe a effective pmtu in absence of ICMP message
for tunnels(e.g. vxlan) across different networking stack.
Patch1/4: Set probe mss base to 1024 Bytes per RFC4821
Patch2/4: Do not double probe_size for each probing,
use a simple binary search to gain maximum performance.
mss for next probing.
Patch3/4: Create a probe timer to detect enlarged path MTU.
Patch4/4: Update ip-sysctl.txt for new sysctl knobs.
Changelog:
v5:
- Zero probe_size before resetting search range.
- Update ip-sysctl.txt for new sysctl knobs.
v4:
- Convert probe_size to mss, not directly from search_low/high
- Clamp probe_threshold
- Don't adjust search_high in blackhole probe, so drop orignal patch3
v3:
- Update commit message for patch2
- Fix pseudo timer delta calculation in patch4
v2:
- Introduce sysctl_tcp_probe_threshold to control when
probing will stop, as suggested by John Heffner.
- Add patch3 to shrink current mss value for search low boundary.
- Drop cannonical timer usages, implements pseudo timer based on
32bits jiffies tcp_time_stamp, as suggested by Eric Dumazet.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:25 +0000 (11:18 +0800)]
ipv4: Documenting two sysctls for tcp PMTU probe
Namely tcp_probe_interval to control how often to restart
a probe. And tcp_probe_threshold to control when stop the
probing in respect to the width of search range in bytes
Signed-off-by: Fan Du <fan.du@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:24 +0000 (11:18 +0800)]
ipv4: Create probe timer for tcp PMTU as per RFC4821
As per RFC4821 7.3. Selecting Probe Size, a probe timer should
be armed once probing has converged. Once this timer expired,
probing again to take advantage of any path PMTU change. The
recommended probing interval is 10 minutes per RFC1981. Probing
interval could be sysctled by sysctl_tcp_probe_interval.
Eric Dumazet suggested to implement pseudo timer based on 32bits
jiffies tcp_time_stamp instead of using classic timer for such
rare event.
Signed-off-by: Fan Du <fan.du@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:23 +0000 (11:18 +0800)]
ipv4: Use binary search to choose tcp PMTU probe_size
Current probe_size is chosen by doubling mss_cache,
the probing process will end shortly with a sub-optimal
mss size, and the link mtu will not be taken full
advantage of, in return, this will make user to tweak
tcp_base_mss with care.
Use binary search to choose probe_size in a fine
granularity manner, an optimal mss will be found
to boost performance as its maxmium.
In addition, introduce a sysctl_tcp_probe_threshold
to control when probing will stop in respect to
the width of search range.
Test env:
Docker instance with vxlan encapuslation(
82599EB)
iperf -c 10.0.0.24 -t 60
before this patch:
1.26 Gbits/sec
After this patch: increase 26%
1.59 Gbits/sec
Signed-off-by: Fan Du <fan.du@intel.com>
Acked-by: John Heffner <johnwheffner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fan Du [Fri, 6 Mar 2015 03:18:22 +0000 (11:18 +0800)]
ipv4: Raise tcp PMTU probe mss base size
Quotes from RFC4821 7.2. Selecting Initial Values
It is RECOMMENDED that search_low be initially set to an MTU size
that is likely to work over a very wide range of environments. Given
today's technologies, a value of 1024 bytes is probably safe enough.
The initial value for search_low SHOULD be configurable.
Moreover, set a small value will introduce extra time for the search
to converge. So set the initial probe base mss size to 1024 Bytes.
Signed-off-by: Fan Du <fan.du@intel.com>
Acked-by: John Heffner <johnwheffner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric W. Biederman [Wed, 4 Mar 2015 16:16:43 +0000 (10:16 -0600)]
DECnet: Only use neigh_ops for adding the link layer header
Other users users of the neighbour table use neigh->output as the method
to decided when and which link-layer header to place on a packet.
DECnet has been using neigh->output to decide which DECnet headers to
place on a packet depending which neighbour the packet is destined for.
The DECnet usage isn't totally wrong but it can run into problems if the
neighbour output function is run for a second time as the teql driver
and the bridge netfilter code can do.
Therefore to avoid pathologic problems later down the line and make the
neighbour code easier to understand by refactoring the decnet output
code to only use a neighbour method to add a link layer header to a
packet.
This is done by moving the neigbhour operations lookup from
dn_to_neigh_output to dn_neigh_output_packet.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mahesh Bandewar [Thu, 5 Mar 2015 05:57:52 +0000 (21:57 -0800)]
bonding: implement bond_poll_controller()
This patches implements the poll_controller support for all
bonding driver. If the slaves have poll_controller net_op defined,
this implementation calls them. This is mode agnostic implementation
and iterates through all slaves (based on mode) and calls respective
handler.
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 09:14:37 +0000 (01:14 -0800)]
rocker: fix some sparse warnings
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Fri, 6 Mar 2015 09:14:36 +0000 (01:14 -0800)]
switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sabrina Dubroca [Thu, 26 Feb 2015 05:35:41 +0000 (05:35 +0000)]
e1000: add dummy allocator to fix race condition between mtu change and netpoll
There is a race condition between e1000_change_mtu's cleanups and
netpoll, when we change the MTU across jumbo size:
Changing MTU frees all the rx buffers:
e1000_change_mtu -> e1000_down -> e1000_clean_all_rx_rings ->
e1000_clean_rx_ring
Then, close to the end of e1000_change_mtu:
pr_info -> ... -> netpoll_poll_dev -> e1000_clean ->
e1000_clean_rx_irq -> e1000_alloc_rx_buffers -> e1000_alloc_frag
And when we come back to do the rest of the MTU change:
e1000_up -> e1000_configure -> e1000_configure_rx ->
e1000_alloc_jumbo_rx_buffers
alloc_jumbo finds the buffers already != NULL, since data (shared with
page in e1000_rx_buffer->rxbuf) has been re-alloc'd, but it's garbage,
or at least not what is expected when in jumbo state.
This results in an unusable adapter (packets don't get through), and a
NULL pointer dereference on the next call to e1000_clean_rx_ring
(other mtu change, link down, shutdown):
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<
ffffffff81194d6e>] put_compound_page+0x7e/0x330
[...]
Call Trace:
[<
ffffffff81195445>] put_page+0x55/0x60
[<
ffffffff815d9f44>] e1000_clean_rx_ring+0x134/0x200
[<
ffffffff815da055>] e1000_clean_all_rx_rings+0x45/0x60
[<
ffffffff815df5e0>] e1000_down+0x1c0/0x1d0
[<
ffffffff811e2260>] ? deactivate_slab+0x7f0/0x840
[<
ffffffff815e21bc>] e1000_change_mtu+0xdc/0x170
[<
ffffffff81647050>] dev_set_mtu+0xa0/0x140
[<
ffffffff81664218>] do_setlink+0x218/0xac0
[<
ffffffff814459e9>] ? nla_parse+0xb9/0x120
[<
ffffffff816652d0>] rtnl_newlink+0x6d0/0x890
[<
ffffffff8104f000>] ? kvm_clock_read+0x20/0x40
[<
ffffffff810a2068>] ? sched_clock_cpu+0xa8/0x100
[<
ffffffff81663802>] rtnetlink_rcv_msg+0x92/0x260
By setting the allocator to a dummy version, netpoll can't mess up our
rx buffers. The allocator is set back to a sane value in
e1000_configure_rx.
Fixes:
edbbb3ca1077 ("e1000: implement jumbo receive with partial descriptors")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Eliezer Tamir [Wed, 25 Feb 2015 15:52:49 +0000 (15:52 +0000)]
e1000: call netif_carrier_off early on down
When bringing down an interface netif_carrier_off() should be
one the first things we do, since this will prevent the stack
from queuing more packets to this interface.
This operation is very fast, and should make the device behave
much nicer when trying to bring down an interface under load.
Also, this would Do The Right Thing (TM) if this device has some
sort of fail-over teaming and redirect traffic to the other IF.
Move netif_carrier_off as early as possible.
Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>