Re: [PATCH net-next v5] tun: limit printing rate when illegal packet received by tun dev

From: Eric Dumazet
Date: Mon Apr 15 2024 - 02:08:42 EST


On Mon, Apr 15, 2024 at 4:03 AM Lei Chen <lei.chen@xxxxxxxxxx> wrote:
>
> vhost_worker will call tun call backs to receive packets. If too many
> illegal packets arrives, tun_do_read will keep dumping packet contents.
> When console is enabled, it will costs much more cpu time to dump
> packet and soft lockup will be detected.
>
> net_ratelimit mechanism can be used to limit the dumping rate.
>
> Fixes: ef3db4a59542 ("tun: avoid BUG, dump packet on GSO errors")
> Signed-off-by: Lei Chen <lei.chen@xxxxxxxxxx>
> Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>
> Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
> ---

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>