Re: [PATCH v5 2/2] net: dsa: mv88e6xxx: Add support for ethernet switch 88E6341 (fwd)

2017-01-20 Thread Julia Lawall
/2] net: dsa: mv88e6xxx: Add support for ethernet switch 88E6341 In-Reply-To: <20170119214934.27442-3-gregory.clem...@free-electrons.com> Hi Gregory, [auto build test WARNING on net-next/master] [also build test WARNING on next-20170120] [cannot apply to v4.10-rc4] [if your patch is applie

Re: [PATCH] net: sctp: fix array overrun read on sctp_timer_tbl

2017-01-20 Thread Marcelo Ricardo Leitner
On Fri, Jan 20, 2017 at 01:01:57PM +, Colin King wrote: > From: Colin Ian King > > The comparison on the timeout can lead to an array overrun > read on sctp_timer_tbl because of an off-by-one error. Fix > this by using < instead of <= and also compare to the array >

Re: [PATCH] net: sctp: fix array overrun read on sctp_timer_tbl

2017-01-20 Thread Colin Ian King
On 20/01/17 13:10, Marcelo Ricardo Leitner wrote: > On Fri, Jan 20, 2017 at 01:01:57PM +, Colin King wrote: >> From: Colin Ian King >> >> The comparison on the timeout can lead to an array overrun >> read on sctp_timer_tbl because of an off-by-one error. Fix >> this

RE: [PATCH net-next V4] tc: flower: Refactor matching flags to be more user friendly

2017-01-20 Thread David Laight
From: Of Jiri Benc > Sent: 19 January 2017 14:22 > On Thu, 19 Jan 2017 16:17:48 +0200, Paul Blakey wrote: > > + while (token) { > > + if (!strncmp(token, "no", 2)) { > > + no = true; > > + token = strchr(token, '_') + 1; > > This seems to still

[PATCH iproute2 net-next] ipmroute: add support for RTNH_F_UNRESOLVED

2017-01-20 Thread Nikolay Aleksandrov
This patch adds a new field that is printed in the end of the line which denotes the real entry state. Before this patch an entry's IIF could disappear and it would look like an unresolved one (iif = unresolved): (3.0.16.1, 225.11.16.1) Iif: unresolved with no way to really distinguish it

Re: [PATCH] net: phy: micrel: add KSZ8795 ethernet switch

2017-01-20 Thread Andrew Lunn
On Fri, Jan 20, 2017 at 01:50:49PM +0100, Sean Nyekjaer wrote: > This ethernet switch have unfortunately the same phy id as KSZ8051. Hi Sean Please could you explain some more. You are adding PHY support here, not switch support. So is this to enable the PHY driver for the PHYs embedded in the

[PATCH] net/mlx4: use rb_entry()

2017-01-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

RE: [PATCHv3 net-next 3/4] sctp: add support for generating stream reconf add incoming/outgoing streams request chunk

2017-01-20 Thread David Laight
From: Xin Long > Sent: 19 January 2017 17:19 > This patch is to define Add Incoming/Outgoing Streams Request > Parameter described in rfc6525 section 4.5 and 4.6. They can > be in one same chunk trunk as rfc6525 section 3.1-7 describes, > so make them in one function. ... > +struct

Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-20 Thread Vlastimil Babka
On 01/12/2017 06:37 PM, Michal Hocko wrote: > On Thu 12-01-17 09:26:09, Kees Cook wrote: >> On Thu, Jan 12, 2017 at 7:37 AM, Michal Hocko wrote: > [...] >>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c >>> index 4f74511015b8..e6bbb33d2956 100644 >>> ---

Re: [PATCH][V2] net: sctp: fix array overrun read on sctp_timer_tbl

2017-01-20 Thread Marcelo Ricardo Leitner
On Fri, Jan 20, 2017 at 01:45:42PM +, Colin King wrote: > From: Colin Ian King > > Table sctp_timer_tbl is missing a TIMEOUT_RECONF string so > add this in. Also compare timeout with the size of the array > sctp_timer_tbl rather than SCTP_EVENT_TIMEOUT_MAX. Also

[PATCH] sock: use hlist_entry_safe

2017-01-20 Thread Geliang Tang
Use hlist_entry_safe() instead of open-coding it. Signed-off-by: Geliang Tang --- include/net/sock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index 4077ec4..c4e1caf1 100644 --- a/include/net/sock.h +++

[PATCH] 6lowpan: use rb_entry()

2017-01-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- net/6lowpan/nhc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/6lowpan/nhc.c b/net/6lowpan/nhc.c index

[PATCH net-next] gre6: Clean up unused struct ipv6_tel_txoption definition

2017-01-20 Thread Jakub Sitnicki
Commit b05229f44228 ("gre6: Cleanup GREv6 transmit path, call common GRE functions") removed the ip6gre specific transmit function, but left the struct ipv6_tel_txoption definition. Clean it up. Signed-off-by: Jakub Sitnicki --- net/ipv6/ip6_gre.c | 5 - 1 file changed, 5

[PATCH] Bluetooth: hidp: might sleep error in hidp_session_thread

2017-01-20 Thread Jeffy Chen
[ 39.044329] do not call blocking ops when !TASK_RUNNING; state=1 set at [] hidp_session_thread+0x110/0x568 [hidp] ... [ 40.159664] Call trace: [ 40.162122] [] __might_sleep+0x64/0x90 [ 40.167443] [] lock_sock_nested+0x30/0x78 [ 40.173047] [] l2cap_sock_sendmsg+0x90/0xf0 [bluetooth] [

Re: [PATCH net-next v4 2/2] net: stmmac: dwmac-meson8b: make the RGMII TX delay configurable

2017-01-20 Thread Martin Blumenstingl
Hi David, On Sun, Dec 18, 2016 at 5:13 PM, Martin Blumenstingl wrote: > On Sun, Dec 18, 2016 at 4:49 PM, David Miller wrote: >> From: Martin Blumenstingl >> Date: Sat, 17 Dec 2016 19:21:19 +0100 >> >>>

Re: [PATCH iproute2 net-next] ipmroute: add support for RTNH_F_UNRESOLVED

2017-01-20 Thread Nikolay Aleksandrov
On 20/01/17 15:04, Nikolay Aleksandrov wrote: > This patch adds a new field that is printed in the end of the line which > denotes the real entry state. Before this patch an entry's IIF could > disappear and it would look like an unresolved one (iif = unresolved): > (3.0.16.1, 225.11.16.1)

Re: [PATCH net] net: mpls: Fix multipath selection for LSR use case

2017-01-20 Thread Robert Shearman
On 20/01/17 00:51, David Ahern wrote: MPLS multipath for LSR is broken -- always selecting the first nexthop in the one label case. For example: $ ip netns exec ns1 ip -f mpls ro ls 100 nexthop as to 200 via inet 172.16.2.2 dev virt12 nexthop as to 300 via inet

RE: [PATCH] rtlwifi: rtl8192x: Enabling and disabling hardware interrupts after enabling local irq flags

2017-01-20 Thread Bharat Kumar Gogada
> On 01/19/2017 04:14 AM, Bharat Kumar Gogada wrote: > > -Realtek 8192CE chipset maintains local irq flags after enabling/disabling > > hardware interrupts. > > -Hardware interrupts are enabled before enabling the local irq > > flags(these flags are being checked in interrupt handler), > >

[PATCH iproute2 net-next v2] ipmroute: add support for RTNH_F_UNRESOLVED

2017-01-20 Thread Nikolay Aleksandrov
This patch adds a new field that is printed in the end of the line which denotes the real entry state. Before this patch an entry's IIF could disappear and it would look like an unresolved one (iif = unresolved): (3.0.16.1, 225.11.16.1) Iif: unresolved with no way to really distinguish it

Re: [PATCH v7 11/13] net: ethernet: aquantia: Ethtool support

2017-01-20 Thread Rami Rosen
+1 Many times this information is needed, and "ethtool -i" is a convenient way to get it. Rami Rosen

Re: [PATCH v2 0/2] net: dsa: Move temperature sensor code into PHY.

2017-01-20 Thread David Miller
From: Andrew Lunn Date: Fri, 20 Jan 2017 01:37:48 +0100 > Marvell Ethernet switches contain a temperature sensor. There appears > to be one sensor, which is shared by each of the internal PHYs. Each > PHY has independent registers to read this sensor, and to set a limit > for

Re: [Xen-devel] xennet_start_xmit assumptions

2017-01-20 Thread Sowmini Varadhan
On (01/20/17 14:30), David Miller wrote: > > CAP_SYS_RAWIO or not, the contract we have with the device is that > there will be at least enough bytes to cover a link layer header. I see. If that's the case (for all the kernel-driver interfaces), then the xen_netfront driver is probably not

[PATCH net-next 7/7] net: phy: bcm7xxx: Implement EGPHY workaround for 7278

2017-01-20 Thread Florian Fainelli
Implement the HW design team recommended workaround in for 7278. Since the GPHY now returns its revision information in MII_PHYS_ID[23] we need to check whether the revision provided in flags is 0 or not. Signed-off-by: Florian Fainelli --- drivers/net/phy/bcm7xxx.c | 34

[PATCH net-next 6/7] net: phy: bcm7xxx: Add entry for BCM7278

2017-01-20 Thread Florian Fainelli
Add support for the BCM7278 28nm process Gigabit Ethernet PHY. Signed-off-by: Florian Fainelli --- drivers/net/phy/bcm7xxx.c | 2 ++ include/linux/brcmphy.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c index

Re: [PATCH] net: qcom/emac: claim the irq only when the device is opened

2017-01-20 Thread Lino Sanfilippo
Hi, On 18.01.2017 22:42, Timur Tabi wrote: @@ -1029,8 +1017,6 @@ void emac_mac_down(struct emac_adapter *adpt) */ writel(DIS_INT, adpt->base + EMAC_INT_STATUS); writel(0, adpt->base + EMAC_INT_MASK); - synchronize_irq(adpt->irq.irq); There is no reason to remove

[PATCH net v2] net: mpls: Fix multipath selection for LSR use case

2017-01-20 Thread David Ahern
MPLS multipath for LSR is broken -- always selecting the first nexthop in the one label case. For example: $ ip -f mpls ro ls 100 nexthop as to 200 via inet 172.16.2.2 dev virt12 nexthop as to 300 via inet 172.16.3.2 dev virt13 101 nexthop as to

Re: [PATCH] net: qcom/emac: claim the irq only when the device is opened

2017-01-20 Thread Timur Tabi
On 01/20/2017 02:44 PM, Lino Sanfilippo wrote: On 18.01.2017 22:42, Timur Tabi wrote: @@ -1029,8 +1017,6 @@ void emac_mac_down(struct emac_adapter *adpt) */ writel(DIS_INT, adpt->base + EMAC_INT_STATUS); writel(0, adpt->base + EMAC_INT_MASK); -

Re: [PATCH v5 0/2] Add support for the ethernet switch on the ESPRESSObin

2017-01-20 Thread David Miller
From: Gregory CLEMENT Date: Thu, 19 Jan 2017 22:49:32 +0100 > I created a new family for this switch and filled the ops structure > by selecting which seems the more appropriate functions. I rebased > the series on net-next/master which allowed me to benefit

Re: [PATCH net v3] bridge: netlink: call br_changelink() during br_dev_newlink()

2017-01-20 Thread David Miller
From: Jiri Pirko Date: Fri, 20 Jan 2017 19:10:42 +0100 > Fri, Jan 20, 2017 at 06:12:17PM CET, c...@cera.cz wrote: >>Any bridge options specified during link creation (e.g. ip link add) >>are ignored as br_dev_newlink() does not process them. >>Use br_changelink() to do it. >>

Re: [Xen-devel] xennet_start_xmit assumptions

2017-01-20 Thread David Miller
From: Sowmini Varadhan Date: Thu, 19 Jan 2017 17:41:23 -0500 > On (01/19/17 13:47), Sowmini Varadhan wrote: >> > Specifically I'm talking about the dev_validate_header() check. >> > That is supposed to protect us from these kinds of situations. >> >> ah, but I run

Re: [PATCH] inet: don't use sk_v6_rcv_saddr directly

2017-01-20 Thread David Miller
From: Josef Bacik Date: Thu, 19 Jan 2017 17:47:46 -0500 > When comparing two sockets we need to use inet6_rcv_saddr so we get a NULL > sk_v6_rcv_saddr if the socket isn't AF_INET6, otherwise our comparison > function > can be wrong. > > Fixes: 637bc8b ("inet: reset

Re: [PATCH net] net: mpls: Fix multipath selection for LSR use case

2017-01-20 Thread David Miller
From: David Ahern Date: Thu, 19 Jan 2017 16:51:03 -0800 > MPLS multipath for LSR is broken -- always selecting the first nexthop > in the one label case. For example: ... David, this doesn't apply cleanly to the net tree, please respin. Thanks.

Re: [pull request][net-next 00/15] Mellanox mlx5 updates 2017-01-19

2017-01-20 Thread David Miller
From: Saeed Mahameed Date: Fri, 20 Jan 2017 00:38:53 +0200 > This pull request includes some small mlx5 updates and two new features, > The 1st exposes new HW counters to "ethtool -S" and the other introduces > mlx5 ptp 1pps support. Details are down bleow. > > Please pull

Re: [PATCH net-next v2 0/2] net: ipv6: Improve user experience with multipath routes

2017-01-20 Thread David Ahern
On 1/19/17 11:10 PM, David Ahern wrote: > This series closes a couple of gaps between IPv4 and IPv6 with respect > to multipath routes: ... > In both cases, the new behavior requires users to opt in by setting a new > flag, RTM_F_ALL_NEXTHOPS, in the rtm_flags of struct rtmsg which is > expected

Re: [PATCH net 0/2] net: Fix oops on state free after lwt module unload

2017-01-20 Thread Robert Shearman
On 20/01/17 17:03, David Miller wrote: From: Robert Shearman Date: Wed, 18 Jan 2017 15:32:01 + This patchset fixes an oops in lwtstate_free and a memory leak that would otherwise be exposed by ensuring that references are taken on modules that need to stay around to

[PATCH net-next 3/7] net: dsa: bcm_sf2: Add support for BCM7278 integrated switch

2017-01-20 Thread Florian Fainelli
Add support for the integrated switch found on BCM7278: - core_reg_align is set to 1, to force a translation into the target address space which is 8 bytes aligned - an alternate SWITCH_REG layout is provided since registers are largely bit/masks compatible but have different offsets -

[PATCH net-next 4/7] net: dsa: bcm_sf2: Move code enabling Broadcom tags

2017-01-20 Thread Florian Fainelli
In preparation for enabling Broadcom tags on different ports based on configuration information, dedicate a function that is responsible for enabling Broadcom tags for a given port and update the IMP port setup to call it. Signed-off-by: Florian Fainelli ---

[PATCH net-next 5/7] net: dsa: bcm_sf2: Allow non-IMP ports to have Broadcom tags enabled

2017-01-20 Thread Florian Fainelli
Parse the "brcm,use-bcm-hdr" boolean property during ports identification to fill a bitmask of ports that should have Broadcom tags enabled. This is needed in some configurations where per-packet metadata can be exchanged using Broadcom tags between the switch and an on-chip acceleration device.

[PATCH net-next 2/7] net: dsa: bcm_sf2: Prepare for different register layouts

2017-01-20 Thread Florian Fainelli
In preparation for supporting a new device with a slightly different register layout, affecting the SWITCH_REG and SWITCH_CORE address spaces, perform a few preparatory steps: - allow matching the compatible string against a data description - convert the SWITCH_REG register accesses into an

[PATCH net-next 0/7] net: dsa: bcm_sf2: Add support for BCM7278

2017-01-20 Thread Florian Fainelli
Hi all, This patch series adds support for the Broadcom BCM7278 integrated switch which is a successor of the BCM7445 switch. We have a little bit of register shuffling going on, which is why most of the functional changes are to deal with that. Thanks! Florian Fainelli (7): net: dsa:

[PATCH net-next 1/7] net: dsa: bcm_sf2: Make SF2_IO64_MACRO() utilize 32-bit macro

2017-01-20 Thread Florian Fainelli
There is no point inlining the 32-bit direct register read/write part, just infer it from the existing macro. This will make it easier to centralize the address rewriting that we are going to introduce later on. Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2.h

Re: [PATCHv4 net-next 3/5] sctp: implement sender-side procedures for SSN/TSN Reset Request Parameter

2017-01-20 Thread marcelo . leitner
On Fri, Jan 20, 2017 at 02:00:34PM -0500, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Fri, 20 Jan 2017 16:25:22 -0200 > > > I talked offline with Xin about this and we cannot do it this way. > > Unfortunatelly we will have to take the long road here,

Re: [PATCH v5 2/2] net: dsa: mv88e6xxx: Add support for ethernet switch 88E6341

2017-01-20 Thread Andrew Lunn
On Fri, Jan 20, 2017 at 12:30:16PM -0500, Vivien Didelot wrote: > Hi Gregory, > > Gregory CLEMENT writes: > > > If there a series about to be merged I can rebase my series on it. Else > > I propose to keep it and convert the family check to ops when you will

[PATCH] [net-next] net: qcom/emac: rename emac_phy to emac_sgmii and move it

2017-01-20 Thread Timur Tabi
The EMAC has an internal PHY that is often called the "SGMII". This SGMII is also connected to an external PHY, which is managed by phylib. These dual PHYs often cause confusion. In this case, the data structure for managing the SGMII was mis-named and located in the wrong header file.

[PATCH] [net-next][v2] net: qcom/emac: claim the irq only when the device is opened

2017-01-20 Thread Timur Tabi
During reset, functions emac_mac_down() and emac_mac_up() are called, so we don't want to free and claim the IRQ unnecessarily. Move those operations to open/close. Signed-off-by: Timur Tabi --- Notes: v2: keep synchronize_irq call where it is

[net-next 0/8] More MV88E6390 patches

2017-01-20 Thread Andrew Lunn
This is the ongoing work to add support for the Marvell 9390 family of switches. There are now two MDIO busses, one for the internal PHYs and an external bus for external PHYs. Add support for this external bus. This switch supports 2Gbps, 2.5Gbps and 10Gbps ports. Add phy-modes for these

[PATCH net-next 5/8] net: dsa: mv88e6xxx: Workaround missing PHY ID on mv88e6390

2017-01-20 Thread Andrew Lunn
The internal PHYs of the mv88e6390 do not have a model ID. Trap any calls to the ID register, and if it is zero, return the ID for the mv88e6390. The Marvell PHY driver can then bind to this ID. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/global2.c | 16

Re: [PATCH net-next 1/8] net: dsa: mv88e6xxx: Implement external MDIO bus on mv88e6390

2017-01-20 Thread Florian Fainelli
On 01/20/2017 03:30 PM, Andrew Lunn wrote: > The mv88e6390 has two MDIO busses. The internal MDIO bus is used for > the internal PHYs. The external MDIO can be used for external PHYs. > The external MDIO bus will be instantiated if there is an > "mdio-external" node in the device tree. This looks

Re: [PATCH net-next 3/8] net: dsa: mv88e6xxx: Fix ATU age timer for MV88E6390

2017-01-20 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The MV88E6390 family uses a different ATU age timer coefficient. > Fix the the info structures. Redundant "the" here. Otherwise good catch, the minimum age time is 3.75 seconds. > Signed-off-by: Andrew Lunn Reviewed-by: Vivien

Re: [PATCH net-next 2/8] net: phy: Add 2000base-x, 2500base-x and rxaui modes

2017-01-20 Thread Florian Fainelli
On 01/20/2017 03:30 PM, Andrew Lunn wrote: > The mv88e6390 ports 9 and 10 supports some additional PHY modes. Add > these modes to the PHY core so they can be used in the binding. > > Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Can you also

Re: [PATCH net-next 4/8] net: dsa: mv88e6xxx: Set the CMODE for mv88e6390 ports 9 & 10

2017-01-20 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > Unlike most ports, ports 9 and 10 of the 6390X family have configurable > PHY modes. Set the mode as part of adjust_link(). > > Ordering is important, because the SERDES interfaces connected to > ports 9 and 10 can be split and assigned to other

[PATCH net v2 2/2] lwtunnel: Fix oops on state free after encap module unload

2017-01-20 Thread Robert Shearman
When attempting to free lwtunnel state after the module for the encap has been unloaded an oops occurs: BUG: unable to handle kernel NULL pointer dereference at 0008 IP: lwtstate_free+0x18/0x40 [..] task: 88003e372380 task.stack: c91fc000 RIP: 0010:lwtstate_free+0x18/0x40

[PATCH net v2 0/2] net: Fix oops on state free after lwt module unload

2017-01-20 Thread Robert Shearman
An oops is seen in lwtstate_free after an lwt ops module has been unloaded. This patchset fixes this by preventing modules implementing lwtunnel ops from being unloaded whilst there's state alive using those ops. The first patch adds fills in a new owner field in all lwt ops and the second patch

Re: [PATCH net-next 5/8] net: dsa: mv88e6xxx: Workaround missing PHY ID on mv88e6390

2017-01-20 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The internal PHYs of the mv88e6390 do not have a model ID. Trap any > calls to the ID register, and if it is zero, return the ID for the > mv88e6390. The Marvell PHY driver can then bind to this ID. This, in addition to the temperature code not

[PATCH net-next 4/8] net: dsa: mv88e6xxx: Set the CMODE for mv88e6390 ports 9 & 10

2017-01-20 Thread Andrew Lunn
Unlike most ports, ports 9 and 10 of the 6390X family have configurable PHY modes. Set the mode as part of adjust_link(). Ordering is important, because the SERDES interfaces connected to ports 9 and 10 can be split and assigned to other ports. The CMODE has to be correctly set before the SERDES

[PATCH net-next 6/8] net: phy: Marvell: Add mv88e6390 internal PHY

2017-01-20 Thread Andrew Lunn
The mv88e6390 Ethernet switch has internal PHYs. These PHYs don't have an model ID in the ID2 register. So the MDIO driver in the switch intercepts reads to this register, and returns the switch family ID. Extend the Marvell PHY driver by including this ID, and tread the PHY as a 88E1540.

[PATCH net] net: phy: Avoid deadlock during phy_error()

2017-01-20 Thread Florian Fainelli
phy_error() is called in the PHY state machine workqueue context, and calls phy_trigger_machine() which does a cancel_delayed_work_sync() of the workqueue we execute from, causing a deadlock situation. Augment phy_trigger_machine() machine with a sync boolean indicating whether we should use

[PATCH net-next 7/8] net: dsa: mv88e6xxx: Implement Clause 45 access to SMI devices

2017-01-20 Thread Andrew Lunn
The mv88e6390 SERDES devices need clause 45 MDIO to access them. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/global2.c | 108 -- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 7 +++ 2 files changed, 111 insertions(+), 4 deletions(-)

[PATCH net-next 3/8] net: dsa: mv88e6xxx: Fix ATU age timer for MV88E6390

2017-01-20 Thread Andrew Lunn
The MV88E6390 family uses a different ATU age timer coefficient. Fix the the info structures. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c

[PATCH net-next 1/8] net: dsa: mv88e6xxx: Implement external MDIO bus on mv88e6390

2017-01-20 Thread Andrew Lunn
The mv88e6390 has two MDIO busses. The internal MDIO bus is used for the internal PHYs. The external MDIO can be used for external PHYs. The external MDIO bus will be instantiated if there is an "mdio-external" node in the device tree. Signed-off-by: Andrew Lunn ---

[PATCH net-next 2/8] net: phy: Add 2000base-x, 2500base-x and rxaui modes

2017-01-20 Thread Andrew Lunn
The mv88e6390 ports 9 and 10 supports some additional PHY modes. Add these modes to the PHY core so they can be used in the binding. Signed-off-by: Andrew Lunn --- Documentation/devicetree/bindings/net/ethernet.txt | 3 +++ include/linux/phy.h| 9

[PATCH net-next 8/8] net: dsa: mv88e6xxx: Fix typ0 when configuring 2.5Gbps

2017-01-20 Thread Andrew Lunn
In order to enable 2.5Gbps mode, we need the base speed of 10G, plus the Alt bit setting. Fix a typ0 that used 1Gb base speed. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH net-next 5/8] net: dsa: mv88e6xxx: Workaround missing PHY ID on mv88e6390

2017-01-20 Thread Florian Fainelli
On 01/20/2017 03:30 PM, Andrew Lunn wrote: > The internal PHYs of the mv88e6390 do not have a model ID. Trap any > calls to the ID register, and if it is zero, return the ID for the > mv88e6390. The Marvell PHY driver can then bind to this ID. > > Signed-off-by: Andrew Lunn

Re: [PATCH net-next 1/8] net: dsa: mv88e6xxx: Implement external MDIO bus on mv88e6390

2017-01-20 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The mv88e6390 has two MDIO busses. The internal MDIO bus is used for > the internal PHYs. The external MDIO can be used for external PHYs. > The external MDIO bus will be instantiated if there is an > "mdio-external" node in the device tree.

[PATCH net] net: dsa: Check return value of phy_connect_direct()

2017-01-20 Thread Florian Fainelli
We need to check the return value of phy_connect_direct() in dsa_slave_phy_connect() otherwise we may be continuing the initialization of a slave network device with a PHY that already attached somewhere else and which will soon be in error because the PHY device is in error. The conditions for

Re: [PATCH net-next 6/8] net: phy: Marvell: Add mv88e6390 internal PHY

2017-01-20 Thread Florian Fainelli
On 01/20/2017 03:31 PM, Andrew Lunn wrote: > The mv88e6390 Ethernet switch has internal PHYs. These PHYs don't have > an model ID in the ID2 register. So the MDIO driver in the switch > intercepts reads to this register, and returns the switch family ID. > Extend the Marvell PHY driver by

[PATCH 1/4] xfrm: Constify xfrm_user arguments and xfrm_mgr callback APIs

2017-01-20 Thread Kevin Cernekee
This provides a better sense of the data flow and inputs/outputs. No change to code size or functionality. Signed-off-by: Kevin Cernekee --- include/net/xfrm.h | 36 -- net/key/af_key.c | 34 +++-- net/xfrm/xfrm_policy.c | 8 +- net/xfrm/xfrm_state.c |

[PATCH 4/4] xfrm_user: Add new 32/64-agnostic netlink messages

2017-01-20 Thread Kevin Cernekee
Add several new message types to address longstanding 32-bit/64-bit compatibility issues. Use xfrm_user_legacy to handle the existing message types, which will retain the old IDs for compatibility with existing binaries. For user->kernel messages, the nlmsg_type will determine whether to use the

[PATCH 3/4] xfrm_user: Initial commit of xfrm_user_legacy.c

2017-01-20 Thread Kevin Cernekee
Several xfrm_* structs are incompatible between 32bit and 64bit builds: xfrm_usersa_info 220 bytes on i386 -> 224 bytes on amd64 xfrm_userpolicy_info 164 -> 168 xfrm_userspi_info 228 -> 232, offset mismatch on min xfrm_user_acquire 276 -> 280, offset mismatch on aalgos

[PATCH 0/4] Make xfrm usable by 32-bit programs

2017-01-20 Thread Kevin Cernekee
Several of the xfrm netlink and setsockopt() interfaces are not usable from a 32-bit binary running on a 64-bit kernel due to struct padding differences. This has been the case for many, many years[0]. This patch series deprecates the broken netlink messages and replaces them with packed structs

[PATCH 2/4] xfrm_user: Allow common functions to be called from another file

2017-01-20 Thread Kevin Cernekee
xfrm_user_legacy.c will need to call a few common functions. Make sure them have an "xfrm_" prefix, and declare them in a new xfrm_user.h header. Signed-off-by: Kevin Cernekee --- net/xfrm/xfrm_user.c | 147 +--

[PATCH net v2 1/2] net: Specify the owning module for lwtunnel ops

2017-01-20 Thread Robert Shearman
Modules implementing lwtunnel ops should not be allowed to unload while there is state alive using those ops, so specify the owning module for all lwtunnel ops. Signed-off-by: Robert Shearman --- include/net/lwtunnel.h| 2 ++ net/core/lwt_bpf.c| 1 +

Re: [PATCH] net: qcom/emac: claim the irq only when the device is opened

2017-01-20 Thread Lino Sanfilippo
On 20.01.2017 22:36, Timur Tabi wrote: On 01/20/2017 03:31 PM, Lino Sanfilippo wrote: In emac_mac_down() however we need synchronize_irq(), since it ensures that the irq handler is not running any more when it (synchronize_irq) returns. So in general, if a driver disables a interrupt but

Re: [PATCH] net: qcom/emac: claim the irq only when the device is opened

2017-01-20 Thread Timur Tabi
On 01/20/2017 03:31 PM, Lino Sanfilippo wrote: In emac_mac_down() however we need synchronize_irq(), since it ensures that the irq handler is not running any more when it (synchronize_irq) returns. So in general, if a driver disables a interrupt but does not free it, it should call

Re: [PATCH] net: qcom/emac: claim the irq only when the device is opened

2017-01-20 Thread Lino Sanfilippo
On 20.01.2017 22:05, Timur Tabi wrote: On 01/20/2017 02:44 PM, Lino Sanfilippo wrote: On 18.01.2017 22:42, Timur Tabi wrote: @@ -1029,8 +1017,6 @@ void emac_mac_down(struct emac_adapter *adpt) */ writel(DIS_INT, adpt->base + EMAC_INT_STATUS); writel(0, adpt->base +

Re: fs, net: deadlock between bind/splice on af_unix

2017-01-20 Thread Dmitry Vyukov
On Fri, Jan 20, 2017 at 5:57 AM, Cong Wang wrote: >> > Why do we do autobind there, anyway, and why is it conditional on >> > SOCK_PASSCRED? Note that e.g. for SOCK_STREAM we can bloody well get >> > to sending stuff without autobind ever done - just use

[PATCH] net: adaptec: starfire: add checks for dma mapping errors

2017-01-20 Thread Alexey Khoroshilov
init_ring() and refill_rx_ring() don't check if mapping dma memory succeed. The patch adds the checks and failure handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/net/ethernet/adaptec/starfire.c | 12

[PATCH v3 09/37] RDS: IB: Remove an unused structure member

2017-01-20 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Santosh Shilimkar Cc: David S. Miller Cc: linux-r...@vger.kernel.org Cc: netdev@vger.kernel.org Cc: rds-de...@oss.oracle.com --- net/rds/ib_mr.h | 1 - 1 file changed, 1

Re: [PATCH v5 0/2] Add support for the ethernet switch on the ESPRESSObin

2017-01-20 Thread Andrew Lunn
> Actually I didn't find anything related to the temperature measurement > in the datasheet I have. For the 6390 there is a dedicated datsheet for > the PHY part for the 6352 it is part of the same datasheet. Hi Gregory The temperature sensor changes have landed in net-next. If you have time,

Re: [PATCH v3] net/irda: fix lockdep annotation

2017-01-20 Thread Dmitry Vyukov
On Thu, Jan 19, 2017 at 5:27 PM, David Miller wrote: > From: Dmitry Vyukov > Date: Thu, 19 Jan 2017 11:05:36 +0100 > >> Thanks for looking into it! This particular issue bothers my fuzzers >> considerably. I agree that removing recursion is better. >> So

Re: [PATCH net-next 8/8] net: dsa: mv88e6xxx: Fix typ0 when configuring 2.5Gbps

2017-01-20 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > In order to enable 2.5Gbps mode, we need the base speed of 10G, plus > the Alt bit setting. Fix a typ0 that used 1Gb base speed. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot

[PATCH v3 net-next] Introduce a sysctl that modifies the value of PROT_SOCK.

2017-01-20 Thread Krister Johansen
Add net.ipv4.ip_unprivileged_port_start, which is a per namespace sysctl that denotes the first unprivileged inet port in the namespace. To disable all privileged ports set this to zero. It also checks for overlap with the local port range. The privileged and local range may not overlap. The

[RFC PATCH net-next 1/5] ip_tunnels: new IP_TUNNEL_INFO_BRIDGE flag for ip_tunnel_info mode

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu New ip_tunnel_info flag to represent bridged tunnel metadata. Used by bridge driver later in the series to pass per vlan dst metadata to bridge ports. Signed-off-by: Roopa Prabhu --- include/net/ip_tunnels.h |1 + 1

[RFC PATCH net-next 4/5] bridge: vlan lwt and dst_metadata netlink support

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds support to attach per vlan tunnel info dst metadata. This enables bridge driver to map vlan to tunnel_info at ingress and egress The initial use case is vlan to vni bridging, but the api is generic to extend to any tunnel_info in the

[RFC PATCH net-next 2/5] vxlan: make COLLECT_METADATA mode bridge friendly

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu This patch series makes vxlan COLLECT_METADATA mode bridge and layer2 network friendly. Vxlan COLLECT_METADATA mode today solves the per-vni netdev scalability problem in l3 networks. When vxlan collect metadata device participates in bridging vlan

[RFC PATCH net-next 0/5] bridge: per vlan lwt and dst_metadata support

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu High level summary: lwt and dst_metadata/collect_metadata have enabled vxlan l3 deployments to use a single vxlan netdev for multiple vnis eliminating the scalability problem with using a single vxlan netdev per vni. This series tries to do the same

[RFC PATCH net-next 5/5] bridge: vlan lwt dst_metadata hooks in ingress and egress paths

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu - ingress hook: - if port is a lwt tunnel port, use tunnel info in attached dst_metadata to map it to a local vlan - egress hook: - if port is a lwt tunnel port, use tunnel info attached to vlan to set dst_metadata on the skb CC:

[RFC PATCH net-next 3/5] bridge: uapi: add per vlan tunnel info

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu New netlink api to associate tunnel info per vlan. This is used by bridge driver to send tunnel metadata to bridge ports in LWT tunnel dst metadata mode. One example use for this is a vxlan bridging gateway or vtep which maps vlans to vn-segments

[PATCH] net: xilinx: constify net_device_ops structures

2017-01-20 Thread Bhumika Goyal
Declare net_device_ops structures as const as they are only stored in the netdev_ops field of a net_device structure. This field is of type const, so net_device_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i;

[PATCH] net: moxa: constify net_device_ops structures

2017-01-20 Thread Bhumika Goyal
Declare net_device_ops structures as const as they are only stored in the netdev_ops field of a net_device structure. This field is of type const, so net_device_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i;

[PATCH v2] net: moxa: constify net_device_ops structures

2017-01-20 Thread Bhumika Goyal
Declare net_device_ops structure as const as it is only stored in the netdev_ops field of a net_device structure. This field is of type const, so net_device_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position

[PATCH v2] net: xilinx: constify net_device_ops structure

2017-01-20 Thread Bhumika Goyal
Declare net_device_ops structure as const as it is only stored in the netdev_ops field of a net_device structure. This field is of type const, so net_device_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position

[PATCH cumulus-4.1.y 3/5] vxlan: enforce precedence for static over dynamic fdb entry

2017-01-20 Thread Roopa Prabhu
From: Wilson Kok This patch enforces fdb state correctly when deciding to add or update an existing fdb. It makes sure static fdb entries are not replaced by dynamic fdb entries. Signed-off-by: Wilson Kok Signed-off-by: Roopa Prabhu

[PATCH cumulus-4.1.y 5/5] vxlan: do not age static remote mac entries

2017-01-20 Thread Roopa Prabhu
From: Balakrishnan Raman Mac aging is applicable only for dynamically learnt remote mac entries. Check for user configured static remote mac entries and skip aging. Signed-off-by: Balakrishnan Raman Signed-off-by: Roopa Prabhu

[PATCH cumulus-4.1.y 4/5] vxlan: don't flush static fdb entries on admin down

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu This patch skips flushing static fdb entries in ndo_stop, but flushes all fdb entries during vxlan device delete. This is consistent with the bridge driver fdb Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 8

[PATCH cumulus-4.1.y 2/5] vxlan: don't replace fdb entry if nothing changed

2017-01-20 Thread Roopa Prabhu
From: Balakrishnan Raman This will avoid unnecessary notifications to userspace. Signed-off-by: Balakrishnan Raman Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 19 +-- 1 file changed,

[PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down

2017-01-20 Thread Roopa Prabhu
From: Balakrishnan Raman Flush fdb entries of a vxlan device when its state changes to oper down. vxlan_stop handles flush on admin down. Signed-off-by: Balakrishnan Raman Signed-off-by: Roopa Prabhu ---

Re: [PATCH cumulus-4.1.y 1/5] vxlan: flush fdb entries on oper down

2017-01-20 Thread Roopa Prabhu
On 1/20/17, 11:40 PM, Roopa Prabhu wrote: > From: Balakrishnan Raman > > Flush fdb entries of a vxlan device when its state > changes to oper down. vxlan_stop handles flush on > admin down. > > Signed-off-by: Balakrishnan Raman >

[PATCH net-next 2/2] vxlan: do not age static remote mac entries

2017-01-20 Thread Roopa Prabhu
From: Balakrishnan Raman Mac aging is applicable only for dynamically learnt remote mac entries. Check for user configured static remote mac entries and skip aging. Signed-off-by: Balakrishnan Raman Signed-off-by: Roopa Prabhu

[PATCH net-next 0/2] vxlan: misc fdb fixes

2017-01-20 Thread Roopa Prabhu
From: Roopa Prabhu Balakrishnan Raman (1): vxlan: do not age static remote mac entries Roopa Prabhu (1): vxlan: don't flush static fdb entries on admin down drivers/net/vxlan.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 1.9.1

  1   2   3   >