diff --git a/include/image.mk b/include/image.mk
index fd04d4020b..c0d0b61479 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -238,7 +238,7 @@ define Image/mkfs/squashfs
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
-nopad -noappend -root-owned \
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
- -processors 1
+ -processors $(shell nproc)
endef
# $(1): board name
diff --git a/package/firmware/linux-firmware/intel.mk b/package/firmware/linux-firmware/intel.mk
index 923701c703..401ab1aa7e 100644
--- a/package/firmware/linux-firmware/intel.mk
+++ b/package/firmware/linux-firmware/intel.mk
@@ -73,7 +73,7 @@ $(eval $(call BuildPackage,iwlwifi-firmware-iwl3160))
Package/iwlwifi-firmware-iwl3168 = $(call Package/firmware-default,Intel Wireless 3168 firmware)
define Package/iwlwifi-firmware-iwl3168/install
$(INSTALL_DIR) $(1)/lib/firmware
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-3168-29.ucode $(1)/lib/firmware
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-3168-27.ucode $(1)/lib/firmware
endef
$(eval $(call BuildPackage,iwlwifi-firmware-iwl3168))
@@ -157,14 +157,14 @@ $(eval $(call BuildPackage,iwlwifi-firmware-iwl8265))
Package/iwlwifi-firmware-iwl9000 = $(call Package/firmware-default,Intel Wireless 9000 firmware)
define Package/iwlwifi-firmware-iwl9000/install
$(INSTALL_DIR) $(1)/lib/firmware
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-9000-pu-b0-jf-b0-46.ucode $(1)/lib/firmware
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-9000-pu-b0-jf-b0-38.ucode $(1)/lib/firmware
endef
$(eval $(call BuildPackage,iwlwifi-firmware-iwl9000))
Package/iwlwifi-firmware-iwl9260 = $(call Package/firmware-default,Intel Wireless 9260 firmware)
define Package/iwlwifi-firmware-iwl9260/install
$(INSTALL_DIR) $(1)/lib/firmware
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-9260-th-b0-jf-b0-46.ucode $(1)/lib/firmware
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/iwlwifi-9260-th-b0-jf-b0-38.ucode $(1)/lib/firmware
endef
$(eval $(call BuildPackage,iwlwifi-firmware-iwl9260))
diff --git a/package/lean/fast-classifier/Makefile b/package/lean/fast-classifier/Makefile
deleted file mode 100644
index 2e29898b46..0000000000
--- a/package/lean/fast-classifier/Makefile
+++ /dev/null
@@ -1,91 +0,0 @@
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=fast-classifier
-PKG_RELEASE:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define KernelPackage/$(PKG_NAME)/Default
- SECTION:=kernel
- CATEGORY:=Kernel modules
- SUBMENU:=Network Support
- DEPENDS:=+kmod-ipt-conntrack +kmod-shortcut-fe
- TITLE:=Kernel driver for FAST Classifier
- FILES:=$(PKG_BUILD_DIR)/fast-classifier.ko
- KCONFIG:=CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y CONFIG_NF_CONNTRACK_MARK=y
- PROVIDES:=$(PKG_NAME)
-endef
-
-define KernelPackage/$(PKG_NAME)
- $(call KernelPackage/$(PKG_NAME)/Default)
-endef
-
-define KernelPackage/$(PKG_NAME)-noload
- $(call KernelPackage/$(PKG_NAME)/Default)
-endef
-
-define KernelPackage/$(PKG_NAME)/Default/description
-FAST Classifier talks to SFE to make decisions about offloading connections
-endef
-
-define KernelPackage/$(PKG_NAME)/description
-$(call KernelPackage/$(PKG_NAME)/Default/description)
-endef
-
-define KernelPackage/$(PKG_NAME)-noload/description
-$(call KernelPackage/$(PKG_NAME)/Default/description)
-
-This package does not load $(PKG_NAME) at boot by default
-endef
-
-define Package/fast-classifier-example
- TITLE:=Example user space program for fast-classifier
- DEPENDS:=+libnl +kmod-fast-classifier
-endef
-
-define Package/fast-classifier-example/description
-Example user space program that communicates with fast
-classifier kernel module
-endef
-
-SFE_MAKE_OPTS:=SFE_SUPPORT_IPV6=y
-
-define Build/Compile/kmod
- +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(SFE_MAKE_OPTS)) \
- $(KERNEL_MAKE_FLAGS) \
- $(PKG_MAKE_FLAGS) \
- SUBDIRS="$(PKG_BUILD_DIR)" \
- CONFIG_FAST_CLASSIFIER=m \
- EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
- modules
-endef
-
-define Build/Compile/example
- $(TARGET_CC) -o $(PKG_BUILD_DIR)/userspace_fast_classifier \
- -I $(PKG_BUILD_DIR) \
- -I$(STAGING_DIR)/usr/include/libnl \
- -I$(STAGING_DIR)/usr/include/libnl3 \
- -lnl-genl-3 -lnl-3 \
- $(PKG_BUILD_DIR)/nl_classifier_test.c
-endef
-
-define Build/Compile
- $(Build/Compile/kmod)
- $(if $(CONFIG_PACKAGE_fast-classifier-example),$(Build/Compile/example))
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_BUILD_DIR)/fast-classifier.h $(1)/usr/include/
-endef
-
-
-define Package/fast-classifier-example/install
- $(INSTALL_DIR) $(1)/sbin
- $(CP) $(PKG_BUILD_DIR)/userspace_fast_classifier $(1)/sbin/
-endef
-
-$(eval $(call KernelPackage,$(PKG_NAME)))
-$(eval $(call KernelPackage,$(PKG_NAME)-noload))
-$(eval $(call BuildPackage,fast-classifier-example))
diff --git a/package/lean/fast-classifier/src/Makefile b/package/lean/fast-classifier/src/Makefile
deleted file mode 100644
index 58dd06e018..0000000000
--- a/package/lean/fast-classifier/src/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-obj-$(CONFIG_FAST_CLASSIFIER) += fast-classifier.o
-
-ifeq ($(SFE_SUPPORT_IPV6),)
-SFE_SUPPORT_IPV6=y
-endif
-ccflags-$(SFE_SUPPORT_IPV6) += -DSFE_SUPPORT_IPV6
-
-ccflags-y += -I$(obj)/../shortcut-fe
-
-obj ?= .
diff --git a/package/lean/luci-app-sfe/root/etc/config/sfe b/package/lean/luci-app-sfe/root/etc/config/sfe
index acb880a942..20697560a4 100644
--- a/package/lean/luci-app-sfe/root/etc/config/sfe
+++ b/package/lean/luci-app-sfe/root/etc/config/sfe
@@ -6,5 +6,5 @@ config sfe
option dns '0'
option dnscache_enable '1'
option dns_server '114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8'
- option ipv6dns_server '240c::6666,240c::6644,2400:da00::6666,2001:da8::666'
+ option ipv6dns_server '240c::6666,240c::6644,2001:da8::666,2001:da8:202:10::36,2001:da8:8000:1:202:120:2:100'
diff --git a/package/lean/luci-app-sfe/root/etc/init.d/sfe b/package/lean/luci-app-sfe/root/etc/init.d/sfe
index 9b137f38ce..2c67e59546 100755
--- a/package/lean/luci-app-sfe/root/etc/init.d/sfe
+++ b/package/lean/luci-app-sfe/root/etc/init.d/sfe
@@ -8,7 +8,7 @@ USE_PROCD=1
DNSMASQ_RESTART=N
DNS_SERVER="114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8"
-IPV6DNS_SERVER="2001:4860:4860::8888,2001:4860:4860::8844,2001:2001::1111,2001:2001::1001,2400:da00::6666,240C::6666,240C::6644"
+IPV6DNS_SERVER="240c::6666,240c::6644,2001:da8::666,2001:da8:202:10::36,2001:da8:8000:1:202:120:2:100"
lan_addr=$(uci get network.lan.ipaddr)
diff --git a/package/lean/luci-theme-netgear/luasrc/view/themes/netgear/header.htm b/package/lean/luci-theme-netgear/luasrc/view/themes/netgear/header.htm
index 9610187264..57051a4ce4 100644
--- a/package/lean/luci-theme-netgear/luasrc/view/themes/netgear/header.htm
+++ b/package/lean/luci-theme-netgear/luasrc/view/themes/netgear/header.htm
@@ -175,7 +175,7 @@
end
%>
<% if ucichanges > 0 then %>
- "><%:Unsaved Changes%>: <%=ucichanges%>
+ "><%=translate('Unsaved Changes')%>: <%=ucichanges%>
<% end %>
<%:Auto Refresh%> <%:on%>
diff --git a/package/lean/shortcut-fe/Makefile b/package/lean/shortcut-fe/Makefile
index a0111cfe25..38b859d080 100644
--- a/package/lean/shortcut-fe/Makefile
+++ b/package/lean/shortcut-fe/Makefile
@@ -15,7 +15,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=shortcut-fe
-PKG_RELEASE:=1
+PKG_RELEASE:=10
include $(INCLUDE_DIR)/package.mk
@@ -23,27 +23,17 @@ define KernelPackage/shortcut-fe
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Network Support
- DEPENDS:=
+ DEPENDS:=@IPV6
TITLE:=Kernel driver for SFE
FILES:=$(PKG_BUILD_DIR)/shortcut-fe.ko $(PKG_BUILD_DIR)/shortcut-fe-ipv6.ko
- KCONFIG:=CONFIG_NF_CONNTRACK_EVENTS=y \
- CONFIG_NF_CONNTRACK_TIMEOUT=y \
- CONFIG_SHORTCUT_FE=y \
- CONFIG_XFRM=y
- AUTOLOAD:=$(call AutoLoad,09,shortcut-fe shortcut-fe-ipv6)
+ KCONFIG:=CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_SHORTCUT_FE=y
+ AUTOLOAD:=$(call AutoProbe,shortcut-fe shortcut-fe-ipv6)
endef
define KernelPackage/shortcut-fe/Description
Shortcut is an in-Linux-kernel IP packet forwarding engine.
endef
-define KernelPackage/shortcut-fe/install
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/etc/init.d/shortcut-fe $(1)/etc/init.d
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) ./files/usr/bin/sfe_dump $(1)/usr/bin
-endef
-
define KernelPackage/shortcut-fe-cm
SECTION:=kernel
CATEGORY:=Kernel modules
@@ -51,31 +41,81 @@ define KernelPackage/shortcut-fe-cm
DEPENDS:=+kmod-ipt-conntrack +kmod-shortcut-fe
TITLE:=Kernel driver for SFE
FILES:=$(PKG_BUILD_DIR)/shortcut-fe-cm.ko
- KCONFIG:=CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y
+ KCONFIG:=CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y CONFIG_NF_CONNTRACK_MARK=y
+ AUTOLOAD:=$(call AutoProbe,shortcut-fe-cm)
endef
define KernelPackage/shortcut-fe-cm/Description
Simple connection manager for the Shortcut forwarding engine.
endef
-EXTRA_CFLAGS+=-DSFE_SUPPORT_IPV6
-
-define Build/Compile
- +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- $(KERNEL_MAKE_FLAGS) \
- $(PKG_MAKE_FLAGS) \
- SUBDIRS="$(PKG_BUILD_DIR)" \
- EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
- SFE_SUPPORT_IPV6=1 \
- modules
+define KernelPackage/fast-classifier
+ SECTION:=kernel
+ CATEGORY:=Kernel modules
+ SUBMENU:=Network Support
+ DEPENDS:=+kmod-ipt-conntrack +kmod-shortcut-fe
+ TITLE:=Kernel driver for FAST Classifier
+ FILES:=$(PKG_BUILD_DIR)/fast-classifier.ko
+ KCONFIG:=CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y CONFIG_NF_CONNTRACK_MARK=y
+ AUTOLOAD:=$(call AutoLoad,z,fast-classifier)
+ PROVIDES:=$(PKG_NAME)
endef
-ifneq ($(CONFIG_PACKAGE_kmod-shortcut-fe)$(CONFIG_PACKAGE_kmod-shortcut-fe-cm),)
+define KernelPackage/fast-classifier/description
+FAST Classifier connection manager for Shortcut forwarding engine.
+It talks to SFE to make decisions about offloading connections.
+endef
+
+define Package/fast-classifier-example
+ TITLE:=Example user space program for fast-classifier
+ DEPENDS:=+libnl +kmod-fast-classifier
+endef
+
+define Package/fast-classifier-example/description
+Example user space program that communicates with fast
+classifier kernel module
+endef
+
+MAKE_OPTS:= \
+ ARCH="$(LINUX_KARCH)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ M="$(PKG_BUILD_DIR)" \
+ EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
+
+define Build/Compile
+ $(MAKE) -C "$(LINUX_DIR)" \
+ $(MAKE_OPTS) \
+ modules
+ $(if $(CONFIG_PACKAGE_fast-classifier-example),$(Build/Compile/fast-classifier-example))
+endef
+
+define Build/Compile/fast-classifier-example
+ $(TARGET_CC) -o $(PKG_BUILD_DIR)/userspace_fast_classifier \
+ -I $(PKG_BUILD_DIR) \
+ -I$(STAGING_DIR)/usr/include/libnl \
+ -I$(STAGING_DIR)/usr/include/libnl3 \
+ -lnl-genl-3 -lnl-3 \
+ $(PKG_BUILD_DIR)/nl_classifier_test.c
+endef
+
+ifneq ($(CONFIG_PACKAGE_kmod-shortcut-fe)$(CONFIG_PACKAGE_kmod-shortcut-fe-cm)$(CONFIG_PACKAGE_kmod-fast-classifier),)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/shortcut-fe
$(CP) -rf $(PKG_BUILD_DIR)/sfe.h $(1)/usr/include/shortcut-fe
+ifneq ($(CONFIG_PACKAGE_kmod-fast-classifier),)
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/fast-classifier.h $(1)/usr/include/
+endif
endef
endif
+define Package/fast-classifier-example/install
+ $(INSTALL_DIR) $(1)/sbin
+ $(CP) $(PKG_BUILD_DIR)/userspace_fast_classifier $(1)/sbin/
+endef
+
$(eval $(call KernelPackage,shortcut-fe))
$(eval $(call KernelPackage,shortcut-fe-cm))
+$(eval $(call KernelPackage,fast-classifier))
+#$(eval $(call BuildPackage,fast-classifier-example))
+
diff --git a/package/lean/shortcut-fe/files/etc/init.d/shortcut-fe b/package/lean/shortcut-fe/files/etc/init.d/shortcut-fe
deleted file mode 100755
index 16ca758764..0000000000
--- a/package/lean/shortcut-fe/files/etc/init.d/shortcut-fe
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh /etc/rc.common
-#
-# Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
-# Permission to use, copy, modify, and/or distribute this software for
-# any purpose with or without fee is hereby granted, provided that the
-# above copyright notice and this permission notice appear in all copies.
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
-# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-#SFE connection manager has a lower priority, it should be started after other connection manager
-#to detect the existence of connection manager with higher priority
-START=72
-
-have_cm() {
- [ -d "/sys/kernel/debug/ecm" ] && echo 1 && return
-
- echo 0
-}
-
-#load shortcut-fe connection manager
-load_sfe_cm() {
- local kernel_version=$(uname -r)
-
- #shortcut-fe-drv.ko is not needed because other connection manager is not enabled
- [ -d "/sys/module/shortcut_fe_drv" ] && rmmod shortcut_fe_drv
-
- [ -e "/lib/modules/$kernel_version/shortcut-fe-cm.ko" ] && {
- [ -d /sys/module/shortcut_fe_cm ] || insmod /lib/modules/$kernel_version/shortcut-fe-cm.ko
- }
- [ -e "/lib/modules/$kernel_version/fast-classifier.ko" ] && {
- [ -d /sys/module/fast_classifier ] || insmod /lib/modules/$kernel_version/fast-classifier.ko
- }
-}
-
-start() {
- [ "$(have_cm)" = "1" ] || load_sfe_cm
-}
-
-stop() {
- [ -d /sys/module/shortcut_fe_cm ] && rmmod shortcut_fe_cm
- [ -d /sys/module/fast_classifier ] && rmmod fast_classifier
-}
diff --git a/package/lean/shortcut-fe/files/usr/bin/sfe_dump b/package/lean/shortcut-fe/files/usr/bin/sfe_dump
deleted file mode 100644
index 2a224e0ca1..0000000000
--- a/package/lean/shortcut-fe/files/usr/bin/sfe_dump
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2015 The Linux Foundation. All rights reserved.
-# Permission to use, copy, modify, and/or distribute this software for
-# any purpose with or without fee is hereby granted, provided that the
-# above copyright notice and this permission notice appear in all copies.
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
-# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-#
-
-#@sfe_dump
-#@example : sfe_dump (ipv4|ipv6)
-sfe_dump(){
- [ -e "/dev/sfe_ipv4" ] || {
- dev_num=$(cat /sys/sfe_ipv4/debug_dev)
- mknod /dev/sfe_ipv4 c $dev_num 0
- }
- [ -e "/dev/sfe_ipv6" ] || {
- dev_num=$(cat /sys/sfe_ipv6/debug_dev)
- mknod /dev/sfe_ipv6 c $dev_num 0
- }
- cat /dev/sfe_$1
-}
-
-if [ -z "$1" ]; then
- sfe_dump ipv4
- sfe_dump ipv6
-else
- sfe_dump $1
-fi
diff --git a/package/lean/shortcut-fe/src/Kconfig b/package/lean/shortcut-fe/src/Kconfig
index 487f1e065e..f6017c9159 100644
--- a/package/lean/shortcut-fe/src/Kconfig
+++ b/package/lean/shortcut-fe/src/Kconfig
@@ -12,3 +12,4 @@ config SHORTCUT_FE
called shortcut-fe.
If unsure, say N.
+ default y
diff --git a/package/lean/shortcut-fe/src/Makefile b/package/lean/shortcut-fe/src/Makefile
index 3b1ceaa44e..88d95d232e 100644
--- a/package/lean/shortcut-fe/src/Makefile
+++ b/package/lean/shortcut-fe/src/Makefile
@@ -2,22 +2,13 @@
# Makefile for Shortcut FE.
#
-obj-m += shortcut-fe.o
-
-ifdef SFE_SUPPORT_IPV6
-obj-m += shortcut-fe-ipv6.o
-endif
-
-obj-m += shortcut-fe-cm.o
+obj-m += shortcut-fe.o shortcut-fe-ipv6.o shortcut-fe-cm.o fast-classifier.o
shortcut-fe-objs := \
sfe_ipv4.o
-ifdef SFE_SUPPORT_IPV6
shortcut-fe-ipv6-objs := \
sfe_ipv6.o
-endif
shortcut-fe-cm-objs := \
sfe_cm.o
-
diff --git a/package/lean/shortcut-fe/src/README b/package/lean/shortcut-fe/src/README
new file mode 100644
index 0000000000..1bf1cc2555
--- /dev/null
+++ b/package/lean/shortcut-fe/src/README
@@ -0,0 +1,122 @@
+Shortcut Forwarding Engine
+--------------------------
+
+Welcome to "Shortcut" :-)
+
+Here's a quick FAQ:
+
+
+Q) What is Shortcut?
+
+A) Shortcut is an in-Linux-kernel IP packet forwarding engine. It's designed
+to offer very high speed IP packet forwarding based on IP connection tracking.
+It's dramatically faster than the standard netfilter-based NAT forwarding path
+but is designed to synchronise state back to netfilter/conntrack so that it
+doesn't need to deal with all of the complexities of special cases.
+
+
+Q) What versions of IP does it support?
+
+A) The current version only supports IPv4 but will be extended to support IPv6 in
+the future.
+
+
+Q) What transport protocols does it support?
+
+A) TCP and UDP. It also knows enough about ICMP to spot ICMP error messages
+related to TCP and UDP and handle things accordingly.
+
+
+Q) Is there a design spec for this software?
+
+A) Not at the moment. I'll write one when I get more time. The code is
+intended to be a good tutorial though - it's very heavily commented. If you
+find yourself reading something and not understanding it then I take that to
+mean I've probably not done a sufficently good job of explaining what it's
+doing in the comments. Let me know - I will try to fix it :-)
+
+
+Q) Why was it written?
+
+A) It was written as a demonstration of what can be done to provide high
+performance forwarding inside the kernel. There were two initial motivations:
+
+1) To provide a platform to enable research into how QoS analysis systems can
+offload work and avoid huge Linux overheads.
+
+2) To provide a tool to investigate the behaviour of various processors, SoCs
+and software sets so that we can characterize and design new network processor
+SoCs.
+
+
+Q) How much faster is it than the Linux kernel forwarding path?
+
+A) At the time of pushing this to github it's been tested on a QCA AP135.
+This has a Scorpion (QCA Scopion, not the QMC one :-)) SoC, QCA9550. The
+SoC's processor is a MIPS74K running at 720 MHz and with a DDR2 memory
+subsystem that offers a peak of 600 MT/s (16-bit transfers).
+
+Running IPv4 NAT forwarding of UDP between the board's 2 GMAC ports and
+using a SmartBits 200 as a traffic generator Linux is able to forward 70k PPS.
+Once the SFE code is invoked this will increase to 350k PPS!
+
+There's also a slightly hacky mode which causes SFE to bypass the Linux
+bridge layer, but this isn't really ready for use because it doesn't have
+sufficient MAC address checks or integration of statistics back to the
+Ethernet bridge, but that runs at 436k PPS.
+
+
+Q) Are there any diagnostics?
+
+A) Yes, this is a research tool after all! There's a complex way to do this
+that's more general purpose and a simple one - here's the simple one:
+
+ mknod /dev/sfe c 253 0
+
+The file /dev/sfe is an XML-ish output and provides details of all the
+network connections currently being offloaded. It also reports the numbers
+of packets that took various "exception" paths within the code. In addition
+it provides a summary of the number of connections, attempts to accelerate
+connections, cancel accelerations, etc. It also reports the numbers of
+packets that were forwarded and not forwarded by the engine and has some
+stats on the effectiveness of the hashing algorithm it uses.
+
+
+Q) How does the code interact with Linux?
+
+A) There are four minor patches required to make this software run with
+Linux. These are currently against a 3.3.8 or 3.4.0 kernel:
+
+* (net/core/dev.c) adds a hook to allow packets to be extracted out.
+
+* (net/netfilter/nf_conntrack_proto_tcp.c) exposes a state variable inside
+ netfilter that's necessary to enable TCP sequence and ACK checking within
+ the offload path. Note that this specific patch is against the QCA QSDK
+ patched version of 3.3.8 - there's a slightly braindead "performance"
+ patch in that kernel, courtesy of the OpenWrt community that makes the
+ Linux forwarding path slightly faster at the expense of losing
+ functionality :-(
+
+* (net/Kconfig) adds the shortcut-fe option.
+
+* (net/Makefile) adds the shortcut-fe build support.
+
+Once these are applied and the module is loaded then everything else
+is automatic :-) The patches are in this git repo.
+
+
+Q) Are any of the pieces reused from other projects?
+
+A) Yes! Some of the forwarding concepts are reused from the Ubicom Network
+Accelerator that morphed into part of the Akronite NSS. This code has all
+been substantially changed though to accomodate Linux's needs.
+
+There are also some pieces that I borrowed from the QCA "FastNAT" software
+written by Xiaoping Fan . Xiaoping's code was the
+first actual demonstration within QCA that this in-kernel concept could yield
+signficant performance gains.
+
+
+Enjoy!
+Dave Hudson
+
diff --git a/package/lean/fast-classifier/src/fast-classifier.c b/package/lean/shortcut-fe/src/fast-classifier.c
similarity index 99%
rename from package/lean/fast-classifier/src/fast-classifier.c
rename to package/lean/shortcut-fe/src/fast-classifier.c
index e9f3d0eb4e..3e7e7ba329 100644
--- a/package/lean/fast-classifier/src/fast-classifier.c
+++ b/package/lean/shortcut-fe/src/fast-classifier.c
@@ -36,11 +36,12 @@
#include
#include
-#include
-#include
-#include
+#include "sfe_backport.h"
+#include "sfe.h"
+#include "sfe_cm.h"
#include "fast-classifier.h"
+
typedef enum fast_classifier_exception {
FAST_CL_EXCEPTION_PACKET_BROADCAST,
FAST_CL_EXCEPTION_PACKET_MULTICAST,
@@ -196,7 +197,7 @@ static atomic_t done_fail_msgs = ATOMIC_INIT(0);
* only implement ingress for now, because for egress we
* want to have the bridge devices qdiscs be used.
*/
-static bool skip_to_bridge_ingress;
+static bool skip_to_bridge_ingress=1;
/*
* fast_classifier_incr_exceptions()
@@ -1824,7 +1825,7 @@ static int __init fast_classifier_init(void)
DEBUG_ERROR("failed to register genl family: %d\n", result);
goto exit5;
}
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
result = genl_register_family_with_ops_groups(&fast_classifier_gnl_family,
fast_classifier_gnl_ops,
fast_classifier_genl_mcgrp);
diff --git a/package/lean/fast-classifier/src/fast-classifier.h b/package/lean/shortcut-fe/src/fast-classifier.h
similarity index 100%
rename from package/lean/fast-classifier/src/fast-classifier.h
rename to package/lean/shortcut-fe/src/fast-classifier.h
diff --git a/package/lean/fast-classifier/src/nl_classifier_test.c b/package/lean/shortcut-fe/src/nl_classifier_test.c
similarity index 100%
rename from package/lean/fast-classifier/src/nl_classifier_test.c
rename to package/lean/shortcut-fe/src/nl_classifier_test.c
diff --git a/package/lean/shortcut-fe/src/sfe_cm.h b/package/lean/shortcut-fe/src/sfe_cm.h
index 23cbde859b..b9cdd42045 100644
--- a/package/lean/shortcut-fe/src/sfe_cm.h
+++ b/package/lean/shortcut-fe/src/sfe_cm.h
@@ -175,7 +175,7 @@ void sfe_ipv4_register_sync_rule_callback(sfe_sync_rule_callback_t callback);
void sfe_ipv4_update_rule(struct sfe_connection_create *sic);
void sfe_ipv4_mark_rule(struct sfe_connection_mark *mark);
-#ifdef SFE_SUPPORT_IPV6
+
/*
* IPv6 APIs used by connection manager
*/
@@ -186,42 +186,7 @@ void sfe_ipv6_destroy_all_rules_for_dev(struct net_device *dev);
void sfe_ipv6_register_sync_rule_callback(sfe_sync_rule_callback_t callback);
void sfe_ipv6_update_rule(struct sfe_connection_create *sic);
void sfe_ipv6_mark_rule(struct sfe_connection_mark *mark);
-#else
-static inline int sfe_ipv6_recv(struct net_device *dev, struct sk_buff *skb)
-{
- return 0;
-}
-static inline int sfe_ipv6_create_rule(struct sfe_connection_create *sic)
-{
- return 0;
-}
-
-static inline void sfe_ipv6_destroy_rule(struct sfe_connection_destroy *sid)
-{
- return;
-}
-
-static inline void sfe_ipv6_destroy_all_rules_for_dev(struct net_device *dev)
-{
- return;
-}
-
-static inline void sfe_ipv6_register_sync_rule_callback(sfe_sync_rule_callback_t callback)
-{
- return;
-}
-
-static inline void sfe_ipv6_update_rule(struct sfe_connection_create *sic)
-{
- return;
-}
-
-static inline void sfe_ipv6_mark_rule(struct sfe_connection_mark *mark)
-{
- return;
-}
-#endif
/*
* sfe_ipv6_addr_equal()
diff --git a/package/lean/fast-classifier/src/userspace_example.c b/package/lean/shortcut-fe/src/userspace_example.c
similarity index 100%
rename from package/lean/fast-classifier/src/userspace_example.c
rename to package/lean/shortcut-fe/src/userspace_example.c
diff --git a/package/lean/wol/Makefile b/package/lean/wol/Makefile
new file mode 100644
index 0000000000..7375b66c40
--- /dev/null
+++ b/package/lean/wol/Makefile
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2007-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wol
+PKG_VERSION:=0.7.1
+PKG_RELEASE:=3
+
+PKG_SOURCE_URL:=@SF/ahh
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_MD5SUM:=c2fa9d7e771134ac8c89d56b8197d4ca
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wol
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Wake On LAN client
+ URL:=http://ahh.sourceforge.net/wol/
+endef
+
+define Package/wol/description
+ wol implements Wake On LAN functionality in a small program.
+ It wakes up hardware that is Magic Packet compliant.
+endef
+
+CONFIGURE_VARS += \
+ ac_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_realloc_0_nonnull=yes \
+ ac_cv_func_mmap_fixed_mapped=yes \
+ jm_cv_func_working_malloc=yes \
+ ac_cv_func_alloca_works=yes \
+
+define Package/wol/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/
+endef
+
+define Package/wol/conffiles
+/etc/config/wol
+endef
+
+$(eval $(call BuildPackage,wol))
\ No newline at end of file
diff --git a/package/lean/wol/patches/001-fix-build-on-x86.patch b/package/lean/wol/patches/001-fix-build-on-x86.patch
new file mode 100644
index 0000000000..5703beebc0
--- /dev/null
+++ b/package/lean/wol/patches/001-fix-build-on-x86.patch
@@ -0,0 +1,19 @@
+diff --git a/lib/getline.h b/lib/getline.h
+index 991184c..e41865c 100644
+--- a/lib/getline.h
++++ b/lib/getline.h
+@@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ # endif
+ # endif
+
++# ifdef _MUSL_
+ # if __GLIBC__ < 2
+ int
+ getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
+@@ -34,5 +35,6 @@ getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
+ int
+ getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
+ # endif
++# endif
+
+ #endif /* not GETLINE_H_ */