diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-12-20 14:20:33 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2022-12-29 23:10:26 +0000 |
commit | fd47cc3fe1685379208ba05aaf3897548a25de3a (patch) | |
tree | b28f2770f6bbfd929756402da194836317e8df0c /meta-agl-core/recipes-core | |
parent | 0959dc5496364ef3b3af9605b58d1d00f330d299 (diff) |
systemd-conf-canbus: Add link configuration
Add a .link file to set the transmit queue length to 1000 for physical
CAN devices. This matches the default used for vcan devices, and in
testing fixes the transmit buffer overflows when running the simulator
script against an interface.
Bug-AGL: SPEC-4652
Change-Id: Icb190cdcbda9b09e337789d3a88e39f7288f34eb
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/28304
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-core/recipes-core')
-rw-r--r-- | meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link | 11 | ||||
-rw-r--r-- | meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb | 8 |
2 files changed, 17 insertions, 2 deletions
diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link new file mode 100644 index 000000000..61fb4d575 --- /dev/null +++ b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus/canbus-can.link @@ -0,0 +1,11 @@ +[Match] +Type=can +OriginalName=can* + +[Link] +TransmitQueueLength=1000 +# Need to duplicate default configuration here, since only first +# matching .link is applied +NamePolicy=keep kernel database onboard slot path +AlternativeNamesPolicy=database onboard slot path +MACAddressPolicy=persistent diff --git a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb index fc2c0c253..a23cd839a 100644 --- a/meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb +++ b/meta-agl-core/recipes-core/systemd/systemd-conf-canbus_1.0.bb @@ -10,19 +10,23 @@ SRC_URI = "\ file://canbus-can.network \ file://canbus-can-fd.network \ file://canbus-virtio.network \ + file://canbus-can.link \ " CANBUS_NETWORK_CONFIG ??= "canbus-can.network" CANBUS_NETWORK_CONFIG:virtio-all ?= "canbus-virtio.network" do_install() { - # Install canbus network script + # Install CAN bus network configuration install -d ${D}${nonarch_base_libdir}/systemd/network/ install -m 0644 ${WORKDIR}/${CANBUS_NETWORK_CONFIG} ${D}${nonarch_base_libdir}/systemd/network/60-canbus-can.network + + # Install link configuration to bump queue size on physical CAN bus devices + install -m 0644 ${WORKDIR}/canbus-can.link ${D}${nonarch_base_libdir}/systemd/network/60-canbus-can.link } PACKAGE_ARCH = "${MACHINE_ARCH}" FILES:${PN} = " \ - ${nonarch_base_libdir}/systemd/network/*.network \ + ${nonarch_base_libdir}/systemd/network/ \ " |