From: Greg KH <gregkh@linuxfoundation.org>
To: Davide Caratti <dcaratti@redhat.com>
Cc: stable@vger.kernel.org, echaudro@redhat.com, i.maximets@ovn.org
Subject: Re: [PATCH 5.10] net/sched: act_police: more accurate MTU policing
Date: Mon, 20 Jun 2022 13:48:00 +0200 [thread overview]
Message-ID: <YrBecGERMPdVEWaw@kroah.com> (raw)
In-Reply-To: <9793e31d40fa043c5965d3008d8534d01f533fa0.1655471603.git.dcaratti@redhat.com>
On Fri, Jun 17, 2022 at 03:32:59PM +0200, Davide Caratti wrote:
> commit 4ddc844eb81da59bfb816d8d52089aba4e59e269 upstream.
>
> in current Linux, MTU policing does not take into account that packets at
> the TC ingress have the L2 header pulled. Thus, the same TC police action
> (with the same value of tcfp_mtu) behaves differently for ingress/egress.
> In addition, the full GSO size is compared to tcfp_mtu: as a consequence,
> the policer drops GSO packets even when individual segments have the L2 +
> L3 + L4 + payload length below the configured valued of tcfp_mtu.
>
> Improve the accuracy of MTU policing as follows:
> - account for mac_len for non-GSO packets at TC ingress.
> - compare MTU threshold with the segmented size for GSO packets.
> Also, add a kselftest that verifies the correct behavior.
>
> [dcaratti: fix conflicts due to lack of the following commits:
> - commit 2ffe0395288a ("net/sched: act_police: add support for
> packet-per-second policing")
> - commit 53b61f29367d ("selftests: forwarding: Add tc-police tests for
> packets per second")]
> Link: https://lore.kernel.org/netdev/876d597a0ff55f6ba786f73c5a9fd9eb8d597a03.1644514748.git.dcaratti@redhat.com
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
> Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> net/sched/act_police.c | 16 +++++-
> .../selftests/net/forwarding/tc_police.sh | 52 +++++++++++++++++++
> 2 files changed, 67 insertions(+), 1 deletion(-)
Both now queued up, thanks.
greg k-h
prev parent reply other threads:[~2022-06-20 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 13:32 [PATCH 5.10] net/sched: act_police: more accurate MTU policing Davide Caratti
2022-06-20 11:48 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YrBecGERMPdVEWaw@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dcaratti@redhat.com \
--cc=echaudro@redhat.com \
--cc=i.maximets@ovn.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.