[PATCH net-next] net: airoha: Add matchall filter offload support
Davide Caratti
dcaratti at redhat.com
Tue Apr 8 01:05:17 PDT 2025
hello Lorenzo, thanks for this patch!
On Mon, Apr 7, 2025 at 10:04 PM Lorenzo Bianconi <lorenzo at kernel.org> wrote:
>
> Introduce tc matchall filter offload support in airoha_eth driver.
> Matchall hw filter is used to implement hw rate policing via tc action
> police:
>
> $tc qdisc add dev eth0 handle ffff: ingress
> $tc filter add dev eth0 parent ffff: matchall action police \
> rate 100mbit burst 1000k drop
>
> Curennet implementation supports just drop/accept as exceed/notexceed
> actions. Moreover, rate and burst are the only supported configuration
> parameters.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
[...]
> +
> + if (act->police.peakrate_bytes_ps || act->police.avrate ||
> + act->police.overhead) {
> + NL_SET_ERR_MSG_MOD(f->common.extack,
> + "peakrate/avrate/overhead not supported");
> + return -EOPNOTSUPP;
> + }
I think the driver should also validate the so-called "mtu policing"
parameter. E.g, configuring it in the hardware if it has non-zero
value in act->police, or alternatively reject offloading of police
rules where act->police.mtu is non-zero (like done in the hunk above).
WDYT?
--
davide
More information about the Linux-mediatek
mailing list