Re: [PATCH net] sctp: fix the check for _sctp_walk_params and _sctp_walk_errors

2017-07-27 Thread David Miller
From: Xin Long Date: Wed, 26 Jul 2017 16:24:59 +0800 > Commit b1f5bfc27a19 ("sctp: don't dereference ptr before leaving > _sctp_walk_{params, errors}()") tried to fix the issue that it > may overstep the chunk end for _sctp_walk_{params, errors} with > 'chunk_end >

Re: [patch net-next 2/2] mlxsw: spectrum: Add support for access cable info via ethtool

2017-07-27 Thread Arkadi Sharshevsky
On 07/26/2017 05:18 PM, Andrew Lunn wrote: >> +static int mlxsw_sp_get_module_info(struct net_device *netdev, >> +struct ethtool_modinfo *modinfo) >> +{ >> +struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev); >> +u8

[PATCH net-next 1/3] tap: use build_skb() for small packet

2017-07-27 Thread Jason Wang
We use tun_alloc_skb() which calls sock_alloc_send_pskb() to allocate skb in the past. This socket based method is not suitable for high speed userspace like virtualization which usually: - ignore sk_sndbuf (INT_MAX) and expect to receive the packet as fast as possible - don't want to be block

Re: [PATCH net-next 2/3] nfp: look for firmware image by device serial number and PCI name

2017-07-27 Thread Jakub Kicinski
On Thu, 27 Jul 2017 08:20:22 +, David Laight wrote: > From: Jakub Kicinski > > Sent: 26 July 2017 19:10 > > We generally look up firmware by card type, but that doesn't allow > > users who have more than one card of the same type in their system > > to select firmware per adapter. > > > >

[PATCH net-next 0/3] XDP support for tap

2017-07-27 Thread Jason Wang
Hi all: This series tries to implement XDP support for tap. Two path were implemented: - fast path: small & non-gso packet, For performance reason we do it at page level and use build_skb() to create skb if necessary. - slow path: big or gso packet, we don't want to lose the capability

Re: [PATCH net-next 2/2] bnxt_en: define sriov_lock unconditionally

2017-07-27 Thread Arnd Bergmann
On Thu, Jul 27, 2017 at 11:00 AM, Sathya Perla wrote: > On Thu, Jul 27, 2017 at 1:18 PM, Arnd Bergmann wrote: > [...] >> >> On today's linux-next: >> >> drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.o: In function >> `bnxt_dl_register': >>

Re: [PATCHv2 iproute2] utils: return default family when rtm_family is not RTNL_FAMILY_IPMR/IP6MR

2017-07-27 Thread Phil Sutter
On Thu, Jul 27, 2017 at 05:44:15PM +0800, Hangbin Liu wrote: > When we get a multicast route, the rtm_type is RTN_MULTICAST, but the > rtm_family may be AF_INET. If we only check the type with RTNL_FAMILY_IPMR, > we will get malformed address. e.g. > > + ip -4 route add multicast 172.111.1.1 dev

Re: [PATCH net-next v2 00/10] netvsc fixes and new features

2017-07-27 Thread David Miller
From: Stephen Hemminger Date: Wed, 26 Jul 2017 16:40:19 -0700 > The next group of patches aims to reduce the driver memory footprint > by reducing the size of the per-device receive and send buffers, and > the per-channel receive completion queue. Sorry Stephen, I

Re: [PATCH net-next v2 01/10] net: dsa: lan9303: Fixed MDIO interface

2017-07-27 Thread kbuild test robot
Hi Egil, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Egil-Hjelmeland/net-dsa-lan9303-unicast-offload-fdb-mdb-STP/20170727-074246 config: x86_64-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce

RE: [PATCH net-next 2/3] nfp: look for firmware image by device serial number and PCI name

2017-07-27 Thread David Laight
From: Jakub Kicinski > Sent: 26 July 2017 19:10 > We generally look up firmware by card type, but that doesn't allow > users who have more than one card of the same type in their system > to select firmware per adapter. > > Unfortunately user space firmware helper seems fraught with >

Re: [PATCH net] dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly

2017-07-27 Thread David Miller
From: Xin Long Date: Wed, 26 Jul 2017 14:19:46 +0800 > The patch "dccp: fix a memleak that dccp_ipv6 doesn't put reqsk > properly" fixed reqsk refcnt leak for dccp_ipv6. The same issue > exists on dccp_ipv4. > > This patch is to fix it for dccp_ipv4. > > Signed-off-by:

Re: [PATCH net] dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly

2017-07-27 Thread David Miller
From: Xin Long Date: Wed, 26 Jul 2017 14:19:09 +0800 > In dccp_v6_conn_request, after reqsk gets alloced and hashed into > ehash table, reqsk's refcnt is set 3. one is for req->rsk_timer, > one is for hlist, and the other one is for current using. > > The problem is when

Re: [oss-drivers] [PATCH net-next 0/3] nfp: extend firmware request logic

2017-07-27 Thread Simon Horman
On Wed, Jul 26, 2017 at 11:09:45AM -0700, Jakub Kicinski wrote: > Hi! > > We have been pondering for some time how to support loading different > application firmwares onto NFP. We want to support both users selecting > one of the firmware images provided by Netronome (which are optimized > for

Re: [PATCH net] xen-netback: correctly schedule rate-limited queues

2017-07-27 Thread Jean-Louis Dupond
Op 2017-06-22 17:16, schreef David Miller: From: Wei Liu Date: Wed, 21 Jun 2017 10:21:22 +0100 Add a flag to indicate if a queue is rate-limited. Test the flag in NAPI poll handler and avoid rescheduling the queue if true, otherwise we risk locking up the host. The

[PATCH iproute2] utils: also check AF_INET family when rtm_type is RTN_MULTICAST

2017-07-27 Thread Hangbin Liu
When we get a multicast route, the rtm_type is RTN_MULTICAST, but the rtm_family may be AF_INET. If we only check the type with RTNL_FAMILY_IPMR, we will get malformed address. e.g. + ip -4 route add multicast 172.111.1.1 dev em1 table main Before fix: + ip route list type multicast table main

Re: [PATCH net] udp6: fix socket leak on early demux

2017-07-27 Thread Paolo Abeni
On Thu, 2017-07-27 at 00:06 -0700, Eric Dumazet wrote: > On Wed, 2017-07-26 at 17:29 +0200, Paolo Abeni wrote: > > When an early demuxed packet reaches __udp6_lib_lookup_skb(), the > > sk reference is retrieved and used, but the relevant reference > > count is leaked and the socket destructor is

Re: [PATCH net] dccp: fix a memleak for dccp_feat_init err process

2017-07-27 Thread David Miller
From: Xin Long Date: Wed, 26 Jul 2017 14:20:15 +0800 > In dccp_feat_init, when ccid_get_builtin_ccids failsto alloc > memory for rx.val, it should free tx.val before returning an > error. > > Signed-off-by: Xin Long Also applied and queued up for

Re: [PATCH net] udp6: fix socket leak on early demux

2017-07-27 Thread Eric Dumazet
On Wed, 2017-07-26 at 17:29 +0200, Paolo Abeni wrote: > When an early demuxed packet reaches __udp6_lib_lookup_skb(), the > sk reference is retrieved and used, but the relevant reference > count is leaked and the socket destructor is never called. > Beyond leaking the sk memory, if there are

Re: [PATCH net-next 2/2] bnxt_en: define sriov_lock unconditionally

2017-07-27 Thread Sathya Perla
On Thu, Jul 27, 2017 at 1:18 PM, Arnd Bergmann wrote: [...] > > On today's linux-next: > > drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.o: In function `bnxt_dl_register': > bnxt_vfr.c:(.text+0x1440): undefined reference to `devlink_alloc' > bnxt_vfr.c:(.text+0x14c0): undefined

Re: [PATCH iproute2] utils: also check AF_INET family when rtm_type is RTN_MULTICAST

2017-07-27 Thread Phil Sutter
Hi Hangbin, On Thu, Jul 27, 2017 at 05:01:49PM +0800, Hangbin Liu wrote: [...] > diff --git a/lib/utils.c b/lib/utils.c > index e77bd30..0479e00 100644 > --- a/lib/utils.c > +++ b/lib/utils.c > @@ -1215,5 +1215,6 @@ int get_real_family(int rtm_type, int rtm_family) > if (rtm_type !=

[PATCHv2 iproute2] utils: return default family when rtm_family is not RTNL_FAMILY_IPMR/IP6MR

2017-07-27 Thread Hangbin Liu
When we get a multicast route, the rtm_type is RTN_MULTICAST, but the rtm_family may be AF_INET. If we only check the type with RTNL_FAMILY_IPMR, we will get malformed address. e.g. + ip -4 route add multicast 172.111.1.1 dev em1 table main Before fix: + ip route list type multicast table main

RE: [PATCH net-next 2/3] nfp: look for firmware image by device serial number and PCI name

2017-07-27 Thread David Laight
From: Jakub Kicinski > Sent: 27 July 2017 10:26 ... > > - use snprintf(). > > To effectively print an integer into an amply sized array? I need to > guarantee that the string will fit otherwise I would request a FW image > with a wrong name. snprintf() would only mask such a bug. Eh? If, for

Re: TC-pedit man page examples error

2017-07-27 Thread Phil Sutter
Hi Tyler, On Wed, Jul 26, 2017 at 09:47:51AM -0700, Tyler Bautista wrote: > Thank you for taking my message. I have gotten a solution working so > feel free to ignore the rest of this email. By vanilla iproute2 do you > mean the latest package through the yum or apt repository? All I can > tell

Re: [PATCH v2 net-next 0/7] qed/qede: Enhancements

2017-07-27 Thread David Miller
From: Manish Chopra Date: Wed, 26 Jul 2017 06:07:08 -0700 > This patch series adds these below features support in qed/qede > > 1) Ntuple filter configuration [via ethtool -n/N] > 2) EEE (energy efficient ethernet) support [ethtool --set-eee/show-eee] > 3) Coalescing

Re: [PATCH net-next 2/2] bnxt_en: define sriov_lock unconditionally

2017-07-27 Thread Arnd Bergmann
On Wed, Jul 26, 2017 at 3:18 PM, Arnd Bergmann wrote: > On Wed, Jul 26, 2017 at 12:54 PM, Sathya Perla > wrote: >> On Wed, Jul 26, 2017 at 2:35 PM, Arnd Bergmann wrote: >> [...] Sathya already sent 3 patches to fix some of these

Re: nf_nat_pptp 4.12.3 kernel lockup/reboot

2017-07-27 Thread Denys Fedoryshchenko
On 2017-07-24 19:20, Florian Westphal wrote: Florian Westphal wrote: Denys Fedoryshchenko wrote: > Hi, > > I am trying to upgrade kernel 4.11.8 to 4.12.3 (it is a nat/router, handling > approx 2gbps of pppoe users traffic) and noticed that after

[PATCH] net: thunderx: Fix BGX transmit stall due to underflow

2017-07-27 Thread sunil . kovvuri
From: Sunil Goutham For SGMII/RGMII/QSGMII interfaces when physical link goes down while traffic is high is resulting in underflow condition being set on that specific BGX's LMAC. Which assets a backpresure and VNIC stops transmitting packets. This is due to BGX being

[PATCH net-next 2/3] net: export some generic xdp helpers

2017-07-27 Thread Jason Wang
This patch tries to export some generic xdp helpers to drivers. This can let driver to do XDP for a specific skb. This is useful for the case when the packet is hard to be processed at page level directly (e.g jumbo/GSO frame). With this patch, there's no need for driver to forbid the XDP set

[PATCH net-next 3/3] tap: XDP support

2017-07-27 Thread Jason Wang
This patch tries to implement XDP for tun. The implementation was split into two parts: - fast path: small and no gso packet. We try to do XDP at page level before build_skb(). For XDP_TX, since creating/destroying queues were completely under control of userspace, it was implemented

Re: [PATCH net-next v2 06/10] net: dsa: lan9303: added sysfs node swe_bcst_throt

2017-07-27 Thread Egil Hjelmeland
On 26. juli 2017 19:14, Andrew Lunn wrote: On Tue, Jul 25, 2017 at 06:15:49PM +0200, Egil Hjelmeland wrote: Allowing per-port access to Switch Engine Broadcast Throttling Register Hi Egil In general, we are against using sysfs. If there is a generic mechanism, that applies for all sorts of

[PATCH net] udp6: fix socket leak on early demux

2017-07-27 Thread Paolo Abeni
When an early demuxed packet reaches __udp6_lib_lookup_skb(), the sk reference is retrieved and used, but the relevant reference count is leaked and the socket destructor is never called. Beyond leaking the sk memory, if there are pending UDP packets in the receive queue, even the related

[PATCH v2 03/11] arm64: defconfig: Enable CONFIG_ROCKCHIP_PHY

2017-07-27 Thread David Wu
Make the rockchip phy driver built into the kernel. Signed-off-by: David Wu --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..925bd478 100644 ---

[PATCH v2 02/11] multi_v7_defconfig: Make rockchip phy built-in

2017-07-27 Thread David Wu
Enable the rockchip phy for multi_v7_defconfig builds. Signed-off-by: David Wu --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4d19c1b..94d7e71

[PATCH v2 04/11] net: stmmac: dwmac-rk: Remove unwanted code for rk3328_set_to_rmii()

2017-07-27 Thread David Wu
This is wrong setting for rk3328_set_to_rmii(), so remove it. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c

Re: [PATCH net] udp6: fix socket leak on early demux

2017-07-27 Thread Paolo Abeni
Hi David, I'm sorry but I'm really too low on coffee and I missed adding the proper v2 tag in the subject. Please let me know if you prefer I repost with a proper subject or if you prefer otherwise. Thanks! Paolo

Re: [PATCH net-next v2 04/10] net: dsa: lan9303: Added adjust_link() method

2017-07-27 Thread Egil Hjelmeland
On 26. juli 2017 19:09, Andrew Lunn wrote: On Tue, Jul 25, 2017 at 06:15:47PM +0200, Egil Hjelmeland wrote: This makes the driver react to device tree "fixed-link" declaration on CPU port. - turn off autonegotiation - force speed 10 or 100 mb/s - force duplex mode Signed-off-by: Egil

Re: mlx5 still has lots of warnings

2017-07-27 Thread Saeed Mahameed
On Mon, Jul 24, 2017 at 7:51 PM, Stephen Hemminger wrote: > I sent patches for this, and you said you were going to solve this (back in > April). > Still see lots of warnings from MLX5. > Hi Stephen, What gcc version are you using ? what special Cflags to use? I am

Re: [PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic

2017-07-27 Thread Egil Hjelmeland
On 26. juli 2017 19:24, Andrew Lunn wrote: Hi Egil +/* forward special tagged packets from port 0 to port 1 *or* port 2 */ +static int lan9303_setup_tagging(struct lan9303 *chip) +{ + int ret; Blank line please. + /* enable defining the destination port via special VLAN

Re: [net 02/14] net/mlx5: Consider tx_enabled in all modes on remap

2017-07-27 Thread Sergei Shtylyov
Hello! On 07/27/2017 01:25 PM, Saeed Mahameed wrote: From: Aviv Heller The tx_enabled lag event field is used to determine whether a slave is active. Current logic uses this value only if the mode is active-backup. However, LACP mode, although considered a load balancing

[PATCH v2 11/11] ARM64: dts: rockchip: Enable gmac2phy for rk3328-evb

2017-07-27 Thread David Wu
Enable the gmac2phy, make the gmac2phy work on the rk3328-evb board. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts

Re: [PATCHv3 net] ipv6: no need to return rt->dst.error if it is prohibit entry

2017-07-27 Thread Hangbin Liu
On Wed, Jul 26, 2017 at 11:09:39AM -0600, David Ahern wrote: > On 7/26/17 3:20 AM, Hangbin Liu wrote: > > After commit 18c3a61c4264 ("net: ipv6: RTM_GETROUTE: return matched fib > > result when requested"). When we get a prohibit ertry, we will return > > -EACCES directly. > > > > Before: > > Do

Re: [-next] rtlwifi: kfree entry until after entry->bssid has been accessed

2017-07-27 Thread Kalle Valo
Colin Ian King wrote: > From: Colin Ian King > > The current code kfree's entry and then dereferences it by accessing > entry->bssid. Avoid the dereference-after-free by moving the kfree > after the access to entry->bssid. > > Detected by

Re: [net] wl1251: add a missing spin_lock_init()

2017-07-27 Thread Kalle Valo
Cong Wang wrote: > This fixes the following kernel warning: > > [ 5668.771453] BUG: spinlock bad magic on CPU#0, kworker/u2:3/9745 > [ 5668.771850] lock: 0xce63ef20, .magic: , .owner: /-1, > .owner_cpu: 0 > [ 5668.772277] CPU: 0 PID: 9745 Comm:

[PATCH v2 08/11] ARM: dts: rk322x: Add support internal phy for gmac

2017-07-27 Thread David Wu
This patch adds internal mac phy clock and internal mac phy reset for rk gmac using. Signed-off-by: David Wu --- arch/arm/boot/dts/rk322x.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi

[PATCH v2 07/11] net: stmmac: dwmac-rk: Add internal phy supprot for rk3328

2017-07-27 Thread David Wu
There are two mac controllers in the rk3328, the one connects to external phy, and the other one connects to internal phy. Like the mac of external phy, the internal phy's mac also needs to configure the related mac registers at GRF. Signed-off-by: David Wu ---

[net V2 09/14] net/mlx5e: Fix broken disable 1PPS flow

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev Need to disable the MTPPS and unsubscribe from the pulse events when user disables the 1PPS functionality. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed

[net V2 08/14] net/mlx5e: Add field select to MTPPS register

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev In order to mark relevant fields while setting the MTPPS register add field select. Otherwise it can cause a misconfiguration in firmware. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev

[net V2 04/14] net/mlx5: Fix command bad flow on command entry allocation failure

2017-07-27 Thread Saeed Mahameed
From: Moshe Shemesh When driver fail to allocate an entry to send command to FW, it must notify the calling function and release the memory allocated for this command. Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Moshe Shemesh

[net V2 13/14] net/mlx5e: Schedule overflow check work to mlx5e workqueue

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev This is done in order to ensure that work will not run after the cleanup. Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed

[net 04/14] net/mlx5: Fix command bad flow on command entry allocation failure

2017-07-27 Thread Saeed Mahameed
From: Moshe Shemesh When driver fail to allocate an entry to send command to FW, it must notify the calling function and release the memory allocated for this command. Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Moshe Shemesh

[net 08/14] net/mlx5e: Add field select to MTPPS register

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev In order to mark relevant fields while setting the MTPPS register add field select. Otherwise it can cause a misconfiguration in firmware. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev

[net 05/14] net/mlx5e: IPoIB, Modify add/remove underlay QPN flows

2017-07-27 Thread Saeed Mahameed
From: Alex Vesker On interface remove, the clean-up was done incorrectly causing an error in the log: "SET_FLOW_TABLE_ROOT(0x92f) op_mod(0x0) failed...syndrome (0x7e9f14)" This was caused by the following flow: -ndo_uninit: Move QP state to RST (this disconnects the QP from

[net 09/14] net/mlx5e: Fix broken disable 1PPS flow

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev Need to disable the MTPPS and unsubscribe from the pulse events when user disables the 1PPS functionality. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed

[net 01/14] net/mlx5: Clean SRIOV eswitch resources upon VF creation failure

2017-07-27 Thread Saeed Mahameed
From: Eran Ben Elisha Upon sriov enable, eswitch is always enabled. Currently, if enable hca failed over all VFs, we would skip eswitch disable as part of sriov disable, which will lead to resources leak. Fix it by disabling eswitch if it was enabled (use indication from

[net 11/14] net/mlx5e: Add missing support for PTP_CLK_REQ_PPS request

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev Add the missing option to enable the PTP_CLK_PPS function. In this case pin should be configured as 1PPS IN first and then it will be connected to PPS mechanism. Events will be reported as PTP_CLOCK_PPSUSR events to relevant sysfs. Fixes:

Re: [PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic

2017-07-27 Thread Andrew Lunn
> >I think you are over-simplifying here. Say i have a layer 2 VPN and i > >bridge port 1 and the VPN? The software bridge still wants to do STP > >on port 1, in order to solve loops. > > > > Problem is that the mainline lan9303_separate_ports() does its > work by setting port 1 & 2 in STP

Re: [PATCH v2 01/11] net: phy: Add rockchip phy driver support

2017-07-27 Thread Andrew Lunn
> + /* > + * If mode switch happens from 10BT to 100BT, all DSP/AFE > + * registers are set to default values. So any AFE/DSP > + * registers have to be re-initialized in this case. > + */ Hi David Are they also lost on suspend and resume? Andrew

[net V2 14/14] net/mlx5: Fix mlx5_add_flow_rules call with correct num of dests

2017-07-27 Thread Saeed Mahameed
From: Paul Blakey When adding ethtool steering rule with action DISCARD we wrongly pass a NULL dest with dest_num 1 to mlx5_add_flow_rules(). What this error seems to have caused is sending VPORT 0 (MLX5_FLOW_DESTINATION_TYPE_VPORT) as the fte dest instead of no dests. We

[net V2 12/14] net/mlx5e: Fix wrong delay calculation for overflow check scheduling

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev The overflow_period is calculated in seconds. In order to use it for delayed work scheduling translation to jiffies is needed. Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Eugenia Emantayev

[net V2 03/14] net/mlx5: Fix command completion after timeout access invalid structure

2017-07-27 Thread Saeed Mahameed
From: Moshe Shemesh Completion on timeout should not free the driver command entry structure as it will need to access it again once real completion event from FW will occur. Fixes: 73dd3a4839c1 ('net/mlx5: Avoid using pending command interface slots') Signed-off-by: Moshe

[PATCH net] intersil/hostap: Fix outdated comment about dev->destructor

2017-07-27 Thread Stefano Brivio
After commit cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state."), setting 'dev->needs_free_netdev' ensures device data is released, and 'dev->destructor' is not used anymore. Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev

[PATCH v2 06/11] net: stmmac: dwmac-rk: Add internal phy support for rk3228

2017-07-27 Thread David Wu
There is only one mac controller in rk3228, which could connect to external phy or internal phy, use the grf_com_mux bit15 to route external/internal phy. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 12 1 file changed, 12

[PATCH v2 05/11] net: stmmac: dwmac-rk: Add internal phy support

2017-07-27 Thread David Wu
To make internal phy work, need to configure the phy_clock, phy cru_reset and related registers. Signed-off-by: David Wu --- changes in v2: - Use the standard "phy-mode" property for internal phy. (Florian) - Move the internal macphy clock to the optional properties.

[PATCH v2 09/11] ARM: dts: rk3228-evb: Enable the internal phy for gmac

2017-07-27 Thread David Wu
This patch enables the internal phy for rk3228 evb board by default. To use the external 1000M phy on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu --- arch/arm/boot/dts/rk3228-evb.dts | 19 +++ 1 file changed, 19

Re: [PATCH net-next v2 06/10] net: dsa: lan9303: added sysfs node swe_bcst_throt

2017-07-27 Thread Andrew Lunn
> Yes, this setting can be used to reduce effect of broadcast storms. So one way to solve this is to teach the software bridge about broadcast storm control. Put some rate limiting into its broadcast flood handling. Then add a switchdev call which passes this down into the switch. Or look at

[net 02/14] net/mlx5: Consider tx_enabled in all modes on remap

2017-07-27 Thread Saeed Mahameed
From: Aviv Heller The tx_enabled lag event field is used to determine whether a slave is active. Current logic uses this value only if the mode is active-backup. However, LACP mode, although considered a load balancing mode, can mark a slave as inactive in certain situations

[net 10/14] net/mlx5e: Change 1PPS out scheme

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev In order to fix the drift in 1PPS out need to adjust the next pulse. On each 1PPS out falling edge driver gets the event, then the event handler adjusts the next pulse starting time. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support')

[net 14/14] net/mlx5: Fix mlx5_add_flow_rules call with correct num of dests

2017-07-27 Thread Saeed Mahameed
From: Paul Blakey When adding ethtool steering rule with action DISCARD we wrongly pass a NULL dest with dest_num 1 to mlx5_add_flow_rules(). What this error seems to have caused is sending VPORT 0 (MLX5_FLOW_DESTINATION_TYPE_VPORT) as the fte dest instead of no dests. We

[net 13/14] net/mlx5e: Schedule overflow check work to mlx5e workqueue

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev This is done in order to ensure that work will not run after the cleanup. Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed

[net 12/14] net/mlx5e: Fix wrong delay calculation for overflow check scheduling

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev The overflow_period is calculated in seconds. In order to use it for delayed work scheduling translation to jiffies is needed. Fixes: ef9814deafd0 ('net/mlx5e: Add HW timestamping (TS) support') Signed-off-by: Eugenia Emantayev

[pull request][net 00/14] Mellanox, mlx5 fixes 2017-07-27

2017-07-27 Thread Saeed Mahameed
Hi Dave, This series contains some misc fixes to the mlx5 driver. Please pull and let me know if there's any problem. for -stable: 4.7 net/mlx5: Fix command bad flow on command entry allocation failure 4.9 net/mlx5: Consider tx_enabled in all modes on remap net/mlx5e: Fix outer_header_zero()

[net 03/14] net/mlx5: Fix command completion after timeout access invalid structure

2017-07-27 Thread Saeed Mahameed
From: Moshe Shemesh Completion on timeout should not free the driver command entry structure as it will need to access it again once real completion event from FW will occur. Fixes: 73dd3a4839c1 ('net/mlx5: Avoid using pending command interface slots') Signed-off-by: Moshe

[net 06/14] net/mlx5e: Fix outer_header_zero() check size

2017-07-27 Thread Saeed Mahameed
From: Ilan Tayari outer_header_zero() routine checks if the outer_headers match of a flow-table entry are all zero. This function uses the size of whole fte_match_param, instead of just the outer_headers member, causing failure to detect all-zeros if any other members of the

[net 07/14] net/mlx5: Fix mlx5_ifc_mtpps_reg_bits structure size

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev Fix miscalculation in reserved_at_1a0 field. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed --- include/linux/mlx5/mlx5_ifc.h | 2

Re: [PATCH net-next v2 02/10] net: dsa: lan9303: Do not disable/enable switch fabric port 0 at startup

2017-07-27 Thread Egil Hjelmeland
On 26. juli 2017 18:58, Andrew Lunn wrote: On Tue, Jul 25, 2017 at 06:15:45PM +0200, Egil Hjelmeland wrote: For some mysterious reason enable switch fabric port 0 TX fails to work, when the TX has previous been disabled. Resolved by not disable/enable switch fabric port 0 at startup. Port 1 and

Re: [PATCH 05/11] net: stmmac: dwmac-rk: Add internal phy support

2017-07-27 Thread David.Wu
Hi Andrew, 在 2017/6/24 10:29, Andrew Lunn 写道: If this is the PHY clock, should it actually be specified in the PHY binding? Can you read the PHY ID registers with this clock off? If the phy clock is closed, we can not read the PHYID.

[PATCH v2 10/11] ARM64: dts: rockchip: Add gmac2phy node support for rk3328

2017-07-27 Thread David Wu
The gmac2phy controller of rk3328 is connected to internal phy directly inside, add the node for the internal phy support. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 24 1 file changed, 24 insertions(+) diff --git

Re: [PATCH net-next v2 06/10] net: dsa: lan9303: added sysfs node swe_bcst_throt

2017-07-27 Thread Jiri Pirko
Thu, Jul 27, 2017 at 03:26:25PM CEST, and...@lunn.ch wrote: >> Yes, this setting can be used to reduce effect of broadcast storms. > >So one way to solve this is to teach the software bridge about >broadcast storm control. Put some rate limiting into its broadcast >flood handling. Then add a

Re: [RFC] switchdev: clarify ndo_get_phys_port_name() formats

2017-07-27 Thread Or Gerlitz
On Wed, Jul 26, 2017 at 11:11 PM, Jakub Kicinski wrote: > On Wed, 26 Jul 2017 12:23:17 +0300, Or Gerlitz wrote: >> On Wed, Jul 26, 2017 at 11:13 AM, Jakub Kicinski wrote: >> > On Wed, 26 Jul 2017 07:48:40 +0200, Jiri Pirko wrote: >> >> >> I think it would make

[PATCH net-next] bnxt_re: add MAY_USE_DEVLINK dependency

2017-07-27 Thread Sathya Perla
bnxt_en depends on MAY_USE_DEVLINK; this is used to force bnxt_en to be =m when DEVLINK is =m. Now, bnxt_re selects bnxt_en. Unless bnxt_re also explicitly calls out dependency on MAY_USE_DEVLINK, Kconfig does not force bnxt_re to be =m when DEVLINK is =m, causing the following error:

Re: [PATCH v3 net-next] net: systemport: Support 64bit statistics

2017-07-27 Thread kiki good
How about the changes below then ? of course, we need to remove bcm_sysport_free_cb(cb) from bcm_sysport_tx_reclaim_one() as well. u64_stats_update_begin(>syncp); ring->bytes += len; if (cb->skb) { ring->packets++; +bcm_sysport_free_cb(cb);

Re: [PATCH net-next v2 08/10] net: dsa: lan9303: Added ALR/fdb/mdb handling

2017-07-27 Thread Egil Hjelmeland
On 26. juli 2017 19:41, Andrew Lunn wrote: Hi Egil +/* This function will wait a while until mask & reg == value */ +/* Otherwise, return timeout */ +static int lan9303_csr_reg_wait(struct lan9303 *chip, int regno, + int mask, char value) +{ + int i; + +

[PATCH V3 net-next] TLP: Don't reschedule PTO when there's one outstanding TLP retransmission

2017-07-27 Thread Mao Wenan
If there is one TLP probe went out(TLP use the write_queue_tail packet as TLP probe, we assume this first TLP probe named A), and this TLP probe was not acked by receive side. Then the transmit side sent the next two packetes out(named B,C), but unfortunately these two packets are also not acked

Re: [PATCH net] udp6: fix socket leak on early demux

2017-07-27 Thread Eric Dumazet
On Thu, 2017-07-27 at 14:45 +0200, Paolo Abeni wrote: > When an early demuxed packet reaches __udp6_lib_lookup_skb(), the > sk reference is retrieved and used, but the relevant reference > count is leaked and the socket destructor is never called. > Beyond leaking the sk memory, if there are

Re: [PATCH v2 05/11] net: stmmac: dwmac-rk: Add internal phy support

2017-07-27 Thread Andrew Lunn
On Thu, Jul 27, 2017 at 09:02:16PM +0800, David Wu wrote: > To make internal phy work, need to configure the phy_clock, > phy cru_reset and related registers. > > Signed-off-by: David Wu > --- > changes in v2: > - Use the standard "phy-mode" property for internal phy.

[PATCH v2 01/11] net: phy: Add rockchip phy driver support

2017-07-27 Thread David Wu
Support internal ephy currently. Signed-off-by: David Wu --- changes in v2: - Alphabetic order for Kconfig and Makefile. - Add analog register init. - Disable auto-mdix for workround. - Rename config drivers/net/phy/Kconfig| 5 ++ drivers/net/phy/Makefile |

[PATCH v2 00/11] Add the internal phy support

2017-07-27 Thread David Wu
The rk3228 and rk3328 support internal phy inside, let's enable it to work. And the internal phy need to do some special setting, so register the rockchip internal phy driver. David Wu (11): net: phy: Add rockchip phy driver support multi_v7_defconfig: Make rockchip phy built-in arm64:

Re: [net 02/14] net/mlx5: Consider tx_enabled in all modes on remap

2017-07-27 Thread Saeed Mahameed
On Thu, Jul 27, 2017 at 2:55 PM, Sergei Shtylyov wrote: > Hello! > > > On 07/27/2017 01:25 PM, Saeed Mahameed wrote: > >> From: Aviv Heller >> >> The tx_enabled lag event field is used to determine whether a slave is >> active. >> Current

[net V2 06/14] net/mlx5e: Fix outer_header_zero() check size

2017-07-27 Thread Saeed Mahameed
From: Ilan Tayari outer_header_zero() routine checks if the outer_headers match of a flow-table entry are all zero. This function uses the size of whole fte_match_param, instead of just the outer_headers member, causing failure to detect all-zeros if any other members of the

[net V2 02/14] net/mlx5: Consider tx_enabled in all modes on remap

2017-07-27 Thread Saeed Mahameed
From: Aviv Heller The tx_enabled lag event field is used to determine whether a slave is active. Current logic uses this value only if the mode is active-backup. However, LACP mode, although considered a load balancing mode, can mark a slave as inactive in certain situations

[net V2 10/14] net/mlx5e: Change 1PPS out scheme

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev In order to fix the drift in 1PPS out need to adjust the next pulse. On each 1PPS out falling edge driver gets the event, then the event handler adjusts the next pulse starting time. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support')

[pull request][net V2 00/14] Mellanox, mlx5 fixes 2017-07-27

2017-07-27 Thread Saeed Mahameed
Hi Dave, This series contains some misc fixes to the mlx5 driver. Please pull and let me know if there's any problem. V1->V2: - removed redundant braces for -stable: 4.7 net/mlx5: Fix command bad flow on command entry allocation failure 4.9 net/mlx5: Consider tx_enabled in all modes on remap

[net V2 11/14] net/mlx5e: Add missing support for PTP_CLK_REQ_PPS request

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev Add the missing option to enable the PTP_CLK_PPS function. In this case pin should be configured as 1PPS IN first and then it will be connected to PPS mechanism. Events will be reported as PTP_CLOCK_PPSUSR events to relevant sysfs. Fixes:

[net V2 05/14] net/mlx5e: IPoIB, Modify add/remove underlay QPN flows

2017-07-27 Thread Saeed Mahameed
From: Alex Vesker On interface remove, the clean-up was done incorrectly causing an error in the log: "SET_FLOW_TABLE_ROOT(0x92f) op_mod(0x0) failed...syndrome (0x7e9f14)" This was caused by the following flow: -ndo_uninit: Move QP state to RST (this disconnects the QP from

[net V2 07/14] net/mlx5: Fix mlx5_ifc_mtpps_reg_bits structure size

2017-07-27 Thread Saeed Mahameed
From: Eugenia Emantayev Fix miscalculation in reserved_at_1a0 field. Fixes: ee7f12205abc ('net/mlx5e: Implement 1PPS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed --- include/linux/mlx5/mlx5_ifc.h | 2

[net V2 01/14] net/mlx5: Clean SRIOV eswitch resources upon VF creation failure

2017-07-27 Thread Saeed Mahameed
From: Eran Ben Elisha Upon sriov enable, eswitch is always enabled. Currently, if enable hca failed over all VFs, we would skip eswitch disable as part of sriov disable, which will lead to resources leak. Fix it by disabling eswitch if it was enabled (use indication from

Re: [PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic

2017-07-27 Thread Egil Hjelmeland
On 27. juli 2017 15:31, Andrew Lunn wrote: I think you are over-simplifying here. Say i have a layer 2 VPN and i bridge port 1 and the VPN? The software bridge still wants to do STP on port 1, in order to solve loops. Problem is that the mainline lan9303_separate_ports() does its work by

Re: qmi_wwan: Null pointer dereference when removing driver

2017-07-27 Thread Dan Williams
On Thu, 2017-07-27 at 13:31 +0800, Nathaniel Roach wrote: > Unsure at which point was added, but issue not present in stock > debian 4.11 kernel. > > Running on a Thinkpad X220 with coreboot. > > I'm building from upstream. When I attempt to remove the qmi_wwan > module (which also happens

RE: [PATCH V4 net-next 8/8] net: hns3: Add HNS3 driver to kernel build framework & MAINTAINERS

2017-07-27 Thread Salil Mehta
Hi Leon, > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Leon Romanovsky > Sent: Sunday, July 23, 2017 2:12 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); >

Possible race in hysdn.ko

2017-07-27 Thread Anton Volkov
Hello. While searching for races in the Linux kernel I've come across "drivers/isdn/hysdn/hysdn.ko" module. Here is a question that I came up with while analysing results. Lines are given using the info from Linux v4.12. In hysdn_proclog.c file in put_log_buffer function a non-standard type of

  1   2   >