libnvme_mi_ep_set_submit_entry(9)

NAME
libnvme_mi_ep_set_submit_entry - Install MI submit-entry callback

SYNOPSIS
void libnvme_mi_ep_set_submit_entry (struct libnvme_mi_ep *ep , void *(*mi_submit_entry)(struct libnvme_mi_ep *ep, __u8 type, const struct nvme_mi_msg_hdr *hdr, size_t hdr_len, const void *data, size_t data_len) );

ARGUMENTS

ep  endpoint to configure

mi_submit_entry
    After input validation the callback is invoked before an MI command is submitted. The function receives the endpoint, message type, header, and data about to be sent, and may return an opaque pointer representing per-command context. This pointer is later passed unmodified to the mi_submit_exit callback. Implementations typically use this hook for logging, tracing, or allocating per-command state.

DESCRIPTION
Installs a callback invoked at the moment an MI command enters the submission path. This applies to all MI operations through this endpoint (both endpoint- level MI commands and controller admin commands). Passing NULL removes any previously installed callback.