95 snprintf ( id_text,
sizeof ( id_text ),
"%02x.%02x.%02x",
96 id->bytes[0],
id->bytes[1],
id->bytes[2] );
108 char *ptr = ( (
char * ) id_text );
112 id->bytes[i++] =
strtoul ( ptr, &ptr, 16 );
113 if ( i ==
sizeof (
id->bytes ) )
114 return ( ( *ptr ==
'\0' ) ? 0 : -
EINVAL );
130 snprintf ( wwn_text,
sizeof ( wwn_text ),
131 "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
132 wwn->bytes[0],
wwn->bytes[1],
wwn->bytes[2],
wwn->bytes[3],
133 wwn->bytes[4],
wwn->bytes[5],
wwn->bytes[6],
wwn->bytes[7] );
145 char *ptr = ( (
char * ) wwn_text );
150 if ( i ==
sizeof (
wwn->bytes ) )
151 return ( ( *ptr ==
'\0' ) ? 0 : -
EINVAL );
172 memset ( sa_fc, 0,
sizeof ( *sa_fc ) );
186 #define EUNKNOWN_LINK_STATUS __einfo_error ( EINFO_EUNKNOWN_LINK_STATUS ) 187 #define EINFO_EUNKNOWN_LINK_STATUS \ 188 __einfo_uniqify ( EINFO_EINPROGRESS, 0x01, "Unknown" ) 328 #define FC_TIMEOUT ( 1 * TICKS_PER_SEC ) 380 DBGC2 (
port,
"FCXCHG %s/%04x closed: %s\n",
468 DBGC (
port,
"FCXCHG %s/%04x cannot transmit while not " 469 "holding sequence initiative\n",
476 switch ( xchg->
type ) {
495 switch (
meta->flags &
525 fchdr =
iob_push ( iobuf,
sizeof ( *fchdr ) );
526 memset ( fchdr, 0,
sizeof ( *fchdr ) );
530 sizeof ( fchdr->
d_id ) );
557 DBGC (
port,
"FCXCHG %s/%04x cannot transmit: %s\n",
603 DBGC (
port,
"FCXCHG %s/%04x received frame while holding " 604 "sequence initiative\n",
port->name, xchg->
xchg_id );
609 DBGC (
port,
"FCXCHG %s/%04x received out-of-order frame %d " 619 DBGC (
port,
"FCXCHG %s/%04x received frame for incorrect " 620 "sequence %02x (expected %02x)\n",
port->name,
636 memset ( &fc_meta, 0,
sizeof ( fc_meta ) );
657 iob_pull ( iobuf,
sizeof ( *fchdr ) );
659 &fc_meta ) ) != 0 ) {
660 DBGC (
port,
"FCXCHG %s/%04x cannot deliver frame: %s\n",
697 unsigned int type ) {
701 xchg =
zalloc (
sizeof ( *xchg ) );
739 DBGC2 (
port,
"FCXCHG %s/%04x originating to %s (type %02x)\n",
768 DBGC2 (
port,
"FCXCHG %s/%04x responding to %s xchg %04x (type " 778 &fchdr->
s_id ) ) !=0 ){
779 DBGC (
port,
"FCXCHG %s/%04x could not " 780 "respond: %s\n",
port->name,
862 unsigned int xchg_id;
867 if (
iob_len ( iobuf ) <
sizeof ( *fchdr ) ) {
868 DBGC (
port,
"FCPORT %s received underlength frame (%zd " 876 sizeof ( fchdr->
d_id ) ) != 0 ) &&
878 sizeof ( fchdr->
d_id ) ) != 0 ) &&
880 sizeof (
port->port_id ) ) != 0 ) ) {
881 DBGC (
port,
"FCPORT %s received frame for incorrect port ID " 901 DBGC (
port,
"FCPORT %s cannot create new exchange\n",
910 DBGC (
port,
"FCPORT %s xchg %04x unknown\n",
942 const struct fc_name *link_node_wwn,
943 const struct fc_name *link_port_wwn,
int has_fabric ) {
951 ( !! has_fabric ) ) ||
952 (
memcmp ( &
port->link_node_wwn, link_node_wwn,
953 sizeof (
port->link_node_wwn ) ) != 0 ) ||
954 (
memcmp ( &
port->link_port_wwn, link_port_wwn,
955 sizeof (
port->link_port_wwn ) ) != 0 ) ||
958 sizeof (
port->port_id ) ) != 0 ) ) ) ) {
967 sizeof (
port->link_node_wwn ) );
969 sizeof (
port->link_port_wwn ) );
970 DBGC (
port,
"FCPORT %s logged in to %s",
978 sizeof (
port->port_id ) );
982 sizeof (
port->port_wwn ) ) > 0 ) {
984 sizeof (
port->port_id ) );
987 sizeof (
port->ptp_link_port_id ) );
990 sizeof (
port->port_id ) );
993 sizeof (
port->ptp_link_port_id ) );
996 DBGC (
port,
"FCPORT %s logged in via a %s, with local ID " 999 "fabric" :
"point-to-point link" ),
1006 DBGC (
port,
"FCPORT %s attempting login to name server\n",
1012 DBGC (
port,
"FCPORT %s could not initiate name " 1013 "server PLOGI: %s\n",
1043 DBGC (
port,
"FCPORT %s logged out: %s\n",
1087 DBGC (
port,
"FCPORT %s logged in to name server\n",
1090 DBGC (
port,
"FCPORT %s could not log in to name server: %s\n",
1109 DBGC (
port,
"FCPORT %s attempting login\n",
port->name );
1114 DBGC (
port,
"FCPORT %s could not initiate FLOGI: %s\n",
1190 const struct fc_name *port_wwn,
const char *
name ) {
1208 DBGC (
port,
"FCPORT %s opened as %s",
1249 DBGC (
peer,
"FCPEER %s closed: %s\n",
1288 if ( --(
peer->usage) == 0 )
1309 sizeof (
peer->port_id ) ) !=0 ) ) ) {
1320 DBGC (
peer,
"FCPEER %s logged in via %s as %s\n",
1351 DBGC (
peer,
"FCPEER %s logged out: %s\n",
1373 if (
peer->usage == 0 )
1406 DBGC (
peer,
"FCPEER %s could not initiate PLOGI: %s\n",
1435 DBGC (
peer,
"FCPEER %s attempting login\n",
1448 sizeof (
peer->port_wwn ) ) == 0 ) ) {
1464 DBGC (
peer,
"FCPEER %s could not attempt " 1465 "name server lookup on %s: %s\n",
1522 sizeof (
peer->port_wwn ) ) == 0 )
1549 sizeof (
peer->port_id ) ) == 0 ) )
1584 DBGC ( ulp,
"FCULP %s/%02x closed: %s\n",
1677 DBGC (
ulp,
"FCULP %s/%02x sending extra PRLI to work around " 1693 DBGC (
ulp,
"FCULP %s/%02x could not record " 1700 DBGC (
ulp,
"FCULP %s/%02x logged in with parameters:\n",
1731 DBGC (
ulp,
"FCULP %s/%02x logged out: %s\n",
1793 DBGC ( ulp,
"FCULP %s/%02x attempting login\n",
1800 DBGC ( ulp,
"FCULP %s/%02x could not initiate PRLI: %s\n",
1825 unsigned int type ) {
1829 ulp =
zalloc (
sizeof ( *ulp ) );
1843 DBGC ( ulp,
"FCULP %s/%02x created\n",
1856 unsigned int type ) {
1881 unsigned int type ) {
1888 goto err_peer_get_wwn;
1893 goto err_ulp_get_type;
1917 unsigned int type ) {
1924 goto err_peer_get_wwn;
1929 goto err_ulp_get_type;
#define iob_pull(iobuf, len)
void fc_ulp_detach(struct fc_ulp_user *user)
Detach Fibre Channel upper-layer protocol user.
struct interface ulp
Upper-layer protocol interface.
#define EINVAL
Invalid argument.
An object interface operation.
struct fc_name port_wwn
Port name.
struct arbelprm_rc_send_wqe rc
static void fc_port_examine(struct fc_link_state *link)
Examine Fibre Channel port link state.
void xfer_window_changed(struct interface *intf)
Report change of flow control window.
void intf_close(struct interface *intf, int rc)
Close an object interface.
static struct interface_descriptor fc_xchg_ulp_desc
Fibre Channel exchange ULP interface descriptor.
static void fc_ulp_free(struct refcnt *refcnt)
Free Fibre Channel upper-layer protocol.
void intf_restart(struct interface *intf, int rc)
Shut down and restart an object interface.
struct fc_port_id fc_ptp_high_port_id
Point-to-point high port ID.
static struct fc_ulp * fc_ulp_get_type(struct fc_peer *peer, unsigned int type)
Get Fibre Channel upper-layer protocol by peer and type.
void intf_shutdown(struct interface *intf, int rc)
Shut down an object interface.
struct list_head fc_peers
struct fc_ulp * ulp
Fibre Channel upper layer protocol.
int fc_xchg_originate(struct interface *parent, struct fc_port *port, struct fc_port_id *peer_port_id, unsigned int type)
Originate a new Fibre Channel exchange.
struct list_head list
List of all ports.
int xfer_deliver_iob(struct interface *intf, struct io_buffer *iobuf)
Deliver datagram as I/O buffer without metadata.
#define FC_LINK_RETRY_DELAY
Delay between failed link-up attempts.
#define EBUSY
Device or resource busy.
static void start_timer_nodelay(struct retry_timer *timer)
Start timer with no delay.
unsigned long strtoul(const char *string, char **endp, int base)
Convert string to numeric value.
Last Sequence of Exchange.
static void fc_port_flogi_done(struct fc_port *port, int rc)
Handle FLOGI completion.
int fc_aton(const char *wwn_text, struct fc_name *wwn)
Parse Fibre Channel WWN.
uint8_t seq_id
Active sequence ID.
static unsigned int fc_new_xchg_id(void)
Create local Fibre Channel exchange identifier.
#define list_add(new, head)
Add a new entry to the head of a list.
A Fibre Channel name server query.
const char * fc_id_ntoa(const struct fc_port_id *id)
Format Fibre Channel port ID.
#define XFER_FL_ABS_OFFSET
Offset is absolute.
#define ref_init(refcnt, free)
Initialise a reference counter.
static void fc_peer_decrement(struct fc_peer *peer)
Decrement Fibre Channel peer active usage count.
#define iob_push(iobuf, len)
static struct interface_operation fc_ulp_prli_op[]
Fibre Channel upper-layer protocol PRLI interface operations.
u16 fc
802.11 Frame Control field
unsigned int type
Data structure type.
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
static void fc_link_examine(struct fc_link_state *link)
Examine Fibre Channel link state.
struct refcnt refcnt
Reference count.
uint32_t type
Operating system type.
#define EPIPE
Broken pipe.
struct fc_peer * fc_peer_get_wwn(const struct fc_name *port_wwn)
Get Fibre Channel peer by node name.
uint16_t seq_cnt
Active sequence count.
static void fc_link_init(struct fc_link_state *link, void(*examine)(struct fc_link_state *link), struct refcnt *refcnt)
Initialise Fibre Channel link state monitor.
A Fibre Channel responder.
struct fc_port_id fc_f_port_id
F_Port contoller port ID.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct fc_port_id fc_ptp_low_port_id
Point-to-point low port ID.
struct fc_name node_wwn
Node name.
static struct interface_operation fc_port_transport_op[]
Fibre Channel port transport interface operations.
#define EUNKNOWN_LINK_STATUS
Default link status code.
static void fc_peer_increment(struct fc_peer *peer)
Increment Fibre Channel peer active usage count.
int fc_port_login(struct fc_port *port, struct fc_port_id *port_id, const struct fc_name *link_node_wwn, const struct fc_name *link_port_wwn, int has_fabric)
Log in Fibre Channel port.
static struct interface_descriptor fc_ulp_prli_desc
Fibre Channel upper-layer protocol PRLI interface descriptor.
Fibre Channel socket address.
void intf_plug_plug(struct interface *a, struct interface *b)
Plug two object interfaces together.
We have the sequence initiative.
struct list_head list
List of upper-layer protocols.
struct io_buffer * xfer_alloc_iob(struct interface *intf, size_t len)
Allocate I/O buffer.
uint16_t xchg_id
Local exchange ID.
struct fc_port_id sfc_port_id
Port ID.
static void fc_port_put(struct fc_port *port)
Drop reference to Fibre Channel port.
const char * fc_ntoa(const struct fc_name *wwn)
Format Fibre Channel WWN.
int fc_els_plogi(struct interface *parent, struct fc_port *port, struct fc_port_id *peer_port_id)
Create PLOGI request.
static struct interface_operation fc_xchg_ulp_op[]
Fibre Channel exchange ULP interface operations.
sa_family_t sfc_family
Socket address family (part of struct sockaddr)
static void fc_link_err(struct fc_link_state *link, int rc)
Mark Fibre Channel link as down.
#define FC_PORT_ID_STRLEN
Length of Fibre Channel port identifier next.
struct list_head fc_ports
Last Data Frame of Sequence.
struct fc_peer * peer
Fibre Channel peer.
We are the exchange originator.
#define AF_FC
Fibre Channel addresses.
size_t xfer_window(struct interface *intf)
Check flow control window.
#define ECANCELED
Operation canceled.
static struct interface_operation fc_port_ns_plogi_op[]
Fibre Channel port name server PLOGI interface operations.
struct list_head users
Active users of this upper-layer protocol.
A doubly-linked list entry (or list head)
Data transfer interfaces.
struct fc_port_id port_id
Local port ID.
#define FC_RESPONDERS
Fibre Channel responder table.
REQUIRING_SYMBOL(fc_ports)
struct list_head list
List of users.
static void fc_peer_examine(struct fc_link_state *link)
Examine Fibre Channel peer link state.
#define list_empty(list)
Test whether a list is empty.
struct fc_port * port
Fibre Channel port, if known.
static struct fc_ulp_user * fc_ulp_user_get(struct fc_ulp_user *user)
Get reference to Fibre Channel upper-layer protocol user.
#define XFER_FL_RESPONSE
Data content is a response.
static struct interface_descriptor fc_peer_plogi_desc
Fibre Channel peer PLOGI interface descriptor.
#define list_del(list)
Delete an entry from a list.
int fc_peer_login(struct fc_peer *peer, struct fc_port *port, struct fc_port_id *port_id)
Log in Fibre Channel peer.
static struct interface_operation fc_port_flogi_op[]
Fibre Channel port FLOGI interface operations.
#define ENOMEM
Not enough space.
#define iob_disown(iobuf)
Disown an I/O buffer.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define __unused
Declare a variable or data structure as unused.
int fc_els_flogi(struct interface *parent, struct fc_port *port)
Create FLOGI request.
Fibre Channel name server lookups.
Port is attached to a fabric.
static struct interface_descriptor fc_port_flogi_desc
Fibre Channel port FLOGI interface descriptor.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
#define container_of(ptr, type, field)
Get containing structure.
static void fc_peer_plogi_done(struct fc_peer *peer, int rc)
Handle PLOGI completion.
void fc_ulp_attach(struct fc_ulp *ulp, struct fc_ulp_user *user)
Attach Fibre Channel upper-layer protocol user.
A Fibre Channel port identifier.
static void fc_port_close(struct fc_port *port, int rc)
Close Fibre Channel port.
struct fc_port_id peer_port_id
Peer port ID.
static void fc_xchg_free(struct refcnt *refcnt)
Free Fibre Channel exchange.
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
size_t param_len
Service parameter length.
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
static int fc_link_ok(struct fc_link_state *link)
Check Fibre Channel link state.
struct fc_link_state link
Link state monitor.
static int fc_xchg_tx(struct fc_exchange *xchg, struct io_buffer *iobuf, struct xfer_metadata *meta)
Transmit data as part of a Fibre Channel exchange.
A login originated by us has succeeded.
A Fibre Channel exchange.
struct sockaddr * fc_fill_sockaddr(struct sockaddr_fc *sa_fc, struct fc_port_id *id)
Fill Fibre Channel socket address.
Transfer Sequence Initiative.
u32 link
Link to next descriptor.
struct list_head list
List of all peers.
static struct interface_descriptor fc_port_ns_plogi_desc
Fibre Channel port name server PLOGI interface descriptor.
This is the first sequence of the exchange.
#define FC_TIMEOUT
Fibre Channel timeout.
int fc_els_prli(struct interface *parent, struct fc_port *port, struct fc_port_id *peer_port_id, unsigned int type)
Create PRLI request.
struct interface prli
PRLI interface.
#define list_for_each_entry_safe(pos, tmp, head, member)
Iterate over entries in a list, safe against deletion of the current entry.
uint8_t id
Request identifier.
static struct interface_operation fc_peer_plogi_op[]
Fibre Channel peer PLOGI interface operations.
struct fc_port_id fc_empty_port_id
Unassigned port ID.
#define ENOTCONN
The socket is not connected.
Generalized socket address structure.
An object interface descriptor.
static int fc_peer_plogi(struct fc_peer *peer, struct fc_port *port, struct fc_port_id *peer_port_id)
Initiate PLOGI.
int(* respond)(struct interface *xchg, struct fc_port *port, struct fc_port_id *port_id, struct fc_port_id *peer_port_id)
Respond to exchange.
static struct fc_exchange * fc_xchg_respond(struct fc_port *port, struct fc_frame_header *fchdr)
Open a new responder Fibre Channel exchange.
struct fc_port_id port_id
Peer port ID, if known.
char * strerror(int errno)
Retrieve string representation of error number.
struct fc_port * port
Fibre Channel port.
#define FC_R_CTL_INFO_MASK
Fibre Channel Routing Control Information mask.
struct fc_peer * fc_peer_get_port_id(struct fc_port *port, const struct fc_port_id *peer_port_id)
Get Fibre Channel peer by port ID.
static struct io_buffer * fc_xchg_alloc_iob(struct fc_exchange *xchg, size_t len)
Allocate Fibre Channel I/O buffer.
static void(* free)(struct refcnt *refcnt))
static void fc_peer_put(struct fc_peer *peer)
Drop reference to Fibre Channel peer.
void * zalloc(size_t size)
Allocate cleared memory.
static size_t fc_xchg_window(struct fc_exchange *xchg __unused)
Check Fibre Channel exchange window.
void * param
Service parameters, if any.
#define ref_get(refcnt)
Get additional reference to object.
Port is logged in to a name server.
static struct fc_ulp * fc_ulp_get(struct fc_ulp *ulp)
Get reference to Fibre Channel upper-layer protocol.
static struct fc_peer * fc_peer_create(const struct fc_name *port_wwn)
Create Fibre Channel peer.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
struct hv_monitor_parameter param[4][32]
Parameters.
#define INTF_OP(op_type, object_type, op_func)
Define an object interface operation.
struct fc_link_state link
Link state monitor.
#define FC_LOGIN_DEFAULT_MTU
Fibre Channel default MTU.
void fc_peer_logout(struct fc_peer *peer, int rc)
Log out Fibre Channel peer.
static void fc_xchg_close(struct fc_exchange *xchg, int rc)
Close Fibre Channel exchange.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
static void fc_ulp_prli_done(struct fc_ulp *ulp, int rc)
Handle PRLI completion.
uint16_t peer_xchg_id
Peer exchange ID.
#define XFER_FL_CMD_STAT
Data content represents a command or status message.
int fc_port_open(struct interface *transport, const struct fc_name *node_wwn, const struct fc_name *port_wwn, const char *name)
Create Fibre Channel port.
void(* examine)(struct fc_ulp_user *user)
Examine link state.
int xfer_deliver(struct interface *intf, struct io_buffer *iobuf, struct xfer_metadata *meta)
Deliver datagram.
struct fc_name port_wwn
Port name.
static void fc_ulp_user_put(struct fc_ulp_user *user)
Drop reference to Fibre Channel upper-layer protocol user.
A Fibre Channel upper-layer protocol user.
static void fc_ulp_examine(struct fc_link_state *link)
Examine Fibre Channel upper-layer protocol link state.
static int fc_xchg_rx(struct fc_exchange *xchg, struct io_buffer *iobuf, struct xfer_metadata *meta __unused)
Receive data as part of a Fibre Channel exchange.
static struct fc_peer * fc_peer_get(struct fc_peer *peer)
Get reference to Fibre Channel peer.
REQUIRE_OBJECT(config_fc)
void * malloc(size_t size)
Allocate memory.
static void fc_link_stop(struct fc_link_state *link)
Stop monitoring Fibre Channel link state.
static unsigned int fc_new_seq_id(void)
Create local Fibre Channel sequence identifier.
int fc_ulp_login(struct fc_ulp *ulp, const void *param, size_t param_len, int originated)
Log in Fibre Channel upper-layer protocol.
static void fc_peer_close(struct fc_peer *peer, int rc)
Close Fibre Channel peer.
struct refcnt refcnt
Reference count.
void start_timer_fixed(struct retry_timer *timer, unsigned long timeout)
Start timer with a specified timeout.
static struct fc_port * fc_port_get(struct fc_port *port)
Get reference to Fibre Channel port.
void fc_ulp_logout(struct fc_ulp *ulp, int rc)
Log out Fibre Channel upper-layer protocol.
#define FC_RX_ID_UNKNOWN
Responder exchange identifier used before first response.
#define iob_reserve(iobuf, len)
#define INIT_LIST_HEAD(list)
Initialise a list head.
#define INTF_DESC(object_type, intf, operations)
Define an object interface descriptor.
void stop_timer(struct retry_timer *timer)
Stop timer.
static struct fc_exchange * fc_port_demux(struct fc_port *port, unsigned int xchg_id)
Identify Fibre Channel exchange by local exchange ID.
static void fc_link_up(struct fc_link_state *link)
Mark Fibre Channel link as up.
int strcmp(const char *first, const char *second)
Compare strings.
static void fc_port_ns_plogi_done(struct fc_port *port, int rc)
Handle name server PLOGI completion.
static struct fc_ulp * fc_ulp_create(struct fc_peer *peer, unsigned int type)
Create Fibre Channel upper-layer protocl.
void * data
Start of data.
struct interface transport
Transport interface.
static void fc_ulp_put(struct fc_ulp *ulp)
Drop reference to Fibre Channel upper-layer protocol.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
struct fc_port * fc_port_find(const char *name)
Find Fibre Channel port by name.
struct retry_timer timer
Timeout timer.
A Fibre Channel link state nonitor.
struct fc_ulp * fc_ulp_get_port_id_type(struct fc_port *port, const struct fc_port_id *peer_port_id, unsigned int type)
Get Fibre Channel upper-layer protocol by port ID and type.
static void fc_link_expired(struct retry_timer *timer, int over __unused)
Handle Fibre Channel link retry timer expiry.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
void(* examine)(struct fc_link_state *link)
Examine link state.
#define XFER_FL_OVER
Sender is relinquishing use of half-duplex channel.
struct mschapv2_challenge peer
Peer challenge.
void fc_port_logout(struct fc_port *port, int rc)
Log out Fibre Channel port.
LIST_HEAD(fc_ports)
List of Fibre Channel ports.
typeof(acpi_finder=acpi_find)
ACPI table finder.
static struct fc_exchange * fc_xchg_create(struct fc_port *port, struct fc_port_id *peer_port_id, unsigned int type)
Create new Fibre Channel exchange.
fc_exchange_flags
Fibre Channel exchange flags.
struct list_head list
List of active exchanges within this port.
static void fc_ulp_close(struct fc_ulp *ulp, int rc)
Close Fibre Channel upper-layer protocol.
static void intf_init(struct interface *intf, struct interface_descriptor *desc, struct refcnt *refcnt)
Initialise an object interface.
#define FC_NAME_STRLEN
Length of Fibre Channel name text.
struct fc_port_id fc_gs_port_id
Generic services port ID.
struct fc_ulp * fc_ulp_get_wwn_type(const struct fc_name *port_wwn, unsigned int type)
Get Fibre Channel upper-layer protocol by port name and type.
#define list_check_contains_entry(entry, head, member)
Check list contains a specified entry.
#define XFER_FL_OUT
This is the final data transfer.
First Sequence of Exchange.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
#define NULL
NULL pointer (VOID *)
#define ETIMEDOUT
Connection timed out.
static const uint8_t fc_r_ctl_info_meta_flags[FC_R_CTL_INFO_MASK+1]
Mapping from Fibre Channel routing control information to xfer metadata.
struct bofm_section_header done
static void fc_xchg_expired(struct retry_timer *timer, int over __unused)
Handle exchange timeout.
static struct interface_descriptor fc_port_transport_desc
Fibre Channel port transport interface descriptor.
#define ref_put(refcnt)
Drop reference to object.
A Fibre Channel upper-layer protocol.
static void fc_port_window_changed(struct fc_port *port)
Handle change of flow control window.
Fibre Channel Extended Link Services.
int fc_id_aton(const char *id_text, struct fc_port_id *id)
Parse Fibre Channel port ID.
void * memset(void *dest, int character, size_t len) __nonnull
static void fc_link_start(struct fc_link_state *link)
Start monitoring Fibre Channel link state.
static int fc_port_deliver(struct fc_port *port, struct io_buffer *iobuf, struct xfer_metadata *meta)
Handle received frame from Fibre Channel port.