瀏覽代碼

qcacmn: Add nbuf alloc failure to nbuf history

In addition to the other nbuf history events, track allocation failures.
This allows root causing issues due to nbuf exhaustion.

Change-Id: Ia0bbc6f12d26e32fcdb4cf7d0efef328417436ce
CRs-Fixed: 2329461
Dustin Brown 6 年之前
父節點
當前提交
e72b7f7e4c
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      qdf/linux/src/qdf_nbuf.c

+ 3 - 0
qdf/linux/src/qdf_nbuf.c

@@ -536,6 +536,7 @@ qdf_export_symbol(__qdf_nbuf_free);
 #ifdef NBUF_MEMORY_DEBUG
 enum qdf_nbuf_event_type {
 	QDF_NBUF_ALLOC,
+	QDF_NBUF_ALLOC_FAILURE,
 	QDF_NBUF_FREE,
 	QDF_NBUF_MAP,
 	QDF_NBUF_UNMAP,
@@ -2667,6 +2668,8 @@ qdf_nbuf_t qdf_nbuf_alloc_debug(qdf_device_t osdev, qdf_size_t size,
 	if (qdf_likely(nbuf)) {
 		qdf_net_buf_debug_add_node(nbuf, size, file, line);
 		qdf_nbuf_history_add(nbuf, file, line, QDF_NBUF_ALLOC);
+	} else {
+		qdf_nbuf_history_add(nbuf, file, line, QDF_NBUF_ALLOC_FAILURE);
 	}
 
 	return nbuf;