• Home
  • Raw
  • Download

Lines Matching full:exchange

11  * Fibre Channel exchange and sequence handling.
39 * fc_exch_mgr holds the exchange state for an N port
41 * fc_exch holds state for one exchange and links to its active sequence.
47 * struct fc_exch_pool - Per cpu exchange pool
48 * @next_index: Next possible free exchange index
55 * This structure manages per cpu exchanges in array of exchange pointers.
70 * struct fc_exch_mgr - The Exchange Manager (EM).
73 * @min_xid: Minimum exchange ID
74 * @max_xid: Maximum exchange ID
75 * @ep_pool: Reserved exchange pointers
78 * @lport: Local exchange port
82 * It manages the allocation of exchange IDs.
106 * @ema_list: Exchange Manager Anchor list
107 * @mp: Exchange Manager associated with this anchor
132 * The exchange manager is one by default in libfc but LLD may choose
133 * to have one per CPU. The sequence manager is one per exchange manager
139 * qualified by exchange ID, which one might think it would be.
141 * per session. For most targets we could treat this limit as per exchange.
143 * The exchange and its sequence are freed when the last sequence is received.
144 * It's possible for the remote port to leave an exchange open without
149 * Exchanges are reference counted and exchange gets freed when the reference
166 * with exchange and sequence tuple.
168 * When we receive the next sequence on the same exchange, we can
202 * - exchange refcnt can be done atomicly without locks.
245 * fc_exch_hold() - Increment an exchange's reference count
256 * @ep: The exchange to that will use the header
306 * fc_exch_release() - Decrement an exchange's reference count
307 * @ep: Exchange to be released
309 * If the reference count reaches zero and the exchange is complete,
327 * @ep: The exchange whose timer to be canceled
332 FC_EXCH_DBG(ep, "Exchange timer canceled\n"); in fc_exch_timer_cancel()
338 * fc_exch_timer_set_locked() - Start a timer for an exchange w/ the
339 * the exchange lock held
340 * @ep: The exchange whose timer will start
343 * Used for upper level protocols to time out the exchange.
344 * The timer is cancelled when it fires or when the exchange completes.
352 FC_EXCH_DBG(ep, "Exchange timer armed : %d msecs\n", timer_msec); in fc_exch_timer_set_locked()
357 FC_EXCH_DBG(ep, "Exchange already queued\n"); in fc_exch_timer_set_locked()
363 * fc_exch_timer_set() - Lock the exchange and set the timer
364 * @ep: The exchange whose timer will start
375 * fc_exch_done_locked() - Complete an exchange with the exchange lock held
376 * @ep: The exchange that is complete
405 * fc_exch_ptr_get() - Return an exchange from an exchange pool
406 * @pool: Exchange Pool to get an exchange from
407 * @index: Index of the exchange within the pool
409 * Use the index to get an exchange from within an exchange pool. exches
410 * will point to an array of exchange pointers. The index will select
411 * the exchange within the array.
421 * fc_exch_ptr_set() - Assign an exchange to a slot in an exchange pool
422 * @pool: The pool to assign the exchange to
423 * @index: The index in the pool where the exchange will be assigned
424 * @ep: The exchange to assign to the pool
433 * fc_exch_delete() - Delete an exchange
434 * @ep: The exchange to be deleted
506 * Update the exchange and sequence flags, in fc_seq_send_locked()
518 * fc_seq_send() - Send a frame using existing sequence/exchange pair
519 * @lport: The local port that the exchange will be sent on
521 * @fp: The frame to be sent on the exchange
539 * fc_seq_alloc() - Allocate a sequence for a given exchange
540 * @ep: The exchange to allocate a new sequence for
543 * We don't support multiple originated sequences on the same exchange.
544 * By implication, any previously originated sequence on this exchange
560 * exchange as the supplied sequence
561 * @sp: The sequence/exchange to get a new sequence for
574 * fc_seq_start_next() - Lock the exchange and get a new sequence
575 * for a given sequence/exchange pair
576 * @sp: The sequence/exchange to get a new exchange for
591 * Set the response handler for the exchange associated with a sequence.
619 * fc_exch_abort_locked() - Abort an exchange
620 * @ep: The exchange to be aborted
623 * Abort an exchange and sequence. Generally called because of a
624 * exchange timeout or an abort from the upper layer.
627 * timer_msec value is specified then exchange resp handler
685 * fc_seq_exch_abort() - Abort an exchange and sequence
707 * @ep: The exchange to be operated on
762 * fc_exch_timeout() - Handle exchange timer expiration
763 * @work: The work_struct identifying the exchange that timed out
773 FC_EXCH_DBG(ep, "Exchange timed out state %x\n", ep->state); in fc_exch_timeout()
807 * fc_exch_em_alloc() - Allocate an exchange from a specified EM.
808 * @lport: The local port that the exchange is for
809 * @mp: The exchange manager that will allocate the exchange
821 /* allocate memory for exchange */ in fc_exch_em_alloc()
875 * update exchange in fc_exch_em_alloc()
897 * fc_exch_alloc() - Allocate an exchange from an EM on a
899 * @lport: The local port that will own the exchange
900 * @fp: The FC frame that the exchange will be for
902 * This function walks the list of exchange manager(EM)
903 * anchors to select an EM for a new exchange allocation. The
924 * fc_exch_find() - Lookup and hold an exchange
925 * @mp: The exchange manager to lookup the exchange from
926 * @xid: The XID of the exchange to look up
963 * fc_exch_done() - Indicate that an exchange/sequence tuple is complete and
985 * fc_exch_resp() - Allocate a new exchange for a response frame
986 * @lport: The local port that the exchange was for
987 * @mp: The exchange manager to allocate the exchange from
1004 * Set EX_CTX indicating we're responding on this exchange. in fc_exch_resp()
1014 * Allocated exchange has placed the XID in the in fc_exch_resp()
1034 * @mp: The Exchange Manager to lookup the exchange from
1055 * Lookup or create the exchange if we will be creating the sequence. in fc_seq_lookup_recip()
1086 * new sequence - find the exchange in fc_seq_lookup_recip()
1110 * At this point, we have the exchange held. in fc_seq_lookup_recip()
1124 * frame of sequence exchange. This is needed in fc_seq_lookup_recip()
1165 * @mp: The Exchange Manager to lookup the exchange from
1200 * fc_exch_set_addr() - Set the source and destination IDs for an exchange
1201 * @ep: The exchange to set the addresses for
1205 * Note this must be done before the first sequence of the exchange is sent.
1222 * the existing sequence/exchange.
1252 * fc_seq_send_last() - Send a sequence that is the last in the exchange
1406 * @ep: The exchange the abort was on
1411 * exchange abort, ignoring the parameter.
1433 FC_EXCH_DBG(ep, "exch: ABTS rejected, exchange complete\n"); in fc_exch_recv_abts()
1468 * fc_seq_assign() - Assign exchange and sequence for incoming request
1473 * A reference will be held on the exchange/sequence for the caller, which
1505 * @mp: The EM that the exchange is on
1508 * This is used when the other end is originating the exchange
1520 * problem now that we know a new exchange needs to be allocated in fc_exch_recv_req()
1532 * If the RX_ID is 0xffff, don't allocate an exchange. in fc_exch_recv_req()
1569 * response to our initial exchange
1570 * @mp: The EM that the exchange is on
1664 * @mp: The EM that the exchange is on
1683 * @ep: The exchange that the frame is on
1686 * This response would be to an ABTS cancelling an exchange or sequence.
1703 FC_EXCH_DBG(ep, "Exchange timer canceled due to ABTS response\n"); in fc_exch_abts_resp()
1760 * @mp: The EM that the exchange is on
1764 * We may be either the originator or recipient of the exchange.
1888 * fc_exch_reset() - Reset an exchange
1889 * @ep: The exchange to be reset
1925 * fc_exch_pool_reset() - Reset a per cpu exchange pool
1926 * @lport: The local port that the exchange pool is on
1927 * @pool: The exchange pool to be reset
1996 * fc_exch_lookup() - find an exchange
1998 * @xid: The exchange ID
2000 * Returns exchange pointer with hold for caller, or NULL if not found.
2013 * fc_exch_els_rec() - Handler for ELS REC (Read Exchange Concise) requests
2099 * @arg: The exchange that the RRQ is on
2141 * fc_exch_seq_send() - Send a frame using a new exchange and sequence
2145 * @destructor: The destructor for the exchange
2147 * @timer_msec: The timeout period for the exchange
2149 * The exchange response handler is set in this routine to resp()
2151 * occurs or if a response frame is received for the exchange. The
2155 * The exchange destructor handler is also set in this routine.
2156 * The destructor handler is invoked by EM layer when exchange
2158 * resources along with exchange free.
2162 * The timeout value (in msec) for an exchange is set if non zero
2164 * it fires or when the exchange is done. The exchange timeout handler
2240 * @ep: The exchange to send the RRQ on
2243 * the exchange and the seq_cnt range.
2298 struct fc_exch *ep = NULL; /* request or subject exchange */ in fc_exch_els_rrq()
2311 * lookup subject exchange. in fc_exch_els_rrq()
2361 * @lport: The local port to update exchange manager stats
2385 * fc_exch_mgr_add() - Add an exchange manager to a local port's list of EMs
2386 * @lport: The local port to add the exchange manager to
2387 * @mp: The exchange manager to be added to the local port
2410 * fc_exch_mgr_destroy() - Destroy an exchange manager
2424 * @ema: The exchange manager anchor identifying the EM to be deleted
2436 * fc_exch_mgr_list_clone() - Share all exchange manager objects
2437 * @src: Source lport to clone exchange managers from
2438 * @dst: New lport that takes references to all the exchange managers
2457 * fc_exch_mgr_alloc() - Allocate an exchange manager
2511 * Setup per cpu exch pool with entire exchange id range equally in fc_exch_mgr_alloc()
2556 * fc_exch_mgr_free() - Free all exchange managers on a local port
2570 * fc_find_ema() - Lookup and return appropriate Exchange Manager Anchor depending
2621 FC_LPORT_DBG(lport, "Unable to find Exchange Manager Anchor," in fc_exch_recv()
2659 * fc_exch_init() - Initialize the exchange layer for a local port
2660 * @lport: The local port to initialize the exchange layer for
2672 * fc_setup_exch_mgr() - Setup an exchange manager
2690 * to exchange id's lower bits such that all incoming in fc_setup_exch_mgr()
2691 * frames of an exchange gets delivered to the same in fc_setup_exch_mgr()
2692 * cpu on which exchange originated by simple bitwise in fc_setup_exch_mgr()
2693 * AND operation between fc_cpu_mask and exchange id. in fc_setup_exch_mgr()
2708 * fc_destroy_exch_mgr() - Destroy an exchange manager