diff options
Diffstat (limited to 'meta-agl/meta-agl-bsp/recipes-kernel/linux')
7 files changed, 116 insertions, 2 deletions
diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch new file mode 100644 index 00000000..7c34fb30 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch @@ -0,0 +1,25 @@ +From 17d0075d95b5087d5df553444cca390fa479bad9 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay <matt.ranostay@konsulko.com> +Date: Tue, 10 Mar 2020 22:27:28 -0700 +Subject: [PATCH] net: sch_generic: add if_afp.h header to get ARPHRD_CAN macro + +Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> +--- + net/sched/sch_generic.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c +index bf8c81e07c70..1845ef8c7dbd 100644 +--- a/net/sched/sch_generic.c ++++ b/net/sched/sch_generic.c +@@ -25,6 +25,7 @@ + #include <linux/rcupdate.h> + #include <linux/list.h> + #include <linux/slab.h> ++#include <linux/if_arp.h> + #include <linux/if_vlan.h> + #include <net/sch_generic.h> + #include <net/pkt_sched.h> +-- +2.25.0 + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc index 87249bdc..8521b1d6 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc @@ -8,3 +8,6 @@ SRC_URI_append_with-lsm-smack = "\ file://Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch \ " +SRC_URI_append = "\ + file://net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch \ + " diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc index e8be23c7..7e801e0a 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc @@ -2,6 +2,12 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" DEPENDS += "kern-tools-native" +# canbus qdisc pfifo change +SRC_URI_append = " file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch" + +# bbe target has this upstream patch already +SRC_URI_remove_bbe = " file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch" + # returns all the elements from the src uri that are .cfg files def find_cfgs(d): sources=src_patches(d, True) @@ -92,3 +98,6 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/iiodevice.cfg" SRC_URI_append = " file://rtc.cfg" KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtc.cfg" +# netfilter options +SRC_URI_append = " file://netfilter.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/netfilter.cfg" diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg index 6f7d4988..ff12e6da 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg @@ -1,4 +1,4 @@ CONFIG_CFG80211=m CONFIG_MAC80211=m -CONFIG_ATH_CARDS=m +CONFIG_WLAN_VENDOR_ATH=m CONFIG_ATH9K_HTC=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg index 8633f29a..c5b8ff35 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg @@ -22,4 +22,5 @@ CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y # # Triggers - standalone # -CONFIG_IIO_HRTIMER_TRIGGER=m
\ No newline at end of file +CONFIG_IIO_HRTIMER_TRIGGER=m +CONFIG_IIO_TRIGGERED_BUFFER=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch new file mode 100644 index 00000000..37ace5a5 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch @@ -0,0 +1,75 @@ +From 546b85bb0aadb5a928b49b53dc02911996169c0b Mon Sep 17 00:00:00 2001 +From: Vincent Prince <vincent.prince.fr@gmail.com> +Date: Wed, 23 Oct 2019 15:44:20 +0200 +Subject: [PATCH] net: sch_generic: Use pfifo_fast as fallback scheduler for + CAN hardware + +There is networking hardware that isn't based on Ethernet for layers 1 and 2. + +For example CAN. + +CAN is a multi-master serial bus standard for connecting Electronic Control +Units [ECUs] also known as nodes. A frame on the CAN bus carries up to 8 bytes +of payload. Frame corruption is detected by a CRC. However frame loss due to +corruption is possible, but a quite unusual phenomenon. + +While fq_codel works great for TCP/IP, it doesn't for CAN. There are a lot of +legacy protocols on top of CAN, which are not build with flow control or high +CAN frame drop rates in mind. + +When using fq_codel, as soon as the queue reaches a certain delay based length, +skbs from the head of the queue are silently dropped. Silently meaning that the +user space using a send() or similar syscall doesn't get an error. However +TCP's flow control algorithm will detect dropped packages and adjust the +bandwidth accordingly. + +When using fq_codel and sending raw frames over CAN, which is the common use +case, the user space thinks the package has been sent without problems, because +send() returned without an error. pfifo_fast will drop skbs, if the queue +length exceeds the maximum. But with this scheduler the skbs at the tail are +dropped, an error (-ENOBUFS) is propagated to user space. So that the user +space can slow down the package generation. + +On distributions, where fq_codel is made default via CONFIG_DEFAULT_NET_SCH +during compile time, or set default during runtime with sysctl +net.core.default_qdisc (see [1]), we get a bad user experience. In my test case +with pfifo_fast, I can transfer thousands of million CAN frames without a frame +drop. On the other hand with fq_codel there is more then one lost CAN frame per +thousand frames. + +As pointed out fq_codel is not suited for CAN hardware, so this patch changes +attach_one_default_qdisc() to use pfifo_fast for "ARPHRD_CAN" network devices. + +During transition of a netdev from down to up state the default queuing +discipline is attached by attach_default_qdiscs() with the help of +attach_one_default_qdisc(). This patch modifies attach_one_default_qdisc() to +attach the pfifo_fast (pfifo_fast_ops) if the network device type is +"ARPHRD_CAN". + +[1] https://github.com/systemd/systemd/issues/9194 + +Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> +Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> +Acked-by: Dave Taht <dave.taht@gmail.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + net/sched/sch_generic.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c +index ed5b0e9fd395..4c5dfcb01e00 100644 +--- a/net/sched/sch_generic.c ++++ b/net/sched/sch_generic.c +@@ -1038,6 +1038,8 @@ static void attach_one_default_qdisc(struct net_device *dev, + + if (dev->priv_flags & IFF_NO_QUEUE) + ops = &noqueue_qdisc_ops; ++ else if(dev->type == ARPHRD_CAN) ++ ops = &pfifo_fast_ops; + + qdisc = qdisc_create_dflt(dev_queue, ops, TC_H_ROOT, NULL); + if (!qdisc) { +-- +2.25.0 + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg new file mode 100644 index 00000000..34be704c --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg @@ -0,0 +1 @@ +CONFIG_NETFILTER_XT_MATCH_OWNER=m |