]> Git Repo - linux.git/log
linux.git
9 years agosh_eth, ravb: Use ARCH_RENESAS
Simon Horman [Wed, 2 Mar 2016 01:28:13 +0000 (10:28 +0900)]
sh_eth, ravb: Use ARCH_RENESAS

Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.

This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.

Signed-off-by: Simon Horman <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: mellanox: add DEVLINK dependencies
Arnd Bergmann [Wed, 2 Mar 2016 09:40:54 +0000 (10:40 +0100)]
net: mellanox: add DEVLINK dependencies

The new NET_DEVLINK infrastructure can be a loadable module, but the drivers
using it might be built-in, which causes link errors like:

drivers/net/built-in.o: In function `mlx4_load_one':
:(.text+0x2fbfda): undefined reference to `devlink_port_register'
:(.text+0x2fc084): undefined reference to `devlink_port_unregister'
drivers/net/built-in.o: In function `mlxsw_sx_port_remove':
:(.text+0x33a03a): undefined reference to `devlink_port_type_clear'
:(.text+0x33a04e): undefined reference to `devlink_port_unregister'

There are multiple ways to avoid this:

a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies
   for each user
b) use 'select NET_DEVLINK' from each driver that uses it
   and hide the symbol in Kconfig.
c) make NET_DEVLINK a 'bool' option so we don't have to
   list it as a dependency, and rely on the APIs to be
   stubbed out when it is disabled
d) use IS_REACHABLE() rather than IS_ENABLED() to check for
   NET_DEVLINK in include/net/devlink.h

This implements a variation of approach a) by adding an
intermediate symbol that drivers can depend on, and changes
the three drivers using it.

Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: 09d4d087cd48 ("mlx4: Implement devlink interface")
Fixes: c4745500e988 ("mlxsw: Implement devlink interface")
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
David S. Miller [Thu, 3 Mar 2016 21:27:23 +0000 (16:27 -0500)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

Johan Hedberg says:

====================
pull request: bluetooth-next 2016-03-01

Here's our main set of Bluetooth & 802.15.4 patches for the 4.6 kernel.

 - New Bluetooth HCI driver for Intel/AG6xx controllers
 - New Broadcom ACPI IDs
 - LED trigger support for indicating Bluetooth powered state
 - Various fixes in mac802154, 6lowpan and related drivers
 - New USB IDs for AR3012 Bluetooth controllers

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agonet: relax setup_tc ndo op handle restriction
John Fastabend [Mon, 29 Feb 2016 19:26:13 +0000 (11:26 -0800)]
net: relax setup_tc ndo op handle restriction

I added this check in setup_tc to multiple drivers,

 if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)

Unfortunately restricting to TC_H_ROOT like this breaks the old
instantiation of mqprio to setup a hardware qdisc. This patch
relaxes the test to only check the type to make it equivalent
to the check before I broke it. With this the old instantiation
continues to work.

A good smoke test is to setup mqprio with,

# tc qdisc add dev eth4 root mqprio num_tc 8 \
  map 0 1 2 3 4 5 6 7 \
  queues 0@0 1@1 2@2 3@3 4@4 5@5 6@6 7@7

Fixes: e4c6734eaab9 ("net: rework ndo tc op to consume additional qdisc handle paramete")
Reported-by: Singh Krishneil <[email protected]>
Reported-by: Jake Keller <[email protected]>
CC: Murali Karicheri <[email protected]>
CC: Shradha Shah <[email protected]>
CC: Or Gerlitz <[email protected]>
CC: Ariel Elior <[email protected]>
CC: Jeff Kirsher <[email protected]>
CC: Bruce Allan <[email protected]>
CC: Jesse Brandeburg <[email protected]>
CC: Don Skidmore <[email protected]>
Signed-off-by: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoath9k: clear bb filter calibration power threshold
Miaoqing Pan [Thu, 18 Feb 2016 09:20:02 +0000 (17:20 +0800)]
ath9k: clear bb filter calibration power threshold

JP WiFi certification for bandwidth of channel 14 failed, the OBW
is lower than the requirement. Clear the bb filter calibration power
threshold to increase OBW(+2). The fix only for qca9531 chip now.

Signed-off-by: Miaoqing Pan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath9k: reduce stack usage in ar9003_aic_cal_post_process
Arnd Bergmann [Fri, 12 Feb 2016 11:55:21 +0000 (12:55 +0100)]
ath9k: reduce stack usage in ar9003_aic_cal_post_process

In some configurations, this function uses more than the warning limit
of 1024 bytes:

drivers/net/wireless/ath/ath9k/ar9003_aic.c: In function 'ar9003_aic_cal_post_process':
drivers/net/wireless/ath/ath9k/ar9003_aic.c:434:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

It turns out that there are two large arrays on the stack here, but
almost all the data in them is never used outside of the loop in
which it gets written, so we can replace the array with a single
instance.

The .valid flag is used later, so I'm replacing the array of structures
with an array of bools. An obvious follow-up optimization would be
to replace it with a bitmask and set_bit()/find_first_bit()/
find_last_bit()/... operations. However, I have not tested this patch,
so I sticked to the simpler transformation that does the job of
reducing the stack usage to a harmless level.

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath9k: make NF load complete quickly and reliably
Miaoqing Pan [Fri, 5 Feb 2016 01:45:50 +0000 (09:45 +0800)]
ath9k: make NF load complete quickly and reliably

Make NF load complete quickly and reliably. NF load execution
is delayed by HW to end of frame if frame Rx or Tx is ongoing.
Increasing timeout to max frame duration. If NF cal is ongoing
before NF load, stop it before load, and restart it afterwards.

Signed-off-by: Miaoqing Pan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: fix sanity check on enabling btcoex via debugfs
Mohammed Shafi Shajakhan [Tue, 23 Feb 2016 07:28:36 +0000 (12:58 +0530)]
ath10k: fix sanity check on enabling btcoex via debugfs

First check for the device state before enabling / disabling
btcoex, also return a proper error value. Enabling / disabling
btcoex ideally does a f/w + ath10k_core_restart so the checks
that are applicable for 'simulate_fw_crash' shall be applicable
for this as well

Signed-off-by: Mohammed Shafi Shajakhan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: reduce number of peers to support peer stats feature
Anilkumar Kolli [Tue, 23 Feb 2016 06:49:57 +0000 (12:19 +0530)]
ath10k: reduce number of peers to support peer stats feature

To enable per peer stats feature we are reducing the number of peers.
Firmware has introduced tx stats feature. We have memory limitation in
firmware to add these additional bytes.

These are the new variables introduced in the firmware.
======== =======================
Variable        Bytes required/per rate
======== =======================
TX success packets  1
TX failed packets 1
Retry packets 1
Success bytes 2
TX failed bytes 2
Retry bytes 2
Tx duration 4
Rate 1
Bw and AMPDU flags 1
Total 16 (because of allocation in word pattern)

Firmware sends these tx_stats in pktlog.
If we consider 4 feedbacks at a time, Frimware need about ~1K memory for coding
and 8192 bytes required / per rate [ 4*16*128(peers)].
To accommodate this firmware needs to reduce 10 peers.

This fixes a firmware crash with firmware-5.bin_10.2.4.70.22-2.

Signed-off-by: Anilkumar Kolli <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: process htt rx indication as batch mode
Rajkumar Manoharan [Fri, 12 Feb 2016 06:10:59 +0000 (11:40 +0530)]
ath10k: process htt rx indication as batch mode

On multicore systems, it is possible that txrx tasket can run
in parallel with pci tasklet (i.e smp affinity of ath10k irq is
assigned to multiple CPUs). Feeding and consuming from the same
rx completion list leads to txrx tasklet runs for longer period.
Prevent this by processing a snapshot of rx queue by moving list
into temporary list. Consecutive received frames will be processed
in next batch.

Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: reduce rx_lock contention for htt rx indication
Rajkumar Manoharan [Fri, 12 Feb 2016 06:10:58 +0000 (11:40 +0530)]
ath10k: reduce rx_lock contention for htt rx indication

Received frame indications are queued into a skb list and latest
processed by txrx tasklet. This skb queue is protected by htt rx lock.
Since the entire rx processing till delivering frame to mac80211 and
replenish tasks are processed under rx_lock protection, there might be
some delay in queuing newly received rx frame into that list on
multicore systems. Optimize this by using skb list lock while accessing
rx completion queue instead of htt rx lock.

Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: fix erroneous return value
Anton Protopopov [Wed, 10 Feb 2016 16:58:55 +0000 (11:58 -0500)]
ath10k: fix erroneous return value

The ath10k_pci_hif_exchange_bmi_msg() function may return the positive
value EIO instead of -EIO in case of error.

Signed-off-by: Anton Protopopov <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: add hw_rev to trace events to support pktlog
Ashok Raj Nagarajan [Fri, 5 Feb 2016 15:42:49 +0000 (21:12 +0530)]
ath10k: add hw_rev to trace events to support pktlog

pktlog data is different between firmware variants (eg. 10.2 vs 10.4). To
have a unified user space script to decode pktlog trace events generated,
it is desirable to know which firmware variant has provided the events and
thereby decode the pktlogs appropriately. Hardware revision (hw_rev) helps
to determine the firmware variant sending these trace events. So add hw_rev
to trace events.

Signed-off-by: Ashok Raj Nagarajan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: fix pktlog in QCA99X0
Ashok Raj Nagarajan [Fri, 5 Feb 2016 15:42:48 +0000 (21:12 +0530)]
ath10k: fix pktlog in QCA99X0

Currently, we are providing wrong payload data of pktlog to trace points.
Data we receive from FW through copy engine 8 contains pktlog data alone.
We don't need to parse anything in driver before handing it to trace
points.

Fixes: afb0bf7f530b ("ath10k: add support for pktlog in QCA99X0")
Signed-off-by: Ashok Raj Nagarajan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoath10k: fix pointless update of peer stats list
Mohammed Shafi Shajakhan [Wed, 3 Feb 2016 15:37:43 +0000 (21:07 +0530)]
ath10k: fix pointless update of peer stats list

We periodically receive f/w stats event for updating
the rx duration and there is no reason to keep on appending
the f/w stats peer list, as this gets completely cleaned up when
the user polls for f/w stats {pdev, vdev, peer stats}. Only don't
print the warning message in the case PEER_STATS service is enabled

Fixes: 856e7c3 ("ath10k: add debugfs support for Per STA total rx duration")
Signed-off-by: Mohammed Shafi Shajakhan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
9 years agoethernet/atl1c: remove left over dead code
Eric Engestrom [Mon, 29 Feb 2016 16:40:23 +0000 (16:40 +0000)]
ethernet/atl1c: remove left over dead code

Left over from c24588afc536a35c924d014f13b669b20ccf8553
("atl1c: using fixed TXQ configuration for l2cb and l1c")

Signed-off-by: Eric Engestrom <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/ipv4: remove left over dead code
Eric Engestrom [Mon, 29 Feb 2016 16:38:06 +0000 (16:38 +0000)]
net/ipv4: remove left over dead code

8cc785f6f429c2a3fb81745dc142cbd72a462c4a ("net: ipv4: make the ping
/proc code AF-independent") removed the code using it, but renamed this
variable instead of removing it.

Signed-off-by: Eric Engestrom <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/rtnetlink: remove dead code
Eric Engestrom [Mon, 29 Feb 2016 16:36:38 +0000 (16:36 +0000)]
net/rtnetlink: remove dead code

3b766cd832328fcb87db3507e7b98cf42f21689d ("net/core: Add reading VF
statistics through the PF netdevice") added that variable but it's never
been used.

Signed-off-by: Eric Engestrom <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'cxgb4-next'
David S. Miller [Wed, 2 Mar 2016 19:46:30 +0000 (14:46 -0500)]
Merge branch 'cxgb4-next'

Hariprasad Shenai says:

====================
cxgb4/cxgb4vf: Cleanup and minor fixes

This series sets FBMIN to 64 bytes for Chelsio's T6 series of adapters,
check to replenish fl is revised, some code cleanup in cxgb4vf sge
initialization code and removes dead code.

This patch series has been created against net-next tree and includes
patches on cxgb4 and cxgb4vf driver.

We have included all the maintainers of respective drivers. Kindly review
the change and let us know in case of any review comments.
====================

9 years agocxgb4vf: Remove dead functions collect_netdev_[um]c_list_addrs
Hariprasad Shenai [Tue, 1 Mar 2016 11:49:36 +0000 (17:19 +0530)]
cxgb4vf: Remove dead functions collect_netdev_[um]c_list_addrs

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agocxgb4vf: Remove redundant adapter ready check during probe
Hariprasad Shenai [Tue, 1 Mar 2016 11:49:35 +0000 (17:19 +0530)]
cxgb4vf: Remove redundant adapter ready check during probe

Function t4vf_wait_dev_ready() is already called in t4vf_prep_adapter(),
no need to call it again in adap_init0().

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agocxgb4vf: Make sge init code more readable
Hariprasad Shenai [Tue, 1 Mar 2016 11:49:34 +0000 (17:19 +0530)]
cxgb4vf: Make sge init code more readable

Adds a new function t4vf_fl_pkt_align() and use the same in SGE
initialization code to find out freelist packet alignment

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agocxgb4/cxgb4vf: For T6 adapter, set FBMIN to 64 bytes
Hariprasad Shenai [Tue, 1 Mar 2016 11:49:33 +0000 (17:19 +0530)]
cxgb4/cxgb4vf: For T6 adapter, set FBMIN to 64 bytes

T4 and T5 hardware will not coalesce Free List PCI-E Fetch Requests if
the Host Driver provides more Free List Pointers than the Fetch Burst
Minimum value.  So if we set FBMIN to 64 bytes and the Host Driver
supplies 128 bytes of Free List Pointer data, the hardware will issue two
64-byte PCI-E Fetch Requests rather than a single coallesced 128-byte
Fetch Request. T6 fixes this. So, for T4/T5 we set the FBMIN value to 128

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agocxgb4/cxgb4vf: Use fl capacity to check if fl needs to be replenished
Hariprasad Shenai [Tue, 1 Mar 2016 11:49:32 +0000 (17:19 +0530)]
cxgb4/cxgb4vf: Use fl capacity to check if fl needs to be replenished

Use freelist capacity instead of freelist size while checking, if
freelist needs to be refilled

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'stmmac-optimizations'
David S. Miller [Wed, 2 Mar 2016 19:21:34 +0000 (14:21 -0500)]
Merge branch 'stmmac-optimizations'

Alexandre TORGUE says:

====================
stmmac: enhance driver performances and update the version

According to Giuseppe, I send the v3 series.

This is a subset of patches to rework the driver in order to improve its
performances and make it more robust under stress conditions.

All patches have been ported on STi mainstream kernel branch and
tested on ARM STiH4xx platforms and newer ones.

This series also updates the driver version and prepares it
to include further development to support new chips.

In detail, these patches are:

o to rework and improve the internal DMA bus settings

  Fine tuning is mandatory on some platforms for both
  performance and stability issues.

o to rework and optimize the descriptor management.

  This will help a lot on performance side and preparing
  the inclusion on the GMAC4.x.

o to add a set of optimizations for both xmit and rx functions.

  These will help a lot on performance side and making the driver
  more robust in case of low memory conditions and under some
  stress test, performed for example on IP-STB.

Below some throughput figures obtained on some boxes before and after
the patches.

                       nuttcp (mbps)       iperf (Mbps)
------------------------------------------------------------------
                      tcp     udp          tcp      udp
                   tx   rx   tx  rx      tx   rx   tx  rx
                    ------------------------------------------
   old             680   800 480  506    760  800   600  700
   new             830   880 540  630    840  880   700   800

V2: - rx_copybreak is now managed by using ethtool.
V3: - improve comments on PCIe detailing that there are no regressions
    - rework some APIs to properly define some params as bool as expected
    - rework the formula to get the element inside the ring. Comparing V2,
patches 4 and 13 have been merged because the same formula have been
used. After this rework, no evident benefit has been noticed in terms
of performances so the table above is still valid. Disassembling the
code for SH4 and ARM, with the new formula just an instr is saved
(depending on compiler flags) and this gives us not so relevanti gain,
for example, on SH4 where some instr are executed in the same pipeline
stage.
Ring sizes are now fixed and maybe they can be reworked to be tuned
w/o using stmmaceth= cmdline option. Indeed, nobody change these sizes
and indeed the numbers selected by default respect the budget and
avoid to pass invalid setup. These are the best driver default sizes
for ring and chain.

====================

9 years agostmmac: update version to Oct_2015
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:43 +0000 (14:27 +0100)]
stmmac: update version to Oct_2015

This patch just updates the driver to the version fully
tested on STi platforms. This version is Oct_2015.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: tune rx copy via threshold.
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:42 +0000 (14:27 +0100)]
stmmac: tune rx copy via threshold.

There is a threshold now used to also limit the skb allocation
when use zero-copy. This is to avoid that there are incoherence
in the ring due to a failure on skb allocation under very
aggressive testing and under low memory conditions.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: do not perform zero-copy for rx frames
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:41 +0000 (14:27 +0100)]
stmmac: do not perform zero-copy for rx frames

This patch is to allow this driver to copy tiny frames during the reception
process. This is giving more stability while stressing the driver on STi
embedded systems.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: fix phy init when attached to a phy
Fabrice Gasnier [Mon, 29 Feb 2016 13:27:40 +0000 (14:27 +0100)]
stmmac: fix phy init when attached to a phy

phy_bus_name can be NULL when "fixed-link" property isn't used.
Then, since "stmmac: do not poll phy handler when attach a switch",
phy_bus_name ptr needs to be checked before strcmp is called.

Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: do not poll phy handler when attach a switch
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:39 +0000 (14:27 +0100)]
stmmac: do not poll phy handler when attach a switch

This patch avoids to call the stmmac_adjust_link when
the driver is connected to a switch by using the FIXED_PHY
support. Prior this patch the phydev->irq was set as PHY_POLL
so periodically the phy handler was invoked spending useless
time because the link cannot actually change.
Note that the stmmac_adjust_link will be called just one
time and this guarantees that the ST glue logic will be
setup according to the mode and speed fixed.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: first frame prep at the end of xmit routine
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:38 +0000 (14:27 +0100)]
stmmac: first frame prep at the end of xmit routine

This patch is to fill the first descriptor just before granting
the DMA engine so at the end of the xmit.
The patch takes care about the algorithm adopted to mitigate the
interrupts, then it fixes the last segment in case of no fragments.
Moreover, this new implementation does not pass any "ter" field when
prepare the descriptors because this is not necessary.
The patch also details the memory barrier in the xmit.

As final results, this patch guarantees the same performances
but fixing a case if small datagram are sent. In fact, this
kind of test is impacted if no coalesce is done.

Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: set dirty index out of the loop
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:37 +0000 (14:27 +0100)]
stmmac: set dirty index out of the loop

The dirty index can be updated out of the loop where all the
tx resources are claimed. This will help on performances too.
Also a useless debug printk has been removed from the main loop.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: optimize tx clean function
Fabrice Gasnier [Mon, 29 Feb 2016 13:27:36 +0000 (14:27 +0100)]
stmmac: optimize tx clean function

This patch "inline" get_tx_owner and get_ls routines. It Results in a
unique read to tdes0, instead of three, to check TX_OWN and LS bits,
and other status bits.

It helps improve driver TX path by removing two uncached read/writes
inside TX clean loop for enhanced descriptors but not for normal ones
because the des1 must be read in any case.

Signed-off-by: Fabrice Gasnier <[email protected]>
Acked-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: optimize tx desc management
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:35 +0000 (14:27 +0100)]
stmmac: optimize tx desc management

This patch is to optimize the way to manage the TDES inside the
xmit function. When prepare the frame, some settings (e.g. OWN
bit) can be merged. This has been reworked to improve the tx
performances.

Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: merge get_rx_owner into rx_status routine.
Fabrice Gasnier [Mon, 29 Feb 2016 13:27:34 +0000 (14:27 +0100)]
stmmac: merge get_rx_owner into rx_status routine.

The RDES0 register can be read several times while doing RX of a
packet.
This patch slightly improves RX path performance by reading rdes0
once for two operation: check rx owner, get rx status bits.

Signed-off-by: Fabrice Gasnier <[email protected]>
Acked-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: add is_jumbo field to dma data
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:33 +0000 (14:27 +0100)]
stmmac: add is_jumbo field to dma data

Optimize tx_clean by avoiding a des3 read in stmmac_clean_desc3().

In ring mode, TX, des3 seems only used when xmit a jumbo frame.
In case of normal descriptors, it may also be used for time
stamping.
Clean it in the above two case, without reading it.

Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: add last_segment field to dma data
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:32 +0000 (14:27 +0100)]
stmmac: add last_segment field to dma data

last_segment field is read twice from dma descriptors in stmmac_clean().
Add last_segment to dma data so that this flag is from priv
structure in cache instead of memory.
It avoids reading twice from memory for each loop in stmmac_clean().

Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: add length field to dma data
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:31 +0000 (14:27 +0100)]
stmmac: add length field to dma data

Currently, the code pulls out the length field when
unmapping a buffer directly from the descriptor. This will result
in an uncached read to a dma_alloc_coherent() region. There is no
need to do this, so this patch simply puts the value directly into
a data structure which will hit the cache.

Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: review RX/TX ring management
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:30 +0000 (14:27 +0100)]
stmmac: review RX/TX ring management

This patch is to rework the ring management now optimized.
The indexes into the ring buffer are always incremented, and
the entry is accessed via doing a modulo to find the "real"
position in the ring.
It is inefficient, modulo is an expensive operation.

The formula [(entry + 1) & (size - 1)] is now adopted on
a ring that is power-of-2 in size.
Then, the number of elements cannot be set by command line but
it is fixed.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: change descriptor layout
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:29 +0000 (14:27 +0100)]
stmmac: change descriptor layout

This patch completely changes the descriptor layout to improve
the whole performances due to the single read usage of the
descriptors in critical paths.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: rework DMA bus setting and introduce new platform AXI structure
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:28 +0000 (14:27 +0100)]
stmmac: rework DMA bus setting and introduce new platform AXI structure

This patch restructures the DMA bus settings and this is done
by introducing a new platform structure used for programming
the AXI Bus Mode Register inside the DMA module.
This structure can be populated from device-tree as documented in the
binding txt file.

After initializing the DMA, the AXI register can be optionally tuned
for platform drivers based.
This patch also reworks some parameters to make coherent the DMA
configuration now that AXI register is introduced.
For example, the burst_len is managed by using the mentioned axi
support above; so the snps,burst-len parameter has been removed.
It makes sense to provide the AAL parameter from DT to Address-Aligned
Beats inside the Register0 and review the PBL settings when initialize
the engine.

For PCI glue, rebuilding the story of this setting, it
was added to align a configuration so not for fixing some
known problem. No issue raised after this patch.
It is safe to use the default burst length instead of
tuning it to the maximum value

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agostmmac: share reset function between dwmac100 and dwmac1000
Giuseppe Cavallaro [Mon, 29 Feb 2016 13:27:27 +0000 (14:27 +0100)]
stmmac: share reset function between dwmac100 and dwmac1000

This patch is to share the same reset procedure between dwmac100 and
dwmac1000 chips.
This will also help on enhancing the driver and support new chips.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: Alexandre TORGUE <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'rds-support-FRMR-and-cleanups'
David S. Miller [Wed, 2 Mar 2016 19:13:20 +0000 (14:13 -0500)]
Merge branch 'rds-support-FRMR-and-cleanups'

Santosh Shilimkar says:

====================
RDS: Major clean-up with couple of new features for 4.6

v3:
Re-generated the same series by omitting "-D" option from git format-patch
command. Since first patch has file removals, git apply/am can't deal
with it when formated with '-D' option.

v2:
Dropped module parameter from [PATCH 11/13] as suggested by David Miller

Series is generated against net-next but also applies against Linus's tip
cleanly. Entire patchset is available at below git tree:

 git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git for_4.6/net-next/rds_v2

The diff-stat looks bit scary since almost ~4K lines of code is
getting removed. Brief summary of the series:

- Drop the stale iWARP support:
RDS iWarp support code has become stale and non testable for
sometime.  As discussed and agreed earlier on list, am dropping
its support for good. If new iWarp user(s) shows up in future,
the plan is to adapt existing IB RDMA with special sink case.
- RDS gets SO_TIMESTAMP support
- Long due RDS maintainer entry gets updated
- Some RDS IB code refactoring towards new FastReg Memory registration (FRMR)
- Lastly the initial support for FRMR

RDS IB RDMA performance with FRMR is not yet as good as FMR and I do have
some patches in progress to address that. But they are not ready for 4.6
so I left them out of this series.

Also am keeping eye on new CQ API adaptations like other ULPs doing and
will try to adapt RDS for the same most likely in 4.7+ timeframe.
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: Support Fastreg MR (FRMR) memory registration mode
Avinash Repaka [Tue, 1 Mar 2016 23:20:54 +0000 (15:20 -0800)]
RDS: IB: Support Fastreg MR (FRMR) memory registration mode

Fastreg MR(FRMR) is another method with which one can
register memory to HCA. Some of the newer HCAs supports only fastreg
mr mode, so we need to add support for it to have RDS functional
on them.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Avinash Repaka <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: allocate extra space on queues for FRMR support
[email protected] [Tue, 1 Mar 2016 23:20:53 +0000 (15:20 -0800)]
RDS: IB: allocate extra space on queues for FRMR support

Fastreg MR(FRMR) memory registration and invalidation makes use
of work request and completion queues for its operation. Patch
allocates extra queue space towards these operation(s).

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: add Fastreg MR (FRMR) detection support
[email protected] [Tue, 1 Mar 2016 23:20:52 +0000 (15:20 -0800)]
RDS: IB: add Fastreg MR (FRMR) detection support

Discovere Fast Memmory Registration support using IB device
IB_DEVICE_MEM_MGT_EXTENSIONS. Certain HCA might support just FRMR
or FMR or both FMR and FRWR. In case both mr type are supported,
default FMR is used.

Default MR is still kept as FMR against what everyone else
is following. Default will be changed to FRMR once the
RDS performance with FRMR is comparable with FMR. The
work is in progress for the same.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: add mr reused stats
[email protected] [Tue, 1 Mar 2016 23:20:51 +0000 (15:20 -0800)]
RDS: IB: add mr reused stats

Add MR reuse statistics to RDS IB transport.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: handle the RDMA CM time wait event
[email protected] [Tue, 1 Mar 2016 23:20:50 +0000 (15:20 -0800)]
RDS: IB: handle the RDMA CM time wait event

Drop the RDS connection on RDMA_CM_EVENT_TIMEWAIT_EXIT so that
it can reconnect and resume.

While testing fastreg, this error happened in couple of tests but
was getting un-noticed.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: add connection info to ibmr
[email protected] [Tue, 1 Mar 2016 23:20:49 +0000 (15:20 -0800)]
RDS: IB: add connection info to ibmr

Preperatory patch for FRMR support. From connection info,
we can retrieve cm_id which contains qp handled needed for
work request posting.

We also need to drop the RDS connection on QP error states
where connection handle becomes useful.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: move FMR code to its own file
[email protected] [Tue, 1 Mar 2016 23:20:48 +0000 (15:20 -0800)]
RDS: IB: move FMR code to its own file

No functional change.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: create struct rds_ib_fmr
[email protected] [Tue, 1 Mar 2016 23:20:47 +0000 (15:20 -0800)]
RDS: IB: create struct rds_ib_fmr

Keep fmr related filed in its own struct. Fastreg MR structure
will be added to the union.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: Re-organise ibmr code
[email protected] [Tue, 1 Mar 2016 23:20:46 +0000 (15:20 -0800)]
RDS: IB: Re-organise ibmr code

No functional changes. This is in preperation towards adding
fastreg memory resgitration support.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: IB: Remove the RDS_IB_SEND_OP dependency
[email protected] [Tue, 1 Mar 2016 23:20:45 +0000 (15:20 -0800)]
RDS: IB: Remove the RDS_IB_SEND_OP dependency

This helps to combine asynchronous fastreg MR completion handler
with send completion handler.

No functional change.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMAINTAINERS: update RDS entry
[email protected] [Tue, 1 Mar 2016 23:20:44 +0000 (15:20 -0800)]
MAINTAINERS: update RDS entry

Acked-by: Chien Yen <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: Add support for SO_TIMESTAMP for incoming messages
[email protected] [Tue, 1 Mar 2016 23:20:43 +0000 (15:20 -0800)]
RDS: Add support for SO_TIMESTAMP for incoming messages

The SO_TIMESTAMP generates time stamp for each incoming RDS messages
User app can enable it by using SO_TIMESTAMP setsocketopt() at
SOL_SOCKET level. CMSG data of cmsg type SO_TIMESTAMP contains the
time stamp in struct timeval format.

Reviewed-by: Sowmini Varadhan <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoRDS: Drop stale iWARP RDMA transport
[email protected] [Tue, 1 Mar 2016 23:20:42 +0000 (15:20 -0800)]
RDS: Drop stale iWARP RDMA transport

RDS iWarp support code has become stale and non testable. As
indicated earlier, am dropping the support for it.

If new iWarp user(s) shows up in future, we can adapat the RDS IB
transprt for the special RDMA READ sink case. iWarp needs an MR
for the RDMA READ sink.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'qed-next'
David S. Miller [Wed, 2 Mar 2016 19:04:19 +0000 (14:04 -0500)]
Merge branch 'qed-next'

Yuval Mintz says:

====================
qed: update series

This patch series tries to improve general configuration by changing
configuration to better suit B0 boards and allow more available
resources to each physical function.
In additition, it contains some small fixes and semantic changes.
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Remove unused NVM vendor ID
Yuval Mintz [Wed, 2 Mar 2016 18:26:04 +0000 (20:26 +0200)]
qed: Remove unused NVM vendor ID

Remove 2 unused fields from driver code.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Fix error flow on slowpath start
Yuval Mintz [Wed, 2 Mar 2016 18:26:03 +0000 (20:26 +0200)]
qed: Fix error flow on slowpath start

In case of problems when initializing the chip, the error flows aren't
being properly done. Specifically, it's possible that the chip would be
left in a configuration allowing it [internally] to access the host
memory, causing fatal problems in the device that would require power
cycle to overcome.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Move statistics to L2 code
Yuval Mintz [Wed, 2 Mar 2016 18:26:02 +0000 (20:26 +0200)]
qed: Move statistics to L2 code

Current statistics logic is meant for L2, not for all future protocols.
Move this content to the proper designated file.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Support B0 instead of A0
Yuval Mintz [Wed, 2 Mar 2016 18:26:01 +0000 (20:26 +0200)]
qed: Support B0 instead of A0

BB_A0 is a development model that is will not reach actual clients.
In fact, future firmware would simply fail to initialize such chip.

This changes the configuration into B0 instead of A0, and adds a safeguard
against the slim chance someone would actually try this with an A0 adapter
in which case probe would gracefully fail.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Correct BAR sizes for older MFW
Ram Amrani [Wed, 2 Mar 2016 18:26:00 +0000 (20:26 +0200)]
qed: Correct BAR sizes for older MFW

Driver learns the inner bar sized from a register configured by management
firmware, but older versions are not setting this register.
But since we know which values were configured back then, use them instead.

Signed-off-by: Ram Amrani <[email protected]>
Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agobatman-adv: clarify CFG80211 dependency
Arnd Bergmann [Wed, 2 Mar 2016 13:54:35 +0000 (14:54 +0100)]
batman-adv: clarify CFG80211 dependency

The driver calls cfg80211_get_station, which may be part of a
module, so we must not enable BATMAN_ADV_BATMAN_V if
BATMAN_ADV=y and CFG80211=m:

net/built-in.o: In function `batadv_v_elp_get_throughput':
(text+0x5c62c): undefined reference to `cfg80211_get_station'

This clarifies the dependency to cover all combinations.

Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: c833484e5f38 ("batman-adv: ELP - compute the metric based on the estimated throughput")
Acked-by: Antonio Quartulli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agowan: lmc: Switch to using managed resources
Amitoj Kaur Chawla [Sat, 27 Feb 2016 17:04:16 +0000 (22:34 +0530)]
wan: lmc: Switch to using managed resources

Use managed resource functions devm_kzalloc and pcim_enable_device
to simplify error handling. Subsequently, remove unnecessary
kfree, pci_disable_device and pci_release_regions.

To be compatible with the change, various gotos are replaced with
direct returns and unneeded labels are dropped.

Also, `sc` was only being freed in the probe function and not the
remove function before the change. By using devm_kzalloc this patch
also fixes this memory leak.

Signed-off-by: Amitoj Kaur Chawla <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'fixes' into next
Emmanuel Grumbach [Wed, 2 Mar 2016 07:35:38 +0000 (09:35 +0200)]
Merge branch 'fixes' into next

Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoiwlwifi: mvm: support sw queue start/stop from mvm
Liad Kaufman [Wed, 3 Feb 2016 09:05:41 +0000 (11:05 +0200)]
iwlwifi: mvm: support sw queue start/stop from mvm

Add a wrapper function to allow stopping SW queues from MVM
as well.

Signed-off-by: Liad Kaufman <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoiwlwifi: mvm: take the transport ref back when leaving
Luca Coelho [Tue, 1 Mar 2016 08:30:48 +0000 (10:30 +0200)]
iwlwifi: mvm: take the transport ref back when leaving

If d0i3 is supported, we have released the initial transport reference
in iwl_op_mode_mvm_start(), so we should take it back in
iwl_op_mode_mvm_stop() to keep it balanced.

Signed-off-by: Luca Coelho <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoiwlwifi: add disable_11ac module param
Andrei Otcheretianski [Mon, 29 Feb 2016 11:25:48 +0000 (13:25 +0200)]
iwlwifi: add disable_11ac module param

Add module parameter that disables VHT capabilities.

Signed-off-by: Andrei Otcheretianski <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoiwlwifi: mvm: only release the trans ref if d0i3 is supported in fw
Luca Coelho [Mon, 22 Feb 2016 13:44:13 +0000 (15:44 +0200)]
iwlwifi: mvm: only release the trans ref if d0i3 is supported in fw

If d0i3 is not supported by the firmware (or if it's disabled via
module parameters) we shouldn't release the initial transport
reference, so that we won't enter runtime suspend.

Signed-off-by: Luca Coelho <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoiwlwifi: mvm: disable DQA support
Liad Kaufman [Tue, 23 Feb 2016 14:23:38 +0000 (16:23 +0200)]
iwlwifi: mvm: disable DQA support

Do not allow entrance into DQA flows until feature is
completely ready and merged.

Signed-off-by: Liad Kaufman <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoiwlwifi: pcie: detect and workaround invalid write ptr behavior
Sara Sharon [Wed, 24 Feb 2016 12:56:21 +0000 (14:56 +0200)]
iwlwifi: pcie: detect and workaround invalid write ptr behavior

In 9000 series A0 step the closed_rb_num is not wrapping around
properly. The queue is wrapping around as it should, so we can
W/A it by wrapping the closed_rb_num in the driver.
While at it, extend RX logging and add error handling of other
cases HW values may cause us to access invalid memory locations.
Add also a proper masking of vid value read from HW - this should
not have actual affect, but better to be on the safe side.

Signed-off-by: Sara Sharon <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoiwlwifi: mvm: update ucode status before stopping device
Chaya Rachel Ivgi [Mon, 22 Feb 2016 08:21:41 +0000 (10:21 +0200)]
iwlwifi: mvm: update ucode status before stopping device

Leaving ucode_loaded to true after stop_device() has been called
is a recipe for problems. Flows that are not sync'ed with the
driver life cycle (like debugfs hooks and thermal hooks) must
check that the firmware is loaded before they interact with it.
Therefore we need to keep this variable updated with the real
status of the firmware.

Signed-off-by: Chaya Rachel Ivgi <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
9 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Tue, 1 Mar 2016 22:48:00 +0000 (17:48 -0500)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Antonio Quartulli says:

====================
batman-adv 20160229

this is our (hopefully) latest batch of patches intended for net-next.

With this patchset we finally introduce B.A.T.M.A.N. V: the latest
version of our routing protocol.
Technical documentation describing the protocol in more detail can
be found in our wiki[1][2][3][4].

For what concerns this pull request, you can find the high level
description right below.

[1] https://www.open-mesh.org/projects/batman-adv/wiki/BATMAN_V
[2] https://www.open-mesh.org/projects/batman-adv/wiki/OGMv2
[3] https://www.open-mesh.org/projects/batman-adv/wiki/ELP
[4] https://www.open-mesh.org/projects/batman-adv/wiki/BATMAN_V_Tests

 ...

With this patchset we finally introduce our new routing protocol:
B.A.T.M.A.N. V. Its implementation started quite some years ago,
but due to the big changes being introduced it took a while to be
discussed, designed, worked, re-worked, tested and debugged (well,
we're never done with the latest). The entire operation has
basically been a team work involving all the core contributors
together with other people interested in the project.

The new protocol is divided into two main subcomponents, called
respectively ELP and OGMv2. The former is in charge of
dealing with the neighbour discovery and link quality estimation,
while the latter implements the algorithm that spreads the
metrics around the network and computes optimal paths.

The biggest change introduced with B.A.T.M.A.N. V is the new
metric: the protocol won't rely on packet loss anymore, but it
will use the estimated throughput extracted directly from the
wifi driver (when available) by querying cfg80211.
Batman-adv will also send some unicast probing packets when
an interface is not used for payload traffic to make sure that
such values are current.

The new protocol can be compiled-in or not like other
features we have and when selected will pull in CFG80211 as
dependency for the reason described above.

Thanks to the big work brought up in the past by Marek Lindner,
batman-adv can easily deal several protocol implementations,
therefore compiling in this new version does not exclude the
older.
This means that the user is offered the option to choose
the protocol when creating the mesh interface (default is the
old one to keep backward compatibility).

Along with the protocol there are some sysfs knobs that are
introduced to fine tune some of its behaviours, but users
are recommended to keep the default values unless they know
what they are doing.

The last patch is about advertising our own patchwork platform
(thanks to Sven Eckelmann for having set that up!) in the
MAINTAINERS file.
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agonet: pktgen: use reset to set mac header
Zhang Shengju [Mon, 29 Feb 2016 08:21:30 +0000 (08:21 +0000)]
net: pktgen: use reset to set mac header

Since offset is zero, it's not necessary to use set function.

Signed-off-by: Zhang Shengju <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agosch_mqprio: Fix build with older gcc.
David S. Miller [Tue, 1 Mar 2016 22:44:59 +0000 (17:44 -0500)]
sch_mqprio: Fix build with older gcc.

  CC [M]  net/sched/sch_mqprio.o
net/sched/sch_mqprio.c: In function ?mqprio_init?:
net/sched/sch_mqprio.c:145: error: unknown field ?tc? specified in initializer
net/sched/sch_mqprio.c:145: warning: missing braces around initializer
net/sched/sch_mqprio.c:145: warning: (near initialization for ?tc.<anonymous>?)
make[2]: *** [net/sched/sch_mqprio.o] Error 1
make[1]: *** [net/sched] Error 2
make: *** [net] Error 2

Several people reported this, surround the unnamed union
member initialization with braces to fix.

Signed-off-by: David S. Miller <[email protected]>
9 years agoof_mdio: kill useless variable in of_mdiobus_register()
Sergei Shtylyov [Sun, 28 Feb 2016 18:56:34 +0000 (21:56 +0300)]
of_mdio: kill useless variable in of_mdiobus_register()

of_mdiobus_register()  declares the 'paddr' variable to hold the result of
the of_get_property()  but only uses it once after that while the function
can be called directly from the *if* statement. Remove that variable and
switch to calling of_find_property() instead since  we don't care about
the "reg" property's value anyway...

Signed-off-by: Sergei Shtylyov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'qed-next'
David S. Miller [Tue, 1 Mar 2016 22:39:51 +0000 (17:39 -0500)]
Merge branch 'qed-next'

Yuval Mintz says:

====================
qed: Attention support patch series

Until now we've only enabled attention generation for the sake of
management firmware indications [required for link notifications].

This series enables [almost] all the attention sources of the HW,
currently for the sake of logging information relating to issues
experienced by HW. In future, infrastructure laid here would also be used
for the sake of the recovery process.

The first patch in the series is a semantic alignemnt of the code.
The later 3 patches incremently create said infrastructure and enrich
the logged information.
Notice #3 contains quite a bit of structures [consisting of ~1K lines]
that will eventually be removed and incorporated in the binary fw file.
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Print additional HW attention info
Yuval Mintz [Sun, 28 Feb 2016 10:26:55 +0000 (12:26 +0200)]
qed: Print additional HW attention info

This patch utilizes the attention infrastructure to log additional
information that relates only to specific HW blocks.
For some of those HW blocks, it also stops automatically disabling the
attention generation as the attention is considered benign and thus
should only be logged; No fear of it flooding the system.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Print HW attention reasons
Yuval Mintz [Sun, 28 Feb 2016 10:26:54 +0000 (12:26 +0200)]
qed: Print HW attention reasons

Each HW block contains common information about attention reasons,
raising a bit for each one of the different sub-reasons that caused it
to raise an attention.

This patch extends the infrastructure by allowing logging of the various
reasons causing the HW blocks to generate an attention.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Add support for HW attentions
Yuval Mintz [Sun, 28 Feb 2016 10:26:53 +0000 (12:26 +0200)]
qed: Add support for HW attentions

HW is capable of generating attentnions for a multitude of reasons,
but current driver is enabling attention generation only for management
firmware [required for link notifications].

This patch enables almost all of the possible reasons for HW attentions,
logging the HW block generating the attention and preventing further
attentions from that source [to prevent possible attention flood].
It also lays the infrastructure for additional exploration of the various
attentions.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoqed: Semantic refactoring of interrupt code
Yuval Mintz [Sun, 28 Feb 2016 10:26:52 +0000 (12:26 +0200)]
qed: Semantic refactoring of interrupt code

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: remove skb_sender_cpu_clear()
WANG Cong [Sun, 28 Feb 2016 04:19:54 +0000 (20:19 -0800)]
net: remove skb_sender_cpu_clear()

After commit 52bd2d62ce67 ("net: better skb->sender_cpu and skb->napi_id cohabitation")
skb_sender_cpu_clear() becomes empty and can be removed.

Cc: Eric Dumazet <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'mlx5-next'
David S. Miller [Tue, 1 Mar 2016 22:28:01 +0000 (17:28 -0500)]
Merge branch 'mlx5-next'

Saeed Mahameed says:

====================
mlx5 driver updates

This series includes some bug fixes and updates for the mlx5 core
and ethernet driver.

From Gal, two fixes that protects the update CQ moderation flows
when it is not allowed.

From Moshe, two fixes for the core and ethernet driver in
non-cached(NC) and write combining(WC) buffers mappings,
which prevents the driver from double memory mappings.

From Or, reduce the firmware command completion timeout.

From Tariq, several small trivial fixes.

Changes from v0:
- "Fix global UAR mapping" commit messages updated to explain ARCH_HAS_IOREMAP_WC usage.
- rebased to commit 8d3f2806f8fb 'Merge branch ethtool-ksettings'

Changes from v1:
- Removed ARCH_HAS_IOREMAP_WC config flag from "Fix global UAR mapping" commit, as it was not accurate to use it.
- Squashed "Fix global UAR mapping" and "net/mlx5: Avoid double mapping of io mapped memory"
- Added more info for "Fix global UAR mapping" in commit message

Changes from v2:
- None. resubmission per Dave's request due to two parallel submissions to mlx5 driver.
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5: Fix global UAR mapping
Moshe Lazer [Tue, 1 Mar 2016 22:13:40 +0000 (00:13 +0200)]
net/mlx5: Fix global UAR mapping

Avoid double mapping of io mapped memory, Device page may be
mapped to non-cached(NC) or to write-combining(WC).
The code before this fix tries to map it both to WC and NC
contrary to what stated in Intel's software developer manual.

Here we remove the global WC mapping of all UARS
"dev->priv.bf_mapping", since UAR mapping should be decided
per UAR (e.g we want different mappings for EQs, CQs vs QPs).

Caller will now have to choose whether to map via
write-combining API or not.

mlx5e SQs will choose write-combining in order to perform
BlueFlame writes.

Fixes: 88a85f99e51f ('TX latency optimization to save DMA reads')
Signed-off-by: Moshe Lazer <[email protected]>
Reviewed-by: Achiad Shochat <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5: Make command timeout way shorter
Or Gerlitz [Tue, 1 Mar 2016 22:13:39 +0000 (00:13 +0200)]
net/mlx5: Make command timeout way shorter

The command timeout is terribly long, whole two hours. Make it 60s so if
things do go wrong, the user gets feedback in relatively short time, so
they can take corrective actions and/or investigate using tools and such.

Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters')
Signed-off-by: Or Gerlitz <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5e: Don't modify CQ before it was created
Gal Pressman [Tue, 1 Mar 2016 22:13:38 +0000 (00:13 +0200)]
net/mlx5e: Don't modify CQ before it was created

Calling mlx5e_set_coalesce while the interface is down will result in
modifying CQs that don't exist.

Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4
Ethernet functionality')
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5e: Don't try to modify CQ moderation if it is not supported
Gal Pressman [Tue, 1 Mar 2016 22:13:37 +0000 (00:13 +0200)]
net/mlx5e: Don't try to modify CQ moderation if it is not supported

If CQ moderation is not supported by the device, print a warning on
netdevice load, and return error when trying to modify/query cq
moderation via ethtool.

Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4
Ethernet functionality')
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5e: Set drop RQ's necessary parameters only
Tariq Toukan [Tue, 1 Mar 2016 22:13:36 +0000 (00:13 +0200)]
net/mlx5e: Set drop RQ's necessary parameters only

By its role, there is no need to set all the other parameters
for the drop RQ.

Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5e: Move common case counters within sq_stats struct
Tariq Toukan [Tue, 1 Mar 2016 22:13:35 +0000 (00:13 +0200)]
net/mlx5e: Move common case counters within sq_stats struct

For data cache locality considerations, we moved the nop and
csum_offload_inner within sq_stats struct as they are more
commonly accessed in xmit path.

Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5e: Changed naming convention of tx queues in ethtool stats
Tariq Toukan [Tue, 1 Mar 2016 22:13:34 +0000 (00:13 +0200)]
net/mlx5e: Changed naming convention of tx queues in ethtool stats

Instead of the pair (channel, tc), we now use a single number that
goes over all tx queues of a TC, for all TCs.

Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5e: Placement changed for carrier state updates
Tariq Toukan [Tue, 1 Mar 2016 22:13:33 +0000 (00:13 +0200)]
net/mlx5e: Placement changed for carrier state updates

More proper to declare carrier state UP only after the channels
are ready for traffic.

Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet/mlx5e: Replace async events spinlock with synchronize_irq()
Tariq Toukan [Tue, 1 Mar 2016 22:13:32 +0000 (00:13 +0200)]
net/mlx5e: Replace async events spinlock with synchronize_irq()

We only need to flush the irq handler to make sure it does not
queue a work into the global work queue after we start to flush it.
So using synchronize_irq() is more appropriate than a spin lock.

Signed-off-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: ipv6/l3mdev: Move host route on saved address if necessary
David Ahern [Sat, 27 Feb 2016 17:59:17 +0000 (09:59 -0800)]
net: ipv6/l3mdev: Move host route on saved address if necessary

Commit f1705ec197e70 allows IPv6 addresses to be retained on a link down.
The address can have a cached host route which can point to the wrong
FIB table if the L3 enslavement is changed (e.g., route can point to local
table instead of VRF table if device is added to an L3 domain).

On link up check the table of the cached host route against the FIB
table associated with the device and correct if needed.

Signed-off-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'net-timestamps-y2038'
David S. Miller [Tue, 1 Mar 2016 22:18:45 +0000 (17:18 -0500)]
Merge branch 'net-timestamps-y2038'

Deepa Dinamani says:

====================
Convert network timestamps to be y2038 safe

Introduction:

The series is aimed at transitioning network timestamps to being
y2038 safe.
All patches can be reviewed and merged independently.

Socket timestamps and ioctl calls will be handled separately.

Thanks to Arnd Bergmann for discussing solution options with me.

Solution:

Data type struct timespec is not y2038 safe.
Replace timespec with struct timespec64 which is y2038 safe.

Changes v1 -> v2:
  Move and rename inet_current_time() as discussed
  Squash patches 1 and 2
  Reword commit text for patch 2/3
  Carry over review tags
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agonet: sctp: Convert log timestamps to be y2038 safe
Deepa Dinamani [Sat, 27 Feb 2016 08:32:17 +0000 (00:32 -0800)]
net: sctp: Convert log timestamps to be y2038 safe

SCTP probe log timestamps use struct timespec which is
not y2038 safe.
Use struct timespec64 which is 2038 safe instead.

Use monotonic time instead of real time as only time
differences are logged.

Signed-off-by: Deepa Dinamani <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Acked-by: Neil Horman <[email protected]>
Cc: Vlad Yasevich <[email protected]>
Cc: Neil Horman <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: ipv4: tcp_probe: Replace timespec with timespec64
Deepa Dinamani [Sat, 27 Feb 2016 08:32:16 +0000 (00:32 -0800)]
net: ipv4: tcp_probe: Replace timespec with timespec64

TCP probe log timestamps use struct timespec which is
not y2038 safe. Even though timespec might be good enough here
as it is used to represent delta time, the plan is to get rid
of all uses of timespec in the kernel.
Replace with struct timespec64 which is y2038 safe.

Prints still use unsigned long format and type.

Signed-off-by: Deepa Dinamani <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Alexey Kuznetsov <[email protected]>
Cc: James Morris <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]>
Cc: Patrick McHardy <[email protected]>
Acked-by: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agonet: ipv4: Convert IP network timestamps to be y2038 safe
Deepa Dinamani [Sat, 27 Feb 2016 08:32:15 +0000 (00:32 -0800)]
net: ipv4: Convert IP network timestamps to be y2038 safe

ICMP timestamp messages and IP source route options require
timestamps to be in milliseconds modulo 24 hours from
midnight UT format.

Add inet_current_timestamp() function to support this. The function
returns the required timestamp in network byte order.

Timestamp calculation is also changed to call ktime_get_real_ts64()
which uses struct timespec64. struct timespec64 is y2038 safe.
Previously it called getnstimeofday() which uses struct timespec.
struct timespec is not y2038 safe.

Signed-off-by: Deepa Dinamani <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Alexey Kuznetsov <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]>
Cc: James Morris <[email protected]>
Cc: Patrick McHardy <[email protected]>
Acked-by: YOSHIFUJI Hideaki <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoMerge branch 'ife'
David S. Miller [Tue, 1 Mar 2016 22:15:23 +0000 (17:15 -0500)]
Merge branch 'ife'

Jamal Hadi Salim says:

====================
net_sched: Add support for IFE action

As agreed at netconf in Seville, here's the patch finally (1 year
was just too long to wait for an ethertype. Now we are just going
have the user configure one).
Described in netdev01 paper:
            "Distributing Linux Traffic Control Classifier-Action Subsystem"
             Authors: Jamal Hadi Salim and Damascene M. Joachimpillai

The original motivation and deployment of this work was to horizontally
scale packet processing at scope of a chasis or rack. This means one
could take a tc policy and split it across machines connected over
L2. The paper refers to this as "pipeline stage indexing". Other
use cases which evolved out of the original intent include but are
not limited to carrying OAM information, carrying exception handling
metadata, carrying programmed authentication and authorization information,
encapsulating programmed compliance information, service IDs etc.
Read the referenced paper for more details.

The architecture allows for incremental updates for new metadatum support
to cover different use cases.
This patch set includes support for basic skb metadatum.
Followup patches will have more examples of metadata and other features.

v4 changes:
Integrate more feedback from Cong

v3 changes:
Integrate with the new namespace changes
Remove skbhash and queue mapping metadata (but keep their claim for ids)
Integrate feedback from Cong
Integrate feedback from Daniel

v2 changes:
Remove module option for an upper bound of metadata
Integrate feedback from Cong
Integrate feedback from Daniel
====================

Signed-off-by: David S. Miller <[email protected]>
9 years agoSupport to encoding decoding skb prio on IFE action
Jamal Hadi Salim [Sat, 27 Feb 2016 13:08:56 +0000 (08:08 -0500)]
Support to encoding decoding skb prio on IFE action

    Example usage:
    Set the skb priority using skbedit then allow it to be encoded

    sudo tc qdisc add dev $ETH root handle 1: prio
    sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \
    u32 match ip protocol 1 0xff flowid 1:2 \
    action skbedit prio 17 \
    action ife encode \
    allow prio \
    dst 02:15:15:15:15:15

    Note: You dont need the skbedit action if you are already encoding the
    skb priority earlier. A zero skb priority will not be sent

    Alternative hard code static priority of decimal 33 (unlike skbedit)
    then mark of 0x12 every time the filter matches

    sudo $TC filter add dev $ETH parent 1: protocol ip prio 10 \
    u32 match ip protocol 1 0xff flowid 1:2 \
    action ife encode \
    type 0xDEAD \
    use prio 33 \
    use mark 0x12 \
    dst 02:15:15:15:15:15

Signed-off-by: Jamal Hadi Salim <[email protected]>
Acked-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
9 years agoSupport to encoding decoding skb mark on IFE action
Jamal Hadi Salim [Sat, 27 Feb 2016 13:08:55 +0000 (08:08 -0500)]
Support to encoding decoding skb mark on IFE action

Example usage:
Set the skb using skbedit then allow it to be encoded

sudo tc qdisc add dev $ETH root handle 1: prio
sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \
u32 match ip protocol 1 0xff flowid 1:2 \
action skbedit mark 17 \
action ife encode \
allow mark \
dst 02:15:15:15:15:15

Note: You dont need the skbedit action if you are already encoding the
skb mark earlier. A zero skb mark, when seen, will not be encoded.

Alternative hard code static mark of 0x12 every time the filter matches

sudo $TC filter add dev $ETH parent 1: protocol ip prio 10 \
u32 match ip protocol 1 0xff flowid 1:2 \
action ife encode \
type 0xDEAD \
use mark 0x12 \
dst 02:15:15:15:15:15

Signed-off-by: Jamal Hadi Salim <[email protected]>
Acked-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This page took 0.111417 seconds and 4 git commands to generate.