Re: [OpenWrt-Devel] [PATCH] [package] uboot-env: fix spurious esac within ramips uci-defaults
Hi Alexander, On Mon, Aug 19, 2013 at 05:21:38AM +0200, Alexander Couzens wrote: Signed-off-by: Alexander Couzens lyn...@fe80.eu --- package/boot/uboot-envtools/files/ramips | 2 -- 1 file changed, 2 deletions(-) Applied in r37814. Don't forget to bump PKG_RELEASE next time. Thank you. Luka ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v3] [packages] AllJoyn: New Package (updated)
I'm curious if anyone has had the opportunity to look at this version of the patch to add AllJoyn to OpenWrt? We are still interested seeing thist added to OpenWrt and will continue to support this package. Thanks, Steve On Tue, 2013-08-06 at 10:53 -0700, Steve Kinneberg wrote: from: AllJoyn Project (Qualcomm Innovation Center, Inc.) maintain...@alljoyn.org Add AllJoyn v. 3.3.2 as a new package to OpenWrt. AllJoyn is a peer-to-peer networking technology. Project details can be found at http://www.alljoyn.org. Signed-off-by: Steve Kinneberg ste...@quicinc.com --- This includes patches to fix building on MacOS. Index: package/network/services/alljoyn/files/alljoyn.init === --- package/network/services/alljoyn/files/alljoyn.init (revision 0) +++ package/network/services/alljoyn/files/alljoyn.init (working copy) @@ -0,0 +1,224 @@ +#!/bin/sh /etc/rc.common + +# Copyright (C) 2013 Qualcomm Innovation Center, Inc. +# +#Licensed under the Apache License, Version 2.0 (the License); +#you may not use this file except in compliance with the License. +#You may obtain a copy of the License at +# +#http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an AS IS BASIS, +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +#See the License for the specific language governing permissions and +#limitations under the License. +# + +START=65 + +SERVICE_PID_FILE=/var/run/alljoyn.pid + +CONFIGFILE=/var/etc/alljoyn.conf + + +check() { +local flag + +config_get_bool flag $1 $2 0 + +test $flag == 1 +return $? +} + + +process_network() { +local network=$1 +local var=$2 +local ifname + +config_get ifname $network ifname +if [ -n $ifname ]; then + append ${var} ${ifname} , +fi +} + +process_networks() { +local section=$1 + +if check $section all_networks; then + export ${section}_networks=* +else + config_list_foreach $section networks process_network ${section}_networks + + if [ $section == ip ]; then + # special case IP until multiple interfaces are properly supported for IP + local len + config_get len ip networks_LENGTH + + if [ $len == 1 ]; then + local network + config_get network ip networks_ITEM1 + config_get addr $network ipaddr + fi + fi +fi +} + + +process_unix_transport() { +if check unix enable; then + local path + local abstract + + + config_get path unix path alljoyn + config_get_bool abstract unix abstract 1 + + if [ -n $abstract ]; then + path=abstract=$path + else + path=path=$path + fi + export ${NO_EXPORT:+-n} listen_specs=${listen_specs} + listenunix:${path}/listen + + config_get unix_auth_timeout unix auth_timeout $unix_auth_timeout +fi +} + + +process_ip_transport() { +if check ip enable; then + local port + local addr=0.0.0.0 + + if check ip advertise_daemon; then + export ${NO_EXPORT:+-n} ip_advertise_daemon=tcp +property router_advertisement_prefix=\org.alljoyn.BusNode.\/ + /tcp + fi + + process_networks ip + + config_get port ip bus_port 9955 + + export ${NO_EXPORT:+-n} listen_specs=${listen_specs} + listentcp:addr=${addr},port=${port}/listen + + config_get ip_max_incomplete_conn ip max_incomplete_conn $ip_max_incomplete_conn + config_get ip_max_complete_conn ip max_complete_conn $ip_max_complete_conn + config_get ip_auth_timeout ip auth_timeout $ip_auth_timeout +fi +} + + +process_ice_transport() { +if check ice enable; then + local url + local addrport + local proto + + export ${NO_EXPORT:+-n} listen_specs=${listen_specs} + listenice:/listen + + process_networks ice + + config_get url ice server + + proto=${url%%:*} + addrport=${url##${proto}://} + + export ice_server=${addrport%:*} + + if [ $proto == http ]; then + export ice_protocol=HTTP + else + export ice_protocol=HTTPS + fi + + + config_get ice_max_incomplete_conn ice max_incomplete_conn $ice_max_incomplete_conn + config_get ice_max_complete_conn ice max_complete_conn $ice_max_complete_conn + config_get ice_auth_timeout ice auth_timeout $ice_auth_timeout +fi +} + + +process_bluetooth_transport() { +if check bluetooth enable; then + export ${NO_EXPORT:+-n} listen_specs=${listen_specs} + listenbluetooth:/listen +fi +} + + +generate_conf_file() { +local listen_specs= + +local unix_auth_timeout=5000 + +local ip_max_incomplete_conn=16
Re: [OpenWrt-Devel] [RFC][PATCH 2/2] bgmac: pass received packet to the netif instead of copying it
2013/8/19 Felix Fietkau n...@openwrt.org: On 2013-08-15 10:21 PM, Rafał Miłecki wrote: I'm afraid this perf top output doesn't really tell us where to look for optimizations :| I'll still try Felix ideas tomorrow, but I'm not sure if they help, since there isn't __copy_user_common anymore in the perf top output... What's the CPU load while passing traffic without running perf? During ping 192.168.5.1 # top Mem: 19564K used, 107076K free, 0K shrd, 0K buff, 12916K cached CPU: 0% usr 0% sys 0% nic 99% idle 0% io 0% irq 0% sirq Load average: 0.17 0.10 0.04 1/24 810 # perf top PerfTop: 261 irqs/sec kernel:100.0% exact: 0.0% [4000Hz cycles], (all, 1 CPU) --- 64.21% [kernel] [k] arch_cpu_idle 16.38% [kernel] [k] arch_local_irq_restore 12.01% [kernel] [k] cpu_startup_entry 2.16% [kernel] [k] rcu_idle_exit During iperf -c 192.168.5.1 # top Mem: 19572K used, 107068K free, 0K shrd, 0K buff, 12916K cached CPU: 0% usr 0% sys 0% nic 3% idle 0% io 0% irq 96% sirq Load average: 0.29 0.11 0.04 1/24 809 PID PPID USER STAT VSZ %VSZ %CPU COMMAND 3 2 root RW 0 0% 9% [ksoftirqd/0] 809 376 root R 1496 1% 2% top 716 1 nobody S 964 1% 1% /usr/sbin/dnsmasq -C /var/etc/dnsmasq # perf top PerfTop: 265 irqs/sec kernel:100.0% exact: 0.0% [4000Hz cycles], (all, 1 CPU) --- 6.41% [ip_tables] [k] ipt_do_table 4.01% [bgmac] [k] 0x06ec 3.43% [kernel] [k] arch_cpu_idle 3.30% [kernel] [k] arch_local_irq_restore 3.25% [kernel] [k] ip_rcv 3.11% [nf_conntrack] [k] nf_conntrack_proto_fini 3.11% [nf_conntrack] [k] nf_conntrack_in Have you tested bridging performance? Do you mean connecting both machines to the same VLAN? Like 2 LAN ports in the standard configuration? It gives me ~600Mb/s using OpenWrt. It's pretty much the same performance I got with the original firmware for transfer between 2 VLANs. [ 5] local 192.168.1.218 port 5001 connected with 192.168.1.131 port 59463 [ 5] 0.0-60.0 sec 4.16 GBytes 596 Mbits/sec -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Question About Interfacing with UCI
Hello all. I'm developing a custom package that I would like to interface with UCI. That is, I would like to have a config file in /etc/config/ that configures my custom package which can be changed via the command line, LuCI, or a C application. Firstly, I've read through the documentation here: http://wiki.openwrt.org/doc/uci. It says UCI is also editable through various programming APIs (like Shell, Lua and C). Where can I find these APIs? Specifically the C UCI API. Secondly, I'm sort of lost about where the config files in /etc/config get parsed and applied to other applications. Eg, when I change the configuration in /etc/config/network, and do a /etc/init.d/network restart, where do these configuration values get passed such that the network is updated appropriately? I'm trying to find an existing package that does what I'm attempting to do so that I can use it as an example to go forward with my own package. Sorry about the basic question. I couldn't find help on the developers forum, so I decided to try the mailing list. If this isn't appropriate to put here, I'll refrain from doing so in the future. -- Justyn ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] if dnsmasq disable dns function, it won't send dns server setting in dhcp
My network has both ipv4 and ipv6, I use radvd to offer RA, and dnsmasq for ipv4 dhcp. My openwrt version is r37806. I want to use bind instead of dnsmasq, so I add port=0 /etc/dnsmasq.conf. Here is the contain of /var/etc/dnsmasq.conf # auto-generated config file from /etc/config/dhcp conf-file=/etc/dnsmasq.conf dhcp-authoritative domain-needed localise-queries read-ethers bogus-priv expand-hosts domain=sumomo.pri server=/sumomo.pri/ dhcp-leasefile=/tmp/dhcp.leases resolv-file=/etc/resolv.conf addn-hosts=/tmp/hosts stop-dns-rebind rebind-localhost-ok dhcp-range=lan,192.168.0.100,192.168.0.249,255.255.255.0,12h no-dhcp-interface=pppoe-wan address=/home-r0.sumomo.pri/192.168.0.1 ptr-record=1.0.168.192.in-addr.arpa,home-r0.sumomo.pri === the netstat -plaunt tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 3910/dnsmasq tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1596/dropbear tcp 0 0 192.168.0.1:22 192.168.0.3:49814 ESTABLISHED 1598/dropbear tcp 0 0 :::5000 :::* LISTEN 2073/miniupnpd tcp 0 0 :::53 :::* LISTEN 3910/dnsmasq tcp 0 0 :::22 :::* LISTEN 1596/dropbear udp 0 0 192.168.0.1:58670 0.0.0.0:* 2073/miniupnpd udp 0 0 0.0.0.0:53 0.0.0.0:* 3910/dnsmasq udp 0 0 0.0.0.0:67 0.0.0.0:* 3910/dnsmasq udp 0 0 0.0.0.0:1900 0.0.0.0:* 2073/miniupnpd udp 0 0 0.0.0.0:1194 0.0.0.0:* 1805/openvpn udp 0 0 192.168.0.1:5351 0.0.0.0:* 2073/miniupnpd udp 0 0 :::53 :::* 3910/dnsmasq udp 0 0 :::1900 :::* 2073/miniupnpd udp 0 0 :::45013 :::* 2073/miniupnpd Then I use dhclient eth0 in computer, then my resolv.conf became below == domain sumomo.pri search sumomo.pri It doesn't tell me where is the nameserver auto. If I start named then restart dnsmasq, the resullt is the same. I have to start dnsmasq with dns function then start bind9 to make both dhcp of dnsmasq and bind9 works(bind9 won't listen on 0.0.0.0:53 as dnsmasq). The result is the same in both dnsmasq and dnsmasq-dhcpv6 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] MTD tool searchs name more accurate
The mtd tool use mtd partition name to search /proc/mtd to find the real device name. Here is a bug when we named two partition names which one's name containers another one, the first one is always be hit. This fix let strstr use string mtd name plus double quotes to make matching more accurate. modified: package/system/mtd/src/mtd.c Signed-off-by: Joe Xue lg...@hotmail.com --- package/system/mtd/src/mtd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/system/mtd/src/mtd.c b/package/system/mtd/src/mtd.c index a660486..916bc63 100644 --- a/package/system/mtd/src/mtd.c +++ b/package/system/mtd/src/mtd.c @@ -63,10 +63,13 @@ int mtd_open(const char *mtd, bool block) int i; int ret; int flags = O_RDWR | O_SYNC; + char name[PATH_MAX]; + + snprintf(name, sizeof(name), \%s\, mtd); if ((fp = fopen(/proc/mtd, r))) { while (fgets(dev, sizeof(dev), fp)) { - if (sscanf(dev, mtd%d:, i) strstr(dev, mtd)) { + if (sscanf(dev, mtd%d:, i) strstr(dev, name)) { snprintf(dev, sizeof(dev), /dev/mtd%s/%d, (block ? block : ), i); if ((ret=open(dev, flags))0) { snprintf(dev, sizeof(dev), /dev/mtd%s%d, (block ? block : ), i); -- 1.8.1.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
I've also submitted this upstream. Without it, the module causes an oops on rt5350. Signed-off-by: Daniel Gimpelevich dan...@gimpelevich.san-francisco.ca.us --- .../patches-3.10/005-hso-stack-clobber-fix.patch | 56 .../patches-3.3/005-hso-stack-clobber-fix.patch| 56 .../patches-3.6/005-hso-stack-clobber-fix.patch| 56 .../patches-3.8/005-hso-stack-clobber-fix.patch| 56 .../patches-3.9/005-hso-stack-clobber-fix.patch| 56 5 files changed, 280 insertions(+) create mode 100644 target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.6/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.8/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.9/005-hso-stack-clobber-fix.patch diff --git a/target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch b/target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch new file mode 100644 index 000..3e0e7c1 --- /dev/null +++ b/target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch @@ -0,0 +1,56 @@ +diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +index cba1d46..86292e6 100644 +--- a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +@@ -2816,13 +2816,16 @@ exit: + static int hso_get_config_data(struct usb_interface *interface) + { + struct usb_device *usbdev = interface_to_usbdev(interface); +- u8 config_data[17]; ++ u8 *config_data = kmalloc(17, GFP_KERNEL); + u32 if_num = interface-altsetting-desc.bInterfaceNumber; + s32 result; + ++ if (!config_data) ++ return -ENOMEM; + if (usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), + 0x86, 0xC0, 0, 0, config_data, 17, + USB_CTRL_SET_TIMEOUT) != 0x11) { ++ kfree(config_data); + return -EIO; + } + +@@ -2873,6 +2876,7 @@ static int hso_get_config_data(struct usb_interface *interface) + if (config_data[16] 0x1) + result |= HSO_INFO_CRC_BUG; + ++ kfree(config_data); + return result; + } + +@@ -2886,6 +2890,11 @@ static int hso_probe(struct usb_interface *interface, + struct hso_shared_int *shared_int; + struct hso_device *tmp_dev = NULL; + ++ if (interface-cur_altsetting-desc.bInterfaceClass != 0xFF) { ++ dev_err(interface-dev, Not our interface\n); ++ return -ENODEV; ++ } ++ + if_num = interface-altsetting-desc.bInterfaceNumber; + + /* Get the interface/port specification from either driver_info or from +@@ -2895,10 +2904,6 @@ static int hso_probe(struct usb_interface *interface, + else + port_spec = hso_get_config_data(interface); + +- if (interface-cur_altsetting-desc.bInterfaceClass != 0xFF) { +- dev_err(interface-dev, Not our interface\n); +- return -ENODEV; +- } + /* Check if we need to switch to alt interfaces prior to port +* configuration */ + if (interface-num_altsetting 1) +-- +1.7.9.5 + diff --git a/target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch b/target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch new file mode 100644 index 000..3e0e7c1 --- /dev/null +++ b/target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch @@ -0,0 +1,56 @@ +diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +index cba1d46..86292e6 100644 +--- a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +@@ -2816,13 +2816,16 @@ exit: + static int hso_get_config_data(struct usb_interface *interface) + { + struct usb_device *usbdev = interface_to_usbdev(interface); +- u8 config_data[17]; ++ u8 *config_data = kmalloc(17, GFP_KERNEL); + u32 if_num = interface-altsetting-desc.bInterfaceNumber; + s32 result; + ++ if (!config_data) ++ return -ENOMEM; + if (usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), + 0x86, 0xC0, 0, 0, config_data, 17, + USB_CTRL_SET_TIMEOUT) != 0x11) { ++ kfree(config_data); + return -EIO; + } + +@@ -2873,6 +2876,7 @@ static int hso_get_config_data(struct usb_interface *interface) + if (config_data[16] 0x1) + result |= HSO_INFO_CRC_BUG; + ++ kfree(config_data); + return result; + } + +@@ -2886,6 +2890,11 @@ static int hso_probe(struct usb_interface *interface, + struct hso_shared_int *shared_int; + struct hso_device *tmp_dev = NULL; + ++ if (interface-cur_altsetting-desc.bInterfaceClass != 0xFF) { ++ dev_err(interface-dev, Not our interface\n); ++ return -ENODEV; ++ } ++
Re: [OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
Hi Daniel, On Mon, Aug 19, 2013 at 01:45:28PM -0700, Daniel Gimpelevich wrote: I've also submitted this upstream. Without it, the module causes an oops on rt5350. Signed-off-by: Daniel Gimpelevich dan...@gimpelevich.san-francisco.ca.us --- .../patches-3.10/005-hso-stack-clobber-fix.patch | 56 .../patches-3.3/005-hso-stack-clobber-fix.patch| 56 .../patches-3.6/005-hso-stack-clobber-fix.patch| 56 .../patches-3.8/005-hso-stack-clobber-fix.patch| 56 .../patches-3.9/005-hso-stack-clobber-fix.patch| 56 5 files changed, 280 insertions(+) create mode 100644 target/linux/generic/patches-3.10/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.3/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.6/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.8/005-hso-stack-clobber-fix.patch create mode 100644 target/linux/generic/patches-3.9/005-hso-stack-clobber-fix.patch Please update your patches with better commit message. It should also contain links to the mailing list and/or patchwork where the patch was sent (if possible of course). Also, patches inside generic should have very detailed description. This is not the case for many patches at the moment but I plan to work on this in the (near) future. Take a look at the links bellow for an example: https://dev.openwrt.org/changeset/37808 https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.10/470-mtd_m25p80_add_pm25_flash_support.patch Luka ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
On Tue, 2013-08-20 at 01:30 +0200, Luka Perkov wrote: Hi Daniel, Please update your patches with better commit message. It should also contain links to the mailing list and/or patchwork where the patch was sent (if possible of course). Also, patches inside generic should have very detailed description. This is not the case for many patches at the moment but I plan to work on this in the (near) future. Take a look at the links bellow for an example: https://dev.openwrt.org/changeset/37808 https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.10/470-mtd_m25p80_add_pm25_flash_support.patch Luka This could actually be taken straight from my upstream submission: https://patchwork.kernel.org/patch/2846700/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
On Mon, Aug 19, 2013 at 04:49:37PM -0700, Daniel Gimpelevich wrote: On Tue, 2013-08-20 at 01:30 +0200, Luka Perkov wrote: Hi Daniel, Please update your patches with better commit message. It should also contain links to the mailing list and/or patchwork where the patch was sent (if possible of course). Also, patches inside generic should have very detailed description. This is not the case for many patches at the moment but I plan to work on this in the (near) future. Take a look at the links bellow for an example: https://dev.openwrt.org/changeset/37808 https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.10/470-mtd_m25p80_add_pm25_flash_support.patch Luka This could actually be taken straight from my upstream submission: https://patchwork.kernel.org/patch/2846700/ Or you could resend the patch. Luka ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Fix arch-dependent bug in hso module
On Tue, 2013-08-20 at 02:30 +0200, Luka Perkov wrote: Or you could resend the patch. Luka I think I'll see what upstream does before I do that. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel