Hi,
We have a question about the qman_fq_lookup_table.
From the code, we can see:
259 static int find_empty_fq_table_entry(u32 *entry, struct qman_fq *fq)
260 {
261 u32 i;
262
263 spin_lock(&fq_hash_table_lock);
264 /* Can't use index zero because this has special meaning
265 * in context_b field. */
266 for (i = 1; i < qman_fq_lookup_table_size; i++) {
267 if (qman_fq_lookup_table[i] == NULL) {
268 *entry = i;
269 qman_fq_lookup_table[i] = fq;
270 spin_unlock(&fq_hash_table_lock);
271 return 0;
272 }
273 }
274 spin_unlock(&fq_hash_table_lock);
275 return -ENOMEM;
276 }
278 static void clear_fq_table_entry(u32 entry)
279 {
280 spin_lock(&fq_hash_table_lock);
281 BUG_ON(entry >= qman_fq_lookup_table_size);
282 qman_fq_lookup_table[entry] = NULL;
283 spin_unlock(&fq_hash_table_lock);
284 }
285
286 static inline struct qman_fq *get_fq_table_entry(u32 entry)
287 {
288 BUG_ON(entry >= qman_fq_lookup_table_size);
289 return qman_fq_lookup_table[entry];
290 }
When we find_empty_fq_table_entry(), we have a fq_hash_table_lock;
When we clear_fq_table_entry(), we also have a fq_hash_table_lock;
But when we get_fq_table_entry(), we don't have a fq_hash_table_lock.
Do you think if we should use a lock for get_fq_table_entry ?
No. I do not think it is necessary to use lock here.
Can it be reproduced with the default code? Any modification? Can it be reproduced every time?
From the objdump to see, it seems the fq is NULL, so could you check the entry index when this issue occurred? Then check whether this entry has been filled correctly.