fc_exch_seq_send(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fc_exch_seq_send(9) β€” the Kernel API Manual, bestie edition

okay so this is the fc_exch_seq_send(9) page from the Kernel API Manual, and honestly? it's lowkey doing a lot. sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

fc_exch_seq_send β€” bestie, this is the one that sends a frame using a new exchange and sequence. it's giving "fresh start, new me" energy fr fr πŸ”₯


🌸 SYNOPSIS 🌸

struct fc_seq * fc_exch_seq_send (struct fc_lport *lport , struct
fc_frame *fp , void (*resp)(struct fc_seq *, struct fc_frame *fp, void
*arg) , void (*destructor)(struct fc_seq *, void *) , void *arg , u32
timer_msec );

look at her. six arguments. she's iconic, she's committed, she knows what she wants πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • lport β€” the local port you're sending the frame on. your home base, your main character 🏠
  • fp β€” the frame to be sent. literally the whole point of the function, no cap ✨
  • resp β€” the response handler for this request. she gets called back. we love a callback queen πŸ’–
  • destructor β€” the destructor for the exchange. the cleanup bestie 🧹
  • arg β€” the argument that gets passed to the response handler. it's the little note you tuck into her bag 🫢
  • timer_msec β€” the timeout period for the exchange. clock's ticking, babe ⏰

πŸ¦‹ DESCRIPTION πŸ¦‹

so the exchange response handler gets set in this routine to the resp function pointer. and ngl, that handler can be called in exactly two scenarios:

  1. if a timeout occurs 😭
  2. or if a response frame is received for the exchange πŸ’Œ

and heads up β€” the fc_frame pointer in the response handler will also indicate a timeout as an error, using IS_ERR related macros. so like, read that pointer properly, don't just assume success. vibe check your errors, okay? πŸ”

the exchange destructor handler also gets set in this routine. the destructor handler is invoked by the EM layer when the exchange is about to free β€” and that's the moment where the caller can free its own resources along with the exchange free. team cleanup, periodt 🧚

the arg is passed back to both the resp and the destructor handler. it goes both places. she gets around (affectionately) πŸ’œ

the timeout value (in msec) for an exchange is set if the timer_msec argument is non-zero. and the timer is canceled when it fires or when the exchange is done. meanwhile the exchange timeout handler is registered by the EM layer. so you're not registering it, they're handling it, love that for us 🌈


⭐ fill these in before you call her ⭐

the frame pointer with some of the header's fields must be filled before calling this routine. bestie, do not skip this. those fields are:

  • routing control
  • FC port did
  • FC port sid
  • FC header type
  • frame control
  • parameter or relative offset

that's the whole checklist. six little boxes. tick them all before you ring her up or it's gonna be a whole thing πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/scsi/libfc/fc_exch.c, plus a truly enormous friend group:

struct fc_exch_pool(9), struct fc_exch_mgr(9), struct fc_exch_mgr_anchor(9),
fc_exch_name_lookup(9), fc_exch_rctl_name(9), fc_exch_hold(9),
fc_exch_setup_hdr(9), fc_exch_release(9), fc_exch_timer_cancel(9),
fc_exch_timer_set_locked(9), fc_exch_timer_set(9),
fc_exch_done_locked(9), fc_exch_ptr_get(9), fc_exch_ptr_set(9),
fc_exch_delete(9), fc_seq_send(9), fc_seq_alloc(9),
fc_seq_start_next_locked(9), fc_seq_start_next(9), fc_exch_abort_locked(9),
fc_seq_exch_abort(9), fc_invoke_resp(9), fc_exch_timeout(9),
fc_exch_em_alloc(9), fc_exch_alloc(9), fc_exch_find(9), fc_exch_done(9),
fc_exch_resp(9), fc_seq_lookup_recip(9), fc_seq_lookup_orig(9),
fc_exch_set_addr(9), fc_seq_els_rsp_send(9), fc_seq_send_last(9),
fc_seq_send_ack(9), fc_exch_send_ba_rjt(9), fc_exch_recv_abts(9),
fc_seq_assign(9), fc_seq_release(9), fc_exch_recv_req(9),
fc_exch_recv_seq_resp(9), fc_exch_recv_resp(9), fc_exch_abts_resp(9),
fc_exch_recv_bls(9), fc_seq_ls_acc(9), fc_seq_ls_rjt(9), fc_exch_reset(9),
fc_exch_pool_reset(9), fc_exch_mgr_reset(9), fc_exch_lookup(9),
fc_exch_els_rec(9), fc_exch_rrq_resp(9), fc_exch_rrq(9),
fc_exch_els_rrq(9), fc_exch_update_stats(9), fc_exch_mgr_add(9),
fc_exch_mgr_destroy(9), fc_exch_mgr_del(9), fc_exch_mgr_list_clone(9),
fc_exch_mgr_alloc(9), fc_exch_mgr_free(9), fc_find_ema(9),
fc_exch_recv(9), fc_exch_init(9), fc_setup_exch_mgr(9),
fc_destroy_exch_mgr(9)

like I said. enormous friend group. iykyk 🫢


pspsps β€” this page lives in ./drivers/scsi/libfc and it's dated October 2026. that's the source and the version-date combo, and that's your cute sign-off bestie πŸ’–βœ¨πŸŽ€ go send some frames! πŸ¦‹
πŸ“¦ where this page comes from