[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230609104512.syus4hoqq6bsdrjc@DEN-LT-70577>
Date: Fri, 9 Jun 2023 10:45:12 +0000
From: Daniel Machon <daniel.machon@...rochip.com>
To: Dave Ertman <david.m.ertman@...el.com>
CC: <intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>, Jacob Keller
<jacob.e.keller@...el.com>
Subject: Re: [PATCH iwl-next v3 01/10] ice: Correctly initialize queue
context values
> 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.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> Signed-off-by: Dave Ertman <david.m.ertman@...el.com>
Reviewed-by: Daniel Machon <daniel.machon@...rochip.com>
Powered by blists - more mailing lists