STRUCT QED_NVMETCP_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 param cdev, param info. returns 0 on success, otherwise error value.
  • register_ops β€” register nvmetcp operations. param cdev, param ops - specified using qed_nvmetcp_cb_ops, param cookie - driver private. (return value? void. she doesn't return anything, she just does 🫢)
  • start β€” nvmetcp in FW. param cdev, param tasks - qed will fill information about tasks. returns 0 on success, otherwise error value. πŸ’…
  • stop β€” nvmetcp in FW. param cdev. returns 0 on success, otherwise error value.
  • acquire_conn β€” acquire a new nvmetcp connection. param cdev. param handle - qed will fill handle that should be used henceforth as identifier of the connection. param p_doorbell - qed will fill the address of the doorbell. returns 0 on success, otherwise error value. πŸ””
  • release_conn β€” release a previously acquired nvmetcp connection. param cdev. param handle - the connection handle. returns 0 on success, otherwise error value.
  • offload_conn β€” configures an offloaded connection. param cdev. param handle - the connection handle. param conn_info - the configuration to use for the offload. returns 0 on success, otherwise error value. πŸ‘‘
  • update_conn β€” updates an offloaded connection. param cdev. param handle - the connection handle. param conn_info - the configuration to use for the offload. returns 0 on success, otherwise error value. (yes it's the same params as offload_conn, she's consistent, we stan 🩷)
  • destroy_conn β€” stops an offloaded connection. param cdev. param handle - the connection handle. returns 0 on success, otherwise error value. πŸ’€
  • clear_sq β€” clear all task in sq. param cdev. param handle - the connection handle. returns 0 on success, otherwise error value. 🧹
  • add_src_tcp_port_filter β€” Add source tcp port filter. param cdev. param src_port. ⭐
  • remove_src_tcp_port_filter β€” Remove source tcp port filter. param cdev. param src_port.
  • add_dst_tcp_port_filter β€” Add destination tcp port filter. param cdev. param dest_port. ⭐
  • remove_dst_tcp_port_filter β€” Remove destination tcp port filter. param cdev. param dest_port.
  • clear_all_filters β€” Clear all filters. param cdev. 🧼
  • 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 return 0 on success and an error value otherwise β€” and the filter ones are void or plain int, 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