STRUCT QED_ISCSI_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct qed_iscsi_ops(9) β€” qed iSCSI operations πŸ’–

okay so bestie, welcome to section 9 of the Kernel API Manual, and today's main character is struct qed_iscsi_ops β€” literally the whole iSCSI operations vibe for qed. it's a struct full of function pointers, and yes, every single one of them matters, so we're doing a full tour, no skipping, periodt. πŸŽ€


✨ SYNOPSIS ✨

here's the whole squad in one go, bestie β€” all the members, all the signatures, exactly as they are:

struct qed_iscsi_ops {
    const struct qed_common_ops *common;
    const struct qed_ll2_ops *ll2;
    int (*fill_dev_info)(struct qed_dev *cdev, struct qed_dev_iscsi_info *info);
    void (*register_ops)(struct qed_dev *cdev, struct qed_iscsi_cb_ops *ops, void *cookie);
    int (*start)(struct qed_dev *cdev, struct qed_iscsi_tid *tasks, void *event_context, iscsi_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_iscsi_params_offload *conn_info);
    int (*update_conn)(struct qed_dev *cdev, u32 handle, struct qed_iscsi_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 (*get_stats)(struct qed_dev *cdev, struct qed_iscsi_stats *stats);
    int (*change_mac)(struct qed_dev *cdev, u32 handle, const u8 *mac);
 };

like, look at her. she's organized. she's giving "I have a pointer for every occasion". πŸ’…


🌸 Members 🌸

πŸ¦‹ the two pointer fields

  • common β€” the common operations pointer. your basic shared-ops hookup, lowkey the foundation of the whole thing.
  • ll2 β€” the light L2 operations pointer. that's the light L2 hookup, right there. ✨

πŸŽ€ fill_dev_info

she fills in the iSCSI-specific information.

  • param cdev
  • param info
  • returns 0 on success, otherwise an error value.

πŸ“ register_ops

registers the iSCSI operations.

  • param cdev
  • param ops β€” specified using qed_iscsi_cb_ops
  • param cookie β€” driver private

πŸ”₯ start

starts iSCSI in the firmware. it's giving "let's goooo".

  • param cdev
  • param tasks β€” qed will fill information about tasks
  • returns 0 on success, otherwise an error value.

🌈 stop

stops iSCSI in the firmware. sad but necessary, we respect the arc. 😭

  • param cdev
  • returns 0 on success, otherwise an error value.

πŸ‘‘ acquire_conn

acquires a new iSCSI connection β€” iconic behaviour honestly.

  • param cdev
  • param handle β€” qed will fill in the handle that should be used henceforth as the identifier of the connection
  • param p_doorbell β€” qed will fill in the address of the doorbell
  • returns 0 on success, otherwise an error value.
bestie, note the wording: qed fills these in for you. you hand over the pointers, she does the work. 🫢

πŸ’œ release_conn

releases a previously acquired iSCSI connection. closure, we love to see it.

  • param cdev
  • param handle β€” the connection handle
  • returns 0 on success, otherwise an 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 an error value.

🧚 update_conn

updates an offloaded connection. glow-up era.

  • param cdev
  • param handle β€” the connection handle
  • param conn_info β€” the configuration to use for the offload
  • returns 0 on success, otherwise an error value.

πŸ’€ destroy_conn

stops an offloaded connection. it's over, it's done, we're moving on.

  • param cdev
  • param handle β€” the connection handle
  • returns 0 on success, otherwise an error value.

🌸 clear_sq

clears all task in sq. (that's the send queue, iykyk.)

  • param cdev
  • param handle β€” the connection handle
  • returns 0 on success, otherwise an error value.

πŸ™ˆ get_stats

iSCSI-related statistics. numbers!! data!! we're obsessed.

  • param cdev
  • param stats β€” pointer to the struct that would be filled with the stats
  • returns 0 on success, error otherwise
  • > ngl, the original page literally says struck and we stats right here. that's a typo in the source, bestie, not me being chaotic. πŸ’€ the meaning is still "pointer to the struct that gets filled with stats".

πŸ¦‹ change_mac

changes the MAC of the interface. new MAC, new me.

  • param cdev
  • param handle β€” the connection handle
  • param mac β€” new MAC to configure
  • returns 0 on success, otherwise an error value.

πŸ” SEE ALSO πŸ”

  • Kernel file ./include/linux/qed/qed_iscsi_if.h

go read the header, bestie, that's where the rest of the lore lives. πŸ’–


and that's the whole page! brought to you by the source tree at ./include/linux/qed, dated October 2026 β€” slay, see u next time, mwah πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from