From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Minseok Kim <kor8821@gmail.com>, <intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>, <anthony.l.nguyen@intel.com>,
<m.wilczynski@samsung.com>
Subject: Re: [PATCH iwl-net] ice: bound the node count in ice_sched_add_elems()
Date: Fri, 27 Nov 2026 22:15:06 +0100 [thread overview]
Message-ID: <4737ccc7-1a11-487a-91df-2caba229ccbd@intel.com> (raw)
In-Reply-To: <20261126064402.87229-1-kor8821@gmail.com>
> diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c
> index a5c7a4e1c..ae4528347 100644
> --- a/drivers/net/ethernet/intel/ice/ice_sched.c
> +++ b/drivers/net/ethernet/intel/ice/ice_sched.c
> @@ -909,6 +909,14 @@ ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node,
> int status = 0;
> u32 teid;
>
> + /* parent->children[] holds hw->max_children[] entries for the parent's
> + * layer and ice_sched_add_node() appends to it unconditionally, so the
> + * request has to be bounded before any node is created.
> + */
we have to trust FW, I would rather do nothing than add such prevention
--
side note: I was working on a OOT bug that manifested in crash a couple
lines down from here - FW was returning 0 as number of children after
a change to 5 layer topology from 9 layer
a fix was to properly re-ask for current topology during the vsi rebuild
> + if (parent->num_children + num_nodes >
> + hw->max_children[parent->tx_sched_layer])
> + return -ENOSPC;
> +
> buf_size = struct_size(buf, generic, num_nodes);
> buf = devm_kzalloc(ice_hw_to_dev(hw), buf_size, GFP_KERNEL);
> if (!buf)
>
> base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5
prev parent reply other threads:[~2026-11-27 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 6:44 [PATCH iwl-net] ice: bound the node count in ice_sched_add_elems() Minseok Kim
2026-11-27 21:15 ` Przemek Kitszel [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=4737ccc7-1a11-487a-91df-2caba229ccbd@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kor8821@gmail.com \
--cc=m.wilczynski@samsung.com \
--cc=netdev@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.