Commit graph

506470 commits

Author SHA1 Message Date
David S. Miller 5428aef811 Merge git://git.kernel.org/pub/scm/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>
2015-03-09 15:58:21 -04:00
Geert Uytterhoeven 26c459a807 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>
2015-03-09 15:51:59 -04:00
Erik Hugne 143fe22f50 tipc: fix inconsistent signal handling regression
Commit 9bbb4ecc68 ("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>
2015-03-09 15:42:19 -04:00
David S. Miller 57ad7a0a81 fix compilation when DEBUGFS isn't set
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU+zjSAAoJEC0Llv5uNjIBtHgQAKAVCy4En1FeOl/XMV1xV98D
 5ex+71JyAjf+08diCTMSfQoq/R73TvhWUFFWnEP5HjNitmdEy3KWliyIZ0CRG8BS
 Tho8YJOLvz/Hk/M5R2yulqj7dMwHcZX40Vmgt5qWNUN3AwmGilngjuDL+CwaAVhv
 5w0yDj+4PDOSxR6bj0oVGCJcvJre8LqTbamRc0m/abtjpx93IbV+q/JLU79eH8Er
 seMsNdHw+t8D9HhNTebdmGzNnyQ64jddqCeGwp4CDYRccbvJ0nzaHidlO0iZiqnJ
 x+DB6q/jpXOpoIdn4UwX4ocy6YJUuqmHGZhfgd0jpULVub8zGuwNYODeafuhXd4L
 8d3qJxLP7sNWpKGlwl0torcgap3+S44GEQOeCt5FL/ivAxejWHpGM4PsaI5NmPbV
 Ma9wZ30z9z+bVZoZ7duOAPOzjhw2Mqik4h3pRIi6Bhi7WXGNGd8hlwOGw26ICOaR
 CiIZBCEz+AI0x5rhAPq/tiW6xs1qCccMF70wEtSkZa+hd9DvMoGnqCqS0O+OEV3B
 8vu0fP7BbAOgvKfK7iGL0QGVInL0VURkxyiHK8uKyGa/aXuVBpdB8hNirftmDLLj
 FmiDFIoBCvv2dr8UCc5LL1wjaOKjLOFiTDOO0ebYbhXCipgvZ1/AJOjQG2QV/+6s
 1O5Ed9XTgv16ucEHu/Pd
 =/+gP
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-for-kalle-2015-03-07' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

fix compilation when DEBUGFS isn't set

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-09 15:38:35 -04:00
Jiri Pirko f4427bc3e2 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>
2015-03-09 15:37:39 -04:00
Erik Hugne 4fee6be813 tipc: sparse: fix htons conversion warnings
Commit d0f91938be ("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>
2015-03-09 15:37:04 -04:00
Cong Wang 1e052be69d 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>
2015-03-09 15:35:55 -04:00
Pablo Neira Ayuso e5de75bf88 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>
2015-03-09 17:56:07 +01:00
Florian Westphal 7a8d831df5 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>
2015-03-09 13:22:58 +01:00
Florian Westphal 4a9d2f2008 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>
2015-03-09 13:21:31 +01:00
Florian Westphal 8bd63cf1a4 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>
2015-03-09 13:20:48 +01:00
Boris BREZILLON fc6c6c2b8a 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>
2015-03-08 22:56:53 -04:00
Joe Perches dbedd44e98 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>
2015-03-08 22:54:22 -04:00
Dinh Nguyen cbe21d92e4 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>
2015-03-08 22:52:45 -04:00
David S. Miller 9b974499e4 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>
2015-03-08 19:30:31 -04:00
Eric W. Biederman b79bda3d38 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>
2015-03-08 19:30:06 -04:00
Eric W. Biederman 7d5f41f276 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: cec9166ca4 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>
2015-03-08 19:30:06 -04:00
Eric W. Biederman aa7da93756 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>
2015-03-08 19:30:06 -04:00
Eric W. Biederman 0f7bbd5805 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>
2015-03-08 19:30:06 -04:00
Eric W. Biederman 19d0c341d9 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>
2015-03-08 19:30:06 -04:00
Eric W. Biederman d865616e18 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>
2015-03-08 19:30:06 -04:00
stephen hemminger 008a5b07f1 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>
2015-03-08 19:11:44 -04:00
David S. Miller d7ed7474a8 Merge branch 'master' of git://git.kernel.org/pub/scm/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>
2015-03-07 22:36:12 -05:00
Guenter Roeck 04b0a80b57 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>
2015-03-07 22:34:10 -05:00
Guenter Roeck 11b3b45d69 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>
2015-03-07 22:34:10 -05:00
Petri Gynther 6f5a272c99 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>
2015-03-07 22:32:40 -05:00
David S. Miller ae00ec9548 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>
2015-03-07 22:31:56 -05:00
Cyrille Pitchen 421d9df062 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>
2015-03-07 22:31:37 -05:00
Cyrille Pitchen 93b31f48b3 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>
2015-03-07 22:31:22 -05:00
Boris BREZILLON a848748959 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>
2015-03-07 22:31:21 -05:00
Boris BREZILLON 9c348d45d8 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>
2015-03-07 22:31:21 -05:00
Emmanuel Grumbach aa5e183207 iwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set
The commits below broke compilation when
CONFIG_IWLWIFI_DEBUGFS is not set.
FIx that.

Fixes: ddf89ab10a ("iwlwifi: mvm: allow to force the Rx chains from debugfs")
Fixes: 9d761fd8a5 ("iwlwifi: mvm: add trigger for firmware dump upon missed beacons")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-07 19:40:02 +02:00
Greg Rose cd77f5e1fa 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>
2015-03-07 07:01:06 -08:00
Sravanthi Tangeda b85e911b75 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>
2015-03-07 07:01:05 -08:00
Jesse Brandeburg 016890b994 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>
2015-03-07 07:01:05 -08:00
Anjali Singhai Jain d9e894ee8a 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>
2015-03-07 07:01:04 -08:00
Anjali Singhai Jain 4599120466 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>
2015-03-07 07:00:13 -08:00
Anjali Singhai Jain 04294e38a4 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>
2015-03-07 04:59:46 -08:00
Anjali Singhai Jain 4205d379b6 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>
2015-03-07 04:59:45 -08:00
Shannon Nelson 58ce51753f 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>
2015-03-07 04:59:45 -08:00
Akeem G Abodunrin 386a0afa70 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>
2015-03-07 04:59:44 -08:00
Shannon Nelson 1e200e4a57 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>
2015-03-07 04:59:44 -08:00
Jesse Brandeburg 7b115dd06d 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>
2015-03-07 04:59:43 -08:00
Jesse Brandeburg 71e6163a4c 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>
2015-03-07 04:59:42 -08:00
Kamil Krawczyk ef0620774f 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>
2015-03-07 04:59:41 -08:00
Catherine Sullivan d6d83c1b3e 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>
2015-03-07 04:59:41 -08:00
Shannon Nelson 37a2973a05 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>
2015-03-07 04:59:40 -08:00
Scott Feldman 1b5ef07e3d 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>
2015-03-06 22:01:27 -05:00
Scott Feldman 0f43deba6f 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>
2015-03-06 22:01:27 -05:00
Daniel Borkmann 3ba67dabaa 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: d4052c4aea ("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>
2015-03-06 21:50:55 -05:00