aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap_mem2.c
diff options
context:
space:
mode:
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>2026-06-15 09:40:30 +0000
committerSumit Saxena <ssaxena@FreeBSD.org>2026-06-15 11:30:40 +0000
commitf85e66e655c9293ea049814e21ed67ab246a7305 (patch)
treebbefa1ae5074d54501ff724e6d8c5a8b854417e1 /sys/dev/netmap/netmap_mem2.c
parentf930d8a6540648423288567ff473123ff5647484 (diff)
if_bnxt/bnxt_re: add support for driver snapdump
Add a logging module which helps to log and collect the driver`s various events and state of device data structures. APIs help modules like l2, RoCE etc. to register and add logs into thg buffers. A segment header is added to the data available in buffers. The final log messages are arranged in following fashion |SegHeader0|Data0|SegHeader1|Data1| Logging module provides two different kinds of buffers: a) A large contiguous memory chunk is used to form circular buffers. Module need to provide a number of buffers while registering to the logging module.Please note that, since memory for the buffers remains with the module as long as it is registered, memory footprints of the driver could be higher so the modules should allocate an appropriate number of buffers. Also, due to limited space, modules should only log important events/messages into the buffer. Modules must use bnxt_log_add_mssg() to add the message into the list. b) Live buffer - They are allocated during coredump retrieval and freed after the coredump data is returned to the user. This helps to collect live data from the driver. Modules must use the bnxt_log_live() function to add the log messages. When coredump is retrieved all the messages available in above buffers are copied into the coredump buffer. Test Plan: Generate the coredump using below niccli command ./niccli.freebsd -i 1 debug --coredump and then verify the coredump contents using the Broadcom's Coredump decoder. MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56682
Diffstat (limited to 'sys/dev/netmap/netmap_mem2.c')
0 files changed, 0 insertions, 0 deletions