STRUCT QED_NVMETCP_OPS(9)
π struct qed_nvmetcp_ops(9) π
okay so bestie, welcome to the Kernel API Manual page for struct qed_nvmetcp_ops β literally the big book of "here's every function pointer qed hands you for NVMeTCP" and ngl it ate. it's a vtable, it's a vibe, it's giving "one struct to rule all the TCP offload things" β¨
πΈ NAME πΈ
struct qed_nvmetcp_ops β qed NVMeTCP operations. that's the whole name, no notes, periodt π
π¦ SYNOPSIS π¦
struct qed_nvmetcp_ops {
const struct qed_common_ops *common;
const struct qed_ll2_ops *ll2;
int (*fill_dev_info)(struct qed_dev *cdev, struct qed_dev_nvmetcp_info *info);
void (*register_ops)(struct qed_dev *cdev, struct qed_nvmetcp_cb_ops *ops, void *cookie);
int (*start)(struct qed_dev *cdev, struct qed_nvmetcp_tid *tasks, void *event_context, nvmetcp_event_cb_t async_event_cb);
int (*stop)(struct qed_dev *cdev);
int (*acquire_conn)(struct qed_dev *cdev, u32 *handle, u32 *fw_cid, void __iomem **p_doorbell);
int (*release_conn)(struct qed_dev *cdev, u32 handle);
int (*offload_conn)(struct qed_dev *cdev, u32 handle, struct qed_nvmetcp_params_offload *conn_info);
int (*update_conn)(struct qed_dev *cdev, u32 handle, struct qed_nvmetcp_params_update *conn_info);
int (*destroy_conn)(struct qed_dev *cdev, u32 handle, u8 abrt_conn);
int (*clear_sq)(struct qed_dev *cdev, u32 handle);
int (*add_src_tcp_port_filter)(struct qed_dev *cdev, u16 src_port);
void (*remove_src_tcp_port_filter)(struct qed_dev *cdev, u16 src_port);
int (*add_dst_tcp_port_filter)(struct qed_dev *cdev, u16 dest_port);
void (*remove_dst_tcp_port_filter)(struct qed_dev *cdev, u16 dest_port);
void (*clear_all_filters)(struct qed_dev *cdev);
void (*init_read_io)(struct nvmetcp_task_params *task_params, struct nvme_tcp_cmd_pdu *cmd_pdu_header, struct nvme_command *nvme_cmd, struct storage_sgl_task_params *sgl_task_params);
void (*init_write_io)(struct nvmetcp_task_params *task_params, struct nvme_tcp_cmd_pdu *cmd_pdu_header, struct nvme_command *nvme_cmd, struct storage_sgl_task_params *sgl_task_params);
void (*init_icreq_exchange)(struct nvmetcp_task_params *task_params, struct nvme_tcp_icreq_pdu *init_conn_req_pdu_hdr, struct storage_sgl_task_params *tx_sgl_task_params, struct storage_sgl_task_params *rx_sgl_task_params);
void (*init_task_cleanup)(struct nvmetcp_task_params *task_params);
};
like, look at her. so many function pointers. main character struct energy fr fr π₯
π Members π
okay so here's the group chat roll call, one member at a time, and no i did not skip anybody (i would never) π
commonβ common operations pointer. the shared stuff πll2β light L2 operations pointer. light L2, as advertised β¨fill_dev_infoβ fills NVMeTCP specific information. takes paramcdev, paraminfo. returns0on success, otherwise error value.register_opsβ register nvmetcp operations. paramcdev, paramops- specified usingqed_nvmetcp_cb_ops, paramcookie- driver private. (return value? void. she doesn't return anything, she just does π«Ά)startβ nvmetcp in FW. paramcdev, paramtasks- qed will fill information about tasks. returns0on success, otherwise error value. πstopβ nvmetcp in FW. paramcdev. returns0on success, otherwise error value.acquire_connβ acquire a new nvmetcp connection. paramcdev. paramhandle- qed will fill handle that should be used henceforth as identifier of the connection. paramp_doorbell- qed will fill the address of the doorbell. returns0on success, otherwise error value. πrelease_connβ release a previously acquired nvmetcp connection. paramcdev. paramhandle- the connection handle. returns0on success, otherwise error value.offload_connβ configures an offloaded connection. paramcdev. paramhandle- the connection handle. paramconn_info- the configuration to use for the offload. returns0on success, otherwise error value. πupdate_connβ updates an offloaded connection. paramcdev. paramhandle- the connection handle. paramconn_info- the configuration to use for the offload. returns0on success, otherwise error value. (yes it's the same params asoffload_conn, she's consistent, we stan π©·)destroy_connβ stops an offloaded connection. paramcdev. paramhandle- the connection handle. returns0on success, otherwise error value. πclear_sqβ clear all task in sq. paramcdev. paramhandle- the connection handle. returns0on success, otherwise error value. π§Ήadd_src_tcp_port_filterβ Add source tcp port filter. paramcdev. paramsrc_port. βremove_src_tcp_port_filterβ Remove source tcp port filter. paramcdev. paramsrc_port.add_dst_tcp_port_filterβ Add destination tcp port filter. paramcdev. paramdest_port. βremove_dst_tcp_port_filterβ Remove destination tcp port filter. paramcdev. paramdest_port.clear_all_filtersβ Clear all filters. paramcdev. π§Όinit_read_ioβ Init read IO.task_params,cmd_pdu_header,nvme_cmd,sgl_task_params. πinit_write_ioβ Init write IO.task_params,cmd_pdu_header,nvme_cmd,sgl_task_params. βοΈinit_icreq_exchangeβ Exchange ICReq.task_params,init_conn_req_pdu_hdr,tx_sgl_task_params,rx_sgl_task_params. π€init_task_cleanupβ Init task cleanup.task_params. π§½
quick vibe check bestie: notice that a bunch of these return0on success and an error value otherwise β and the filter ones arevoidor plainint, with no return note in this page. don't go assuming, k? i'm only telling you what's written here π
π SEE ALSO π
- Kernel file
./include/linux/qed/qed_nvmetcp_if.hβ go read it, it's the actual source of truth iykyk π
aaand that's the page!! π brought to you by the fine people of ./include/linux/qed, dated October 2026 β so like, from the future, iconic behavior honestly β¨π
π¦ bye bestie, go write some drivers π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms