[OpenWrt-Devel] Understanding LEDs on WNDR3800
Hi all, I recently acquired a Netgear WNDR3800. To date I've been playing exclusively on an alix 2D13 platform so I have a few new things to learn. In any case, I've been tinkering with the LEDs and I'm having some trouble getting my head around a few things. Specifically: 1. How does one accurately control the WAN LED? /etc/config/network has this: config switch_port # Port 5 controls the configuration of the WAN LED and the # section does not correspond to a real switch port. # # To toggle the use of green or orange LEDs for the WAN port, # see the LED setting for wndr3700:green:wan in /etc/config/system. # # See the key above for switch port 1 for the meaning of the # 'led' setting below. option devicertl8366s option port5 option led2 Supposedly this controls the orange WAN LED. However, setting "option led 0" does not turn the LED off as indicated. It stops blinking but it doesn't turn off. How do I turn off the orange LED? 2. Why is the orange component of the WAN LED configured/controlled via /etc/config/network yet the wan:green LED is controlled via /etc/config/system? Is there some reason I'm not immediately understanding? Is it because the orange LED for WAN isn't listed under /sys/class/leds? This would lead me to believe that this is controlled via some different mechanism than the green LED on the hardware. config led 'led_wan' option name 'WAN LED (green)' option sysfs 'wndr3700:green:wan' option default '0' 3. Along with #2, why is the green LED pre-configured in /etc/config/system by /etc/uci-defaults/leds on first boot? The preconfiguration doesn't actually do anything. What is this for? Am I missing something? 4. The wifi adapters, ath9k-phy0 and ath9k-phy1 apparently default to the respective "phy[0|1]tpt" trigger. This also isn't in /etc/config/system. It seems to happen elsewhere, but I haven't found the place that controls this. How is this accomplished? Is this some ath9k driver default? Any input / insight would be most helpful. Thanks in advance, Adam ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/4] [package] hostapd: revamped WPS support
Enabled random per-device PSK generation for WPS clients Signed-off-by: Lorenzo Cappelletti --- diff --git a/hostapd/files/hostapd.sh b/hostapd/files/hostapd.sh --- a/hostapd/files/hostapd.sh +++ b/hostapd/files/hostapd.sh @@ -1,5 +1,6 @@ hostapd_set_wps_options() { - local config_methods device_name device_type manufacturer + local config_methods device_name device_type manufacturer\ + wpa_psk_file config_get config_methods "$vif" wps_config_methods @@ -13,6 +14,7 @@ [ -z "$config_methods" ] && return # common options + config_get ifname "$vif" ifname config_get device_type "$vif" wps_device_type "6-0050F204-1" config_get device_name "$vif" wps_device_name "OpenWrt AP" config_get manufacturer "$vif" wps_manufacturer "openwrt.org" @@ -25,6 +27,12 @@ append "$var" "manufacturer=$manufacturer" "$N" append "$var" "config_methods=$config_methods" "$N" + # enable random per-device PSK generation for WPS clients + # (file has to exists for hostapd to start) + wpa_psk_file=/var/run/hostapd-$ifname.psk + append "$var" "wpa_psk_file=$wpa_psk_file" "$N" + [ ! -e $wpa_psk_file ] && :> $wpa_psk_file + # per-method options list_contains config_methods label && { list_remove config_methods label ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/4] [package] hostapd: revamped WPS support
Added 'wps_ap_pin' option along with a default pin for 'label' method Signed-off-by: Lorenzo Cappelletti --- diff --git a/hostapd/files/hostapd.sh b/hostapd/files/hostapd.sh --- a/hostapd/files/hostapd.sh +++ b/hostapd/files/hostapd.sh @@ -35,7 +35,11 @@ # per-method options list_contains config_methods label && { + local ap_pin + list_remove config_methods label + + config_get ap_pin "$vif" wps_ap_pin "12345670" } list_contains config_methods push_button && { ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/4] [package] hostapd: revamped WPS support
Deprecated config options 'wps_label' and 'wps_pbc' The use of a list option 'wps_pushbutton' is more scalable. Signed-off-by: Lorenzo Cappelletti --- diff --git a/hostapd/files/hostapd.sh b/hostapd/files/hostapd.sh --- a/hostapd/files/hostapd.sh +++ b/hostapd/files/hostapd.sh @@ -1,12 +1,14 @@ hostapd_set_wps_options() { - local config_methods device_name device_type manufacturer\ - wps_label wps_pbc + local config_methods device_name device_type manufacturer + config_get config_methods "$vif" wps_config_methods + + # deprecated options + local wps_label wps_pbc config_get_bool wps_pbc "$vif" wps_pushbutton 0 + [ "$wps_pbc" -gt 0 ] && append config_methods push_button config_get_bool wps_label "$vif" wps_label 0 - - config_get config_methods "$vif" wps_config - [ "$wps_pbc" -gt 0 ] && append config_methods push_button + "$wps_label" -gt 0 ] && append config_methods label [ -z "$config_methods" ] && return @@ -22,6 +24,18 @@ append "$var" "device_name=$device_name" "$N" append "$var" "manufacturer=$manufacturer" "$N" append "$var" "config_methods=$config_methods" "$N" + + # per-method options + list_contains config_methods label && { + list_remove config_methods label + } + + list_contains config_methods push_button && { + list_remove config_methods push_button + } + + [ -z "$config_methods" ] ||\ + logger -t "$vif" "WPS config methods not supported: $config_methods" } hostapd_set_bss_options() { ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/4] [package] hostapd: revamped WPS support
Moved WPS code to new function The WPS implementation is going to have a bigger code base which justifies a dedicated function with less indentation levels. Signed-off-by: Lorenzo Cappelletti --- Hi everyone, I'm a senior embedded C programmer and I'd like to contribute with my 2 cents to this great project. My final goal consists in implementing a WPS (http://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup) based guest network which my friends coming by can connect to and have access to my entire network resources. Of course, without compromising on security. I already started documenting the code on the wiki last month. My next step was preparing the ground for a couple of new WPS methods, label and keypad. What I'm submitting here is the result of this first effort. I hope you'll accept it in the trunk. Next, I'll move on to implement the keypad method which requires user inputs. I think I'll create a dynamic web page here. Not sure because I'm new to this. diff --git a/hostapd/files/hostapd.sh b/hostapd/files/hostapd.sh --- a/hostapd/files/hostapd.sh +++ b/hostapd/files/hostapd.sh @@ -1,3 +1,29 @@ +hostapd_set_wps_options() { + local config_methods device_name device_type manufacturer\ + wps_label wps_pbc + + config_get_bool wps_pbc "$vif" wps_pushbutton 0 + config_get_bool wps_label "$vif" wps_label 0 + + config_get config_methods "$vif" wps_config + [ "$wps_pbc" -gt 0 ] && append config_methods push_button + + [ -z "$config_methods" ] && return + + # common options + config_get device_type "$vif" wps_device_type "6-0050F204-1" + config_get device_name "$vif" wps_device_name "OpenWrt AP" + config_get manufacturer "$vif" wps_manufacturer "openwrt.org" + + append "$var" "eap_server=1" "$N" + append "$var" "wps_state=2" "$N" + append "$var" "ap_setup_locked=1" "$N" + append "$var" "device_type=$device_type" "$N" + append "$var" "device_name=$device_name" "$N" + append "$var" "manufacturer=$manufacturer" "$N" + append "$var" "config_methods=$config_methods" "$N" +} + hostapd_set_bss_options() { local var="$1" local vif="$2" @@ -159,25 +185,7 @@ config_get ieee80211d "$vif" ieee80211d config_get iapp_interface "$vif" iapp_interface - config_get_bool wps_pbc "$vif" wps_pushbutton 0 - config_get_bool wps_label "$vif" wps_label 0 - - config_get config_methods "$vif" wps_config - [ "$wps_pbc" -gt 0 ] && append config_methods push_button - - [ -n "$wps_possible" -a -n "$config_methods" ] && { - config_get device_type "$vif" wps_device_type "6-0050F204-1" - config_get device_name "$vif" wps_device_name "OpenWrt AP" - config_get manufacturer "$vif" wps_manufacturer "openwrt.org" - - append "$var" "eap_server=1" "$N" - append "$var" "wps_state=2" "$N" - append "$var" "ap_setup_locked=1" "$N" - append "$var" "device_type=$device_type" "$N" - append "$var" "device_name=$device_name" "$N" - append "$var" "manufacturer=$manufacturer" "$N" - append "$var" "config_methods=$config_methods" "$N" - } + [ -n "$wps_possible" ] && hostapd_set_wps_options append "$var" "ssid=$ssid" "$N" [ -n "$bridge" ] && append "$var" "bridge=$bridge" "$N" ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 5/8] Reduce skb truesize on common qdiscs under load
On Mon, Oct 01, 2012 at 10:44:56AM -0700, Sebastian Moeller wrote: > Hi Felix, > > > On Oct 1, 2012, at 10:26 , Felix Fietkau wrote: > > > On 2012-10-01 6:49 PM, Dave Täht wrote: > >> From: Dave Taht > >> > >> After queue lengths start getting out of hand, try to preserve memory > >> by shortening skbs to their truesize on the common pfifo, codel, and > >> fq_codel qdiscs. > >> > >> Arguably (128) should be a configureable param > > I think this is a bad idea, at least on routers. 'Preserving memory' > > here involves copying buffer data, which is really horrible for > > performance. The memory bus is a tough bottleneck when routing at high > > speed… > > But the in severe situations the alternative is OOM -> watchdog based > reboot; under these circumstances limping along and recover later once the > memory pressure is over sounds better than rebooting? (At least in cerowrt > the OOM reboot cycle could be easily initiated by a simple UDP flood through > the router. Now, while this is abusive, it is way better if the router > survives this and recovers with out a reboot, IMHO). This change along with a > few others Dave made turned cerowrt robust against UDP flooding which I think > is the right thing to do. Since this only triggers once memory gets scarce, > think of this as a defense mechanism in a situation where performance will > suffer anyway... > > best > Sebastian As I noted, openwrt's workaround of a txqueuelen of 30 on wifi means this check will never be hit. It also means that fq_codel can't be applied at all to the openwrt wifi queues, as 30 is not deep enough to do any good. (cerowrt is presently using a latency/bandwidth compromise of a shortened driver queue and a longer fq_codel based txqueue - and we're painfully aware that far more work is needed to make wireless-n stop being so darn bloated and unresponsive: http://www.bufferbloat.net/projects/cerowrt/wiki/Fq_Codel_on_Wireless ) So, it IS possible to run a box with tons of SSIDs easily out of memory with the larger txqueuelens cero is using, and this patch helped that. Other devices (such as ethernet and qos'd devices) have longer queues by default, where this memory saving optimization *might* help It would be interesting if more folk would abuse their openwrt routers heavily using the current (2.6) version of netperf, to fully exercise the 4 hardware wifi queues, or the multiple qos queues. Tests like this showed up a hw queue bug in ath9k (long since fixed) and appears to mess up iwl (on a laptop) somewhat, and it would be good to blow up more drivers and devices... in addition to running older versions of openwrt out of memory. What I typically do is a bunch of udp flooding and tcp flooding, along the lines of this, using the netperf 2.6 distro, and exercising each hw queue thusly. # netserver runs here SERVER1=somewhere SERVER2=somewhere.else DUR=120 # on clients connected through the router via # wifi, etc ( # Flood BE with tcp in both directions netperf -l$DIR -H$SERVER1 -tTCP_MAERTS & netperf -l$DIR -H$SERVER2 -tTCP_MAERTS & netperf -l$DIR -H$SERVER1 -tTCP_STREAM & netperf -l$DIR -H$SERVER2 -tTCP_STREAM & # Beat up on the BK, BE, VO, VI hw queues netperf -l$DIR -Y CS1,CS1 -H$SERVER2 -tUDP_STREAM & netperf -l$DIR -Y CS0,CS0 -H$SERVER2 -tUDP_STREAM & netperf -l$DIR -Y EF,EF -H$SERVER2 -tUDP_STREAM & netperf -l$DIR -Y CS5,CS5 -H$SERVER2 -tUDP_STREAM & ) > > > > > > - Felix > > > > ___ > > openwrt-devel mailing list > > openwrt-devel@lists.openwrt.org > > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 7/8] mac80211: add full diffserv support to wireless
On Mon, Oct 01, 2012 at 07:28:11PM +0200, Felix Fietkau wrote: > On 2012-10-01 6:49 PM, Dave Täht wrote: > > From: Dave Taht > > > > This moves all but EF marked traffic out of the VO queue, > > allowing for aggregation of other forms of traffic. > > > > It more aggressively uses the VI queue for interactive-ish > > traffic. > Please propose this for upstream inclusion on linux-wireless@. I'd like > to see the feedback there before I consider merging it to OpenWrt. OK. Honestly I wanted feedback from openwrt first because this patch originally exposed several problems in the VI queue handling on the ath9k, and I suspect that other chipsets (like iwl) have hidden problems in VI queue handling as well. > > - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [video] gspca: JPEG improvements for sn9c20x
On 01/10/12 19:50, Tim Harvey wrote: SN9C20x/GSPCA JPEG improvements This increases the JPEG buffersize and adds JPEG quality set/get methods. The largest framesize I've encountered was 230KB resulting from quality=95 (and a complex/blury image). This also fixes a bug in the mode selection. Signed-off-by: Tim Harvey Hi did yu also send this patch upstream to the v4l2 guys ? John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 5/8] Reduce skb truesize on common qdiscs under load
Hi Felix, On Oct 1, 2012, at 10:26 , Felix Fietkau wrote: > On 2012-10-01 6:49 PM, Dave Täht wrote: >> From: Dave Taht >> >> After queue lengths start getting out of hand, try to preserve memory >> by shortening skbs to their truesize on the common pfifo, codel, and >> fq_codel qdiscs. >> >> Arguably (128) should be a configureable param > I think this is a bad idea, at least on routers. 'Preserving memory' > here involves copying buffer data, which is really horrible for > performance. The memory bus is a tough bottleneck when routing at high > speed… But the in severe situations the alternative is OOM -> watchdog based reboot; under these circumstances limping along and recover later once the memory pressure is over sounds better than rebooting? (At least in cerowrt the OOM reboot cycle could be easily initiated by a simple UDP flood through the router. Now, while this is abusive, it is way better if the router survives this and recovers with out a reboot, IMHO). This change along with a few others Dave made turned cerowrt robust against UDP flooding which I think is the right thing to do. Since this only triggers once memory gets scarce, think of this as a defense mechanism in a situation where performance will suffer anyway... best Sebastian > > - Felix > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [video] gspca: JPEG improvements for sn9c20x
SN9C20x/GSPCA JPEG improvements This increases the JPEG buffersize and adds JPEG quality set/get methods. The largest framesize I've encountered was 230KB resulting from quality=95 (and a complex/blury image). This also fixes a bug in the mode selection. Signed-off-by: Tim Harvey target/linux/generic/patches-3.3/065-gspca_bufsize.patch | 144 +++ 1 file changed, 144 insertions(+) Index: trunk/target/linux/generic/patches-3.3/065-gspca_bufsize.patch === --- trunk/target/linux/generic/patches-3.3/065-gspca_bufsize.patch (revision 0) +++ trunk/target/linux/generic/patches-3.3/065-gspca_bufsize.patch (working copy) @@ -0,0 +1,144 @@ +--- a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c +@@ -1044,11 +1044,13 @@ static int gspca_get_mode(struct gspca_d + == pixfmt) + return modeD; + } ++/* + if (++modeU < gspca_dev->cam.nmodes) { + if (gspca_dev->cam.cam_mode[modeU].pixelformat + == pixfmt) + return modeU; + } ++*/ + } + return -EINVAL; + } +--- a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c +@@ -35,6 +35,14 @@ MODULE_LICENSE("GPL"); + + #define MODULE_NAME "sn9c20x" + ++#define QUALITY_MIN 20 ++#define QUALITY_DEF 85 ++#define QUALITY_MAX 95 ++ ++static int jpeg_quality = QUALITY_DEF; ++module_param(jpeg_quality, int, 0644); ++MODULE_PARM_DESC(jpeg_quality, "JPEG Quality"); ++ + /* + * Pixel format private data + */ +@@ -363,7 +371,7 @@ static const struct ctrl sd_ctrls[] = { + static const struct v4l2_pix_format vga_mode[] = { + {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 160, +- .sizeimage = 160 * 120 * 4 / 8 + 590, ++ .sizeimage = 160 * 120 * 7 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = SCALE_160x120 | MODE_JPEG}, + {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, +@@ -378,7 +386,7 @@ static const struct v4l2_pix_format vga_ + .priv = SCALE_160x120}, + {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 320, +- .sizeimage = 320 * 240 * 4 / 8 + 590, ++ .sizeimage = 320 * 240 * 7 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = SCALE_320x240 | MODE_JPEG}, + {320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, +@@ -393,7 +401,7 @@ static const struct v4l2_pix_format vga_ + .priv = SCALE_320x240}, + {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 640, +- .sizeimage = 640 * 480 * 4 / 8 + 590, ++ .sizeimage = 640 * 480 * 7 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = SCALE_640x480 | MODE_JPEG}, + {640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, +@@ -411,7 +419,7 @@ static const struct v4l2_pix_format vga_ + static const struct v4l2_pix_format sxga_mode[] = { + {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 160, +- .sizeimage = 160 * 120 * 4 / 8 + 590, ++ .sizeimage = 160 * 120 * 7 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = SCALE_160x120 | MODE_JPEG}, + {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, +@@ -426,7 +434,7 @@ static const struct v4l2_pix_format sxga + .priv = SCALE_160x120}, + {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 320, +- .sizeimage = 320 * 240 * 4 / 8 + 590, ++ .sizeimage = 320 * 240 * 7 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = SCALE_320x240 | MODE_JPEG}, + {320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, +@@ -441,7 +449,7 @@ static const struct v4l2_pix_format sxga + .priv = SCALE_320x240}, + {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 640, +- .sizeimage = 640 * 480 * 4 / 8 + 590, ++ .sizeimage = 640 * 480 * 7 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = SCALE_640x480 | MODE_JPEG}, + {640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, +@@ -2090,7 +2098,7 @@ static int sd_config(struct gspca_dev *g + sd->gain = GAIN_DEFAULT; + sd->auto_exposure = AUTO_EXPOSURE_DEFAULT; + +- sd->quality = 95; ++ sd->quality = jpeg_quality; + + return 0; + } +@@ -2503,6 +2511,38 @@ static void sd_pkt_scan(struct gspca_dev + } + } + ++static int sd_set_jcomp(struct gspca_dev *gspca_dev, ++ struct v4l2_jpegcompression *jcomp) ++{
Re: [OpenWrt-Devel] [PATCH 7/8] mac80211: add full diffserv support to wireless
On 2012-10-01 6:49 PM, Dave Täht wrote: > From: Dave Taht > > This moves all but EF marked traffic out of the VO queue, > allowing for aggregation of other forms of traffic. > > It more aggressively uses the VI queue for interactive-ish > traffic. Please propose this for upstream inclusion on linux-wireless@. I'd like to see the feedback there before I consider merging it to OpenWrt. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 5/8] Reduce skb truesize on common qdiscs under load
On 2012-10-01 6:49 PM, Dave Täht wrote: > From: Dave Taht > > After queue lengths start getting out of hand, try to preserve memory > by shortening skbs to their truesize on the common pfifo, codel, and > fq_codel qdiscs. > > Arguably (128) should be a configureable param I think this is a bad idea, at least on routers. 'Preserving memory' here involves copying buffer data, which is really horrible for performance. The memory bus is a tough bottleneck when routing at high speed... - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [usb] Add support for new Option modules
Add support for new Option modules (GTM66xxWFS/GTM67xxWFS) Add new device ID's for the hso driver as well as usb storage Signed-off-by: Tim Harvey target/linux/generic/patches-3.3/060-hso_devices.patch | 36 + 1 file changed, 36 insertions(+) Index: trunk/target/linux/generic/patches-3.3/060-hso_devices.patch === --- trunk/target/linux/generic/patches-3.3/060-hso_devices.patch (revision 0) +++ trunk/target/linux/generic/patches-3.3/060-hso_devices.patch (working copy) @@ -0,0 +1,36 @@ +--- a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c +@@ -476,8 +476,10 @@ static const struct usb_device_id hso_id + {USB_DEVICE(0x0af0, 0x8400)}, + {USB_DEVICE(0x0af0, 0x8600)}, + {USB_DEVICE(0x0af0, 0x8800)}, +- {USB_DEVICE(0x0af0, 0x8900)}, +- {USB_DEVICE(0x0af0, 0x9000)}, ++ {USB_DEVICE(0x0af0, 0x8900)}, /* GTM 67xx */ ++ {USB_DEVICE(0x0af0, 0x9000)}, /* GTM 66xx */ ++ {USB_DEVICE(0x0af0, 0x9200)}, /* GTM 67xxWFS */ ++ {USB_DEVICE(0x0af0, 0x9300)}, /* GTM 66xxWFS */ + {USB_DEVICE(0x0af0, 0xd035)}, + {USB_DEVICE(0x0af0, 0xd055)}, + {USB_DEVICE(0x0af0, 0xd155)}, +--- a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h +@@ -1231,6 +1231,18 @@ UNUSUAL_DEV( 0x0af0, 0x8304, 0x, 0x0 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + 0 ), + ++UNUSUAL_DEV( 0x0af0, 0x9200, 0x, 0x, ++ "Option", ++ "Globetrotter 67xxWFS SD-Card", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ 0 ), ++ ++UNUSUAL_DEV( 0x0af0, 0x9300, 0x, 0x, ++ "Option", ++ "Globetrotter 66xxWFS SD-Card", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ 0 ), ++ + UNUSUAL_DEV( 0x0af0, 0xc100, 0x, 0x, + "Option", + "GI 070x SD-Card", ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/8] net: add skb_reduce_truesize to reduce skbs when needed
From: Dave Taht skb_reduce_truesize is an inline function to reduce large skbs when needed. The API may change before inclusion with Linux 3.7... --- .../054-net-add-skb_reduce_truesize.patch | 45 1 file changed, 45 insertions(+) create mode 100644 target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch diff --git a/target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch b/target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch new file mode 100644 index 000..73d0270 --- /dev/null +++ b/target/linux/generic/patches-3.3/054-net-add-skb_reduce_truesize.patch @@ -0,0 +1,45 @@ +From 7cdeef22fb3164bbb52d9fcec9186c6eda877eef Mon Sep 17 00:00:00 2001 +From: Dave Taht +Date: Mon, 27 Aug 2012 10:55:45 -0700 +Subject: [PATCH 2/4] net: add skb_reduce_truesize + +skb_reduce_truesize is a helper function for shrinking skbs whenever +needed. +--- + include/linux/skbuff.h | 21 + + 1 file changed, 21 insertions(+) + +diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h +index 42854ce..38f7bb8 100644 +--- a/include/linux/skbuff.h b/include/linux/skbuff.h +@@ -2531,5 +2531,26 @@ static inline bool skb_is_recycleable(const struct sk_buff *skb, int skb_size) + + return true; + } ++ ++/* ++ * Caller wants to reduce memory needs before queueing skb ++ * The (expensive) copy should not be be done in fast path. ++ */ ++ ++static inline struct sk_buff *skb_reduce_truesize(struct sk_buff *skb) ++{ ++ if (skb->truesize > 2 * SKB_TRUESIZE(skb->len)) { ++ struct sk_buff *nskb; ++ ++ nskb = skb_copy_expand(skb, skb_headroom(skb), 0, ++ GFP_ATOMIC | __GFP_NOWARN); ++ if (nskb) { ++ __kfree_skb(skb); ++ skb = nskb; ++ } ++ } ++ return skb; ++} ++ + #endif/* __KERNEL__ */ + #endif/* _LINUX_SKBUFF_H */ +-- +1.7.9.5 + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/8] net-next: dont delay acks after ECN CE
From: Dave Taht Bugfix from linux head - don't delay acks from ECN congestion experienced in some situations. --- ...net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch | 63 1 file changed, 63 insertions(+) create mode 100644 target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch diff --git a/target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch b/target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch new file mode 100644 index 000..547e4fa --- /dev/null +++ b/target/linux/generic/patches-3.3/050-net-next-tcp-ecn-dont-delay-ACKS-after-CE.patch @@ -0,0 +1,63 @@ +From patchwork Mon Aug 6 21:04:43 2012 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [net-next] tcp: ecn: dont delay ACKS after CE +Date: Mon, 06 Aug 2012 11:04:43 - +From: Eric Dumazet +X-Patchwork-Id: 175453 +Message-Id: <1344287083.26674.83.camel@edumazet-glaptop> +To: David Miller +Cc: netdev , + Neal Cardwell + +From: Eric Dumazet + +While playing with CoDel and ECN marking, I discovered a +non optimal behavior of receiver of CE (Congestion Encountered) +segments. + +In pathological cases, sender has reduced its cwnd to low values, +and receiver delays its ACK (by 40 ms). + +While RFC 3168 6.1.3 (The TCP Receiver) doesn't explicitly recommend +to send immediate ACKS, we believe its better to not delay ACKS, because +a CE segment should give same signal than a dropped segment, and its +quite important to reduce RTT to give ECE/CWR signals as fast as +possible. + +Note we already call tcp_enter_quickack_mode() from TCP_ECN_check_ce() +if we receive a retransmit, for the same reason. + +Signed-off-by: Eric Dumazet +Cc: Neal Cardwell +Acked-by: Neal Cardwell + +--- +net/ipv4/tcp_input.c |6 +- + 1 file changed, 5 insertions(+), 1 deletion(-) + + + +-- +To unsubscribe from this list: send the line "unsubscribe netdev" in +the body of a message to majord...@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c +index 2fd2bc9..fa2c2c2 100644 +--- a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c +@@ -237,7 +237,11 @@ static inline void TCP_ECN_check_ce(struct tcp_sock *tp, const struct sk_buff *s + tcp_enter_quickack_mode((struct sock *)tp); + break; + case INET_ECN_CE: +- tp->ecn_flags |= TCP_ECN_DEMAND_CWR; ++ if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) { ++ /* Better not delay acks, sender can have a very low cwnd */ ++ tcp_enter_quickack_mode((struct sock *)tp); ++ tp->ecn_flags |= TCP_ECN_DEMAND_CWR; ++ } + /* fallinto */ + default: + tp->ecn_flags |= TCP_ECN_SEEN; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 7/8] mac80211: add full diffserv support to wireless
From: Dave Taht This moves all but EF marked traffic out of the VO queue, allowing for aggregation of other forms of traffic. It more aggressively uses the VI queue for interactive-ish traffic. --- ...901-Add-full-diffserv-support-to-wireless.patch | 126 1 file changed, 126 insertions(+) create mode 100644 package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch diff --git a/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch b/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch new file mode 100644 index 000..7c19e05 --- /dev/null +++ b/package/mac80211/patches/901-Add-full-diffserv-support-to-wireless.patch @@ -0,0 +1,126 @@ +From 12b7c8b3cb5750f58e560076b93d3a0af1d70e09 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dave=20T=C3=A4ht?= +Date: Sun, 8 Jul 2012 14:38:32 -0400 +Subject: [PATCH] Add full diffserv support to wireless + +The previous dscp scheme in linux wireless only respected the topmost +3 diffserv priority bits (e.g. CS0 through CS7). This patch respects +all the diffserv bits and all the old-style tos bits that make sense. + +It moves all but EF marked traffic out of the VO queue, where CS6 and +CS7 have been going. + +The imm bit (set by ssh) now moves to VI +Background goes to BK +Most other (obsolete) options move into VI, notably CS6 and CS7 traffic. + +Sort of in keeping with the 802.1q spirit, but not along the actual +performance of 802.1q, the queues are marked with the range 0-7. +--- + net/wireless/util.c | 73 +-- + 1 file changed, 71 insertions(+), 2 deletions(-) + +diff --git a/net/wireless/util.c b/net/wireless/util.c +index 316cfd0..304a6c7 100644 +--- a/net/wireless/util.c b/net/wireless/util.c +@@ -12,6 +12,8 @@ + #include + #include "core.h" + ++/* VI, VO, BE, BK */ ++ + struct ieee80211_rate * + ieee80211_get_response_rate(struct ieee80211_supported_band *sband, + u32 basic_rates, int bitrate) +@@ -635,10 +637,77 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, + } + EXPORT_SYMBOL(ieee80211_amsdu_to_8023s); + ++static u8 dscp_table[] = { ++ 0, /* BE = 0x0 */ ++ 0, /* Max-Reliability = 0x1 */ ++ 3, /* Max-Throughput = 0x2 */ ++ 0, /* 0x3 Undefined */ ++ 5, /* Min-Delay = 0x4 */ ++ 0, /* 0x5 Undefined */ ++ 0, /* 0x6 Undefined */ ++ 0, /* 0x7 Undefined */ ++ 1, /* CS1 = 0x8 */ ++ 0, /* 0x9 Undefined */ ++ 3, /* AF11 = 0xa */ ++ 0, /* 0xb Undefined */ ++ 3, /* AF12 = 0xc */ ++ 0, /* 0xd Undefined */ ++ 3, /* AF13 = 0xe */ ++ 0, /* 0xf Undefined */ ++ 2, /* CS2 = 0x10 */ ++ 0, /* 0x11 Undefined */ ++ 3, /* AF21 = 0x12 */ ++ 0, /* 0x13 Undefined */ ++ 3, /* AF22 = 0x14 */ ++ 0, /* 0x15 Undefined */ ++ 3, /* AF23 = 0x16 */ ++ 0, /* 0x17 Undefined */ ++ 4, /* CS3 = 0x18 */ ++ 0, /* 0x19 Undefined */ ++ 3, /* AF31 = 0x1a */ ++ 0, /* 0x1b Undefined */ ++ 3, /* AF32 = 0x1c */ ++ 0, /* 0x1d Undefined */ ++ 3, /* AF33 = 0x1e */ ++ 0, /* 0x1f Undefined */ ++ 5, /* CS4 = 0x20 */ ++ 0, /* 0x21 Undefined */ ++ 5, /* AF41 = 0x22 */ ++ 0, /* 0x23 Undefined */ ++ 5, /* AF42 = 0x24 */ ++ 0, /* 0x25 Undefined */ ++ 4, /* AF43 = 0x26 */ ++ 0, /* 0x27 Undefined */ ++ 5, /* CS5 = 0x28 */ ++ 0, /* 0x29 Undefined */ ++ 0, /* 0x2a Undefined */ ++ 0, /* 0x2b Undefined */ ++ 4, /* VA = 0x2c */ ++ 0, /* 0x2d Undefined */ ++ 6, /* EF = 0x2e */ ++ 0, /* 0x2f Undefined */ ++ 5, /* CS6 = 0x30 */ ++ 0, /* 0x31 Undefined */ ++ 0, /* 0x32 Undefined */ ++ 0, /* 0x33 Undefined */ ++ 0, /* 0x34 Undefined */ ++ 0, /* 0x35 Undefined */ ++ 0, /* 0x36 Undefined */ ++ 0, /* 0x37 Undefined */ ++ 5, /* CS7 = 0x38 */ ++ 0, /* 0x39 Undefined */ ++ 0, /* 0x3a Undefined */ ++ 0, /* 0x3b Undefined */ ++ 0, /* 0x3c Undefined */ ++ 0, /* 0x3d Undefined */ ++ 0, /* 0x3e Undefined */ ++ 0, /* 0x3f Undefined */ ++}; ++ + /* Given a data frame determine the 802.1p/1d tag to use. */ + unsigned int cfg80211_classify8021d(struct sk_buff *skb) + { +- unsigned int dscp; ++ unsigned char dscp; + + /* skb->priority values from 256->263 are magic values to +* directly indicate a specific 802.1d priority. This is used +@@ -659,7 +728,7 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb) + return 0; + } + +- return dscp >> 5; ++ return (dscp_table[dscp>>2]); + } + EXPORT_SYMBOL(cfg80211_classify8021d); + +-- +1.7.9.5 + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 5/8] Reduce skb truesize on common qdiscs under load
From: Dave Taht After queue lengths start getting out of hand, try to preserve memory by shortening skbs to their truesize on the common pfifo, codel, and fq_codel qdiscs. Arguably (128) should be a configureable param --- ..._reduce_truesize-support-to-common-qdiscs.patch | 73 1 file changed, 73 insertions(+) create mode 100644 target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch diff --git a/target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch b/target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch new file mode 100644 index 000..d80e4ac --- /dev/null +++ b/target/linux/generic/patches-3.3/057-net-add-skb_reduce_truesize-support-to-common-qdiscs.patch @@ -0,0 +1,73 @@ +From 341cca736cb9a991069d6ad4f819241161936f47 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dave=20T=C3=A4ht?= +Date: Mon, 17 Sep 2012 19:20:22 -0700 +Subject: [PATCH 711/712] net: add skb_reduce_truesize support to common + qdiscs + +Reduce skb size under load when queues begin to fill on the +common qdiscs. +--- + net/sched/sch_codel.c|2 ++ + net/sched/sch_fifo.c | 12 + net/sched/sch_fq_codel.c |2 ++ + 3 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c +index 2f9ab17..12d9363c 100644 +--- a/net/sched/sch_codel.c b/net/sched/sch_codel.c +@@ -96,6 +96,8 @@ static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch) + struct codel_sched_data *q; + + if (likely(qdisc_qlen(sch) < sch->limit)) { ++ if(qdisc_qlen(sch) > 128) ++ skb = skb_reduce_truesize(skb); + codel_set_enqueue_time(skb); + return qdisc_enqueue_tail(skb, sch); + } +diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c +index 66effe2..2031a3e 100644 +--- a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c +@@ -29,17 +29,21 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) + + static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) + { +- if (likely(skb_queue_len(&sch->q) < sch->limit)) ++ if (likely(skb_queue_len(&sch->q) < sch->limit)) { ++ if (skb_queue_len(&sch->q) > 128) ++ skb = skb_reduce_truesize(skb); + return qdisc_enqueue_tail(skb, sch); +- ++ } + return qdisc_reshape_fail(skb, sch); + } + + static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch) + { +- if (likely(skb_queue_len(&sch->q) < sch->limit)) ++ if (likely(skb_queue_len(&sch->q) < sch->limit)) { ++ if (skb_queue_len(&sch->q) > 128) ++ skb = skb_reduce_truesize(skb); + return qdisc_enqueue_tail(skb, sch); +- ++ } + /* queue full, remove one skb to fulfill the limit */ + __qdisc_queue_drop_head(sch, &sch->q); + sch->qstats.drops++; +diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c +index ba944bd..136d2bc 100644 +--- a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c +@@ -182,6 +182,8 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch) + return ret; + } + idx--; ++ if (sch->q.qlen > 128) ++ skb = skb_reduce_truesize(skb); + + codel_set_enqueue_time(skb); + flow = &q->flows[idx]; +-- +1.7.9.5 + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Multiple patches "Best of Cerowrt"
The patch set following is the "Best of" what is in cerowrt. Of these, the only patch that I think is crucial to the openwrt freeze is the qos-scripts one... ... and it could use a bit more work! The remainder have been in cero for a while, and could at the very least, use some eyeballs on them. The reduce_truesize patches were suggested by Eric Dumazet, in particular, and help on multiple SSIDs and larger txqueuelens. (A core difference between cero and current openwrt, is that openwrt runs with a txqueuelen of 30 pfifo_fast, and cero runs fq_codel on everything with a packet limit of 1000) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/8] fq_codel: dont remove dropped statistic on empty queue
From: Dave Taht dropped statistic is useful if retained. --- ...56-fq_codel-dont-remove-dropped-statistic.patch | 24 1 file changed, 24 insertions(+) create mode 100644 target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch diff --git a/target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch b/target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch new file mode 100644 index 000..4491a67 --- /dev/null +++ b/target/linux/generic/patches-3.3/056-fq_codel-dont-remove-dropped-statistic.patch @@ -0,0 +1,24 @@ +From 0bca85ea6c06392e4ca04ebd7270cb567d8ebfb4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dave=20T=C3=A4ht?= +Date: Mon, 17 Sep 2012 18:03:15 -0700 +Subject: [PATCH 710/712] fq_codel: dont remove dropped statistic + +--- + net/sched/sch_fq_codel.c |1 - + 1 file changed, 1 deletion(-) + +diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c +index 4e606fc..ba944bd 100644 +--- a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c +@@ -193,7 +193,6 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch) + list_add_tail(&flow->flowchain, &q->new_flows); + q->new_flow_count++; + flow->deficit = q->quantum; +- flow->dropped = 0; + } + if (++sch->q.qlen < sch->limit) + return NET_XMIT_SUCCESS; +-- +1.7.9.5 + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/8] fq_codel: dont reinit flow state
From: Dave Taht Keep fq_codel flow state around after queue empty. --- .../052-fq_codel-dont-reinit-flow-state.patch | 41 1 file changed, 41 insertions(+) create mode 100644 target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch diff --git a/target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch b/target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch new file mode 100644 index 000..2e6b219 --- /dev/null +++ b/target/linux/generic/patches-3.3/052-fq_codel-dont-reinit-flow-state.patch @@ -0,0 +1,41 @@ +From b379135c40163ae79ba7a54e6928b53983e74ee8 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Sat, 1 Sep 2012 03:19:57 + +Subject: [PATCH 307/558] fq_codel: dont reinit flow state + +When fq_codel builds a new flow, it should not reset codel state. + +Codel algo needs to get previous values (lastcount, drop_next) to get +proper behavior. + +Signed-off-by: Dave Taht +Signed-off-by: Eric Dumazet +Acked-by: Dave Taht +Signed-off-by: David S. Miller +--- + net/sched/sch_fq_codel.c |2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c +index 9fc1c62..4e606fc 100644 +--- a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c +@@ -191,7 +191,6 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch) + + if (list_empty(&flow->flowchain)) { + list_add_tail(&flow->flowchain, &q->new_flows); +- codel_vars_init(&flow->cvars); + q->new_flow_count++; + flow->deficit = q->quantum; + flow->dropped = 0; +@@ -418,6 +417,7 @@ static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt) + struct fq_codel_flow *flow = q->flows + i; + + INIT_LIST_HEAD(&flow->flowchain); ++ codel_vars_init(&flow->cvars); + } + } + if (sch->limit >= 1) +-- +1.7.9.5 + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 6/8] net-next: respect RA messages better
From: Dave Taht --- ...-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch | 55 1 file changed, 55 insertions(+) create mode 100644 target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch diff --git a/target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch b/target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch new file mode 100644 index 000..73b832a --- /dev/null +++ b/target/linux/generic/patches-3.3/051-ipv6-fix-RTPROT_RA-markup-of-RA-routes-w-nexthops.patch @@ -0,0 +1,55 @@ +From patchwork Tue Jul 10 14:45:50 2012 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: ipv6: fix RTPROT_RA markup of RA routes w/nexthops +Date: Tue, 10 Jul 2012 04:45:50 - +From: Denis Ovsienko +X-Patchwork-Id: 170201 +Message-Id: <20120710184550.7a5a8d89802473b4c28d0...@yandex.ru> +To: net...@vger.kernel.org + +From: Denis Ovsienko + +Userspace implementations of network routing protocols sometimes need to +tell RA-originated IPv6 routes from other kernel routes to make proper +routing decisions. This makes most sense for RA routes with nexthops, +namely, default routes and Route Information routes. + +The intended mean of preserving RA route origin in a netlink message is +through indicating RTPROT_RA as protocol code. Function rt6_fill_node() +tried to do that for default routes, but its test condition was taken +wrong. This change is modeled after the original mailing list posting +by Jeff Haran. It fixes the test condition for default route case and +sets the same behaviour for Route Information case (both types use +nexthops). Handling of the 3rd RA route type, Prefix Information, is +left unchanged, as it stands for interface connected routes (without +nexthops). + +Signed-off-by: Denis Ovsienko + +--- +net/ipv6/route.c | 10 ++ + 1 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/net/ipv6/route.c b/net/ipv6/route.c +index 999a982..238b1ee 100644 +--- a/net/ipv6/route.c b/net/ipv6/route.c +@@ -2440,10 +2440,12 @@ static int rt6_fill_node(struct net *net, + rtm->rtm_protocol = rt->rt6i_protocol; + if (rt->rt6i_flags & RTF_DYNAMIC) + rtm->rtm_protocol = RTPROT_REDIRECT; +- else if (rt->rt6i_flags & RTF_ADDRCONF) +- rtm->rtm_protocol = RTPROT_KERNEL; +- else if (rt->rt6i_flags & RTF_DEFAULT) +- rtm->rtm_protocol = RTPROT_RA; ++ else if (rt->rt6i_flags & RTF_ADDRCONF) { ++ if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ROUTEINFO)) ++ rtm->rtm_protocol = RTPROT_RA; ++ else ++ rtm->rtm_protocol = RTPROT_KERNEL; ++ } + + if (rt->rt6i_flags & RTF_CACHE) + rtm->rtm_flags |= RTM_F_CLONED; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 8/8] qos-scripts: put arbitrary packet limit on fq_codel and disable ecn
From: Dave Taht fq_codel defaults to 10k packets which is excessive. While a good packet limit should be a calculated value (X * 64 = bandwidth + slop), an arbitrary size of 800 is more than enough for most bandwidths. ecn makes sense on ingress. After traversing the internet, it makes no sense to drop the packet on the last hop, if it can, instead be ECN marked. However at low egress bandwidths (say, below 20Mbit) ecn bloats up a connection at the core bottleneck. qos-scripts doesn't presently make a distinction between setup for ingress and egress, so ecn is arbitrarily disabled here. Lastly, this drops the quantum size so as to deprioritize the delivery of big packets slightly. More work on qos-scripts and related is needed... --- package/qos-scripts/files/usr/lib/qos/tcrules.awk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/qos-scripts/files/usr/lib/qos/tcrules.awk b/package/qos-scripts/files/usr/lib/qos/tcrules.awk index a19b651..80c0ebf 100644 --- a/package/qos-scripts/files/usr/lib/qos/tcrules.awk +++ b/package/qos-scripts/files/usr/lib/qos/tcrules.awk @@ -79,7 +79,7 @@ END { # leaf qdisc avpkt = 1200 for (i = 1; i <= n; i++) { - print "tc qdisc add dev "device" parent 1:"class[i]"0 handle "class[i]"00: fq_codel" + print "tc qdisc add dev "device" parent 1:"class[i]"0 handle "class[i]"00: fq_codel noecn limit 800 quantum 500" } # filter rule -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] [RFC] Add Kernel 3.4 to AR71xx platform.
Hello, Le 28/09/2012 21:07, Dave Taht a écrit : > On Fri, Sep 28, 2012 at 02:29:56PM +0200, Oliver wrote: >> On Friday 28 September 2012 14:30:45 Felix Fietkau wrote: >>> 3.6 is going to be released soon, I think we should go for that once >>> we've taken care of branching for release. >>> >>> - Felix >> +1 to that. > +1 to that too. It seems possible this will be a long-term stable release, > which 3.3 is not. Unless I failed to understant the -longterm selection process, it will not (unless someone other than GKH decide to make it a longterm). GKH took 3.4 to make it a -longterm, and he only peek one version per year. I guess the next -longterm (the one that will replace v3.0) will be v3.8, not v3.6. 3.0: -longterm support by GKH; released 07/22/2011 3.2: -longterm support by BH; released 01/05/2012 3.4: -longterm support by GHK; released 05/22/2012 3.6: no -longterm support; released 10/01/2012 3.8: probable -longterm support by GKH, will be released on 08/??/2013 (roughly ; there is a delay of 4-5 month between two subsequent kernel versions). Best regards, -- Emmanuel Deloget ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel