Re: [LEDE-DEV] [PATCH] ath10k: Re-enable intermediate softqueues for all devices

2017-09-28 Thread Weedy
On 28 September 2017 at 23:04, Jim Gettys  wrote:
> I like two orders of magnitude improvement of latency under load!  Anyone have
> suggestions on what to buy for a new laptop these days?

You can change your wifi card you know. It's just a mini pci-e card.

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH netifd] system-linux: add support for hotplug event 'move'

2017-09-28 Thread Philip Prindeville
Inline…


> On Sep 28, 2017, at 2:32 AM, Martin Schiller  wrote:
> 
> If you rename a network interface, there is a move uevent
> invoked instead of remove/add.
> 
> This patch adds support for this kind of event.
> 
> Signed-off-by: Martin Schiller 
> ---
> system-linux.c | 31 ---
> 1 file changed, 28 insertions(+), 3 deletions(-)
> 
> diff --git a/system-linux.c b/system-linux.c
> index 6d97a02..e2017d0 100644
> --- a/system-linux.c
> +++ b/system-linux.c
> @@ -543,16 +543,20 @@ out:
> static void
> handle_hotplug_msg(char *data, int size)
> {
> - const char *subsystem = NULL, *interface = NULL;
> + const char *subsystem = NULL, *interface = NULL, *interface_old = NULL;
>   char *cur, *end, *sep;
>   struct device *dev;
>   int skip;
> - bool add;
> + bool add, move = false;
> 
>   if (!strncmp(data, "add@", 4))
>   add = true;
>   else if (!strncmp(data, "remove@", 7))
>   add = false;
> + else if (!strncmp(data, "move@", 5)) {
> + add = true;
> + move = true;
> + }
>   else
>   return;
> 
> @@ -574,11 +578,32 @@ handle_hotplug_msg(char *data, int size)
>   if (strcmp(subsystem, "net") != 0)
>   return;
>   }
> - if (subsystem && interface)
> + else if (!strcmp(cur, "DEVPATH_OLD")) {
> + interface_old = strrchr(sep + 1, '/');
> + if (interface_old)
> + interface_old++;
> + }
> + }
> +
> + if (subsystem && interface) {
> + if (move && interface_old)
> + goto move;
> + else
>   goto found;
>   }
> +
>   return;
> 
> +move:
> + dev = device_find(interface_old);
> + if (!dev)
> + goto found;
> +
> + if (dev->type != _device_type)
> + goto found;
> +
> + device_set_present(dev, false);
> +
> found:
>   dev = device_find(interface);
>   if (!dev)
> 


I’m a little unclear about how all of this would work.

We have a platform where the kernel always detects certain devices (mostly i210 
and i350 Intel NICs) in the wrong order, so early on (S19) we run an init.d 
script which looks at their PCI bus information and then depending on whether 
it matches the pattern of the devices which get mis-numbered, we do the 
following:

ip link set eth0 name _eth0
ip link set eth1 name _eth1
...
ip link set eth7 name _eth7

ip link set _eth7 name eth0
ip link set _eth6 name eth1
...
ip link set _eth0 name eth7

so it seems to me that your logic would get confused by the “old” instance of 
“eth0” and the new one.

Am I missing anything?

And yes, we do this as a work-around to not having udev rules to handle the 
naming for us.

-Philip


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Updating Perl to 5.26.1

2017-09-28 Thread Philip Prindeville

> On Sep 28, 2017, at 4:04 PM, Russell Senior  wrote:
> 
>> "Philip" == Philip Prindeville  
>> writes:
> 
> Philip> Hi.  I’m trying to update Perl from 5.24.1 to 5.26.1 but running
> Philip> into some issues.
> 
> Philip> We don’t use ./Configure to build the target versions (just the
> Philip> host version), so when new settings are added, we need to figure
> Philip> out what they are… and what the appropriate settings are for all
> Philip> processors.
> 
> Philip> And word is from upstream that 5.28.1 will have even more stuff
> Philip> that we need to add to get it to build.
> 
> Philip> Wondering if there isn’t an easier way to figure out
> Philip> automatically what those settings should be.
> 
> Philip> Obviously we can’t compile and run for other platforms, but we
> Philip> can compile and extract information from those images (with
> Philip> objdump, nm, etc).
> 
> Philip> A lot of the tests that get run during Configure (grep ‘$run
> Philip> ./try’ Configure) are run just to dump out information about the
> Philip> result of compilation… most of which could also be extracted
> Philip> just by examining the generated object (such as with objdump
> Philip> -d).
> 
> Philip> Anyone have any suggestions for things we can try to make
> Philip> ./Configure work for cross-compiles as well?
> 
> Philip> Because doing version updates seems to involve a fair amount of
> Philip> guesswork about what the correct values are for a whole gamut of
> Philip> platforms, and this seems error-prone.
> 
> A long time ago, I tracked down a bug in the perl builds on a brcm47xx
> device by installing a native toolchain in an nfs-mounted rootfs and,
> over about 24 hours, running the auto configuration script on the target
> device.
> 
> I have no idea if the situation has improved since then, maybe 10 years
> ago.
> 


That sounds about as fun as spinning up a Qemu in the makefile and running 
configure inside that…

-Philip



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Updating Perl to 5.26.1

2017-09-28 Thread Russell Senior
> "Philip" == Philip Prindeville  
> writes:

Philip> Hi.  I’m trying to update Perl from 5.24.1 to 5.26.1 but running
Philip> into some issues.

Philip> We don’t use ./Configure to build the target versions (just the
Philip> host version), so when new settings are added, we need to figure
Philip> out what they are… and what the appropriate settings are for all
Philip> processors.

Philip> And word is from upstream that 5.28.1 will have even more stuff
Philip> that we need to add to get it to build.

Philip> Wondering if there isn’t an easier way to figure out
Philip> automatically what those settings should be.

Philip> Obviously we can’t compile and run for other platforms, but we
Philip> can compile and extract information from those images (with
Philip> objdump, nm, etc).

Philip> A lot of the tests that get run during Configure (grep ‘$run
Philip> ./try’ Configure) are run just to dump out information about the
Philip> result of compilation… most of which could also be extracted
Philip> just by examining the generated object (such as with objdump
Philip> -d).

Philip> Anyone have any suggestions for things we can try to make
Philip> ./Configure work for cross-compiles as well?

Philip> Because doing version updates seems to involve a fair amount of
Philip> guesswork about what the correct values are for a whole gamut of
Philip> platforms, and this seems error-prone.

A long time ago, I tracked down a bug in the perl builds on a brcm47xx
device by installing a native toolchain in an nfs-mounted rootfs and,
over about 24 hours, running the auto configuration script on the target
device.

I have no idea if the situation has improved since then, maybe 10 years
ago.


-- 
Russell Senior, President
russ...@personaltelco.net

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/3] sunxi: A64: add device tree changes for A64 Ethernet

2017-09-28 Thread Hauke Mehrtens
This adds the device tree changes needed to make the GMAC stmmac driver
working for the Allwinner A64 SoCs.

Signed-off-by: Hauke Mehrtens 
---
 ...nner-sun50i-a64-Add-dt-node-for-the-sysco.patch | 33 +++
 ...nner-sun50i-a64-add-dwmac-sun8i-Ethernet-.patch | 69 ++
 ...arm64-allwinner-pine64-Enable-dwmac-sun8i.patch | 46 +++
 ...-allwinner-pine64-plus-Enable-dwmac-sun8i.patch | 38 
 ...nner-sun50i-a64-Correct-emac-register-siz.patch | 26 
 ...nner-a64-pine64-add-missing-ethernet0-ali.patch | 29 +
 6 files changed, 241 insertions(+)
 create mode 100644 
target/linux/sunxi/patches-4.9/0060-arm64-allwinner-sun50i-a64-Add-dt-node-for-the-sysco.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0061-arm64-allwinner-sun50i-a64-add-dwmac-sun8i-Ethernet-.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0062-arm64-allwinner-pine64-Enable-dwmac-sun8i.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0063-arm64-allwinner-pine64-plus-Enable-dwmac-sun8i.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0064-arm64-allwinner-sun50i-a64-Correct-emac-register-siz.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0065-arm64-allwinner-a64-pine64-add-missing-ethernet0-ali.patch

diff --git 
a/target/linux/sunxi/patches-4.9/0060-arm64-allwinner-sun50i-a64-Add-dt-node-for-the-sysco.patch
 
b/target/linux/sunxi/patches-4.9/0060-arm64-allwinner-sun50i-a64-Add-dt-node-for-the-sysco.patch
new file mode 100644
index 00..911ea49967
--- /dev/null
+++ 
b/target/linux/sunxi/patches-4.9/0060-arm64-allwinner-sun50i-a64-Add-dt-node-for-the-sysco.patch
@@ -0,0 +1,33 @@
+From 79b953605ded6a9a995040a1c8cc665127a6411a Mon Sep 17 00:00:00 2001
+From: Corentin Labbe 
+Date: Wed, 31 May 2017 09:18:45 +0200
+Subject: arm64: allwinner: sun50i-a64: Add dt node for the syscon control
+ module
+
+This patch add the dt node for the syscon register present on the
+Allwinner A64.
+
+Only two register are present in this syscon and the only one useful is
+the one dedicated to EMAC clock.
+
+Signed-off-by: Corentin Labbe 
+Signed-off-by: Maxime Ripard 
+---
+ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++
+ 1 file changed, 6 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
 b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+@@ -129,6 +129,12 @@
+   #size-cells = <1>;
+   ranges;
+ 
++  syscon: syscon@1c0 {
++  compatible = "allwinner,sun50i-a64-system-controller",
++  "syscon";
++  reg = <0x01c0 0x1000>;
++  };
++
+   mmc0: mmc@1c0f000 {
+   compatible = "allwinner,sun50i-a64-mmc";
+   reg = <0x01c0f000 0x1000>;
diff --git 
a/target/linux/sunxi/patches-4.9/0061-arm64-allwinner-sun50i-a64-add-dwmac-sun8i-Ethernet-.patch
 
b/target/linux/sunxi/patches-4.9/0061-arm64-allwinner-sun50i-a64-add-dwmac-sun8i-Ethernet-.patch
new file mode 100644
index 00..e59c3e8735
--- /dev/null
+++ 
b/target/linux/sunxi/patches-4.9/0061-arm64-allwinner-sun50i-a64-add-dwmac-sun8i-Ethernet-.patch
@@ -0,0 +1,69 @@
+From e53f67e981bcc5547857475241b3a4a066955f8c Mon Sep 17 00:00:00 2001
+From: Corentin Labbe 
+Date: Wed, 31 May 2017 09:18:46 +0200
+Subject: arm64: allwinner: sun50i-a64: add dwmac-sun8i Ethernet driver
+
+The dwmac-sun8i is an Ethernet MAC that supports 10/100/1000 Mbit
+connections. It is very similar to the device found in the Allwinner
+H3, but lacks the internal 100 Mbit PHY and its associated control
+bits.
+This adds the necessary bits to the Allwinner A64 SoC .dtsi, but keeps
+it disabled at this level.
+
+Signed-off-by: Corentin Labbe 
+Signed-off-by: Maxime Ripard 
+---
+ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 +++
+ 1 file changed, 35 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
 b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+@@ -284,6 +284,21 @@
+   bias-pull-up;
+   };
+ 
++  rmii_pins: rmii_pins {
++  pins = "PD10", "PD11", "PD13", "PD14", "PD17",
++ "PD18", "PD19", "PD20", "PD22", "PD23";
++  function = "emac";
++  drive-strength = <40>;
++  };
++
++  rgmii_pins: rgmii_pins {
++  pins = "PD8", "PD9", "PD10", "PD11", "PD12",
++ "PD13", "PD15", "PD16", "PD17", "PD18",
++ "PD19", "PD20", "PD21", "PD22", "PD23";
++  function = 

[LEDE-DEV] [PATCH 3/3] sunxi: H3: add device tree changes for H3 Ethernet

2017-09-28 Thread Hauke Mehrtens
This adds the device tree changes needed to make the GMAC stmmac driver
working for the Allwinner H3 SoCs.

Signed-off-by: Hauke Mehrtens 
---
 ...unxi-h3-h5-Add-dt-node-for-the-syscon-con.patch | 32 +++
 ...unxi-h3-h5-add-dwmac-sun8i-ethernet-drive.patch | 67 ++
 ...2-arm-sun8i-orangepi-2-Enable-dwmac-sun8i.patch | 40 +
 ...RM-sun8i-orangepi-plus-Enable-dwmac-sun8i.patch | 64 +
 ...ts-sunxi-h3-h5-Correct-emac-register-size.patch | 26 +
 5 files changed, 229 insertions(+)
 create mode 100644 
target/linux/sunxi/patches-4.9/0070-arm-sun8i-sunxi-h3-h5-Add-dt-node-for-the-syscon-con.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0071-arm-sun8i-sunxi-h3-h5-add-dwmac-sun8i-ethernet-drive.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0072-arm-sun8i-orangepi-2-Enable-dwmac-sun8i.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0073-ARM-sun8i-orangepi-plus-Enable-dwmac-sun8i.patch
 create mode 100644 
target/linux/sunxi/patches-4.9/0074-ARM-dts-sunxi-h3-h5-Correct-emac-register-size.patch

diff --git 
a/target/linux/sunxi/patches-4.9/0070-arm-sun8i-sunxi-h3-h5-Add-dt-node-for-the-syscon-con.patch
 
b/target/linux/sunxi/patches-4.9/0070-arm-sun8i-sunxi-h3-h5-Add-dt-node-for-the-syscon-con.patch
new file mode 100644
index 00..88d431d319
--- /dev/null
+++ 
b/target/linux/sunxi/patches-4.9/0070-arm-sun8i-sunxi-h3-h5-Add-dt-node-for-the-syscon-con.patch
@@ -0,0 +1,32 @@
+From d91d3daf5de90e0118227d8ddcb7bb4ff40c1b91 Mon Sep 17 00:00:00 2001
+From: Corentin Labbe 
+Date: Wed, 31 May 2017 09:18:37 +0200
+Subject: arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module
+
+This patch add the dt node for the syscon register present on the
+Allwinner H3/H5
+
+Only two register are present in this syscon and the only one useful is
+the one dedicated to EMAC clock..
+
+Signed-off-by: Corentin Labbe 
+Signed-off-by: Maxime Ripard 
+---
+ arch/arm/boot/dts/sunxi-h3-h5.dtsi | 6 ++
+ 1 file changed, 6 insertions(+)
+
+--- a/arch/arm/boot/dts/sun8i-h3.dtsi
 b/arch/arm/boot/dts/sun8i-h3.dtsi
+@@ -140,6 +140,12 @@
+   #size-cells = <1>;
+   ranges;
+ 
++  syscon: syscon@1c0 {
++  compatible = "allwinner,sun8i-h3-system-controller",
++  "syscon";
++  reg = <0x01c0 0x1000>;
++  };
++
+   dma: dma-controller@01c02000 {
+   compatible = "allwinner,sun8i-h3-dma";
+   reg = <0x01c02000 0x1000>;
diff --git 
a/target/linux/sunxi/patches-4.9/0071-arm-sun8i-sunxi-h3-h5-add-dwmac-sun8i-ethernet-drive.patch
 
b/target/linux/sunxi/patches-4.9/0071-arm-sun8i-sunxi-h3-h5-add-dwmac-sun8i-ethernet-drive.patch
new file mode 100644
index 00..7054e3dc0f
--- /dev/null
+++ 
b/target/linux/sunxi/patches-4.9/0071-arm-sun8i-sunxi-h3-h5-add-dwmac-sun8i-ethernet-drive.patch
@@ -0,0 +1,67 @@
+From 0eba511a3cac29d6338b22b5b727f40cf8d163df Mon Sep 17 00:00:00 2001
+From: Corentin Labbe 
+Date: Wed, 31 May 2017 09:18:38 +0200
+Subject: arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver
+
+The dwmac-sun8i is an ethernet MAC hardware that support 10/100/1000
+speed.
+
+This patch enable the dwmac-sun8i on Allwinner H3/H5 SoC Device-tree.
+SoC H3/H5 have an internal PHY, so optionals syscon and ephy are set.
+
+Signed-off-by: Corentin Labbe 
+Signed-off-by: Maxime Ripard 
+---
+ arch/arm/boot/dts/sunxi-h3-h5.dtsi | 34 ++
+ 1 file changed, 34 insertions(+)
+
+--- a/arch/arm/boot/dts/sun8i-h3.dtsi
 b/arch/arm/boot/dts/sun8i-h3.dtsi
+@@ -333,6 +333,14 @@
+   interrupt-controller;
+   #interrupt-cells = <3>;
+ 
++  emac_rgmii_pins: emac0 {
++  pins = "PD0", "PD1", "PD2", "PD3", "PD4",
++ "PD5", "PD7", "PD8", "PD9", "PD10",
++ "PD12", "PD13", "PD15", "PD16", "PD17";
++  function = "emac";
++  drive-strength = <40>;
++  };
++
+   i2c0_pins: i2c0 {
+   allwinner,pins = "PA11", "PA12";
+   allwinner,function = "i2c0";
+@@ -431,6 +439,32 @@
+   clocks = <>;
+   };
+ 
++  emac: ethernet@1c3 {
++  compatible = "allwinner,sun8i-h3-emac";
++  syscon = <>;
++  reg = <0x01c3 0x104>;
++  interrupts = ;
++  interrupt-names = "macirq";
++  resets = < RST_BUS_EMAC>;
++  

[LEDE-DEV] Updating Perl to 5.26.1

2017-09-28 Thread Philip Prindeville
Hi.

I’m trying to update Perl from 5.24.1 to 5.26.1 but running into some issues.

We don’t use ./Configure to build the target versions (just the host version), 
so when new settings are added, we need to figure out what they are… and what 
the appropriate settings are for all processors.

And word is from upstream that 5.28.1 will have even more stuff that we need to 
add to get it to build.

Wondering if there isn’t an easier way to figure out automatically what those 
settings should be.

Obviously we can’t compile and run for other platforms, but we can compile and 
extract information from those images (with objdump, nm, etc).

A lot of the tests that get run during Configure (grep ‘$run ./try’ Configure) 
are run just to dump out information about the result of compilation… most of 
which could also be extracted just by examining the generated object (such as 
with objdump -d).

Anyone have any suggestions for things we can try to make ./Configure work for 
cross-compiles as well?

Because doing version updates seems to involve a fair amount of guesswork about 
what the correct values are for a whole gamut of platforms, and this seems 
error-prone.

Thanks,

-Philip


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/3] Remove ttl==255 restriction for queries

2017-09-28 Thread Philip Prindeville


> On Sep 28, 2017, at 2:32 PM, Christian Lamparter  
> wrote:
> 
>> On Thursday, September 28, 2017 1:36:52 PM CEST Philip Prindeville wrote:
>> Why was this test there and equally why are we removing it?
> I guess it was there so umdns would ignore any forwarded mdns?
> This would stop two mDNS reflectors to ping-pong each other. 
> The avahi-daemon manpages speaks about this in:
> 
> 

So why remove it in that case?


> 
> Regards,
> Christian
> 
>> 
>>> On Sep 28, 2017, at 1:09 AM, Philipp Meier  
>>> wrote:
>>> 
>>> Signed-off-by: Philipp Meier 
>>> ---
>>> interface.c | 6 --
>>> 1 file changed, 6 deletions(-)
>>> 
>>> diff --git a/interface.c b/interface.c
>>> index 3904c89..7f814d2 100644
>>> --- a/interface.c
>>> +++ b/interface.c
>>> @@ -233,9 +233,6 @@ read_socket4(struct uloop_fd *u, unsigned int events)
>>>   }
>>>   }
>>> 
>>> -if (ttl != 255)
>>> -return;
>>> -
>>>   if (debug > 1) {
>>>   char buf[256];
>>> 
>>> @@ -310,9 +307,6 @@ read_socket6(struct uloop_fd *u, unsigned int events)
>>>   }
>>>   }
>>> 
>>> -if (ttl != 255)
>>> -return;
>>> -
>>>   if (debug > 1) {
>>>   char buf[256];
>>> 
>> 
>> 
>> ___
>> Lede-dev mailing list
>> Lede-dev@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
>> 
> 
> 


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/3] Remove ttl==255 restriction for queries

2017-09-28 Thread Christian Lamparter via Lede-dev
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
On Thursday, September 28, 2017 1:36:52 PM CEST Philip Prindeville wrote:
> Why was this test there and equally why are we removing it?
I guess it was there so umdns would ignore any forwarded mdns?
This would stop two mDNS reflectors to ping-pong each other. 
The avahi-daemon manpages speaks about this in:



Regards,
Christian

> 
> > On Sep 28, 2017, at 1:09 AM, Philipp Meier  
> > wrote:
> > 
> > Signed-off-by: Philipp Meier 
> > ---
> > interface.c | 6 --
> > 1 file changed, 6 deletions(-)
> > 
> > diff --git a/interface.c b/interface.c
> > index 3904c89..7f814d2 100644
> > --- a/interface.c
> > +++ b/interface.c
> > @@ -233,9 +233,6 @@ read_socket4(struct uloop_fd *u, unsigned int events)
> >}
> >}
> > 
> > -if (ttl != 255)
> > -return;
> > -
> >if (debug > 1) {
> >char buf[256];
> > 
> > @@ -310,9 +307,6 @@ read_socket6(struct uloop_fd *u, unsigned int events)
> >}
> >}
> > 
> > -if (ttl != 255)
> > -return;
> > -
> >if (debug > 1) {
> >char buf[256];
> > 
> 
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 



--- End Message ---
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/3] Remove ttl==255 restriction for queries

2017-09-28 Thread Philip Prindeville
Why was this test there and equally why are we removing it?

> On Sep 28, 2017, at 1:09 AM, Philipp Meier  wrote:
> 
> Signed-off-by: Philipp Meier 
> ---
> interface.c | 6 --
> 1 file changed, 6 deletions(-)
> 
> diff --git a/interface.c b/interface.c
> index 3904c89..7f814d2 100644
> --- a/interface.c
> +++ b/interface.c
> @@ -233,9 +233,6 @@ read_socket4(struct uloop_fd *u, unsigned int events)
>}
>}
> 
> -if (ttl != 255)
> -return;
> -
>if (debug > 1) {
>char buf[256];
> 
> @@ -310,9 +307,6 @@ read_socket6(struct uloop_fd *u, unsigned int events)
>}
>}
> 
> -if (ttl != 255)
> -return;
> -
>if (debug > 1) {
>char buf[256];
> 
> -- 
> 2.7.4
> 
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 3/3] Add debug output for service_timeout

2017-09-28 Thread Philip Prindeville
Inline

Sent from my iPhone
> On Sep 28, 2017, at 1:09 AM, Philipp Meier  wrote:
> 
> Signed-off-by: Philipp Meier 
> ---
> service.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/service.c b/service.c
> index 0a9e25d..97b6f91 100644
> --- a/service.c
> +++ b/service.c
> @@ -121,8 +121,10 @@ service_timeout(struct service *s)
> {
>time_t t = monotonic_time();
> 
> -if (t - s->t <= TOUT_LOOKUP)
> +if (t - s->t <= TOUT_LOOKUP) {
> +DBG(2, "t=%lu, s->t=%lu, t - s->t = %lu\n", t, s->t, t - s->t);

Do you need to write "t - s->t" or would "elapsed", "remaining", or even 
"delta" be more descriptive?


>return 0;
> +}
> 
>return t;
> }
> -- 
> 2.7.4
> 


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] LEDE Reboot SNAPSHOT r4940-00e9a7a lantiq fails to connect to DSL

2017-09-28 Thread Mauro Mozzarelli
From r4940-00e9a7a release, just built, BT Home Hub 5 router fails to 
connect to dsl at boot.



After issuing:

# /etc/init.d/dsl_control stop

and then

# /etc/init.d/dsl_control start

It will reconnect eventually, but it won't automatically after a reboot.

I have seen a lantiq patch coming through git, so this issue might be 
related to the latest changes.



Hardware: BT Home Hub 5


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] Fix NULL pointer dereferece in at803x_link_change_notify()

2017-09-28 Thread Andrey Jr. Melnikov
Hello.

Fix NULL pointer dereferece in at803x_link_change_notify().

Signed-Off-by: "Andrey Jr. Melnikov" 

--

diff --git 
a/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch 
b/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch
index 2244f882e7..efc8502bcd 100644
--- a/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch
+++ b/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau 
 */
if (phydev->state == PHY_NOLINK) {
 -  if (priv->gpiod_reset && !priv->phy_reset) {
-+  if ((priv->gpiod_reset || pdata->has_reset_gpio) &&
++  if ((priv->gpiod_reset || (pdata && pdata->has_reset_gpio)) &&
 +  !priv->phy_reset) {
struct at803x_context context;
  
@@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau 
 -  msleep(1);
 -  gpiod_set_value(priv->gpiod_reset, 0);
 -  msleep(1);
-+  if (pdata->has_reset_gpio) {
++  if (pdata && pdata->has_reset_gpio) {
 +  gpio_set_value_cansleep(pdata->reset_gpio, 0);
 +  msleep(1);
 +  gpio_set_value_cansleep(pdata->reset_gpio, 1);
diff --git a/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch b/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch
index 2244f882e7..efc8502bcd 100644
--- a/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch
+++ b/target/linux/ar71xx/patches-4.4/902-at803x-add-reset-gpio-pdata.patch
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau 
  	 */
  	if (phydev->state == PHY_NOLINK) {
 -		if (priv->gpiod_reset && !priv->phy_reset) {
-+		if ((priv->gpiod_reset || pdata->has_reset_gpio) &&
++		if ((priv->gpiod_reset || (pdata && pdata->has_reset_gpio)) &&
 +		!priv->phy_reset) {
  			struct at803x_context context;
  
@@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau 
 -			msleep(1);
 -			gpiod_set_value(priv->gpiod_reset, 0);
 -			msleep(1);
-+			if (pdata->has_reset_gpio) {
++			if (pdata && pdata->has_reset_gpio) {
 +gpio_set_value_cansleep(pdata->reset_gpio, 0);
 +msleep(1);
 +gpio_set_value_cansleep(pdata->reset_gpio, 1);
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] kernel: update 4.4 to 4.4.89

2017-09-28 Thread Kevin Darbyshire-Bryant
Refresh patches.
Compile & run tested on ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/kernel-version.mk  |  4 ++--
 ...alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |  2 +-
 ...w-rejecting-with-source-address-failed-policy.patch | 18 +-
 ...y-provide-a-hook-for-link-up-link-down-events.patch | 18 +-
 4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 0422c20..3d32017 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,11 +3,11 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .71
-LINUX_VERSION-4.4 = .88
+LINUX_VERSION-4.4 = .89
 LINUX_VERSION-4.9 = .52
 
 LINUX_KERNEL_HASH-3.18.71 = 
5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
-LINUX_KERNEL_HASH-4.4.88 = 
144fe8dd773ec317fa06109b8d7bd04141bf1941daa03799fb4f437919b4
+LINUX_KERNEL_HASH-4.4.89 = 
a81d1b1306e4fddee5d6f7219090a616073b02f4069e44522a9c0454b17f2b67
 LINUX_KERNEL_HASH-4.9.52 = 
ffdd034f1bf32fa41d1a66a347388c0dc4c3cff6f578a1e29d88b20fbae1048a
 
 ifdef KERNEL_PATCHVER
diff --git 
a/target/linux/generic/pending-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
 
b/target/linux/generic/pending-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
index 304cb87..6c9b12c 100644
--- 
a/target/linux/generic/pending-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
+++ 
b/target/linux/generic/pending-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -75,7 +75,7 @@ Signed-off-by: Tobias Wolf 
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -5345,7 +5345,7 @@ static void __init_refok alloc_node_mem_
+@@ -5357,7 +5357,7 @@ static void __init_refok alloc_node_mem_
mem_map = NODE_DATA(0)->node_mem_map;
  #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
diff --git 
a/target/linux/generic/pending-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
 
b/target/linux/generic/pending-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
index c6c65d9..c5f3e19 100644
--- 
a/target/linux/generic/pending-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
+++ 
b/target/linux/generic/pending-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
@@ -143,7 +143,7 @@ Signed-off-by: Jonas Gorski 
  static const struct rt6_info ip6_blk_hole_entry_template = {
.dst = {
.__refcnt   = ATOMIC_INIT(1),
-@@ -1889,6 +1906,11 @@ static struct rt6_info *ip6_route_info_c
+@@ -1898,6 +1915,11 @@ static struct rt6_info *ip6_route_info_c
rt->dst.output = ip6_pkt_prohibit_out;
rt->dst.input = ip6_pkt_prohibit;
break;
@@ -155,7 +155,7 @@ Signed-off-by: Jonas Gorski 
case RTN_THROW:
case RTN_UNREACHABLE:
default:
-@@ -2492,6 +2514,17 @@ static int ip6_pkt_prohibit_out(struct n
+@@ -2501,6 +2523,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, 
IPSTATS_MIB_OUTNOROUTES);
  }
  
@@ -173,7 +173,7 @@ Signed-off-by: Jonas Gorski 
  /*
   *Allocate a dst for local (unicast / anycast) address.
   */
-@@ -2734,7 +2767,8 @@ static int rtm_to_fib6_config(struct sk_
+@@ -2743,7 +2776,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT ||
@@ -183,7 +183,7 @@ Signed-off-by: Jonas Gorski 
cfg->fc_flags |= RTF_REJECT;
  
if (rtm->rtm_type == RTN_LOCAL)
-@@ -3087,6 +3121,9 @@ static int rt6_fill_node(struct net *net
+@@ -3096,6 +3130,9 @@ static int rt6_fill_node(struct net *net
case -EACCES:
rtm->rtm_type = RTN_PROHIBIT;
break;
@@ -193,7 +193,7 @@ Signed-off-by: Jonas Gorski 
case -EAGAIN:
rtm->rtm_type = RTN_THROW;
break;
-@@ -3366,6 +3403,8 @@ static int ip6_route_dev_notify(struct n
+@@ -3375,6 +3412,8 @@ static int ip6_route_dev_notify(struct n
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski 
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  #endif
-@@ -3588,6 +3627,17 @@ static int __net_init ip6_route_net_init
+@@ -3597,6 +3636,17 @@ static int __net_init ip6_route_net_init
   

[LEDE-DEV] [PATCH netifd] system-linux: add support for hotplug event 'move'

2017-09-28 Thread Martin Schiller
If you rename a network interface, there is a move uevent
invoked instead of remove/add.

This patch adds support for this kind of event.

Signed-off-by: Martin Schiller 
---
 system-linux.c | 31 ---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/system-linux.c b/system-linux.c
index 6d97a02..e2017d0 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -543,16 +543,20 @@ out:
 static void
 handle_hotplug_msg(char *data, int size)
 {
-   const char *subsystem = NULL, *interface = NULL;
+   const char *subsystem = NULL, *interface = NULL, *interface_old = NULL;
char *cur, *end, *sep;
struct device *dev;
int skip;
-   bool add;
+   bool add, move = false;
 
if (!strncmp(data, "add@", 4))
add = true;
else if (!strncmp(data, "remove@", 7))
add = false;
+   else if (!strncmp(data, "move@", 5)) {
+   add = true;
+   move = true;
+   }
else
return;
 
@@ -574,11 +578,32 @@ handle_hotplug_msg(char *data, int size)
if (strcmp(subsystem, "net") != 0)
return;
}
-   if (subsystem && interface)
+   else if (!strcmp(cur, "DEVPATH_OLD")) {
+   interface_old = strrchr(sep + 1, '/');
+   if (interface_old)
+   interface_old++;
+   }
+   }
+
+   if (subsystem && interface) {
+   if (move && interface_old)
+   goto move;
+   else
goto found;
}
+
return;
 
+move:
+   dev = device_find(interface_old);
+   if (!dev)
+   goto found;
+
+   if (dev->type != _device_type)
+   goto found;
+
+   device_set_present(dev, false);
+
 found:
dev = device_find(interface);
if (!dev)
-- 
2.11.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] umdns: Remove incorrect comma in http service json config

2017-09-28 Thread John Crispin



On 28/09/17 09:42, Philipp Meier wrote:



On 26/09/17 10:55, Philipp Meier wrote:

Remove trailing comma in http service json configuration file

Signed-off-by: Philipp Meier 
---
json/http.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/json/http.json b/json/http.json
index cf60532..2a7b50a 100644
--- a/json/http.json
+++ b/json/http.json
@@ -1,3 +1,3 @@
{
-"http_80": { "service": "_http._tcp.local", "port": 80, 
"txt": [ "foo=bar"] },
+"http_80": { "service": "_http._tcp.local", "port": 80, 
"txt": [ "foo=bar"] }

}
--
2.7.4

Hi Philipp,

your mail client chewed up all tabs and replaced them with spaces on 
patches that you sent. please resend them using git send-email.


 John

Hi John,

I resent all 3 patches for umdns using git send-email as you 
requested for the http.json minor fix.
I have seen that the subject now misses the "umdns: ...". If this is 
a problem please tell me.


Philipp

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Hi John,

would it help you if I resend the patch mails once again with better 
subject ("umdns: " in front of subject line) and not as series of 
patch but as 3 single patch mails?


Philipp

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

i've already merged them
    John

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] umdns: Remove incorrect comma in http service json config

2017-09-28 Thread Philipp Meier



On 26/09/17 10:55, Philipp Meier wrote:

Remove trailing comma in http service json configuration file

Signed-off-by: Philipp Meier 
---
json/http.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/json/http.json b/json/http.json
index cf60532..2a7b50a 100644
--- a/json/http.json
+++ b/json/http.json
@@ -1,3 +1,3 @@
{
-"http_80": { "service": "_http._tcp.local", "port": 80, 
"txt": [ "foo=bar"] },
+"http_80": { "service": "_http._tcp.local", "port": 80, 
"txt": [ "foo=bar"] }

}
--
2.7.4

Hi Philipp,

your mail client chewed up all tabs and replaced them with spaces on 
patches that you sent. please resend them using git send-email.


 John

Hi John,

I resent all 3 patches for umdns using git send-email as you requested 
for the http.json minor fix.
I have seen that the subject now misses the "umdns: ...". If this is a 
problem please tell me.


Philipp

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Hi John,

would it help you if I resend the patch mails once again with better 
subject ("umdns: " in front of subject line) and not as series of patch 
but as 3 single patch mails?


Philipp

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] umdns: Remove incorrect comma in http service json config

2017-09-28 Thread Philipp Meier



On 26/09/17 10:55, Philipp Meier wrote:

Remove trailing comma in http service json configuration file

Signed-off-by: Philipp Meier 
---
json/http.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/json/http.json b/json/http.json
index cf60532..2a7b50a 100644
--- a/json/http.json
+++ b/json/http.json
@@ -1,3 +1,3 @@
{
-"http_80": { "service": "_http._tcp.local", "port": 80, 
"txt": [ "foo=bar"] },
+"http_80": { "service": "_http._tcp.local", "port": 80, 
"txt": [ "foo=bar"] }

}
--
2.7.4

Hi Philipp,

your mail client chewed up all tabs and replaced them with spaces on 
patches that you sent. please resend them using git send-email.


     John

Hi John,

I resent all 3 patches for umdns using git send-email as you requested 
for the http.json minor fix.
I have seen that the subject now misses the "umdns: ...". If this is a 
problem please tell me.


Philipp

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 3/3] Add debug output for service_timeout

2017-09-28 Thread Philipp Meier
Signed-off-by: Philipp Meier 
---
 service.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/service.c b/service.c
index 0a9e25d..97b6f91 100644
--- a/service.c
+++ b/service.c
@@ -121,8 +121,10 @@ service_timeout(struct service *s)
 {
time_t t = monotonic_time();
 
-   if (t - s->t <= TOUT_LOOKUP)
+   if (t - s->t <= TOUT_LOOKUP) {
+   DBG(2, "t=%lu, s->t=%lu, t - s->t = %lu\n", t, s->t, t - s->t);
return 0;
+   }
 
return t;
 }
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/3] Remove ttl==255 restriction for queries

2017-09-28 Thread Philipp Meier
Signed-off-by: Philipp Meier 
---
 interface.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/interface.c b/interface.c
index 3904c89..7f814d2 100644
--- a/interface.c
+++ b/interface.c
@@ -233,9 +233,6 @@ read_socket4(struct uloop_fd *u, unsigned int events)
}
}
 
-   if (ttl != 255)
-   return;
-
if (debug > 1) {
char buf[256];
 
@@ -310,9 +307,6 @@ read_socket6(struct uloop_fd *u, unsigned int events)
}
}
 
-   if (ttl != 255)
-   return;
-
if (debug > 1) {
char buf[256];
 
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/3] Remove incorrect comma in http service json config

2017-09-28 Thread Philipp Meier
Signed-off-by: Philipp Meier 
---
 json/http.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/json/http.json b/json/http.json
index cf60532..2a7b50a 100644
--- a/json/http.json
+++ b/json/http.json
@@ -1,3 +1,3 @@
 {
-   "http_80": { "service": "_http._tcp.local", "port": 80, "txt": [ 
"foo=bar"] },
+   "http_80": { "service": "_http._tcp.local", "port": 80, "txt": [ 
"foo=bar"] }
 }
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev