[PATCH net-next] net: airoha: Add matchall filter offload support
Lorenzo Bianconi
lorenzo at kernel.org
Tue Apr 8 01:11:45 PDT 2025
> hello Lorenzo, thanks for this patch!
Hi Davide,
thx for the review.
>
> 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?
ack, right, I missed it. I will add it in v2.
Regards,
Lorenzo
> --
> davide
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20250408/dcf51217/attachment-0001.sig>
More information about the Linux-mediatek
mailing list