All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kurt Kanzenbach <kurt@linutronix.de>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Gerhard Engleder <gerhard@engleder-embedded.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] net/sched: taprio: don't allow dynamic max_sdu to go negative after stab adjustment
Date: Thu, 16 Feb 2023 10:27:57 +0100	[thread overview]
Message-ID: <87fsb6ot7m.fsf@kurt> (raw)
In-Reply-To: <20230215224632.2532685-3-vladimir.oltean@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 958 bytes --]

On Thu Feb 16 2023, Vladimir Oltean wrote:
> The overhead specified in the size table comes from the user. With small
> time intervals (or gates always closed), the overhead can be larger than
> the max interval for that traffic class, and their difference is
> negative.
>
> What we want to happen is for max_sdu_dynamic to have the smallest
> non-zero value possible (1) which means that all packets on that traffic
> class are dropped on enqueue. However, since max_sdu_dynamic is u32, a
> negative is represented as a large value and oversized dropping never
> happens.
>
> Use max_t with int to force a truncation of max_frm_len to no smaller
> than dev->hard_header_len + 1, which in turn makes max_sdu_dynamic no
> smaller than 1.
>
> Fixes: fed87cc6718a ("net/sched: taprio: automatically calculate queueMaxSDU based on TC gate durations")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2023-02-16  9:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 22:46 [PATCH net-next 0/3] taprio queueMaxSDU fixes Vladimir Oltean
2023-02-15 22:46 ` [PATCH net-next 1/3] net/sched: taprio: fix calculation of maximum gate durations Vladimir Oltean
2023-02-16  9:27   ` Kurt Kanzenbach
2023-02-15 22:46 ` [PATCH net-next 2/3] net/sched: taprio: don't allow dynamic max_sdu to go negative after stab adjustment Vladimir Oltean
2023-02-16  9:27   ` Kurt Kanzenbach [this message]
2023-02-15 22:46 ` [PATCH net-next 3/3] net/sched: taprio: dynamic max_sdu larger than the max_mtu is unlimited Vladimir Oltean
2023-02-16  9:28   ` Kurt Kanzenbach
2023-02-16 10:29     ` Vladimir Oltean
2023-02-16 10:34       ` Kurt Kanzenbach
2023-02-16 10:35       ` Vladimir Oltean
2023-02-20  8:00 ` [PATCH net-next 0/3] taprio queueMaxSDU fixes patchwork-bot+netdevbpf

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=87fsb6ot7m.fsf@kurt \
    --to=kurt@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gerhard@engleder-embedded.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiyou.wangcong@gmail.com \
    /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.