|
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
|
static int | fc_els_is_request (struct fc_els *els) |
| Check if Fibre Channel ELS transaction is a request. More...
|
|
static unsigned int | fc_els_tx_command (struct fc_els *els, unsigned int request_command) |
| Calculate ELS command to transmit. More...
|
|
int | fc_els_tx (struct fc_els *els, const void *data, size_t len) |
| Transmit Fibre Channel ELS frame. More...
|
|
int | fc_els_request (struct interface *job, struct fc_port *port, struct fc_port_id *peer_port_id, struct fc_els_handler *handler) |
| Create ELS request. More...
|
|
int | fc_els_flogi (struct interface *parent, struct fc_port *port) |
| Create FLOGI request. More...
|
|
int | fc_els_plogi (struct interface *parent, struct fc_port *port, struct fc_port_id *peer_port_id) |
| Create PLOGI request. More...
|
|
int | fc_els_logo (struct interface *parent, struct fc_port *port, struct fc_port_id *peer_port_id) |
| Create LOGO request. More...
|
|
int | fc_els_prli (struct interface *parent, struct fc_port *port, struct fc_port_id *peer_port_id, unsigned int type) |
| Create PRLI request. More...
|
|
int | fc_els_prli_tx (struct fc_els *els, struct fc_els_prli_descriptor *descriptor, void *param) |
| Transmit PRLI. More...
|
|
int | fc_els_prli_rx (struct fc_els *els, struct fc_els_prli_descriptor *descriptor, void *data, size_t len) |
| Receive PRLI. More...
|
|
int | fc_els_prli_detect (struct fc_els *els __unused, struct fc_els_prli_descriptor *descriptor, const void *data, size_t len) |
| Detect PRLI. More...
|
|
Fibre Channel Extended Link Services.
Definition in file fcels.h.
int fc_els_tx |
( |
struct fc_els * |
els, |
|
|
const void * |
data, |
|
|
size_t |
len |
|
) |
| |
Transmit Fibre Channel ELS frame.
- Parameters
-
els | Fibre Channel ELS transaction |
data | Data to transmit |
len | Length of data |
- Return values
-
Definition at line 126 of file fcels.c.
struct arbelprm_rc_send_wqe rc
int xfer_deliver_raw_meta(struct interface *intf, const void *data, size_t len, struct xfer_metadata *meta)
Deliver datagram as raw data.
Fibre Channel socket address.
#define FCELS_FMT
Fibre Channel ELS transaction debug message format.
struct fc_port_id peer_port_id
Peer port ID.
#define XFER_FL_RESPONSE
Data content is a response.
struct interface xchg
Fibre Channel exchange.
struct sockaddr * fc_fill_sockaddr(struct sockaddr_fc *sa_fc, struct fc_port_id *id)
Fill Fibre Channel socket address.
char * strerror(int errno)
Retrieve string representation of error number.
#define FCELS_ARGS(els)
Fibre Channel ELS transaction debug message arguments.
static int fc_els_is_request(struct fc_els *els)
Check if Fibre Channel ELS transaction is a request.
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
uint8_t data[48]
Additional event data.
#define XFER_FL_OVER
Sender is relinquishing use of half-duplex channel.
#define XFER_FL_OUT
This is the final data transfer.
void * memset(void *dest, int character, size_t len) __nonnull
References data, DBGC, DBGC2, DBGC2_HDA, dest, fc_els_is_request(), fc_fill_sockaddr(), FCELS_ARGS, FCELS_FMT, len, memset(), meta(), fc_els::peer_port_id, rc, strerror(), fc_els::xchg, xfer_deliver_raw_meta(), XFER_FL_OUT, XFER_FL_OVER, and XFER_FL_RESPONSE.
Referenced by fc_els_echo_rx_request(), fc_els_echo_tx(), fc_els_flogi_tx(), fc_els_logo_tx(), fc_els_logo_tx_response(), fc_els_plogi_tx(), fc_els_prli_tx(), fc_els_rtv_tx_response(), and fc_els_unknown_tx_response().
Create ELS request.
- Parameters
-
job | Parent job-control interface |
port | Fibre Channel port |
peer_port_id | Peer port ID |
handler | ELS handler |
- Return values
-
Definition at line 323 of file fcels.c.
struct fc_els_handler * handler
ELS handler, if known.
void intf_plug_plug(struct interface *a, struct interface *b)
Plug two object interfaces together.
struct fc_port_id peer_port_id
Peer port ID.
#define ENOMEM
Not enough space.
ELS transaction is a request.
struct refcnt refcnt
Reference count.
void process_add(struct process *process)
Add process to process list.
A Fibre Channel extended link services transaction.
struct interface job
Job control interface.
static struct fc_els * fc_els_create(struct fc_port *port, struct fc_port_id *port_id, struct fc_port_id *peer_port_id)
Create ELS transaction.
struct process process
Request sending process.
#define ref_put(refcnt)
Drop reference to object.
References ENOMEM, fc_els_create(), FC_ELS_REQUEST, fc_els::flags, fc_els::handler, intf_plug_plug(), fc_els::job, fc_els::peer_port_id, port, fc_els::process, process_add(), ref_put, and fc_els::refcnt.
Referenced by fc_els_flogi(), fc_els_logo(), fc_els_plogi(), fc_els_prli(), and fcels().
Transmit PRLI.
- Parameters
-
els | Fibre Channel ELS transaction |
descriptor | ELS PRLI descriptor |
param | Service parameters |
- Return values
-
Definition at line 950 of file fcels.c.
964 goto err_get_port_id_type;
970 prli.frame.page_len =
971 (
sizeof (
prli.frame.page ) +
sizeof (
prli.param ) );
973 prli.frame.page.type = descriptor->
type;
993 err_get_port_id_type:
struct arbelprm_rc_send_wqe rc
size_t param_len
Service parameter length.
struct fc_port_id peer_port_id
Peer port ID.
int fc_els_tx(struct fc_els *els, const void *data, size_t len)
Transmit Fibre Channel ELS frame.
#define ENOMEM
Not enough space.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
A Fibre Channel PRLI frame.
static int fc_link_ok(struct fc_link_state *link)
Check Fibre Channel link state.
#define FC_PRLI_ESTABLISH
Establish image pair.
struct interface prli
PRLI interface.
struct fc_port * port
Fibre Channel port.
static unsigned int fc_els_tx_command(struct fc_els *els, unsigned int request_command)
Calculate ELS command to transmit.
struct hv_monitor_parameter param[4][32]
Parameters.
struct fc_link_state link
Link state monitor.
static int fc_els_is_request(struct fc_els *els)
Check if Fibre Channel ELS transaction is a request.
static void fc_ulp_put(struct fc_ulp *ulp)
Drop reference to Fibre Channel upper-layer protocol.
#define FC_PRLI_RESPONSE_SUCCESS
Request was executed successfully.
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.
unsigned int type
Upper-layer protocol type.
A Fibre Channel upper-layer protocol.
void * memset(void *dest, int character, size_t len) __nonnull
References __attribute__, ENOMEM, fc_els_is_request(), FC_ELS_PRLI, fc_els_tx(), fc_els_tx_command(), fc_link_ok(), FC_PRLI_ESTABLISH, FC_PRLI_RESPONSE_SUCCESS, fc_ulp_get_port_id_type(), fc_ulp_put(), frame, htons, fc_ulp::link, memcpy(), memset(), param, fc_els_prli_descriptor::param_len, fc_els::peer_port_id, fc_els::port, fc_ulp::prli, rc, and fc_els_prli_descriptor::type.
Referenced by fcp_prli_tx().
Receive PRLI.
- Parameters
-
els | Fibre Channel ELS transaction |
descriptor | ELS PRLI descriptor |
frame | ELS frame |
len | Length of ELS frame |
- Return values
-
Definition at line 1006 of file fcels.c.
1017 if (
len <
sizeof ( *
prli ) ) {
1033 goto err_get_port_id_type;
1038 DBGC ( els,
FCELS_FMT " received while peer link is down\n",
1047 sizeof (
prli->param ),
1078 err_get_port_id_type:
#define EINVAL
Invalid argument.
struct arbelprm_rc_send_wqe rc
size_t param_len
Service parameter length.
int(* tx)(struct fc_els *els)
Transmit ELS frame.
struct fc_els_handler * handler
ELS handler, if known.
#define EACCES
Permission denied.
#define FCELS_FMT
Fibre Channel ELS transaction debug message format.
struct fc_port_id peer_port_id
Peer port ID.
struct fc_peer * peer
Fibre Channel peer.
#define ENOMEM
Not enough space.
A Fibre Channel PRLI frame.
static int fc_link_ok(struct fc_link_state *link)
Check Fibre Channel link state.
struct fc_link_state link
Link state monitor.
#define FC_PRLI_ESTABLISH
Establish image pair.
struct interface prli
PRLI interface.
char * strerror(int errno)
Retrieve string representation of error number.
struct fc_port * port
Fibre Channel port.
void * param
Service parameters, if any.
#define FCELS_ARGS(els)
Fibre Channel ELS transaction debug message arguments.
int fc_ulp_login(struct fc_ulp *ulp, const void *param, size_t param_len, int originated)
Log in Fibre Channel upper-layer protocol.
void fc_ulp_logout(struct fc_ulp *ulp, int rc)
Log out Fibre Channel upper-layer protocol.
static int fc_els_is_request(struct fc_els *els)
Check if Fibre Channel ELS transaction is a request.
static void fc_ulp_put(struct fc_ulp *ulp)
Drop reference to Fibre Channel upper-layer protocol.
uint8_t data[48]
Additional event data.
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.
unsigned int type
Upper-layer protocol type.
A Fibre Channel upper-layer protocol.
References __attribute__, data, DBGC, DBGC_HDA, EACCES, EINVAL, ENOMEM, fc_els_is_request(), fc_link_ok(), FC_PRLI_ESTABLISH, fc_ulp_get_port_id_type(), fc_ulp_login(), fc_ulp_logout(), fc_ulp_put(), FCELS_ARGS, FCELS_FMT, frame, fc_els::handler, htons, len, fc_peer::link, fc_ulp::param, fc_els_prli_descriptor::param_len, fc_ulp::peer, fc_els::peer_port_id, fc_els::port, fc_ulp::prli, rc, strerror(), fc_els_handler::tx, and fc_els_prli_descriptor::type.
Referenced by fcp_prli_rx().