Re: pls merge net to net-next

2016-08-17 Thread David Miller
From: Stephen Hemminger Date: Tue, 16 Aug 2016 14:02:18 -0700 > Since Vitaly's changes to hyperv drivers went into net it makes > it harder to submit other changes for net-next since they will invariably > cause conflicts. Done.

[PATCH 2/2] pptp: Reset call_id as 0 to avoid one useless lookup at next time

2016-08-17 Thread fgao
From: Gao Feng When pptp fails to get valid callid, the global call_id is set as MAX_CALLID. Then it must fail to get callid at next time, when invoke find_next_zero_bit from call_id+1. Because the call_id+1 exceeds the limit "MAX_CALLID". So reset call_id as 0 when fail to get

[PATCH v1 1/2] pptp: Use macro and sizeof instead of literal number

2016-08-17 Thread fgao
From: Gao Feng Use existing macros like PPP_ADDRESS, SC_COMP_PROT and sizeof fixed variables instead of original literal number to enhance readbility. BTW, the original pptp_rcv uses literal number "12" as the param of pskb_may_pull. Actually the "12" is less than the size of

[PATCH] fib_trie: Fix the description of pos and bits

2016-08-17 Thread Xunlei Pang
1) Fix one typo: s/tn/tp/ 2) Fix the description about the "u" bits. Signed-off-by: Xunlei Pang --- net/ipv4/fib_trie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index d07fc07..eb7c5d1 100644 ---

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Timur Tabi
Florian Fainelli wrote: The larger issue is that the emac_sgmii node in the form you posted is going to be backed by a platform device in Linux while you want a PHY device with a reg property that describes a MDIO address (#address-cells = 1, #size-cells = 0). But how do I get the platform

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Florian Fainelli
On August 17, 2016 8:27:19 PM PDT, Timur Tabi wrote: >Florian Fainelli wrote: > >>> emac_sgmii: ethernet-phy@410400 { >>> compatible = "qcom,qdf2432-emac-phy"; >>> reg = <0x0 0x00410400 0x0 0x100>; >>> interrupts = <0 0x104 0>; >>> }; >>>

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Timur Tabi
Florian Fainelli wrote: emac_sgmii: ethernet-phy@410400 { compatible = "qcom,qdf2432-emac-phy"; reg = <0x0 0x00410400 0x0 0x100>; interrupts = <0 0x104 0>; }; Is this register range relative to the emac0 node here, or is this really a separate node,

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread David Ahern
On 8/17/16 7:06 PM, Alexander Duyck wrote: > On Wed, Aug 17, 2016 at 4:23 PM, David Ahern wrote: >> On 8/17/16 5:16 PM, Alexander Duyck wrote: diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 1ecbd7715f6d..6d78f162a88b 100644 ---

[PATCH v1 1/1] pppoe: l2tp: the PPPOX_CONNECTED should be used with bit operation

2016-08-17 Thread fgao
From: Gao Feng There are some codes in pppoe and l2tp which use the PPPOX_CONNECTED as the value including assignment and condition check. They should keep consistent with other codes. Signed-off-by: Gao Feng --- v1: Initial Patch drivers/net/ppp/pppoe.c |

Re: [PATCH net-next] tcp: refine tcp_prune_ofo_queue() to not drop all packets

2016-08-17 Thread Soheil Hassas Yeganeh
On Wed, Aug 17, 2016 at 5:17 PM, Eric Dumazet wrote: > From: Eric Dumazet > > Over the years, TCP BDP has increased a lot, and is typically > in the order of ~10 Mbytes with help of clever Congestion Control > modules. > > In presence of packet

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread Alexander Duyck
On Wed, Aug 17, 2016 at 4:23 PM, David Ahern wrote: > On 8/17/16 5:16 PM, Alexander Duyck wrote: >>> diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c >>> index 1ecbd7715f6d..6d78f162a88b 100644 >>> --- a/net/openvswitch/actions.c >>> +++

Re: [PATCH v2 1/1] ppp: Fix one deadlock issue of PPP when send frame

2016-08-17 Thread Feng Gao
inline answer. On Thu, Aug 18, 2016 at 1:42 AM, Guillaume Nault wrote: > On Tue, Aug 16, 2016 at 07:33:38PM +0800, f...@ikuai8.com wrote: >> From: Gao Feng >> >> PPP channel holds one spinlock before send frame. But the skb may >> select the same PPP

[GIT] Networking

2016-08-17 Thread David Miller
1) Buffers powersave frame test is reversed in cfg80211, fix from Felix Fietkau. 2) Remove bogus WARN_ON in openvswitch, from Jarno Rajahalme. 3) Fix some tg3 ethtool logic bugs, and one that would cause no interrupts to be generated when rx-coalescing is set to 0. From Satish

Re: [PATCH] net: ipconfig: Fix more use after free

2016-08-17 Thread David Miller
From: Thierry Reding Date: Tue, 16 Aug 2016 16:45:38 +0200 > From: Thierry Reding > > While commit 9c706a49d660 ("net: ipconfig: fix use after free") avoids > the use after free, the resulting code still ends up calling both the > ic_setup_if() and

Re: [PATCH v4 net-next 0/3] strp: Stream parser for messages

2016-08-17 Thread David Miller
From: Tom Herbert Date: Mon, 15 Aug 2016 14:51:00 -0700 > This patch set introduces a utility for parsing application layer > protocol messages in a TCP stream. This is a generalization of the > mechanism implemented of Kernel Connection Multiplexor. ... Series applied,

Re: [RFC PATCH 10/13] net: sched: lockless support for netif_schedule

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 16:17 -0700, John Fastabend wrote: > On 16-08-17 04:01 PM, Eric Dumazet wrote: > > On Wed, 2016-08-17 at 12:37 -0700, John Fastabend wrote: > > > >> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c > >> index d10b762..f5b7254 100644 > >> ---

Re: [PATCH] xfrm: Only add l3mdev oif to dst lookups

2016-08-17 Thread David Miller
From: David Ahern Date: Sun, 14 Aug 2016 19:52:56 -0700 > Subash reported that commit 42a7b32b73d6 ("xfrm: Add oif to dst lookups") > broke a wifi use case that uses fib rules and xfrms. The intent of > 42a7b32b73d6 was driven by VRFs with IPsec. As a compromise relax

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread David Ahern
On 8/17/16 5:16 PM, Alexander Duyck wrote: >> diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c >> index 1ecbd7715f6d..6d78f162a88b 100644 >> --- a/net/openvswitch/actions.c >> +++ b/net/openvswitch/actions.c >> @@ -167,6 +167,12 @@ static int push_mpls(struct sk_buff *skb, struct

Re: [PATCH 00/16] pull request for net-next: batman-adv 2016-08-16

2016-08-17 Thread David Miller
From: Simon Wunderlich Date: Tue, 16 Aug 2016 10:32:28 +0200 > this is our second feature pull request for batman-adv in this round, with > our joint work on netlink and netns support. There will be at least one more > pull request coming later. > > Please pull or let

Re: [net 0/6][pull request] Intel Wired LAN Driver Updates 2016-08-16

2016-08-17 Thread David Miller
From: Jeff Kirsher Date: Tue, 16 Aug 2016 13:40:08 -0700 > This series contains fixes to e1000e, igb, ixgbe and i40e. Pulled, thanks a lot Jeff.

Re: [patch net v2 00/10] mlxsw: IPv4 UC router fixes

2016-08-17 Thread David Miller
From: Jiri Pirko Date: Wed, 17 Aug 2016 16:39:27 +0200 > Ido says: > Patches 1-3 fix a long standing problem in the driver's init sequence, > which manifests itself quite often when routing daemons try to configure > an IP address on registered netdevs that don't yet have an

Re: [RFC PATCH 12/13] net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mq

2016-08-17 Thread John Fastabend
On 16-08-17 04:04 PM, Eric Dumazet wrote: > On Wed, 2016-08-17 at 12:38 -0700, John Fastabend wrote: >> The sch_mq qdisc creates a sub-qdisc per tx queue which are then >> called independently for enqueue and dequeue operations. However >> statistics are aggregated and pushed up to the "master"

Re: [RFC PATCH 10/13] net: sched: lockless support for netif_schedule

2016-08-17 Thread John Fastabend
On 16-08-17 04:01 PM, Eric Dumazet wrote: > On Wed, 2016-08-17 at 12:37 -0700, John Fastabend wrote: > >> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c >> index d10b762..f5b7254 100644 >> --- a/net/sched/sch_generic.c >> +++ b/net/sched/sch_generic.c >> @@ -171,6 +171,7 @@ static

Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread Alexander Duyck
On Wed, Aug 17, 2016 at 2:49 PM, David Ahern wrote: > As reported by Lennert the MPLS GSO code is failing to properly segment > large packets. There are a couple of problems: > > 1. the inner protocol is not set so the gso segment functions for inner >protocol layers

Re: [PATCH net-next] dsa: mv88e6xxx: Timeout based on iterations

2016-08-17 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The mv88e6xxx driver times out operations on the switch based on > looping until an elapsed wall clock time is reached. However, if > usleep_range() sleeps much longer than expected, it could timeout with > an error without actually checking to

Re: [RFC PATCH 07/13] net: sched: support qdisc_reset on NOLOCK qdisc

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 12:36 -0700, John Fastabend wrote: > The qdisc_reset operation depends on the qdisc lock at the moment > to halt any additions to gso_skb and statistics while the list is > free'd and the stats zeroed. ... > Signed-off-by: John Fastabend > --- >

Re: [RFC PATCH 12/13] net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mq

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 12:38 -0700, John Fastabend wrote: > The sch_mq qdisc creates a sub-qdisc per tx queue which are then > called independently for enqueue and dequeue operations. However > statistics are aggregated and pushed up to the "master" qdisc. > > This patch adds support for any of

[PATCH net-next 3/4] bpf: enable event output helper also for xdp types

2016-08-17 Thread Daniel Borkmann
Follow-up to 555c8a8623a3 ("bpf: avoid stack copy and use skb ctx for event output") for also adding the event output helper for XDP typed programs. The event output helper has been very useful in particular for debugging or event notification purposes, since it's much faster and flexible than

[PATCH net-next 0/4] BPF helper improvements and cleanups

2016-08-17 Thread Daniel Borkmann
This set adds various improvements to BPF helpers, a cleanup to use skb_pkt_type_ok() helper, addition of bpf_skb_change_tail(), a follow up for event output helper and removing ifdefs around the cgroupv2 helper bits. For details please see individual patches. The set is based against net-next

[PATCH net-next 4/4] bpf: get rid of cgroup helper related ifdefs

2016-08-17 Thread Daniel Borkmann
As recently discussed during the task_under_cgroup_hierarchy() addition, we should get rid of the ifdefs surrounding the bpf_skb_under_cgroup() helper. If related functionality is not built-in, the helper cannot be used anyway, which is also in line with what we do for all other helpers.

Re: [RFC PATCH 10/13] net: sched: lockless support for netif_schedule

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 12:37 -0700, John Fastabend wrote: > diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c > index d10b762..f5b7254 100644 > --- a/net/sched/sch_generic.c > +++ b/net/sched/sch_generic.c > @@ -171,6 +171,7 @@ static void try_bulk_dequeue_skb_slow(struct Qdisc *q, >

[PATCH net-next 1/4] bpf: use skb_pkt_type_ok helper in bpf_skb_change_type

2016-08-17 Thread Daniel Borkmann
Since we have a skb_pkt_type_ok() helper for checking the type before mangling, make use of it instead of open coding. Follow-up to commit 8b10cab64c13 ("net: simplify and make pkt_type_ok() available for other users") that came in after d2485c4242a8 ("bpf: add bpf_skb_change_type helper").

[PATCH net-next 2/4] bpf: add bpf_skb_change_tail helper

2016-08-17 Thread Daniel Borkmann
This work adds a bpf_skb_change_tail() helper for tc BPF programs. The basic idea is to expand or shrink the skb in a controlled manner. The eBPF program can then rewrite the rest via helpers like bpf_skb_store_bytes(), bpf_lX_csum_replace() and others rather than passing a raw buffer for writing

Re: [RFC PATCH 08/13] net: sched: support skb_bad_tx with lockless qdisc

2016-08-17 Thread John Fastabend
On 16-08-17 03:58 PM, Eric Dumazet wrote: > On Wed, 2016-08-17 at 12:36 -0700, John Fastabend wrote: >> Similar to how gso is handled skb_bad_tx needs to be per cpu to handle >> lockless qdisc with multiple writer/producers. > \ >> @@ -1021,6 +1026,7 @@ err_out4: >>

Re: [RFC PATCH 07/13] net: sched: support qdisc_reset on NOLOCK qdisc

2016-08-17 Thread John Fastabend
On 16-08-17 03:53 PM, Eric Dumazet wrote: > On Wed, 2016-08-17 at 12:36 -0700, John Fastabend wrote: >> The qdisc_reset operation depends on the qdisc lock at the moment >> to halt any additions to gso_skb and statistics while the list is >> free'd and the stats zeroed. > > ... > >>

Re: [RFC PATCH 08/13] net: sched: support skb_bad_tx with lockless qdisc

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 12:36 -0700, John Fastabend wrote: > Similar to how gso is handled skb_bad_tx needs to be per cpu to handle > lockless qdisc with multiple writer/producers. \ > @@ -1021,6 +1026,7 @@ err_out4: > free_percpu(sch->cpu_bstats); > free_percpu(sch->cpu_qstats); >

Re: [PATCH net-next 3/3] net: veth: Set features for MPLS

2016-08-17 Thread David Ahern
On 8/17/16 4:41 PM, Eric Dumazet wrote: > On Wed, 2016-08-17 at 14:49 -0700, David Ahern wrote: >> veth does not really transmit packets only moves the skb from one >> netdev to another so gso and checksum is not really needed. Add >> the features to mpls_features to get the same benefit and

Re: [PATCH net] netfilter: tproxy: properly refcount tcp listeners

2016-08-17 Thread Pablo Neira Ayuso
On Wed, Aug 17, 2016 at 09:56:46AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > inet_lookup_listener() and inet6_lookup_listener() no longer > take a reference on the found listener. > > This minimal patch adds back the refcounting, but we might do > this differently

Re: [RFC PATCH 01/13] net: sched: allow qdiscs to handle locking

2016-08-17 Thread John Fastabend
On 16-08-17 03:33 PM, Eric Dumazet wrote: > On Wed, 2016-08-17 at 12:33 -0700, John Fastabend wrote: >> This patch adds a flag for queueing disciplines to indicate the stack >> does not need to use the qdisc lock to protect operations. This can >> be used to build lockless scheduling algorithms

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Florian Fainelli
On 08/17/2016 03:32 PM, Timur Tabi wrote: > Timur Tabi wrote: >>> >>> Nothing prevents you from detailing in ACPI or DT sub-components of a >>> larger HW block, if there is such a desire, but just make it in a way >>> that it looks like what would be done for e.g: separate discrete parts, >>> only

Re: [RFC PATCH 01/13] net: sched: allow qdiscs to handle locking

2016-08-17 Thread John Fastabend
On 16-08-17 03:34 PM, Eric Dumazet wrote: > On Wed, 2016-08-17 at 12:33 -0700, John Fastabend wrote: > > >> diff --git a/net/core/dev.c b/net/core/dev.c >> index 4ce07dc..5db395d 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -3076,6 +3076,26 @@ static inline int

Re: [PATCH net-next 3/3] net: veth: Set features for MPLS

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 14:49 -0700, David Ahern wrote: > veth does not really transmit packets only moves the skb from one > netdev to another so gso and checksum is not really needed. Add > the features to mpls_features to get the same benefit and performance > with MPLS as without it. It seems

Re: [RFC PATCH 01/13] net: sched: allow qdiscs to handle locking

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 12:33 -0700, John Fastabend wrote: > diff --git a/net/core/dev.c b/net/core/dev.c > index 4ce07dc..5db395d 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -3076,6 +3076,26 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, > struct Qdisc *q, > int rc;

Re: [RFC PATCH 01/13] net: sched: allow qdiscs to handle locking

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 12:33 -0700, John Fastabend wrote: > This patch adds a flag for queueing disciplines to indicate the stack > does not need to use the qdisc lock to protect operations. This can > be used to build lockless scheduling algorithms and improving > performance. > > The flag is

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Timur Tabi
Timur Tabi wrote: Nothing prevents you from detailing in ACPI or DT sub-components of a larger HW block, if there is such a desire, but just make it in a way that it looks like what would be done for e.g: separate discrete parts, only the parenting of nodes would change. So instead of just

[PATCH net-next 2/3] net: mpls: Fixups for GSO

2016-08-17 Thread David Ahern
As reported by Lennert the MPLS GSO code is failing to properly segment large packets. There are a couple of problems: 1. the inner protocol is not set so the gso segment functions for inner protocol layers are not getting run, and 2 MPLS labels for packets that use the "native" (non-OVS)

[PATCH net-next 3/3] net: veth: Set features for MPLS

2016-08-17 Thread David Ahern
veth does not really transmit packets only moves the skb from one netdev to another so gso and checksum is not really needed. Add the features to mpls_features to get the same benefit and performance with MPLS as without it. Reported-by: Lennert Buytenhek Signed-off-by:

[PATCH net-next 1/3] net: lwtunnel: Handle fragmentation

2016-08-17 Thread David Ahern
From: Roopa Prabhu Today mpls iptunnel lwtunnel_output redirect expects the tunnel output function to handle fragmentation. This is ok but can be avoided if we did not do the mpls output redirect too early. ie we could wait until ip fragmentation is done and then call

[PATCH v2 net-next 0/3] net: mpls: fragmentation and gso fixes for locally originated traffic

2016-08-17 Thread David Ahern
This series fixes mtu and fragmentation for tunnels using lwtunnel output redirect, and fixes GSO for MPLS for locally originated traffic reported by Lennert Buytenhek. A follow on series will address fragmentation and GSO for forwarded MPLS traffic. Hardware offload of GSO with MPLS also needs

[PATCH iproute2] ip: report IFLA_GSO_MAX_SIZE and IFLA_GSO_MAX_SEGS

2016-08-17 Thread Eric Dumazet
From: Eric Dumazet kernel support for these attributes was added in linux-4.6 Signed-off-by: Eric Dumazet --- ip/ipaddress.c |8 1 file changed, 8 insertions(+) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index ab4b1b1..76bd7b3 100644

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-08-17 Thread Phil Sutter
On Wed, Jun 01, 2016 at 10:03:49PM +0200, Phil Sutter wrote: > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks > overly complicated. Instead rely upon parse_rtattr_nested() to assign > the relevant pointer if requested rtattr fields are present. In order to validate correctness

[PATCH net-next] dsa: mv88e6xxx: Timeout based on iterations

2016-08-17 Thread Andrew Lunn
The mv88e6xxx driver times out operations on the switch based on looping until an elapsed wall clock time is reached. However, if usleep_range() sleeps much longer than expected, it could timeout with an error without actually checking to see if the devices has completed the operation. So replace

[PATCH net-next] tcp: refine tcp_prune_ofo_queue() to not drop all packets

2016-08-17 Thread Eric Dumazet
From: Eric Dumazet Over the years, TCP BDP has increased a lot, and is typically in the order of ~10 Mbytes with help of clever Congestion Control modules. In presence of packet losses, TCP stores incoming packets into an out of order queue, and number of skbs sitting there

[PATCH net-next] net: bgmac: make it clear when setting interface type to RMII

2016-08-17 Thread Rafał Miłecki
From: Rafał Miłecki It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is equal to 0. It make code a bit clener, so far when reading it one could think we forgot to set a proper mode. It also keeps this mode code in sync with other ones. Signed-off-by: Rafał

[PATCH net-next] net: bgmac: support Ethernet core on BCM53573 SoCs

2016-08-17 Thread Rafał Miłecki
From: Rafał Miłecki BCM53573 is a new series of Broadcom's SoCs. It's based on ARM and can be found in two packages (versions): BCM53573 and BCM47189. It shares some code with the Northstar family, but also requires some new quirks. First of all there can be up to 2 Ethernet

Re: [PATCH iproute] ipila: Fixed unitialized variables

2016-08-17 Thread Stephen Hemminger
On Mon, 15 Aug 2016 16:30:22 -0700 Tom Herbert wrote: > Initialize locator and locator_match to zero and only do > addattr if they have been set. > > Signed-off-by: Tom Herbert Applied thanks

Re: [PATCH] [v8] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Andrew Lunn
> Something is odd about of_mdiobus_register(). > > This function scans child nodes to look for PHYs: > > /* Loop over the child nodes and register a phy_device for each phy */ > for_each_available_child_of_node(np, child) { > addr = of_mdio_parse_addr(>dev, child); > > And in my driver,

Re: [PATCH iproute2] ip route: restore_handler should check tb[RTA_PREFSRC] for local networks

2016-08-17 Thread Stephen Hemminger
On Wed, 17 Aug 2016 11:32:53 +0800 Xin Long wrote: > Hi, Stephen > > any update on this ? Was waiting long enough to get a comment or two.

Re: [PATCH iproute2 v2 2/2] tipc: refactor bearer identification

2016-08-17 Thread Stephen Hemminger
On Mon, 15 Aug 2016 10:24:32 +0200 Richard Alpe wrote: > Introduce a generic function (nl_add_bearer_name()) that identifies a > bearer and adds it to an existing netlink message. This reduces code > complexity and makes the code a little bit easier to maintain. > >

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Timur Tabi
Florian Fainelli wrote: If it has self identification, and the MAC is capable of knowing what kind of PHY it is internally bundled with, why does it matter to represent that specific piece of information in Device Tree or ACPI? That's the thing - the MAC is not capable of knowing. From a

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Florian Fainelli
On 08/16/2016 02:37 PM, Timur Tabi wrote: > Al Stone wrote: >> Does the ACPI portion of the driver*have* to know about the PHY? In >> general, >> the ACPI assumption on ARM [**] is that those have all been set up >> before we >> get to the kernel. So, does it need to be visible to the ACPI part

Re: [PATCH] [v8] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Florian Fainelli
On 08/17/2016 12:38 PM, Timur Tabi wrote: >> If this is an external PHY, the expectation is that it will be hanging >> off a MDIO bus controller, either the MDIO bus internal to the MAC, or >> an external MDIO bus (separate register range). > > So for starters, I forgot to delete the 'compatible'

Re: [RFC PATCH 12/13] net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mq

2016-08-17 Thread John Fastabend
On 16-08-17 12:38 PM, John Fastabend wrote: > The sch_mq qdisc creates a sub-qdisc per tx queue which are then > called independently for enqueue and dequeue operations. However > statistics are aggregated and pushed up to the "master" qdisc. > > This patch adds support for any of the sub-qdiscs

Re: [RFC PATCH 10/13] net: sched: lockless support for netif_schedule

2016-08-17 Thread John Fastabend
On 16-08-17 12:37 PM, John Fastabend wrote: > netif_schedule uses a bit QDISC_STATE_SCHED to tell the qdisc layer > if a run of the qdisc has been scheduler. This is important when > tearing down qdisc instances. We can rcu_free an instance for example > if its possible that we might have

[RFC PATCH 00/13] Series short description

2016-08-17 Thread John Fastabend
I've been working on this for a bit now figured its time for a v2 RFC. As usual any comments, suggestions, observations, musings, etc are appreciated. Latest round of lockless qdisc patch set with performance metric primarily using pktgen to inject pkts into the qdisc layer. Some simple netperf

[RFC PATCH 12/13] net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mq

2016-08-17 Thread John Fastabend
The sch_mq qdisc creates a sub-qdisc per tx queue which are then called independently for enqueue and dequeue operations. However statistics are aggregated and pushed up to the "master" qdisc. This patch adds support for any of the sub-qdiscs to be per cpu statistic qdiscs. To handle this case

[RFC PATCH 11/13] net: sched: pfifo_fast use alf_queue

2016-08-17 Thread John Fastabend
This converts the pfifo_fast qdisc to use the alf_queue enqueue and dequeue routines then sets the NOLOCK bit. This also removes the logic used to pick the next band to dequeue from and instead just checks each alf_queue for packets from top priority to lowest. This might need to be a bit more

Re: [PATCH] [v8] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Timur Tabi
Florian Fainelli wrote: On 08/11/2016 02:34 PM, Timur Tabi wrote: >Add supports for ethernet controller HW on Qualcomm Technologies, Inc. SoC. >This driver supports the following features: >1) Checksum offload. >2) Interrupt coalescing support. >3) SGMII phy. >4) phylib interface for external

[RFC PATCH 13/13] net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mqprio

2016-08-17 Thread John Fastabend
The sch_mqprio qdisc creates a sub-qdisc per tx queue which are then called independently for enqueue and dequeue operations. However statistics are aggregated and pushed up to the "master" qdisc. This patch adds support for any of the sub-qdiscs to be per cpu statistic qdiscs. To handle this

[RFC PATCH 08/13] net: sched: support skb_bad_tx with lockless qdisc

2016-08-17 Thread John Fastabend
Similar to how gso is handled skb_bad_tx needs to be per cpu to handle lockless qdisc with multiple writer/producers. Signed-off-by: John Fastabend --- include/net/sch_generic.h |7 +++ net/sched/sch_api.c |6 +++ net/sched/sch_generic.c | 95

[RFC PATCH 09/13] net: sched: helper to sum qlen

2016-08-17 Thread John Fastabend
Reporting qlen when qlen is per cpu requires aggregating the per cpu counters. This adds a helper routine for this. Signed-off-by: John Fastabend --- include/net/sch_generic.h | 15 +++ net/sched/sch_api.c |3 ++- 2 files changed, 17

[RFC PATCH 10/13] net: sched: lockless support for netif_schedule

2016-08-17 Thread John Fastabend
netif_schedule uses a bit QDISC_STATE_SCHED to tell the qdisc layer if a run of the qdisc has been scheduler. This is important when tearing down qdisc instances. We can rcu_free an instance for example if its possible that we might have outstanding references to it. Perhaps more importantly in

[RFC PATCH 05/13] net: sched: a dflt qdisc may be used with per cpu stats

2016-08-17 Thread John Fastabend
Enable dflt qdisc support for per cpu stats before this patch a dflt qdisc was required to use the global statistics qstats and bstats. Signed-off-by: John Fastabend --- net/sched/sch_generic.c | 24 1 file changed, 20 insertions(+), 4

[RFC PATCH 06/13] net: sched: per cpu gso handlers

2016-08-17 Thread John Fastabend
The net sched infrastructure has a gso ptr that points to skb structs that have failed to be enqueued by the device driver. This can happen when multiple cores try to push a skb onto the same underlying hardware queue resulting in lock contention. This case is handled by a cpu collision handler

[RFC PATCH 07/13] net: sched: support qdisc_reset on NOLOCK qdisc

2016-08-17 Thread John Fastabend
The qdisc_reset operation depends on the qdisc lock at the moment to halt any additions to gso_skb and statistics while the list is free'd and the stats zeroed. Without the qdisc lock we can not guarantee another cpu is not in the process of adding a skb to one of the "cells". Here are the two

[RFC PATCH 01/13] net: sched: allow qdiscs to handle locking

2016-08-17 Thread John Fastabend
This patch adds a flag for queueing disciplines to indicate the stack does not need to use the qdisc lock to protect operations. This can be used to build lockless scheduling algorithms and improving performance. The flag is checked in the tx path and the qdisc lock is only taken if it is not

[RFC PATCH 04/13] net: sched: provide atomic qlen helpers for bypass case

2016-08-17 Thread John Fastabend
The qlen is used by the core/dev.c to determine if a packet can skip the qdisc on qdiscs with bypass enabled. In these cases a per cpu qlen value can cause one cpu to bypass a qdisc that has packets in it. To avoid this case use the simplest solution I could come up with for now and add an atomic

[RFC PATCH 02/13] net: sched: qdisc_qlen for per cpu logic

2016-08-17 Thread John Fastabend
This is a bit interesting because it means sch_direct_xmit will return a positive value which causes the dequeue/xmit cycle to continue only when a specific cpu has a qlen > 0. However checking each cpu for qlen will break performance so its important to note that qdiscs that set the no lock bit

[RFC PATCH 03/13] net: sched: provide per cpu qstat helpers

2016-08-17 Thread John Fastabend
The per cpu qstats support was added with per cpu bstat support which is currently used by the ingress qdisc. This patch adds a set of helpers needed to make other qdiscs that use qstats per cpu as well. Signed-off-by: John Fastabend --- include/net/sch_generic.h |

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Timur Tabi
Timur Tabi wrote: The question, how should adpt->phy.version be initialized on device tree and ACPI platforms? The reason why this is confusing is because there are conflicting perspectives of this "internal PHY". It both is and is not part of the EMAC. It is a separate block in the chip,

Re: [RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 11:20:29AM -0700, Alexei Starovoitov wrote: > On Wed, Aug 17, 2016 at 04:00:47PM +0200, Daniel Mack wrote: > > If CONFIG_CGROUP_BPF is enabled, and the cgroup associated with the > > receiving socket has an eBPF programs installed, run them from > > sk_filter_trim_cap(). >

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 09:16:02AM -0700, Eric Dumazet wrote: > On Wed, 2016-08-17 at 16:00 +0200, Daniel Mack wrote: > > > + progp = is_ingress ? >bpf_ingress : >bpf_egress; > > + > > + rcu_read_lock(); > > + old_prog = rcu_dereference(*progp); > > +

Re: [RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 04:00:47PM +0200, Daniel Mack wrote: > If CONFIG_CGROUP_BPF is enabled, and the cgroup associated with the > receiving socket has an eBPF programs installed, run them from > sk_filter_trim_cap(). > > eBPF programs used in this context are expected to either return 1 to >

Re: [RFC PATCH 2/5] cgroup: add bpf_{e,in}gress pointers

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 04:00:45PM +0200, Daniel Mack wrote: > Add two pointers for eBPF programs to struct cgroup. These will be used > to store programs for ingress and egress for accounting and filtering. > > This new feature is guarded by CONFIG_CGROUP_BPF. ... > +#ifdef CONFIG_CGROUP_BPF > +

Re: [RFC PATCH 2/5] cgroup: add bpf_{e,in}gress pointers

2016-08-17 Thread Tejun Heo
Hello, On Wed, Aug 17, 2016 at 10:50:40AM -0700, Alexei Starovoitov wrote: > > +config CGROUP_BPF > > + bool "Enable eBPF programs in cgroups" > > + depends on BPF_SYSCALL > > + help > > + This options allows cgroups to accommodate eBPF programs that > > + can be used for network

[PATCH] net: ethernet: nuvoton: fix spelling mistake: "aligment" -> "alignment"

2016-08-17 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King --- drivers/net/ethernet/nuvoton/w90p910_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 05:51:44PM +0200, Daniel Mack wrote: > On 08/17/2016 05:06 PM, Tejun Heo wrote: > > What I'd suggest is keeping two sets of pointers, one set for the > > programs explicitly attached to the cgroup and the other for programs > > which are to be executed for the cgroup. The

Re: [PATCH v2 1/1] ppp: Fix one deadlock issue of PPP when send frame

2016-08-17 Thread Guillaume Nault
On Tue, Aug 16, 2016 at 07:33:38PM +0800, f...@ikuai8.com wrote: > From: Gao Feng > > PPP channel holds one spinlock before send frame. But the skb may > select the same PPP channel with wrong route policy. As a result, > the skb reaches the same channel path. It tries to get

Re: regression in xgene-enet in 4.8-rc series, oops from xgene_enet_probe

2016-08-17 Thread Loc Ho
Hi Riku, >> When the driver is configured as kernel module and when it gets >> unloaded and reloaded, kernel crash was observed. This patch >> addresses the software cleanup by doing the following, >> >> - Moved register_netdev call after hardware is ready >> - Since ndev is not ready, added

Server fails to boot with net-next

2016-08-17 Thread Yuval Mintz
Just updated to last net-next and boot crashed in x2apic_cluster_probe(). Bisection seemed to point to: commit 6b2c28471de550308784560206c3365e5179d42f Author: Sebastian Andrzej Siewior Date: Wed Jul 13 17:17:00 2016 + x86/x2apic:

Re: Server fails to boot with net-next

2016-08-17 Thread bige...@linutronix.de
On 2016-08-17 16:58:02 [+], Yuval Mintz wrote: > Are there known issues here? fixed in -rc2 by http://git.kernel.org/tip/d52c0569bab4edc32df44dc7ac28517134f6 Sebastian

[PATCH net] netfilter: tproxy: properly refcount tcp listeners

2016-08-17 Thread Eric Dumazet
From: Eric Dumazet inet_lookup_listener() and inet6_lookup_listener() no longer take a reference on the found listener. This minimal patch adds back the refcounting, but we might do this differently in net-next later. Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener

Re: kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 19:44 +0300, Denys Fedoryshchenko wrote: > Yes, everything fine after patch! > Thanks a lot Perfect, thanks for testing, I am sending the official patch.

Re: kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Denys Fedoryshchenko
On 2016-08-17 19:04, Eric Dumazet wrote: On Wed, 2016-08-17 at 08:42 -0700, Eric Dumazet wrote: On Wed, 2016-08-17 at 17:31 +0300, Denys Fedoryshchenko wrote: > Hi! > > Tried to run squid on latest kernel, and hit a panic > Sometimes it just shows warning in dmesg (but doesnt work properly) > [

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread Mike Manning
On 08/17/2016 04:40 PM, Hannes Frederic Sowa wrote: > On 17.08.2016 12:28, Mike Manning wrote: >> +static void dev_disable_change(struct inet6_dev *idev); >> >> /* >> * Configured unicast address hash table >> @@ -1945,6 +1946,12 @@ lock_errdad: >> >> pr_info("%s: IPv6

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread Hannes Frederic Sowa
On Wed, Aug 17, 2016, at 18:08, Mike Manning wrote: > On 08/17/2016 04:40 PM, Hannes Frederic Sowa wrote: > > On 17.08.2016 12:28, Mike Manning wrote: > >> +static void dev_disable_change(struct inet6_dev *idev); > >> > >> /* > >> *Configured unicast address hash table > >> @@ -1945,6

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 16:00 +0200, Daniel Mack wrote: > + progp = is_ingress ? >bpf_ingress : >bpf_egress; > + > + rcu_read_lock(); > + old_prog = rcu_dereference(*progp); > + rcu_assign_pointer(*progp, prog); > + > + if (old_prog) > +

Re: [PATCH net] tcp: fix use after free in tcp_xmit_retransmit_queue()

2016-08-17 Thread Cong Wang
On Wed, Aug 17, 2016 at 5:56 AM, Eric Dumazet wrote: > From: Eric Dumazet > > When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the > tail of the write queue using tcp_add_write_queue_tail() > > Then it attempts to copy user data into

Re: kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 08:42 -0700, Eric Dumazet wrote: > On Wed, 2016-08-17 at 17:31 +0300, Denys Fedoryshchenko wrote: > > Hi! > > > > Tried to run squid on latest kernel, and hit a panic > > Sometimes it just shows warning in dmesg (but doesnt work properly) > > [ 75.701666] IPv4: Attempt to

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Daniel Mack
On 08/17/2016 05:06 PM, Tejun Heo wrote: > What I'd suggest is keeping two sets of pointers, one set for the > programs explicitly attached to the cgroup and the other for programs > which are to be executed for the cgroup. The two pointers in the > latter set will point to the closest non-null

  1   2   >