diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-09-15 19:25:05 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-09-15 19:25:05 +0100 |
commit | 52e54a8c69351ee1455f8fbf2a9cd5d27d42f7ab (patch) | |
tree | d8b88315c25088f824ee97b0b0faf4945311445a /src/net/infiniband | |
parent | 3ea3c846d8cb5d7f1814eab6a3dac149b4f7fe8b (diff) | |
download | ipxe-52e54a8c69351ee1455f8fbf2a9cd5d27d42f7ab.tar.gz |
[infiniband] Match GID/GUID terminology as used in the IBA
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/infiniband')
-rw-r--r-- | src/net/infiniband/ib_cm.c | 9 | ||||
-rw-r--r-- | src/net/infiniband/ib_cmrc.c | 6 | ||||
-rw-r--r-- | src/net/infiniband/ib_mcast.c | 26 | ||||
-rw-r--r-- | src/net/infiniband/ib_packet.c | 7 | ||||
-rw-r--r-- | src/net/infiniband/ib_pathrec.c | 36 | ||||
-rw-r--r-- | src/net/infiniband/ib_sma.c | 18 | ||||
-rw-r--r-- | src/net/infiniband/ib_smc.c | 15 | ||||
-rw-r--r-- | src/net/infiniband/ib_srp.c | 35 |
8 files changed, 63 insertions, 89 deletions
diff --git a/src/net/infiniband/ib_cm.c b/src/net/infiniband/ib_cm.c index cac0a983e..bbba5727e 100644 --- a/src/net/infiniband/ib_cm.c +++ b/src/net/infiniband/ib_cm.c @@ -432,7 +432,7 @@ static struct ib_path_operations ib_cm_path_op = { */ struct ib_connection * ib_create_conn ( struct ib_device *ibdev, struct ib_queue_pair *qp, - struct ib_gid *dgid, struct ib_gid_half *service_id, + union ib_gid *dgid, union ib_guid *service_id, void *private_data, size_t private_data_len, struct ib_connection_operations *op ) { struct ib_connection *conn; @@ -463,11 +463,8 @@ ib_create_conn ( struct ib_device *ibdev, struct ib_queue_pair *qp, DBGC ( conn, "CM %p created for IBDEV %p QPN %lx\n", conn, ibdev, qp->qpn ); - DBGC ( conn, "CM %p connecting to %08x:%08x:%08x:%08x %08x:%08x\n", - conn, ntohl ( dgid->u.dwords[0] ), ntohl ( dgid->u.dwords[1] ), - ntohl ( dgid->u.dwords[2] ), ntohl ( dgid->u.dwords[3] ), - ntohl ( service_id->u.dwords[0] ), - ntohl ( service_id->u.dwords[1] ) ); + DBGC ( conn, "CM %p connecting to " IB_GID_FMT " " IB_GUID_FMT "\n", + conn, IB_GID_ARGS ( dgid ), IB_GUID_ARGS ( service_id ) ); return conn; diff --git a/src/net/infiniband/ib_cmrc.c b/src/net/infiniband/ib_cmrc.c index f596c36dc..011ff3e06 100644 --- a/src/net/infiniband/ib_cmrc.c +++ b/src/net/infiniband/ib_cmrc.c @@ -80,9 +80,9 @@ struct ib_cmrc_connection { /** Connection */ struct ib_connection *conn; /** Destination GID */ - struct ib_gid dgid; + union ib_gid dgid; /** Service ID */ - struct ib_gid_half service_id; + union ib_guid service_id; /** QP is connected */ int connected; /** Shutdown process */ @@ -357,7 +357,7 @@ static struct interface_descriptor ib_cmrc_xfer_desc = * @ret rc Returns status code */ int ib_cmrc_open ( struct interface *xfer, struct ib_device *ibdev, - struct ib_gid *dgid, struct ib_gid_half *service_id ) { + union ib_gid *dgid, union ib_guid *service_id ) { struct ib_cmrc_connection *cmrc; int rc; diff --git a/src/net/infiniband/ib_mcast.c b/src/net/infiniband/ib_mcast.c index 9eff1899e..0f03b54ac 100644 --- a/src/net/infiniband/ib_mcast.c +++ b/src/net/infiniband/ib_mcast.c @@ -41,7 +41,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * @v join Join (rather than leave) group * @v mad MAD to fill in */ -static void ib_mcast_mad ( struct ib_device *ibdev, struct ib_gid *gid, +static void ib_mcast_mad ( struct ib_device *ibdev, union ib_gid *gid, int join, union ib_mad *mad ) { struct ib_mad_sa *sa = &mad->sa; @@ -79,7 +79,7 @@ static void ib_mcast_complete ( struct ib_device *ibdev, struct ib_address_vector *av __unused ) { struct ib_mc_membership *membership = ib_madx_get_ownerdata ( madx ); struct ib_queue_pair *qp = membership->qp; - struct ib_gid *gid = &membership->gid; + union ib_gid *gid = &membership->gid; struct ib_mc_member_record *mc_member_record = &mad->sa.sa_data.mc_member_record; int joined; @@ -97,11 +97,9 @@ static void ib_mcast_complete ( struct ib_device *ibdev, /* Extract values from MAD */ joined = ( mad->hdr.method == IB_MGMT_METHOD_GET_RESP ); qkey = ntohl ( mc_member_record->qkey ); - DBGC ( ibdev, "IBDEV %p QPN %lx %s %08x:%08x:%08x:%08x qkey %lx\n", + DBGC ( ibdev, "IBDEV %p QPN %lx %s " IB_GID_FMT " qkey %lx\n", ibdev, qp->qpn, ( joined ? "joined" : "left" ), - ntohl ( gid->u.dwords[0] ), ntohl ( gid->u.dwords[1] ), - ntohl ( gid->u.dwords[2] ), ntohl ( gid->u.dwords[3] ), - qkey ); + IB_GID_ARGS ( gid ), qkey ); /* Set queue key */ qp->qkey = qkey; @@ -136,7 +134,7 @@ static struct ib_mad_transaction_operations ib_mcast_op = { * @ret rc Return status code */ int ib_mcast_join ( struct ib_device *ibdev, struct ib_queue_pair *qp, - struct ib_mc_membership *membership, struct ib_gid *gid, + struct ib_mc_membership *membership, union ib_gid *gid, void ( * complete ) ( struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_mc_membership *membership, @@ -144,10 +142,8 @@ int ib_mcast_join ( struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_mad mad; int rc; - DBGC ( ibdev, "IBDEV %p QPN %lx joining %08x:%08x:%08x:%08x\n", - ibdev, qp->qpn, ntohl ( gid->u.dwords[0] ), - ntohl ( gid->u.dwords[1] ), ntohl ( gid->u.dwords[2] ), - ntohl ( gid->u.dwords[3] ) ); + DBGC ( ibdev, "IBDEV %p QPN %lx joining " IB_GID_FMT "\n", + ibdev, qp->qpn, IB_GID_ARGS ( gid ) ); /* Initialise structure */ membership->qp = qp; @@ -191,14 +187,12 @@ int ib_mcast_join ( struct ib_device *ibdev, struct ib_queue_pair *qp, */ void ib_mcast_leave ( struct ib_device *ibdev, struct ib_queue_pair *qp, struct ib_mc_membership *membership ) { - struct ib_gid *gid = &membership->gid; + union ib_gid *gid = &membership->gid; union ib_mad mad; int rc; - DBGC ( ibdev, "IBDEV %p QPN %lx leaving %08x:%08x:%08x:%08x\n", - ibdev, qp->qpn, ntohl ( gid->u.dwords[0] ), - ntohl ( gid->u.dwords[1] ), ntohl ( gid->u.dwords[2] ), - ntohl ( gid->u.dwords[3] ) ); + DBGC ( ibdev, "IBDEV %p QPN %lx leaving " IB_GID_FMT "\n", + ibdev, qp->qpn, IB_GID_ARGS ( gid ) ); /* Detach from multicast GID */ ib_mcast_detach ( ibdev, qp, &membership->gid ); diff --git a/src/net/infiniband/ib_packet.c b/src/net/infiniband/ib_packet.c index 943f39571..d58e0ad4b 100644 --- a/src/net/infiniband/ib_packet.c +++ b/src/net/infiniband/ib_packet.c @@ -215,11 +215,8 @@ int ib_pull ( struct ib_device *ibdev, struct io_buffer *iobuf, if ( IB_LID_MULTICAST ( lid ) && grh ) { if ( ! ( *qp = ib_find_qp_mgid ( ibdev, &grh->dgid ))){ DBGC ( ibdev, "IBDEV %p RX for unknown MGID " - "%08x:%08x:%08x:%08x\n", ibdev, - ntohl ( grh->dgid.u.dwords[0] ), - ntohl ( grh->dgid.u.dwords[1] ), - ntohl ( grh->dgid.u.dwords[2] ), - ntohl ( grh->dgid.u.dwords[3] ) ); + IB_GID_FMT "\n", + ibdev, IB_GID_ARGS ( &grh->dgid ) ); return -ENODEV; } } else { diff --git a/src/net/infiniband/ib_pathrec.c b/src/net/infiniband/ib_pathrec.c index e1fa53068..7b9146547 100644 --- a/src/net/infiniband/ib_pathrec.c +++ b/src/net/infiniband/ib_pathrec.c @@ -49,18 +49,16 @@ static void ib_path_complete ( struct ib_device *ibdev, int rc, union ib_mad *mad, struct ib_address_vector *av __unused ) { struct ib_path *path = ib_madx_get_ownerdata ( madx ); - struct ib_gid *dgid = &path->av.gid; + union ib_gid *dgid = &path->av.gid; struct ib_path_record *pathrec = &mad->sa.sa_data.path_record; /* Report failures */ if ( ( rc == 0 ) && ( mad->hdr.status != htons ( IB_MGMT_STATUS_OK ) )) rc = -ENETUNREACH; if ( rc != 0 ) { - DBGC ( ibdev, "IBDEV %p path lookup for %08x:%08x:%08x:%08x " - "failed: %s\n", ibdev, htonl ( dgid->u.dwords[0] ), - htonl ( dgid->u.dwords[1] ), - htonl ( dgid->u.dwords[2] ), - htonl ( dgid->u.dwords[3] ), strerror ( rc ) ); + DBGC ( ibdev, "IBDEV %p path lookup for " IB_GID_FMT + " failed: %s\n", + ibdev, IB_GID_ARGS ( dgid ), strerror ( rc ) ); goto out; } @@ -68,10 +66,8 @@ static void ib_path_complete ( struct ib_device *ibdev, path->av.lid = ntohs ( pathrec->dlid ); path->av.sl = ( pathrec->reserved__sl & 0x0f ); path->av.rate = ( pathrec->rate_selector__rate & 0x3f ); - DBGC ( ibdev, "IBDEV %p path to %08x:%08x:%08x:%08x is %04x sl %d " - "rate %d\n", ibdev, htonl ( dgid->u.dwords[0] ), - htonl ( dgid->u.dwords[1] ), htonl ( dgid->u.dwords[2] ), - htonl ( dgid->u.dwords[3] ), path->av.lid, path->av.sl, + DBGC ( ibdev, "IBDEV %p path to " IB_GID_FMT " is %04x sl %d rate " + "%d\n", ibdev, IB_GID_ARGS ( dgid ), path->av.lid, path->av.sl, path->av.rate ); out: @@ -179,7 +175,7 @@ static unsigned int ib_path_cache_idx; * @ret path Path cache entry, or NULL */ static struct ib_cached_path * -ib_find_path_cache_entry ( struct ib_device *ibdev, struct ib_gid *dgid ) { +ib_find_path_cache_entry ( struct ib_device *ibdev, union ib_gid *dgid ) { struct ib_cached_path *cached; unsigned int i; @@ -240,14 +236,14 @@ static struct ib_path_operations ib_cached_path_op = { * cache similar to ARP. */ int ib_resolve_path ( struct ib_device *ibdev, struct ib_address_vector *av ) { - struct ib_gid *gid = &av->gid; + union ib_gid *gid = &av->gid; struct ib_cached_path *cached; unsigned int cache_idx; /* Sanity check */ if ( ! av->gid_present ) { - DBGC ( ibdev, "IBDEV %p attempt to look up path " - "without GID\n", ibdev ); + DBGC ( ibdev, "IBDEV %p attempt to look up path without GID\n", + ibdev ); return -EINVAL; } @@ -258,16 +254,12 @@ int ib_resolve_path ( struct ib_device *ibdev, struct ib_address_vector *av ) { av->lid = cached->path->av.lid; av->rate = cached->path->av.rate; av->sl = cached->path->av.sl; - DBGC2 ( ibdev, "IBDEV %p cache hit for %08x:%08x:%08x:%08x\n", - ibdev, htonl ( gid->u.dwords[0] ), - htonl ( gid->u.dwords[1] ), htonl ( gid->u.dwords[2] ), - htonl ( gid->u.dwords[3] ) ); + DBGC2 ( ibdev, "IBDEV %p cache hit for " IB_GID_FMT "\n", + ibdev, IB_GID_ARGS ( gid ) ); return 0; } - DBGC ( ibdev, "IBDEV %p cache miss for %08x:%08x:%08x:%08x%s\n", - ibdev, htonl ( gid->u.dwords[0] ), htonl ( gid->u.dwords[1] ), - htonl ( gid->u.dwords[2] ), htonl ( gid->u.dwords[3] ), - ( cached ? " (in progress)" : "" ) ); + DBGC ( ibdev, "IBDEV %p cache miss for " IB_GID_FMT "%s\n", ibdev, + IB_GID_ARGS ( gid ), ( cached ? " (in progress)" : "" ) ); /* If lookup is already in progress, do nothing */ if ( cached ) diff --git a/src/net/infiniband/ib_sma.c b/src/net/infiniband/ib_sma.c index b8327355f..45a1e4469 100644 --- a/src/net/infiniband/ib_sma.c +++ b/src/net/infiniband/ib_sma.c @@ -61,7 +61,7 @@ static void ib_sma_node_info ( struct ib_device *ibdev, node_info->num_ports = ib_get_hca_info ( ibdev, &node_info->sys_guid ); memcpy ( &node_info->node_guid, &node_info->sys_guid, sizeof ( node_info->node_guid ) ); - memcpy ( &node_info->port_guid, &ibdev->gid.u.half[1], + memcpy ( &node_info->port_guid, &ibdev->gid.s.guid, sizeof ( node_info->port_guid ) ); node_info->partition_cap = htons ( 1 ); node_info->local_port_num = ibdev->port; @@ -88,7 +88,7 @@ static void ib_sma_node_desc ( struct ib_device *ibdev, union ib_mad *mad, struct ib_address_vector *av ) { struct ib_node_desc *node_desc = &mad->smp.smp_data.node_desc; - struct ib_gid_half guid; + union ib_guid guid; char hostname[ sizeof ( node_desc->node_string ) ]; int hostname_len; int rc; @@ -101,9 +101,9 @@ static void ib_sma_node_desc ( struct ib_device *ibdev, snprintf ( node_desc->node_string, sizeof ( node_desc->node_string ), "iPXE %s%s%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x (%s)", hostname, ( ( hostname_len >= 0 ) ? " " : "" ), - guid.u.bytes[0], guid.u.bytes[1], guid.u.bytes[2], - guid.u.bytes[3], guid.u.bytes[4], guid.u.bytes[5], - guid.u.bytes[6], guid.u.bytes[7], ibdev->dev->name ); + guid.bytes[0], guid.bytes[1], guid.bytes[2], guid.bytes[3], + guid.bytes[4], guid.bytes[5], guid.bytes[6], guid.bytes[7], + ibdev->dev->name ); /* Send GetResponse */ mad->hdr.method = IB_MGMT_METHOD_GET_RESP; @@ -131,7 +131,7 @@ static void ib_sma_guid_info ( struct ib_device *ibdev, /* Fill in information */ memset ( guid_info, 0, sizeof ( *guid_info ) ); - memcpy ( guid_info->guid[0], &ibdev->gid.u.half[1], + memcpy ( guid_info->guid[0], &ibdev->gid.s.guid, sizeof ( guid_info->guid[0] ) ); /* Send GetResponse */ @@ -160,8 +160,8 @@ static int ib_sma_set_port_info ( struct ib_device *ibdev, int rc; /* Set parameters */ - memcpy ( &ibdev->gid.u.half[0], port_info->gid_prefix, - sizeof ( ibdev->gid.u.half[0] ) ); + memcpy ( &ibdev->gid.s.prefix, port_info->gid_prefix, + sizeof ( ibdev->gid.s.prefix ) ); ibdev->lid = ntohs ( port_info->lid ); ibdev->sm_lid = ntohs ( port_info->mastersm_lid ); if ( ( link_width_enabled = port_info->link_width_enabled ) ) @@ -210,7 +210,7 @@ static void ib_sma_port_info ( struct ib_device *ibdev, /* Fill in information */ memset ( port_info, 0, sizeof ( *port_info ) ); - memcpy ( port_info->gid_prefix, &ibdev->gid.u.half[0], + memcpy ( port_info->gid_prefix, &ibdev->gid.s.prefix, sizeof ( port_info->gid_prefix ) ); port_info->lid = ntohs ( ibdev->lid ); port_info->mastersm_lid = ntohs ( ibdev->sm_lid ); diff --git a/src/net/infiniband/ib_smc.c b/src/net/infiniband/ib_smc.c index 7d5963594..5eef8255a 100644 --- a/src/net/infiniband/ib_smc.c +++ b/src/net/infiniband/ib_smc.c @@ -141,8 +141,8 @@ int ib_smc_update ( struct ib_device *ibdev, ib_local_mad_t local_mad ) { */ if ( ( rc = ib_smc_get_port_info ( ibdev, local_mad, &mad ) ) != 0 ) return rc; - memcpy ( &ibdev->gid.u.half[0], port_info->gid_prefix, - sizeof ( ibdev->gid.u.half[0] ) ); + memcpy ( &ibdev->gid.s.prefix, port_info->gid_prefix, + sizeof ( ibdev->gid.s.prefix ) ); ibdev->lid = ntohs ( port_info->lid ); ibdev->sm_lid = ntohs ( port_info->mastersm_lid ); ibdev->link_width_enabled = port_info->link_width_enabled; @@ -161,19 +161,16 @@ int ib_smc_update ( struct ib_device *ibdev, ib_local_mad_t local_mad ) { /* GUID info gives us the second half of the port GID */ if ( ( rc = ib_smc_get_guid_info ( ibdev, local_mad, &mad ) ) != 0 ) return rc; - memcpy ( &ibdev->gid.u.half[1], guid_info->guid[0], - sizeof ( ibdev->gid.u.half[1] ) ); + memcpy ( &ibdev->gid.s.guid, guid_info->guid[0], + sizeof ( ibdev->gid.s.guid ) ); /* Get partition key */ if ( ( rc = ib_smc_get_pkey_table ( ibdev, local_mad, &mad ) ) != 0 ) return rc; ibdev->pkey = ntohs ( pkey_table->pkey[0] ); - DBGC ( ibdev, "IBDEV %p port GID is %08x:%08x:%08x:%08x\n", ibdev, - htonl ( ibdev->gid.u.dwords[0] ), - htonl ( ibdev->gid.u.dwords[1] ), - htonl ( ibdev->gid.u.dwords[2] ), - htonl ( ibdev->gid.u.dwords[3] ) ); + DBGC ( ibdev, "IBDEV %p port GID is " IB_GID_FMT "\n", + ibdev, IB_GID_ARGS ( &ibdev->gid ) ); return 0; } diff --git a/src/net/infiniband/ib_srp.c b/src/net/infiniband/ib_srp.c index 41416a202..7b2b2b4ea 100644 --- a/src/net/infiniband/ib_srp.c +++ b/src/net/infiniband/ib_srp.c @@ -81,9 +81,9 @@ struct ib_srp_device { struct ib_device *ibdev; /** Destination GID (for boot firmware table) */ - struct ib_gid dgid; + union ib_gid dgid; /** Service ID (for boot firmware table) */ - struct ib_gid_half service_id; + union ib_guid service_id; }; /** @@ -184,7 +184,7 @@ static struct interface_descriptor ib_srp_srp_desc = * @ret rc Return status code */ static int ib_srp_open ( struct interface *block, struct ib_device *ibdev, - struct ib_gid *dgid, struct ib_gid_half *service_id, + union ib_gid *dgid, union ib_guid *service_id, union srp_port_id *initiator, union srp_port_id *target, struct scsi_lun *lun ) { struct ib_srp_device *ib_srp; @@ -200,11 +200,8 @@ static int ib_srp_open ( struct interface *block, struct ib_device *ibdev, intf_init ( &ib_srp->srp, &ib_srp_srp_desc, &ib_srp->refcnt ); intf_init ( &ib_srp->cmrc, &ib_srp_cmrc_desc, &ib_srp->refcnt ); ib_srp->ibdev = ibdev_get ( ibdev ); - DBGC ( ib_srp, "IBSRP %p created for %08x%08x%08x%08x:%08x%08x\n", - ib_srp, ntohl ( dgid->u.dwords[0] ), - ntohl ( dgid->u.dwords[1] ), ntohl ( dgid->u.dwords[2] ), - ntohl ( dgid->u.dwords[3] ), ntohl ( service_id->u.dwords[0] ), - ntohl ( service_id->u.dwords[1] ) ); + DBGC ( ib_srp, "IBSRP %p for " IB_GID_FMT " " IB_GUID_FMT "\n", + ib_srp, IB_GID_ARGS ( dgid ), IB_GUID_ARGS ( service_id ) ); /* Preserve parameters required for boot firmware table */ memcpy ( &ib_srp->dgid, dgid, sizeof ( ib_srp->dgid ) ); @@ -256,15 +253,15 @@ enum ib_srp_parse_flags { /** IB SRP root path parameters */ struct ib_srp_root_path { /** Source GID */ - struct ib_gid sgid; + union ib_gid sgid; /** Initiator port ID */ union ib_srp_initiator_port_id initiator; /** Destination GID */ - struct ib_gid dgid; + union ib_gid dgid; /** Partition key */ uint16_t pkey; /** Service ID */ - struct ib_gid_half service_id; + union ib_guid service_id; /** SCSI LUN */ struct scsi_lun lun; /** Target port ID */ @@ -337,7 +334,7 @@ static int ib_srp_parse_sgid ( const char *rp_comp, if ( ( ibdev = last_opened_ibdev() ) != NULL ) memcpy ( &rp->sgid, &ibdev->gid, sizeof ( rp->sgid ) ); - return ib_srp_parse_byte_string ( rp_comp, rp->sgid.u.bytes, + return ib_srp_parse_byte_string ( rp_comp, rp->sgid.bytes, ( sizeof ( rp->sgid ) | IB_SRP_PARSE_OPTIONAL ) ); } @@ -353,7 +350,7 @@ static int ib_srp_parse_initiator_id_ext ( const char *rp_comp, struct ib_srp_root_path *rp ) { union ib_srp_initiator_port_id *port_id = &rp->initiator; - return ib_srp_parse_byte_string ( rp_comp, port_id->ib.id_ext.u.bytes, + return ib_srp_parse_byte_string ( rp_comp, port_id->ib.id_ext.bytes, ( sizeof ( port_id->ib.id_ext ) | IB_SRP_PARSE_OPTIONAL ) ); } @@ -370,10 +367,10 @@ static int ib_srp_parse_initiator_hca_guid ( const char *rp_comp, union ib_srp_initiator_port_id *port_id = &rp->initiator; /* Default to the GUID portion of the source GID */ - memcpy ( &port_id->ib.hca_guid, &rp->sgid.u.half[1], + memcpy ( &port_id->ib.hca_guid, &rp->sgid.s.guid, sizeof ( port_id->ib.hca_guid ) ); - return ib_srp_parse_byte_string ( rp_comp, port_id->ib.hca_guid.u.bytes, + return ib_srp_parse_byte_string ( rp_comp, port_id->ib.hca_guid.bytes, ( sizeof ( port_id->ib.hca_guid ) | IB_SRP_PARSE_OPTIONAL ) ); } @@ -387,7 +384,7 @@ static int ib_srp_parse_initiator_hca_guid ( const char *rp_comp, */ static int ib_srp_parse_dgid ( const char *rp_comp, struct ib_srp_root_path *rp ) { - return ib_srp_parse_byte_string ( rp_comp, rp->dgid.u.bytes, + return ib_srp_parse_byte_string ( rp_comp, rp->dgid.bytes, ( sizeof ( rp->dgid ) | IB_SRP_PARSE_REQUIRED ) ); } @@ -418,7 +415,7 @@ static int ib_srp_parse_pkey ( const char *rp_comp, */ static int ib_srp_parse_service_id ( const char *rp_comp, struct ib_srp_root_path *rp ) { - return ib_srp_parse_byte_string ( rp_comp, rp->service_id.u.bytes, + return ib_srp_parse_byte_string ( rp_comp, rp->service_id.bytes, ( sizeof ( rp->service_id ) | IB_SRP_PARSE_REQUIRED ) ); } @@ -446,7 +443,7 @@ static int ib_srp_parse_target_id_ext ( const char *rp_comp, struct ib_srp_root_path *rp ) { union ib_srp_target_port_id *port_id = &rp->target; - return ib_srp_parse_byte_string ( rp_comp, port_id->ib.id_ext.u.bytes, + return ib_srp_parse_byte_string ( rp_comp, port_id->ib.id_ext.bytes, ( sizeof ( port_id->ib.id_ext ) | IB_SRP_PARSE_REQUIRED ) ); } @@ -462,7 +459,7 @@ static int ib_srp_parse_target_ioc_guid ( const char *rp_comp, struct ib_srp_root_path *rp ) { union ib_srp_target_port_id *port_id = &rp->target; - return ib_srp_parse_byte_string ( rp_comp, port_id->ib.ioc_guid.u.bytes, + return ib_srp_parse_byte_string ( rp_comp, port_id->ib.ioc_guid.bytes, ( sizeof ( port_id->ib.ioc_guid ) | IB_SRP_PARSE_REQUIRED ) ); } |