devlink dev info reports no chip id, and the ingress port meter keeps its
credit when a police action is removed. Report the device and revision
fields of the switch id register as the generic asic id and revision;
device 0x15 with revision 0 is IPQ807x and 1 is IPQ6018, and probe does not
depend on it. Clear both words of the port's meter credit entry when the
rate goes to zero, as the port shaper already does.
On IPQ8074 the credit entry reads zero after the police action is deleted,
and a re-armed police holds its rate.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
Disabling a port leaves its queued frames holding buffers charged to the
admission and shared groups, so every other port is admitted against a
smaller pool. On port_disable, stop each unicast and multicast queue's
enqueue and dequeue, flush it through FLUSH_CFG and wait for completion,
one queue at a time with the QM clock gate dropped around the pass. The
gates stay closed until port_enable, and the CPU port is skipped.
On IPQ8074 a full queue drains to empty when its port goes down and fills
again once the port is back up.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The L2 block has two trunk groups, and without port_lag_join a bond over
switch ports stays in software. Implement port_lag_join, port_lag_leave,
port_lag_change and the LAG FDB ops; port_lag_change rebuilds the eight
hash buckets from the transmitting members, which is the failover.
num_lag_ids is 2, only hash-mode bonds are offloaded, and a second LAG must
hash on the same fields, since TRUNK_HASH_FIELD at 0x002068 in the ingress
parser is shared. Flooding is limited to one member per LAG, and a fast age
on a member ages the LAG.
On IPQ8074 a layer2 bond programs the hash field and the buckets, and the
peer is reachable through the bond; LACP and traffic over both links are
not measured, because the bench has no aggregation partner.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
Classifier occupancy, the buffer pool limits and a port's registers are
fixed or hidden in the driver. Register the ACL table as a devlink resource
with an occupancy callback, and the four BM and four QM groups as the
ingress and egress pools of one devlink shared buffer, settable except as a
static pool, and add get_regs on user ports as address and value pairs.
Pool occupancy is left out, because the hardware keeps no watermark.
Measured on IPQ8074 (the bench has no IPQ6018 board): the resource reads 2
of 512, and ingress pool 0 reads 358400 bytes and resizes.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The conduit's ring sizes are fixed at 128 and 2048, and ethtool cannot
change them. Add set_ringparam on the EDMA conduit, with power-of-two
rings between 64 and 8192, and reuse the reconfigure path for the resize,
which puts the old rings back if the new ones cannot be allocated.
Measured on IPQ8074: the rings resize from 128/2048 to 256/1024 and back
with the datapath intact.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The ACL engine has 512 entries, and the driver uses two at fixed indices
with no way to install a rule from userspace. Add an allocator that places
a rule on the entry chains the hardware can merge, with range compares on
even entries, move the two small-packet rules onto it, and implement
cls_flower_add and cls_flower_del for MAC, IPv4, IPv6, L4 port and port
range, ICMP, IP protocol, DSCP, TCP flag and fragment keys, refusing any
other key. The actions are pass, drop, trap, skbedit priority, redirect,
mirred mirror, which claims both of the port mirror's analyzers, pedit of
the DSCP byte and police on one of the 512 ACL meters, and set_rxnfc gives
ethtool -N the queue action, refusing queues 12 to 143, the CPU port queues
the scheduler does not serve, and a VF or RSS context, which the switch
does not have. The engine matches the highest PRI, so a rule's priority is
the 9-bit span minus its tc preference. The address family comes from the
control key, since cls_flower registers both address keys over one union,
and from the registered address key where ethtool_rx_flow_rule_create()
leaves the control key out.
On IPQ8074 every accepted action installs in_hw, an ICMP drop filter drops
in the switch, and a pedit to 0x88 moves the datagrams to another egress
queue.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The PPE counts frames at every stage and the driver enables most of the
counting, but nothing reads it back. Add qca_ppe_debugfs.c with read-only
files for the L3 interface, port policer, drop code, queue, buffer manager,
ingress, egress and ACL counters, at the addresses of this generation
rather than the APPE ones the IPQ9574 driver uses. The queue drop counters
sit past 0x900000, so the PPE register window grows to 0xa00000 in both
dtsi files and the binding example. Nothing is written, and sparse tables
skip entries that counted nothing.
On IPQ8074 the drop_code, queues and bm files give the drop codes and queue
occupancy the later patches in this series are measured with.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The port's unicast scheduler is three strict bands, but nothing tells tc.
Offload an ets or prio qdisc at the root when it describes those bands:
three bands, served from band 0 down as tc numbers them, and a priomap
that matches the band split ppe_qm_init programs or is the default one.
sch_ets fills in a quantum for every band, so only quanta that differ
between bands are refused. Neither qdisc programs the hardware; an
accepted one reports the port's counters.
Measured on IPQ8074: ets and prio with bands 3 and priomap 2 2 2 2 1 1 1 1
0 ... are offloaded, and two bands, unequal quanta and the inverted priomap
are refused.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The driver writes green_max into the multicast admission entry's
GAP_GRN_YEL field and 400 into SHARED_CEILING, while qca-ssdk puts
green_max in the ceiling and leaves the gaps at zero. Rename the fields
after the register and write the values where qca-ssdk does. Fill
MCAST_PRIORITY_MAPn on user ports so flooded traffic reaches all of a
port's multicast queues instead of class 0 only; the CPU port keeps its
reset map. Set PC_DROP_BYPASS so dropped frames spend no policer tokens,
and METER_CMPST_LENGTH to the 4 FCS bytes, both as qca-ssdk does.
Measured on IPQ8074: the first multicast entry reads ceiling 250 with zero
gaps, and a four-queue port's map reads 0, 1, 2, 3, 3, 3.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The driver turns learning on for every port and floods to every VSI member,
so "bridge link set flood off" returns -EINVAL and a port that left its
bridge keeps learning. Implement port_pre_bridge_flags and
port_bridge_flags for BR_LEARNING, the three flood flags and BR_ISOLATED,
and add port_fast_age, which deletes the port's learned FDB entries.
BR_LEARNING switches station moves together with new-address learning, so a
port with learning off no longer moves an existing FDB entry onto itself.
Standalone ports now start flooding and not learning, as DSA defines them.
On IPQ8074 each flag reads back in its register and reverts, a station move
is not learned with learning off and is with it on, and routing and NAT
offload are unaffected.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
Each priority has one unicast queue, so all best-effort flows share one
FIFO. Spread each port's 5-tuple hash over four queues per band, with
strict bands: bulk, classified priorities, and on a user port priorities
8 and up on the second scheduler node. The CPU port takes the same
bands, so its queue bases for CPU codes and service codes 2 and 6 move
to 0, and queues 4 to 7 sit a priority above the rest. On a shaped port
each band queue takes a quarter of the configured depth.
Measured on IPQ8074, Waveform over Wi-Fi with the download shaped to 305
Mbit/s, three interleaved runs: +19/+21/+32 ms before, +5/+14/+15 ms after.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The port scheduler is strict priority, so a class that never runs dry
starves every class below it, and the port shaper cannot bound one class.
Offload the mqprio per-class max_rate to the shaper of the scheduler node
the class spans: one queue maps to its L0 node, all queues of an L1 node to
that node, and any other split, or a priomap that disagrees with the queue
ranges, is refused. A rate arms the committed bucket and an empty excess
bucket, because the excess input otherwise passes whatever the committed
one refuses. A shaped class's queues take a static limit of 10 ms of the
rate, and nothing is programmed until every class is checked.
On IPQ8074 a one-queue class and an eight-queue class are each held to
their max_rate.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
An offloaded flow never reaches the CPU, so tcpdump cannot see it.
Implement port_mirror_add and port_mirror_del on the switch's ingress and
egress analyzer ports. Each direction has its own analyzer, so an ingress
and an egress mirror can go to different ports, as mv88e6xxx does with
ingress_dest_port and egress_dest_port; a second mirror of one direction to
another port is refused. The enable bit is counted per port and direction.
On IPQ8074 a mirrored LAN port delivers a forwarded download to the
analyzer.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
Every packet lands in a port's priority-0 queue, because the
DSCP-to-priority table is all zeroes and nothing fills it. Implement the
DSA DCB ops: dcb app dscp-prio fills the table, which all ports share and
is reported global, and dcb apptrust orders DSCP and PCP precedence and
refuses a one-selector list. The PCP map, measured to be indexed by
PCP << 1 | DEI, is set to identity at probe, and priorities are capped at
11, because the top four unicast queues share their scheduler nodes with
the multicast queues.
On IPQ8074, after dcb app add dscp-prio 46:5, EF-marked packets on an
offloaded path land on the priority-5 queue.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
The PPE has a token bucket per port in each direction, and the driver uses
neither. Offload a root tbf to the egress port shaper and a matchall police
action to the ingress port meter, which runs in RFC 2697 single-rate mode
with red dropped, and report the port's transmit and drop counters as
TC_TBF_STATS. A shaped port's queues get a static limit enforced by
dropping, 1 ms of the rate with a floor of eight frames, because the
probe-time dynamic limit asserts flow control and does not bind. The tbf
overhead, mpu and linklayer are ignored rather than refused, since
sqm-scripts sets them on every shaper.
Run on IPQ8074; the bench has no IPQ6018 board.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
DSA copies only the rate and burst of a matchall police action into
dsa_mall_policer_tc_entry, so a port offered a two-rate meter installs a
single-rate one and reports success. Backport c22ba07c827f ("net: dsa:
eliminate local type for tc policers", v7.0) and 09e4d1298b36 ("net: dsa:
pass extack to dsa_switch_ops :: port_policer_add()", v7.2), which hand
port_policer_add the whole struct flow_action_police and an extack. The
qca_ppe port meter in the next patch uses them to refuse what it cannot
express. The devlink flash_update and rtl839x/rtl931x port count patches
are refreshed for the shifted hunks.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25700
Signed-off-by: Robert Marko <robimarko@gmail.com>
add drm-display-helper as a dependency on 6.18 and add
imx-legacy-bridge.ko to the drm-imx-ldb package to fix:
Package kmod-drm-imx-ldb is missing dependencies for the following libraries:
drm_display_helper.ko
imx-legacy-bridge.ko
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This refreshes the configuration for Linux kernel 6.18.
I first selected one subtarget after the other and refreshed their
configuration using this command:
make kernel_oldconfig CONFIG_TARGET=subtarget
Then I selected the cortexa7 subtarget and then refreshed the target
kernel configuration using this command:
make kernel_oldconfig CONFIG_TARGET=target
Then I selected one subtarget after the other and refreshed their
configuration using this command:
make kernel_oldconfig CONFIG_TARGET=subtarget
I compared the kernel configuration used to compile the kernel from the
build directory for each subtarget before updating the target
config-6.18 file and after all tasks and it was still the same.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[for imx6 (on Toradex i.MX6D)]
Tested-by: Zoltan HERPAI <wigyori@uid0.hu>
Add KERNEL_TESTING_PATCHVER for Linux 6.18.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[for imx6 (on Toradex i.MX6D)]
Tested-by: Zoltan HERPAI <wigyori@uid0.hu>
We have to remove the patches which are already included in
linux-6.18.55.
We also have to refresh 315-arm64-dts-Add-support-for-Olimex-i.MX8MP-...
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[for imx6 (on Toradex i.MX6D)]
Tested-by: Zoltan HERPAI <wigyori@uid0.hu>
This refreshes the configuration for Linux kernel 6.12.
I first selected the cortexa7 subtarget and then refreshed the target
kernel configuration using this command:
make kernel_oldconfig CONFIG_TARGET=target
Then I selected one subtarget after the other and refreshed their
configuration using this command:
make kernel_oldconfig CONFIG_TARGET=subtarget
After this, I had to manually enable CONFIG_PCI_IMX6_HOST for the
cortexa9 subtarget.
I compared the kernel configuration used to compile the kernel from the
build directory for each subtarget before and after this task and it was
still the same.
Also rename the subtarget config files to config-6.12 as a preparation
for linux 6.18 testing support.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[for imx6 (on Toradex i.MX6D)]
Tested-by: Zoltan HERPAI <wigyori@uid0.hu>
If input, drm or video support is enabled on imx targets, then these
will pop up.
We add them to the generic configs, because they will be dropped again
if we add them to the target config and call `make kernel_oldconfig
CONFIG_TARGET=target`.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[for imx6 (on Toradex i.MX6D)]
Tested-by: Zoltan HERPAI <wigyori@uid0.hu>
The driver is restricted to kernel 6.12 since commit 57ce8f50e6
("rtl8812au-ct: restrict to kernels ≤ 6.18"), which describes it as
obsolete and replaced by rtw88. With all targets switching to kernel
6.18, it can no longer be built at all.
rtw88 supports the same hardware: all RTL8812AU and RTL8821AU USB IDs
of this driver are handled by kmod-rtw88-8812au and kmod-rtw88-8821au.
The only exception, 2357:0115 (TP-Link Archer T4U), is an RTL8812BU
device and is handled by kmod-rtw88-8822bu.
No device profile or package depends on kmod-rtl8812au-ct or the
virtual kmod-rtl8812au-any, so no other changes are needed.
Signed-off-by: Sander van Deijck <sander@vandeijck.com>
Link: https://github.com/openwrt/openwrt/pull/25972
Signed-off-by: Robert Marko <robimarko@gmail.com>
The global flow control thresholds are left at their reset values, so
the switch starts to drop frames once 984 pages of the packet buffer
are in use. The vendor SDK raises them at initialisation, to 2592 pages
in its 8x10G profile and to 2192 pages in its larger ones.
Program the SDK values in the four global threshold registers: those of
the 8x10G profile on switches with up to 8 user ports, the others above
that.
RTL9303, pause off, TCP for 20 seconds through a port limited to
100 Mbit/s on egress: one flow is retransmitted 164 and 149 times
before and 56 and 72 times after, four flows 1480 and 1473 times
before and 291 and 294 times after, at 0.7 to 0.8 Mbit/s more
throughput. The deeper buffer raises the queueing delay at that port
from at most 20 ms to at most 58 ms.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Quinn O'Shea <qoshea@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25970
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
The legacy debugfs implementation selects private diagnostic registers by
family at read time. Move these switch-wide counters into stats.c and
select immutable counter descriptors through priv->r->drop_desc.
Keep an explicit register offset for each of the 246 retained counters.
Omit the RTL838x bridge learned-entry discard counter at 0x6a9c and the
four reserved slots on RTL930x/RTL931x. All retained counters are 16-bit,
so a single OTTO_DROP macro and a common read path suffice. Correct two
RTL930x counter labels.
Expose a read-only realtek_otto_stats/drop_counters file. Serialize register
reads with reg_mutex, propagate regmap failures, and remove the debugfs
interface before switch teardown. A devm action also covers resource
cleanup; unavailable debugfs does not prevent switch operation. The fixed
root is owned by one device and is never reused by another instance.
Remove the legacy drop-counter data, reader and registrations. Other
legacy debugfs features and existing MIB exports are unchanged.
Assisted-by: ChatGPT (OpenAI GPT-6 Astra)
Link: https://github.com/openwrt/openwrt/pull/25931
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Add the stateful V4L2 encoder driver for the RKVENC v1 of the RV1126 and
RK3568 as patches 183: its binding, the PD_VEPU clock tree, the driver
and the device tree node, followed by the frequency scaling with a
cooling device and the operating points that go with it. The operating
points carry the vendor voltages, which apply once a board names the
supply of the encoder. The NPU thermal zone gets two passive trips and
cools the encoder, which lowers its clock and voltage and then its frame
rate. The zone is polled every second, since the temperature trend
decides when the cooling device is released.
Build the devfreq core and the simple_ondemand governor into the ARMv7
kernel for the frequency scaling, and let the 38x38 v10 board name
vdd_logic_npu_vepu as the supply of the encoder.
Add kmod-video-rockchip-rkvenc and install it on the Herospeed RV1126
board.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add the rkisp2 driver for the image signal processor of the RK3588 and
the RV1126, in three groups of patches:
- 180: the posted series of Xu Hongfei and Paul Elder, a driver with the
parameters and statistics nodes, its binding and the RK3588 device
tree nodes;
- 181: fixes for that series, for example the media bus code of the YUV
formats, the missing V4L2_ISP selection, the chroma resizing for 4:2:0
output, the third histogram block, the DMA segment size, the colour
space defaults and range, the reset bits of SWS_CFG and the interrupts
of the 3A blocks;
- 182: support for the ISP 2.0 of the RV1126, with its binding, the ISPP
clock tree and device tree nodes, the raw frames from the VICAP, the
white balance means of the ISP core and an IOMMU change that maps the
MMU registers non-exclusively since they lie inside the ISP range.
Add kmod-video-rockchip-isp2 and install it on the Herospeed RV1126 board.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Backport the V4L2 generic ISP types and the v4l2-isp helpers that ISP
drivers use for their parameters and statistics buffers: the two v6.19
commits and a rename that followed them, and the four v7.3 commits that
add the extensible statistics buffer, the per-block validation callback
and the statistics helpers.
Add kmod-video-v4l2-isp for the v4l2-isp module.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add two rkcif kernel patches. The first masks the MIPI interrupts that
come out of reset enabled, which kept the interrupt line asserted at
about a thousand interrupts per second until the kernel disabled it.
The second lets the RV1126 ISP take the raw frames of the VICAP without
user space: it writes the unpacked raw formats MSB aligned, keeps a
larger sizeimage set by the application and offers the MIPI stream to a
consumer through a V4L2 subdevice.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Interface naming currently depends on registration order between
stmmac instances, which is non-deterministic when multiple probes
race at boot (e.g. two independent GMACs with no shared switch).
This causes eth0/eth1 to swap randomly across reboots on some
platforms.
Force the netdev name to match the "ethernetN" DT alias when one is
present. plat->bus_id cannot be used for this: stmmac_platform.c
falls back to a driver-global counter when of_alias_get_id() finds
no alias, so plat->bus_id is never negative and every stmmac netdev
would be forced, including boards with no alias at all. Re-read the
alias directly from the device's OF node instead, and only force the
name when it actually resolves. Fall back to the original
auto-numbering template if the forced name collides.
unifi-ac-hd already has a correct alias mapping, so the preinit
eth0/eth1 swap hack for it is no longer needed. Drop it.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/25143
Signed-off-by: Robert Marko <robimarko@gmail.com>
G10 and WPQ864 alias ethernet1 to &gmac0, which is never enabled on
either board; the GMAC that actually is enabled, gmac2, has no
alias. The following commit will force netdev naming from the DT alias,
so point ethernet1 at gmac2 to keep both active GMACs aliased.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/25143
Signed-off-by: Robert Marko <robimarko@gmail.com>
The kmod definitions live in ath.mk, intel.mk and the other included
.mk files, but the package scan only regenerates the mac80211 metadata
when the Makefile changes. An edit to a DEPENDS or Kconfig line in
ath.mk is then ignored until tmp/ is deleted by hand.
Name the included files in SCAN_DEPS, as linux-firmware does.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25953
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add the TX completion, RX fill and RX descriptor interrupts of ring
sets 22/6/14, 21/5/13 and 20/4/12. The lines count down from the first
set's: TX completion ring n is SPI 355 + n, RX fill ring n SPI 347 + n
and RX descriptor ring n SPI 331 + n, each read from the GIC pending
state on a Linksys MR7350 with only that ring's interrupt unmasked.
Link: https://github.com/openwrt/openwrt/pull/25663#issuecomment-6194790602
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25663
Signed-off-by: Robert Marko <robimarko@gmail.com>
The PPE spreads unicast to the CPU by its RSS hash over four switch
queues from each of three bases, and the EDMA queue-to-ring table
decides which receive ring each hash bucket feeds. Offer that table as
the ethtool RSS indirection table, so that "ethtool -X" can weight or
narrow the spread. The hash key is not offered: the PPE hash is not
Toeplitz and its seed is a PPE register.
On IPQ8074 with four rings and 3000 datagrams in 64 flows to the CPU,
"equal 2" leaves rings 2 and 3 and "weight 1 0 0 1" leaves rings 1 and
2 without a receive interrupt (n=3).
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25663
Signed-off-by: Robert Marko <robimarko@gmail.com>
Add the TX completion, RX fill and RX descriptor interrupts of ring
sets 6/6/14, 5/5/13 and 4/4/12. The lines count down from the first
set's: TX completion ring n is SPI 352 - n, RX fill ring n SPI 360 - n
and RX descriptor ring n SPI 376 - n, each read from the GIC pending
state with only that ring's interrupt unmasked.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25663
Signed-off-by: Robert Marko <robimarko@gmail.com>
The driver uses one RX and one TX ring set, so all traffic through the
host is handled by one CPU. Use up to four ring sets, as many as the
device tree gives interrupts for, counting down from the rings in the
SoC data. Each set has one NAPI context for its TX completions and RX,
its own page pool and TX queue; XPS maps TX queue n to CPU n, and the
switch queues map onto the RX rings through QID2RID. The regmap runs
without its lock, since a ring's registers are only touched from its
own NAPI or under its TX lock, and threaded NAPI starts at the first
open so that packet steering can pair each NAPI thread with its queue.
ethtool -l/-L reports and changes the number of ring sets.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25663
Signed-off-by: Robert Marko <robimarko@gmail.com>
Out of reset the RSS hash puts every flow in the same bucket, so the
RX hash qca_edma reports is the same for every frame and RPS cannot
spread the receive work. Program the hash, and spread unicast to the
CPU port over four queues from each of its queue bases 0, 4 and 8 by it.
Queues 0 to 11 share one priority and one DRR node. Only queues 0, 4 and
8 carried unicast before.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://github.com/openwrt/openwrt/pull/25663
Signed-off-by: Robert Marko <robimarko@gmail.com>
The cfg80211 7.2 API conversion changed cfg80211_rtw_get_key() to take
a wireless_dev instead of a net_device, but its DBG_871X() statement
still uses ndev. This breaks compilation with an undeclared identifier:
ioctl_cfg80211.c: error: 'ndev' undeclared (first use in this function)
Derive ndev from wdev before the disabled code block, matching the other
converted callbacks. Bump PKG_RELEASE to rebuild the module.
Fixes: 3c1066f412 ("rtl8812au-ct: fix build with mac80211 7.2")
Signed-off-by: Alexander Zaguzin <st7105@gmail.com>
16c95b04c020 main: tear down the DNS ifb device on exit
d8b47df02cdf interface: fix the socket() error check in qosify_iface_init()
21cc61818226 interface: fix the ifb device name for long interface names
bbb96c522f39 interface: add option for multiqueue cake
39889ba2d94b interface: only use cake_mq on devices with several transmit queues
b2f9e2818d1c interface: create the ifb device with one queue per receive queue
c6983494fe42 qosify-bpf: only override unmarked packets with a fallback value
551491cead1c dns: check the length of address records
f840a74077f3 qosify-bpf: classify IPv4 fragments like their first fragment
90c756581a62 interface: factor out the setup of filter netlink messages
aa3aa6b52c63 interface: redirect DNS replies with one flower filter
ddd72827f252 qosify-bpf: add a macro for timeouts in seconds
b3ee50eff9d9 map: accept port 65535 in port rules
DNS replies are now redirected with flower, add kmod-sched-flower to
the dependencies. Add the multiqueue option to the config.
Link: https://github.com/openwrt/openwrt/pull/25696
Signed-off-by: Nick Hainke <vincent@systemli.org>