Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions net/udpspeeder-simd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# Copyright (c) 2026 David Connolly <david@connol.ly>
#
# This is free software, licensed under MIT
#

include $(TOPDIR)/rules.mk

PKG_NAME:=udpspeeder-simd
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/connollydavid/UDPspeeder-simd.git

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your forked repository has two extra commits compared to https://github.com/slartibardfast/UDPspeeder, and there's no pull request there. I mean, I'm looking at three repositories here. One is a completely unnecessary fork when it could have been solved with a patch ideally submitted to upstream, which would make it appear in the second repository, and since the second repository wants to get it into the third one, it would show up in this pull request. https://github.com/wangyu-/UDPspeeder/pull/354

Pretty convoluted, right? It's basically all about the exact same thing. And somehow I still don't know what exactly the advantage is of using your fork.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi,

yes, https://github.com/slartibardfast/UDPspeeder was for the initial idea.
but now it's complete, and had been requested on the bug ticket,
i've moved it to my this account & submitted it from here.

wangyu- doesn't appear to be available, or interested so i've now closed https://github.com/wangyu-/UDPspeeder/pull/354.

the only reason for including it is it takes us closer to line rate, at much lower cpu usage.

thanks, i'll take a look at the points you've raised.

p.s. when i seen CoPilot jump-in, i relaxed a little, i'll be much more careful in next commit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p.s. when i seen CoPilot jump-in, i relaxed a little, i'll be much more careful in next commit

Don't worry, there won't be a re-run of Copilot from my side, because I no longer have the credits to review pull requests here. 🤦 🙈

wangyu- doesn't appear to be available, or interested

@wangyu- ? :)

@connollydavid connollydavid Jul 5, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks Josef, if there's anything more i can do, please let me know.

fwiw, I intend to maintain udpspeeder-simd fully from now, including for security / bug reports.
I use it daily on otherwise quite crappy hardware with simd :)

(thinking for udpspeeder itself:
connollydavid@e9b1d20)

PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_MIRROR_HASH:=9ef24879157c493f610ab945c9bbec6c4c95ace929618faf21ccee8a0852e6e4

PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.md
PKG_MAINTAINER:=David Connolly <david@connol.ly>

PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16

include $(INCLUDE_DIR)/package.mk

define Package/udpspeeder-simd
SECTION:=net
CATEGORY:=Network
TITLE:=SIMD-accelerated UDP FEC tunnel
URL:=https://github.com/connollydavid/UDPspeeder-simd
DEPENDS:=+libstdcpp +librt +libatomic
endef

define Package/udpspeeder-simd/description
A Forward Error Correction UDP tunnel that improves a high-latency, lossy link
with Reed-Solomon redundancy. A SIMD-accelerated fork of UDPspeeder; on targets
with no SIMD path (for example MIPS) it uses a portable word-width path. Installs
alongside the udpspeeder package with distinct paths, so the two do not conflict.
endef

MAKE_FLAGS += cross gitversion="$(PKG_VERSION)"

define Package/udpspeeder-simd/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/speederv2_cross $(1)/usr/bin/udpspeeder-simd

$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/udpspeeder-simd.config $(1)/etc/config/udpspeeder-simd

$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/udpspeeder-simd.init $(1)/etc/init.d/udpspeeder-simd
endef

define Package/udpspeeder-simd/conffiles
/etc/config/udpspeeder-simd
endef

$(eval $(call BuildPackage,udpspeeder-simd))
19 changes: 19 additions & 0 deletions net/udpspeeder-simd/files/udpspeeder-simd.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

config udpspeeder-simd 'tunnel1'
option enabled '0'
option server '1'
option mode '0'
option mtu '1250'
option timeout '8'
option local '0.0.0.0:4096'
option remote '127.0.0.1:443'
option report '10'
option disable_obscure '1'
option interval '0'
option fec '2:4'
option disable_fec '0'
option sock_buf '1024'
option log_level '4'
option decode_buf '2000'
option fix_latency '1'
option queue_len '200'
116 changes: 116 additions & 0 deletions net/udpspeeder-simd/files/udpspeeder-simd.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2026 David Connolly <david@connol.ly>

START=89
STOP=11

USE_PROCD=1
PROG=/usr/bin/udpspeeder-simd

validate_udpspeeder_simd_section() {
uci_validate_section udpspeeder-simd udpspeeder-simd "${1}" \
'enabled:bool:0' \
'server:bool:0' \
'mode:integer:0' \
'mtu:integer:1250' \
'timeout:integer:8' \
'local:string' \
'remote:string' \
'key:string' \
'report:integer:10' \
'disable_obscure:bool:0' \
'interval:integer:0' \
'fec:string:20:10' \
'disable_fec:bool:0' \
'sock_buf:integer:1024' \
'log_level:integer:4' \
'decode_buf:integer:2000' \
'fix_latency:bool:0' \
'queue_len:integer:200'
}

start_instance() {

local section="$1"

local server mode mtu timeout local remote key report disable_obscure fifo interval \
fec disable_fec sock_buf queue_len decode_buf log_level fix_latency enabled

fifo="/tmp/udpspeeder-simd-${section}.fifo"

validate_udpspeeder_simd_section $section || {
echo "validation failed"
return 1
}

if [ "${enabled}" -ne 1 ]
then
return 1
fi

procd_open_instance
procd_set_param respawn
procd_set_param stderr 1
procd_set_param stdout 1

procd_set_param command "${PROG}"

if [ "${server}" -eq 1 ]
then
procd_append_param command -s
else
procd_append_param command -c
fi

if [ "${disable_fec}" -eq 1 ]
then
procd_append_param command --disable-fec
else
procd_append_param command --fec "${fec}"
fi

if [ "${fix_latency}" -eq 1 ] && [ "${mode}" -eq 0 ]
then
procd_append_param command --fix-latency
fi

if [ "${disable_obscure}" -eq 1 ]
then
procd_append_param command --disable-obscure
fi

[ -z "${key}" ] || procd_append_param command --key "${key}"

procd_append_param command -l "${local}"
procd_append_param command -r "${remote}"
procd_append_param command --mode "${mode}"
procd_append_param command --report "${report}"
procd_append_param command --interval "${interval}"
procd_append_param command --mtu "${mtu}"
procd_append_param command --sock-buf "${sock_buf}"
procd_append_param command --decode-buf "${decode_buf}"
procd_append_param command --queue-len "${queue_len}"
procd_append_param command --log-level "${log_level}"
procd_append_param command --fifo "${fifo}"
procd_append_param command --disable-color

procd_close_instance
}

start_service() {

config_load 'udpspeeder-simd'
config_foreach start_instance 'udpspeeder-simd'

}

stop_service()
{
service_stop ${PROG}
}

service_triggers()
{
procd_add_reload_trigger "udpspeeder-simd"
procd_add_validation validate_udpspeeder_simd_section
}