[PATCH net 0/2] r8152: rx patches

2016-11-10 Thread Hayes Wang
Let the rx sw checksum available and add some checks for rx desc. Hayes Wang (2): r8152: fix the sw rx checksum is unavailable r8152: rx descriptor check drivers/net/usb/r8152.c | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) -- 2.7.4

[PATCH net 2/2] r8152: rx descriptor check

2016-11-10 Thread Hayes Wang
For some platforms, the data in memory is not the same with the one from the device. That is, the data of memory is unbelievable. The check is used to find out this situation. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 49

[PATCH net 1/2] r8152: fix the sw rx checksum is unavailable

2016-11-10 Thread Hayes Wang
Fix the hw rx checksum is always enabled, and the user couldn't switch it to sw rx checksum. Note that the RTL_VER_01 only supports sw rx checksum only. Besides, the hw rx checksum for RTL_VER_02 is disabled after commit b9a321b48af4 ("r8152: Fix broken RX checksums."). Re-enable it.

[PATCH v4 2/6] kconfig: regenerate *.c_shipped files after previous changes

2016-11-10 Thread Nicolas Pitre
Signed-off-by: Nicolas Pitre --- scripts/kconfig/zconf.hash.c_shipped | 30 +- scripts/kconfig/zconf.tab.c_shipped | 1581 -- 2 files changed, 753 insertions(+), 858 deletions(-) diff --git a/scripts/kconfig/zconf.hash.c_shipped

[PATCH v4 1/6] kconfig: introduce the "imply" keyword

2016-11-10 Thread Nicolas Pitre
The "imply" keyword is a weak version of "select" where the target config symbol can still be turned off, avoiding those pitfalls that come with the "select" keyword. This is useful e.g. with multiple drivers that want to indicate their ability to hook into a secondary subsystem while allowing

[PATCH net 0/2] bnxt_en: 2 bug fixes.

2016-11-10 Thread Michael Chan
Bug fixes in bnxt_setup_tc() and VF vitual link state. Michael Chan (2): bnxt_en: Fix ring arithmetic in bnxt_setup_tc(). bnxt_en: Fix VF virtual link state. drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 4 ++-- 2 files

[PATCH net 1/2] bnxt_en: Fix ring arithmetic in bnxt_setup_tc().

2016-11-10 Thread Michael Chan
The logic is missing the check on whether the tx and rx rings are sharing completion rings or not. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH net 2/2] bnxt_en: Fix VF virtual link state.

2016-11-10 Thread Michael Chan
If the physical link is down and the VF virtual link is set to "enable", the current code does not always work. If the link is down but the cable is attached, the firmware returns LINK_SIGNAL instead of NO_LINK. The current code is treating LINK_SIGNAL as link up. The fix is to treat link as

[PATCH v4 6/6] posix-timers: make it configurable

2016-11-10 Thread Nicolas Pitre
Some embedded systems have no use for them. This removes about 25KB from the kernel binary size when configured out. Corresponding syscalls are routed to a stub logging the attempt to use those syscalls which should be enough of a clue if they were disabled without proper consideration. They

[PATCH v4 3/6] ptp_clock: allow for it to be optional

2016-11-10 Thread Nicolas Pitre
In order to break the hard dependency between the PTP clock subsystem and ethernet drivers capable of being clock providers, this patch provides simple PTP stub functions to allow linkage of those drivers into the kernel even when the PTP subsystem is configured out. Drivers must be ready to

[PATCH v4 5/6] posix_cpu_timers_exit: wrong place to collect entropy

2016-11-10 Thread Nicolas Pitre
There is no logical relation between add_device_randomness() and posix_cpu_timers_exit(). Let's move the former to where the later is called. This way, when posix-cpu-timers.c is compiled out, there is no need to worry about not losing a call to add_device_randomness(). Signed-off-by: Nicolas

[PATCH v4 4/6] timer: move sys_alarm from timer.c to itimer.c

2016-11-10 Thread Nicolas Pitre
Move the only user of alarm_setitimer to itimer.c where it is defined. This allows for making alarm_setitimer static, and dropping it from the build when __ARCH_WANT_SYS_ALARM is not defined. Signed-off-by: Nicolas Pitre --- include/linux/time.h | 2 -- kernel/time/itimer.c |

[PATCH v4 0/6] make POSIX timers optional with some Kconfig help

2016-11-10 Thread Nicolas Pitre
Many embedded systems don't need the full POSIX timer support. Configuring them out provides a nice kernel image size reduction. When POSIX timers are configured out, the PTP clock subsystem should be left out as well. However a bunch of ethernet drivers currently *select* the later in their

[RFC PATCH 2/2] ptr_ring_ll: pop/push multiple objects at once

2016-11-10 Thread John Fastabend
Signed-off-by: John Fastabend --- include/linux/ptr_ring_ll.h | 22 -- include/linux/skb_array.h | 11 +-- net/sched/sch_generic.c |2 +- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git

Re: [PATCH 1/3] tuntap: rx batching

2016-11-10 Thread John Fastabend
On 16-11-10 08:28 PM, Jason Wang wrote: > > > On 2016年11月11日 12:17, John Fastabend wrote: >> On 16-11-10 07:31 PM, Michael S. Tsirkin wrote: >>> >On Fri, Nov 11, 2016 at 10:07:44AM +0800, Jason Wang wrote: >> >> >>On 2016年11月10日 00:38, Michael S. Tsirkin wrote: > >>>On Wed,

[RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings

2016-11-10 Thread John Fastabend
--- include/linux/ptr_ring_ll.h | 136 +++ include/linux/skb_array.h | 25 2 files changed, 161 insertions(+) create mode 100644 include/linux/ptr_ring_ll.h diff --git a/include/linux/ptr_ring_ll.h b/include/linux/ptr_ring_ll.h new file

[RFC PATCH 0/2] illustrate cmpxchg ring for tap/tun and qdisc

2016-11-10 Thread John Fastabend
This is a cmpxchg ring that could potentially be used to replace the spinlock variant of skb_array. Couple comments its missing a resize operator which would need to be added before it could be a drop in replacement. And although I tested the first patch with my latest set of qdisc updates the

Re: [PATCH 1/3] tuntap: rx batching

2016-11-10 Thread Jason Wang
On 2016年11月11日 12:17, John Fastabend wrote: On 16-11-10 07:31 PM, Michael S. Tsirkin wrote: >On Fri, Nov 11, 2016 at 10:07:44AM +0800, Jason Wang wrote: >> >> >>On 2016年11月10日 00:38, Michael S. Tsirkin wrote: >>>On Wed, Nov 09, 2016 at 03:38:31PM +0800, Jason Wang wrote: Backlog were

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Jason Wang
On 2016年11月11日 11:41, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > >On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > >On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > > >We should use vq->last_avail_idx instead of vq->avail_idx in

Re: [PATCH 1/3] tuntap: rx batching

2016-11-10 Thread John Fastabend
On 16-11-10 07:31 PM, Michael S. Tsirkin wrote: > On Fri, Nov 11, 2016 at 10:07:44AM +0800, Jason Wang wrote: >> >> >> On 2016年11月10日 00:38, Michael S. Tsirkin wrote: >>> On Wed, Nov 09, 2016 at 03:38:31PM +0800, Jason Wang wrote: Backlog were used for tuntap rx, but it can only process 1

Re: [PATCH 1/3] tuntap: rx batching

2016-11-10 Thread Jason Wang
On 2016年11月11日 11:31, Michael S. Tsirkin wrote: On Fri, Nov 11, 2016 at 10:07:44AM +0800, Jason Wang wrote: > > >On 2016年11月10日 00:38, Michael S. Tsirkin wrote: > >On Wed, Nov 09, 2016 at 03:38:31PM +0800, Jason Wang wrote: > > >Backlog were used for tuntap rx, but it can only process 1

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Michael S. Tsirkin
On Fri, Nov 11, 2016 at 10:18:37AM +0800, Jason Wang wrote: > > > On 2016年11月10日 03:57, Michael S. Tsirkin wrote: > > On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: > > > We should use vq->last_avail_idx instead of vq->avail_idx in the > > > checking of vhost_vq_avail_empty() since

Re: [PATCH 1/3] tuntap: rx batching

2016-11-10 Thread Michael S. Tsirkin
On Fri, Nov 11, 2016 at 10:07:44AM +0800, Jason Wang wrote: > > > On 2016年11月10日 00:38, Michael S. Tsirkin wrote: > > On Wed, Nov 09, 2016 at 03:38:31PM +0800, Jason Wang wrote: > > > Backlog were used for tuntap rx, but it can only process 1 packet at > > > one time since it was scheduled

[PATCH net-next 00/11] Start adding support for mv88e6390 family

2016-11-10 Thread Andrew Lunn
This is the first patchset implementing support for the mv88e6390 family. This is a new generation of switch devices and has numerous incompatible changes to the registers. These patches allow the switch to the detected during probe, and makes the statistics unit work. These patches are

[PATCH net-next 01/11] net: dsa: mv88e6xxx: Take switch out of reset before probe

2016-11-10 Thread Andrew Lunn
The switch needs to be taken out of reset before we can read its ID register on the MDIO bus. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c

[PATCH net-next 02/11] net: dsa: mv88e6xxx: Fix unused variable warning by using variable

2016-11-10 Thread Andrew Lunn
_mv88e6xxx_stats_wait() did not check the return value from mv88e6xxx_g1_read(), so the compiler complained about set but unused err. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH net-next 03/11] net: dsa: mv88e6xxx: Add the mv88e6390 family

2016-11-10 Thread Andrew Lunn
With the devices added to the tables, the probe will recognize the switch. This however is not sufficient to make it work properly, other changes are needed because of incompatibilities. Signed-off-by: Andrew Lunn --- .../devicetree/bindings/net/dsa/marvell.txt| 3 +-

[PATCH net-next 08/11] net: dsa: mv88e6xxx: Add stats_get_sset_count to ops structure

2016-11-10 Thread Andrew Lunn
Different families have different sets of statistics. Abstract this using a stats_get_sset_count op. Each stat has a bitmap, and the ops implementer uses a bit map mask to count the statistics which apply for the family. Signed-off-by: Andrew Lunn ---

[PATCH net-next 07/11] net: dsa: mv88e6xxx: Add mv88e6390 statistics unit init

2016-11-10 Thread Andrew Lunn
The statistics unit on the mv88e6390 needs to the configured in a different register to the others as to what histogram statistics is should return. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 31 +++

[PATCH net-next 05/11] net: dsa: mv88e6xxx: Add comment about family a device belongs to

2016-11-10 Thread Andrew Lunn
Knowing the family of device belongs to helps with picking the ops implementation which is appropriate to the device. So add a comment to each structure of ops. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 19 +++ 1 file changed, 19

[PATCH net-next 04/11] net: dsa: mv88e6xxx: Abstract stats_snapshot into ops structure

2016-11-10 Thread Andrew Lunn
Taking a stats snapshot differs between same families. Abstract this into an ops member. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 37 +++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 + 2 files changed, 38

[PATCH net-next 09/11] net: dsa: mv88e6xxx: Add stats_get_strings to ops structure

2016-11-10 Thread Andrew Lunn
Different families have different sets of statistics. Abstract this using a stats_get_strings op. Each stat has a bitmap, and the ops implementer uses a bit map mask to return a list of strings for the statistics which apply for the family. Signed-off-by: Andrew Lunn ---

[PATCH net-next 11/11] net: dsa: mv88e6xxx: Implement mv88e6390 get_stats

2016-11-10 Thread Andrew Lunn
The mv88e6390 uses a different bit to select between bank0 and bank1 of the statistics. So implement an ops function for this, and pass the selector bit to the generic stats read function. Also, the histogram selection has moved for the mv88e6390, so abstract its selection as well. Signed-off-by:

[PATCH net-next 10/11] net: dsa: mv88e6xxx: Add stats_get_stats to ops structure

2016-11-10 Thread Andrew Lunn
Different families have different sets of statistics. Abstract this using a stats_get_stats op. The mv88e6390 needs a different implementation, which will be added later. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 84

[PATCH net-next 06/11] net: dsa: mv88e6xxx: Add mv88e6390 stats snapshot operation

2016-11-10 Thread Andrew Lunn
The MV88E6390 has a control register for what the histogram statistics actually contain. This means the stat_snapshot method should not set this information. So implement the 6390 stats_snapshot function without these bits. Signed-off-by: Andrew Lunn ---

Re: [PATCH] net: phy: marvell: optimize logic for page changing during init

2016-11-10 Thread Florian Fainelli
Le 10/11/2016 à 06:03, Uwe Kleine-König a écrit : > Instead of remembering if the page was changed, just compare the current > page to the saved one. This is easier and has the advantage to save a > register write if the page was already restored. Seems reasonable to me: Reviewed-by: Florian

Re: [PATCH 3/3] vhost_net: tx support batching

2016-11-10 Thread Jason Wang
On 2016年11月10日 04:05, Michael S. Tsirkin wrote: On Wed, Nov 09, 2016 at 03:38:33PM +0800, Jason Wang wrote: This patch tries to utilize tuntap rx batching by peeking the tx virtqueue during transmission, if there's more available buffers in the virtqueue, set MSG_MORE flag for a hint for

Re: [PATCH 2/3] vhost: better detection of available buffers

2016-11-10 Thread Jason Wang
On 2016年11月10日 03:57, Michael S. Tsirkin wrote: On Wed, Nov 09, 2016 at 03:38:32PM +0800, Jason Wang wrote: We should use vq->last_avail_idx instead of vq->avail_idx in the checking of vhost_vq_avail_empty() since latter is the cached avail index from guest but we want to know if there's

Re: [PATCH 1/3] tuntap: rx batching

2016-11-10 Thread Jason Wang
On 2016年11月10日 00:38, Michael S. Tsirkin wrote: On Wed, Nov 09, 2016 at 03:38:31PM +0800, Jason Wang wrote: Backlog were used for tuntap rx, but it can only process 1 packet at one time since it was scheduled during sendmsg() synchronously in process context. This lead bad cache utilization

RE: [patch net-next 5/8] Introduce sample tc action

2016-11-10 Thread Yotam Gigi
>-Original Message- >From: John Fastabend [mailto:john.fastab...@gmail.com] >Sent: Thursday, November 10, 2016 9:38 PM >To: Jiri Pirko ; netdev@vger.kernel.org >Cc: da...@davemloft.net; Yotam Gigi ; Ido Schimmel >; Elad Raz

Re: [PATCH] bpf: fix range arithmetic for bpf map access

2016-11-10 Thread David Miller
From: Josef Bacik Date: Thu, 10 Nov 2016 19:18:12 -0500 > --- > Sorry Jann, I saw your response last night and then promptly forgot about it, > here's the git-send-email version. GIT will remove everything after the first "---" line from the commit message, so you've essentially

[PATCH] bpf: fix range arithmetic for bpf map access

2016-11-10 Thread Josef Bacik
--- Sorry Jann, I saw your response last night and then promptly forgot about it, here's the git-send-email version. --- I made some invalid assumptions with BPF_AND and BPF_MOD that could result in invalid accesses to bpf map entries. Fix this up by doing a few things 1) Kill BPF_MOD support.

[PATCH] Revert "include/uapi/linux/atm_zatm.h: include linux/time.h"

2016-11-10 Thread Mike Frysinger
This reverts commit cf00713a655d ("include/uapi/linux/atm_zatm.h: include linux/time.h"). This attempted to fix userspace breakage that no longer existed when the patch was merged. Almost one year earlier, commit 70ba07b675b5 ("atm: remove 'struct zatm_t_hist'") deleted the struct in question.

Re: [PATCH] net: ethernet: ti: davinci_cpdma: fix fixed prio cpdma ctlr configuration

2016-11-10 Thread Grygorii Strashko
On 11/10/2016 01:52 PM, ivan.khoronzhuk wrote: On 10.11.16 18:37, Grygorii Strashko wrote: On 11/09/2016 05:56 PM, Ivan Khoronzhuk wrote: On 09.11.16 23:09, Grygorii Strashko wrote: On 11/08/2016 07:10 AM, Ivan Khoronzhuk wrote: The dma ctlr is reseted to 0 while cpdma start, thus

[PATCH] [v2] net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause

2016-11-10 Thread Timur Tabi
Instead of having individual PHY drivers set the SUPPORTED_Pause and SUPPORTED_Asym_Pause flags, phylib itself should set those flags. During autonegotiation, the PHYs will determine whether to enable pause frame support. Pause frames are a feature that is supported by the MAC. It is the MAC

RE: [v16, 0/7] Fix eSDHC host version register bug

2016-11-10 Thread Y.B. Lu
> -Original Message- > From: Y.B. Lu > Sent: Thursday, November 10, 2016 12:06 PM > To: 'Scott Wood'; Ulf Hansson > Cc: linux-mmc; Arnd Bergmann; linuxppc-...@lists.ozlabs.org; > devicet...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; linux- > ker...@vger.kernel.org; linux-clk;

[PATCH net-next v1 11/11] amd-xgbe: Add support for a KR redriver

2016-11-10 Thread Tom Lendacky
This patch provides support for the presence of a KR redriver chip in between the device PCS and an external PHY. When a redriver chip is present the device must perform clause 73 auto-negotiation in order to set the redriver chip for the downstream connection. Signed-off-by: Tom Lendacky

[PATCH net-next v1 10/11] amd-xgbe: Add support for MDIO attached PHYs

2016-11-10 Thread Tom Lendacky
Use the phylib support in the kernel to communicate with and control an MDIO attached PHY. Use the hardware's MDIO communication mechanism to communicate with the PHY. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-common.h | 37 +++

[PATCH net-next v1 09/11] amd-xgbe: Add support for SFP+ modules

2016-11-10 Thread Tom Lendacky
Add support for recognizing and using SFP+ modules directly. This includes using the I2C support to read and interpret the information returned from an SFP+ module and configuring things properly. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/Kconfig

[PATCH net-next v1 07/11] amd-xgbe: Add I2C support for sideband communication

2016-11-10 Thread Tom Lendacky
Add support to initialize and use the I2C controller within the hardware in order to perform sideband communication, e.g. determine the SFP media type that is installed. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/Makefile |2

[PATCH net-next v1 08/11] net: phy: expose phy_aneg_done API for use by drivers

2016-11-10 Thread Tom Lendacky
Make phy_aneg_done() available to drivers so that the result of the auto-negotiation initiated by phy_start_aneg() can be determined. Remove the local implementation of phy_aneg_done() from the Aeroflex driver and use the phy library version. Signed-off-by: Tom Lendacky

[PATCH net-next v1 04/11] amd-xgbe: Allow for a greater number of Rx queues

2016-11-10 Thread Tom Lendacky
Remove the call to netif_get_num_default_rss_queues() and replace it with num_online_cpus() to allow for the possibility of using all of the hardware DMA channels available. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-main.c |3 +-- 1 file

[PATCH net-next v1 06/11] amd-xgbe: Add ECC status support for the device memory

2016-11-10 Thread Tom Lendacky
Some versions of the amd-xgbe device are capable of reporting ECC error information back to the driver. Add support to process, track and report on this information. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/Kconfig|5 +

[PATCH net-next v1 03/11] amd-xgbe: Add PCI device support

2016-11-10 Thread Tom Lendacky
Add support for new PCI devices to the driver. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/Kconfig |4 drivers/net/ethernet/amd/xgbe/Makefile|3 drivers/net/ethernet/amd/xgbe/xgbe-common.h | 99 +++

[PATCH net-next v1 02/11] amd-xgbe: Add a workaround for Tx timestamp issue

2016-11-10 Thread Tom Lendacky
Update the reading of the Tx timestamp to account for a hardware issue on how the fields and interrupt are cleared. The "seconds" portion of the timestamp should be read first, followed by the "nanoseconds" portion. Reading the "nanoseconds" portion should clear the timestamp data and the

[PATCH net-next v1 05/11] amd-xgbe: Add support for new DMA interrupt mode

2016-11-10 Thread Tom Lendacky
The current per channel DMA interrupt support is based on an edge triggered interrupt that is not maskable. This results in having to call the disable_irq/enable_irq functions in order to prevent interrupts during napi processing. The hardware now has a way to configure the per channel DMA

[PATCH net-next v1 00/11] amd-xgbe: AMD XGBE driver updates 2016-11-10

2016-11-10 Thread Tom Lendacky
This patch series is targeted at adding support for a new PCI version of the hardware. As part of the new PCI device, there is a new PCS/PHY interaction, ECC support, I2C sideband communication, SFP+ support and more. The following updates and fixes are included in this driver update series: -

[PATCH net-next v1 01/11] amd-xgbe: Guard against incorrectly generated interrupts

2016-11-10 Thread Tom Lendacky
Due to a hardware issue, it is possible for interrupt events to be incorrectly generated when performing a soft reset. To guard against this, perform the soft reset twice. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 16 +++-

Re: [PATCH 2/2] rtl8xxxu: Fix for bogus data used to determine macpower

2016-11-10 Thread Barry Day
On Tue, Nov 08, 2016 at 09:29:07AM -0500, Jes Sorensen wrote: > Dave Jones writes: > > On Fri, Nov 04, 2016 at 09:56:00AM -0400, Jes Sorensen wrote: > >> > >> Joe Perches writes: > >> > On Sun, 2016-10-30 at 19:02 -0400, Jes Sorensen wrote: > >> >> Code

Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN

2016-11-10 Thread Baicar, Tyler
Hello Sasha, On 11/9/2016 11:19 PM, Neftin, Sasha wrote: On 11/9/2016 11:41 PM, Tyler Baicar wrote: Move IRQ free code so that it will happen regardless of the __E1000_DOWN bit. Currently the e1000e driver only releases its IRQ if the __E1000_DOWN bit is cleared. This is not sufficient because

Re: Long delays creating a netns after deleting one (possibly RCU related)

2016-11-10 Thread Paul E. McKenney
On Thu, Nov 10, 2016 at 09:37:47AM -0800, Cong Wang wrote: > (Cc'ing Paul) > > On Wed, Nov 9, 2016 at 7:42 AM, Rolf Neugebauer > wrote: > > Hi > > > > We noticed some long delays starting docker containers on some newer > > kernels (starting with 4.5.x and still

[PATCH v2 net] tcp: take care of truncations done by sk_filter()

2016-11-10 Thread Eric Dumazet
From: Eric Dumazet With syzkaller help, Marco Grassi found a bug in TCP stack, crashing in tcp_collapse() Root cause is that sk_filter() can truncate the incoming skb, but TCP stack was not really expecting this to happen. It probably was expecting a simple DROP or ACCEPT

Re: [PATCH net] tcp: take care of truncations done by sk_filter()

2016-11-10 Thread Eric Dumazet
On Thu, 2016-11-10 at 12:50 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > With syzkaller help, Marco Grassi found a bug in TCP stack, > crashing in tcp_collapse() I will send a v2, we need to reload iph, not only th.

[PATCH net] tcp: take care of truncations done by sk_filter()

2016-11-10 Thread Eric Dumazet
From: Eric Dumazet With syzkaller help, Marco Grassi found a bug in TCP stack, crashing in tcp_collapse() Root cause is that sk_filter() can truncate the incoming skb, but TCP stack was not really expecting this to happen. It probably was expecting a simple DROP or ACCEPT

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-10 Thread Bjørn Mork
Alan Stern writes: > On Thu, 10 Nov 2016, Kai-Heng Feng wrote: > >> Is there a way to force XHCI run at HighSpeed? > > Yes, like I said above: Use a USB-2 cable instead of a USB-3 cable. It's an m.2 form factor modem, so there most likely isn't any cable involved. But

Re: [patch net-next 5/8] Introduce sample tc action

2016-11-10 Thread John Fastabend
On 16-11-10 11:58 AM, Yotam Gigi wrote: > > >> -Original Message- >> From: John Fastabend [mailto:john.fastab...@gmail.com] >> Sent: Thursday, November 10, 2016 9:38 PM >> To: Jiri Pirko ; netdev@vger.kernel.org >> Cc: da...@davemloft.net; Yotam Gigi

Re: BUG() can be hit in tcp_collapse()

2016-11-10 Thread Eric Dumazet
On Thu, 2016-11-10 at 11:49 -0800, Eric Dumazet wrote: > On Thu, 2016-11-10 at 11:26 -0800, Eric Dumazet wrote: > > > The issue is that sk_filter() truncates an incoming packet to a smaller > > value. > > > > Bad things happen because TCP_SKB_CB(skb)->end_seq is not updated. > > > > I guess

RE: [patch net-next 1/8] Introduce ife encapsulation module

2016-11-10 Thread Yotam Gigi
>-Original Message- >From: David Miller [mailto:da...@davemloft.net] >Sent: Thursday, November 10, 2016 9:18 PM >To: j...@resnulli.us >Cc: netdev@vger.kernel.org; Yotam Gigi ; Ido Schimmel >; Elad Raz ; Nogah Frankel

Re: [PATCH] net: ethernet: ti: davinci_cpdma: fix fixed prio cpdma ctlr configuration

2016-11-10 Thread ivan.khoronzhuk
On 10.11.16 18:37, Grygorii Strashko wrote: On 11/09/2016 05:56 PM, Ivan Khoronzhuk wrote: On 09.11.16 23:09, Grygorii Strashko wrote: On 11/08/2016 07:10 AM, Ivan Khoronzhuk wrote: The dma ctlr is reseted to 0 while cpdma start, thus cpdma ctlr I assume this is because

Re: BUG() can be hit in tcp_collapse()

2016-11-10 Thread Eric Dumazet
On Thu, 2016-11-10 at 11:26 -0800, Eric Dumazet wrote: > The issue is that sk_filter() truncates an incoming packet to a smaller > value. > > Bad things happen because TCP_SKB_CB(skb)->end_seq is not updated. > > I guess other issues would also happen if the truncation also removes > part of

Re: [patch net-next 5/8] Introduce sample tc action

2016-11-10 Thread John Fastabend
On 16-11-10 11:35 AM, John Fastabend wrote: > On 16-11-10 03:23 AM, Jiri Pirko wrote: >> From: Yotam Gigi >> >> This action allow the user to sample traffic matched by tc classifier. >> The sampling consists of choosing packets randomly, truncating them, >> adding some

Re: [patch net-next 5/8] Introduce sample tc action

2016-11-10 Thread John Fastabend
On 16-11-10 03:23 AM, Jiri Pirko wrote: > From: Yotam Gigi > > This action allow the user to sample traffic matched by tc classifier. > The sampling consists of choosing packets randomly, truncating them, > adding some informative metadata regarding the interface and the

Re: BUG() can be hit in tcp_collapse()

2016-11-10 Thread Eric Dumazet
On Thu, 2016-11-10 at 07:44 -0800, Eric Dumazet wrote: > On Thu, 2016-11-10 at 09:47 -0500, Vladis Dronov wrote: > > Hello, > > > > It was discovered by Marco Grassi (many thanks) that > > the > > latest stable Linux kernel v4.8.6 is crashing in tcp_collapse() after making

Re: [PATCH net-next v2 2/7] vxlan: simplify exception handling

2016-11-10 Thread Pravin Shelar
On Thu, Nov 10, 2016 at 10:33 AM, Jiri Benc wrote: > On Thu, 10 Nov 2016 10:10:09 -0800, Pravin Shelar wrote: >> I wanted to do same, that is free dst and skb in caller function. But >> that would need more changes due to discrepancy in IPv4 udp-tunnel and >> IPv6 udp-tunnel

Re: [patch net-next 1/8] Introduce ife encapsulation module

2016-11-10 Thread David Miller
From: Jiri Pirko Date: Thu, 10 Nov 2016 12:23:01 +0100 > +void *ife_encode(struct sk_buff *skb, u16 metalen) metalen is u16 > + metalen = htons(metalen); htons() returns be16. > +int ife_tlv_meta_encode(void *skbdata, u16 attrtype, u16 dlen, const void > *dval) > +{ >

Re: [Regression w/ patch] Restore network resistance to weird ICMP messages

2016-11-10 Thread David Miller
This is still not formed properly. Your Subject line should be of the form: Subject: $Subsystem: $Description Something like "icmp: Restore resistence to abnormal messages." Also, your patch must be inline, right after the commit message, rather than included as an attachment.

[Regression w/ patch] Restore network resistance to weird ICMP messages

2016-11-10 Thread Vicente Jiménez
Handle weird ICMP fragmentation needed messages with next hop MTU equal to (or exceeding) dropped packet size Fixes: 46517008e116 ("ipv4: Kill ip_rt_frag_needed().") In a large corporate network, we spotted this weird ICMP message after a long troubleshooting. See attached capture file. Those

[PATCH net v2] igb: re-assign hw address pointer on reset after PCI error

2016-11-10 Thread Guilherme G. Piccoli
Whenever the igb driver detects the result of a read operation returns a value composed only by F's (like 0x), it will detach the net_device, clear the hw_addr pointer and warn to the user that adapter's link is lost - those steps happen on igb_rd32(). In case a PCI error happens on Power

Re: [mm PATCH v3 07/23] arch/hexagon: Add option to skip DMA sync as a part of mapping

2016-11-10 Thread Richard Kuo
On Thu, Nov 10, 2016 at 06:34:52AM -0500, Alexander Duyck wrote: > This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to > avoid invoking cache line invalidation if the driver will just handle it > later via a sync_for_cpu or sync_for_device call. > > Cc: Richard Kuo

Re: [PATCH net-next v2 4/7] vxlan: improve vxlan route lookup checks.

2016-11-10 Thread Jiri Benc
On Thu, 10 Nov 2016 10:10:25 -0800, Pravin Shelar wrote: > I am specifically talking about cached routes. If the dst entry is > cached, this patch avoids checking for device loop. Okay, true, for cached routes we do less work with this patch. This was more a side note anyway, the real comment

Re: [PATCH net-next v2 2/7] vxlan: simplify exception handling

2016-11-10 Thread Jiri Benc
On Thu, 10 Nov 2016 10:10:09 -0800, Pravin Shelar wrote: > I wanted to do same, that is free dst and skb in caller function. But > that would need more changes due to discrepancy in IPv4 udp-tunnel and > IPv6 udp-tunnel api. IPv4 works on route entry and IPv6 needs dst > entry. so If caller frees

Re: [PATCH net-next v2 2/7] vxlan: simplify exception handling

2016-11-10 Thread Pravin Shelar
On Thu, Nov 10, 2016 at 1:47 AM, Jiri Benc wrote: > On Wed, 9 Nov 2016 19:33:24 -0800, Pravin Shelar wrote: >> I have moved the dst error handling to vxlan_build_skb(), which is >> releasing the dst entry. > > Hmm, right, I missed that. But it's weird. The previous logic was >

Re: [PATCH net-next v2 4/7] vxlan: improve vxlan route lookup checks.

2016-11-10 Thread Pravin Shelar
On Thu, Nov 10, 2016 at 1:56 AM, Jiri Benc wrote: > On Wed, 9 Nov 2016 19:34:06 -0800, Pravin Shelar wrote: >> Why it would not help in non-ovs vxlan egress path? It avoids checking >> (if condition) for device loop. > > I may be missing something but I count the same number of

Re: [PATCH 1/2] net: mvpp2: don't bring up on MAC address set

2016-11-10 Thread Baruch Siach
Hi David, On Thu, Nov 10, 2016 at 11:57:18AM -0500, David Miller wrote: > From: Baruch Siach > Date: Wed, 9 Nov 2016 14:56:33 +0200 > > > Current .ndo_set_mac_address implementation brings up the interface when > > revert > > to original address after failure succeeds. Fix

Re: [patch net-next] mlxsw: spectrum_router: Add FIB abort warning

2016-11-10 Thread David Miller
From: Jiri Pirko Date: Thu, 10 Nov 2016 12:10:29 +0100 > From: Jiri Pirko > > Add a warning that the abort mechanism was triggered for device. > Also avoid going through the procedure if abort was already done. > > Signed-off-by: Jiri Pirko

Re: [PATCH net-next 0/2] Fixes for port refactoring

2016-11-10 Thread David Miller
From: Andrew Lunn Date: Thu, 10 Nov 2016 15:43:59 +0100 > The patches which refactored setting up the switch MACs introduced a > couple of regressions. The RGMII delays for a port can be set using > other mechanism than just phy-mode. Don't overwrite the delays unless >

Re: [patch net v2 0/2] mlxsw: Couple of router fixes

2016-11-10 Thread David Miller
From: Jiri Pirko Date: Thu, 10 Nov 2016 12:31:03 +0100 > From: Jiri Pirko > > --- > v1->v2: > - patch2: > - use net_eq Series applied, thanks Jiri.

RE: [PATCH net-next V5 3/9] liquidio CN23XX: Mailbox support

2016-11-10 Thread Vatsavayi, Raghu
Thanks. Will you please let me know if any more changes that you need, I will include all those in next version. If this the only change then please do confirm, so that I can mail you next patch soon with this change. Regards Raghu. > -Original Message- > From: David Miller

Re: [PATCH net 0/2] qed: Fix RoCE infrastructure

2016-11-10 Thread David Miller
From: Yuval Mintz Date: Wed, 9 Nov 2016 22:48:42 +0200 > This series fixes 2 basic issues with RoCE support, > one handles a missing configuration in the initial infrastructure > support while the other is a regression introduced by one of the > initial fix submissions.

Re: net/l2tp: use-after-free write in l2tp_ip6_close

2016-11-10 Thread Guillaume Nault
On Mon, Nov 07, 2016 at 11:35:26PM +0100, Andrey Konovalov wrote: > Hi, > > I've got the following error report while running the syzkaller fuzzer: > > == > BUG: KASAN: use-after-free in l2tp_ip6_close+0x239/0x2a0 at addr >

Re: [PATCH net-next V5 3/9] liquidio CN23XX: Mailbox support

2016-11-10 Thread David Miller
From: "Vatsavayi, Raghu" Date: Thu, 10 Nov 2016 17:44:50 + > Thanks. Will you please let me know if any more changes that you > need, I will include all those in next version. Nobody is under any obligation to review your entire series every time I or any other

Re: [PATCH] debugfs: improve formatting of debugfs_real_fops()

2016-11-10 Thread Greg Kroah-Hartman
On Thu, Nov 10, 2016 at 05:23:49PM +, Jakub Kicinski wrote: > Type of debugfs_real_fops() is longer than parameters and > the name, so there is no way to break the declaration nicely. > We have to go over 80 characters. > > Signed-off-by: Jakub Kicinski > --- >

[mm PATCH v3 05/23] arch/c6x: Add option to skip sync on DMA map and unmap

2016-11-10 Thread Alexander Duyck
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to avoid invoking cache line invalidation if the driver will just handle it later via a sync_for_cpu or sync_for_device call. Acked-by: Mark Salter Signed-off-by: Alexander Duyck

[mm PATCH v3 14/23] arch/parisc: Add option to skip DMA sync as a part of map and unmap

2016-11-10 Thread Alexander Duyck
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to avoid invoking cache line invalidation if the driver will just handle it via a sync_for_cpu or sync_for_device call. Cc: "James E.J. Bottomley" Cc: Helge Deller Cc:

[mm PATCH v3 13/23] arch/openrisc: Add option to skip DMA sync as a part of mapping

2016-11-10 Thread Alexander Duyck
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to avoid invoking cache line invalidation if the driver will just handle it via a sync_for_cpu or sync_for_device call. Cc: Jonas Bonn Signed-off-by: Alexander Duyck ---

[mm PATCH v3 06/23] arch/frv: Add option to skip sync on DMA map

2016-11-10 Thread Alexander Duyck
The use of DMA_ATTR_SKIP_CPU_SYNC was not consistent across all of the DMA APIs in the arch/arm folder. This change is meant to correct that so that we get consistent behavior. Signed-off-by: Alexander Duyck --- arch/frv/mb93090-mb00/pci-dma-nommu.c | 14

[mm PATCH v3 02/23] arch/arm: Add option to skip sync on DMA map and unmap

2016-11-10 Thread Alexander Duyck
The use of DMA_ATTR_SKIP_CPU_SYNC was not consistent across all of the DMA APIs in the arch/arm folder. This change is meant to correct that so that we get consistent behavior. Cc: Russell King Signed-off-by: Alexander Duyck ---

[mm PATCH v3 12/23] arch/nios2: Add option to skip DMA sync as a part of map and unmap

2016-11-10 Thread Alexander Duyck
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to avoid invoking cache line invalidation if the driver will just handle it via a sync_for_cpu or sync_for_device call. Cc: Ley Foon Tan Signed-off-by: Alexander Duyck ---

[mm PATCH v3 03/23] arch/avr32: Add option to skip sync on DMA map

2016-11-10 Thread Alexander Duyck
The use of DMA_ATTR_SKIP_CPU_SYNC was not consistent across all of the DMA APIs in the arch/arm folder. This change is meant to correct that so that we get consistent behavior. Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Alexander Duyck

[mm PATCH v3 01/23] arch/arc: Add option to skip sync on DMA mapping

2016-11-10 Thread Alexander Duyck
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to avoid invoking cache line invalidation if the driver will just handle it later via a sync_for_cpu or sync_for_device call. Acked-by: Vineet Gupta Signed-off-by: Alexander Duyck

  1   2   3   >