[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZImggC0H91d/qUyg@corigine.com>
Date: Wed, 14 Jun 2023 13:12:00 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Dave Ertman <david.m.ertman@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, daniel.machon@...rochip.com,
netdev@...r.kernel.org, Jacob Keller <jacob.e.keller@...el.com>
Subject: Re: [PATCH iwl-next v4 01/10] ice: Correctly initialize queue
context values
On Fri, Jun 09, 2023 at 02:16:17PM -0700, Dave Ertman wrote:
> From: Jacob Keller <jacob.e.keller@...el.com>
>
> The ice_alloc_lan_q_ctx function allocates the queue context array for a
> given traffic class. This function uses devm_kcalloc which will
> zero-allocate the structure. Thus, prior to any queue being setup by
> ice_ena_vsi_txq, the q_ctx structure will have a q_handle of 0 and a q_teid
> of 0. These are potentially valid values.
>
> Modify the ice_alloc_lan_q_ctx function to initialize every member of the
> q_ctx array to have invalid values. Modify ice_dis_vsi_txq to ensure that
> it assigns q_teid to an invalid value when it assigns q_handle to the
> invalid value as well.
>
> This will allow other code to check whether the queue context is currently
> valid before operating on it.
>
> Reviewed-by: Daniel Machon <daniel.machon@...rochip.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> Signed-off-by: Dave Ertman <david.m.ertman@...el.com>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists