iPXE
|
Xsigo virtual Ethernet devices. More...
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <byteswap.h>
#include <ipxe/version.h>
#include <ipxe/timer.h>
#include <ipxe/malloc.h>
#include <ipxe/iobuf.h>
#include <ipxe/retry.h>
#include <ipxe/process.h>
#include <ipxe/settings.h>
#include <ipxe/infiniband.h>
#include <ipxe/ib_service.h>
#include <ipxe/ib_cmrc.h>
#include <ipxe/if_ether.h>
#include <ipxe/ethernet.h>
#include <ipxe/eoib.h>
#include <ipxe/xsigo.h>
Go to the source code of this file.
Data Structures | |
struct | xsigo_device |
A Xsigo device. More... | |
struct | xsigo_manager |
A Xsigo configuration manager. More... | |
struct | xsigo_nic |
A Xsigo virtual Ethernet device. More... | |
struct | xsigo_discovery |
A stage of discovery. More... | |
Enumerations | |
enum | xsigo_manager_pending { XCM_TX_CONNECT = 0x0001, XCM_TX_REGISTER = 0x0002 } |
Configuration manager pending transmissions. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static | LIST_HEAD (xsigo_devices) |
List of all Xsigo devices. More... | |
static void | xsigo_free (struct refcnt *refcnt) |
Free Xsigo device. More... | |
static void | xcm_free (struct refcnt *refcnt) |
Free configuration manager. More... | |
static int | xve_create (struct xsigo_manager *xcm, union ib_guid *resource, const uint8_t *mac, unsigned long network, unsigned long qkey, const char *name) |
Create virtual Ethernet device. More... | |
static struct xsigo_nic * | xve_find (struct xsigo_manager *xcm, union ib_guid *resource) |
Find virtual Ethernet device. More... | |
static void | xve_destroy (struct xsigo_nic *xve) |
Destroy virtual Ethernet device. More... | |
static int | xve_update_mtu (struct xsigo_nic *xve, struct eoib_device *eoib, size_t mtu) |
Update virtual Ethernet device MTU. More... | |
static int | xve_open (struct xsigo_nic *xve, struct eoib_device *eoib) |
Open virtual Ethernet device. More... | |
static void | xve_close (struct xsigo_nic *xve, struct eoib_device *eoib) |
Close virtual Ethernet device. More... | |
static int | xve_update_state (struct xsigo_nic *xve, struct eoib_device *eoib, int open) |
Update virtual Ethernet device administrative state. More... | |
static int | xve_update_tca (struct xsigo_nic *xve, struct eoib_device *eoib, struct ib_address_vector *av) |
Update gateway (TCA) More... | |
static const char * | xsmp_session_type (unsigned int type) |
Get session message name (for debugging) More... | |
static const char * | xsmp_chassis_name (struct xsmp_session_message *msg) |
Extract chassis name (for debugging) More... | |
static const char * | xsmp_session_name (struct xsmp_session_message *msg) |
Extract session name (for debugging) More... | |
static int | xsmp_tx_session (struct xsigo_manager *xcm, unsigned int type) |
Send session message. More... | |
static int | xsmp_tx_session_register (struct xsigo_manager *xcm) |
Send registration message. More... | |
static int | xsmp_tx_session_hello (struct xsigo_manager *xcm) |
Send keepalive message. More... | |
static int | xsmp_rx_session_hello (struct xsigo_manager *xcm, struct xsmp_session_message *msg __unused) |
Handle received keepalive message. More... | |
static int | xsmp_rx_session_confirm (struct xsigo_manager *xcm, struct xsmp_session_message *msg) |
Handle received registration confirmation message. More... | |
static int | xsmp_rx_session_reject (struct xsigo_manager *xcm, struct xsmp_session_message *msg) |
Handle received registration rejection message. More... | |
static int | xsmp_rx_session_shutdown (struct xsigo_manager *xcm, struct xsmp_session_message *msg) |
Handle received shutdown message. More... | |
static int | xsmp_rx_session (struct xsigo_manager *xcm, struct xsmp_session_message *msg) |
Handle received session message. More... | |
static const char * | xsmp_xve_type (unsigned int type) |
Get virtual Ethernet message name (for debugging) More... | |
static int | xsmp_tx_xve (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Send virtual Ethernet message. More... | |
static int | xsmp_tx_xve_params (struct xsigo_manager *xcm, struct xsmp_xve_message *msg, struct xsigo_nic *xve, struct eoib_device *eoib) |
Send virtual Ethernet message including current device parameters. More... | |
static int | xsmp_tx_xve_nack (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Send virtual Ethernet error response. More... | |
static int | xsmp_tx_xve_notify (struct xsigo_manager *xcm, unsigned int type, struct xsigo_nic *xve, struct eoib_device *eoib) |
Send virtual Ethernet notification. More... | |
static int | xsmp_tx_xve_oper (struct xsigo_manager *xcm, struct xsigo_nic *xve, struct eoib_device *eoib) |
Send virtual Ethernet current operational state. More... | |
static int | xsmp_rx_xve_modify (struct xsigo_manager *xcm, struct xsmp_xve_message *msg, unsigned int update) |
Handle received virtual Ethernet modification message. More... | |
static int | xsmp_rx_xve_install (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Handle received virtual Ethernet installation message. More... | |
static int | xsmp_rx_xve_delete (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Handle received virtual Ethernet deletion message. More... | |
static int | xsmp_rx_xve_update (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Handle received virtual Ethernet update message. More... | |
static int | xsmp_rx_xve_oper_req (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Handle received virtual Ethernet operational request message. More... | |
static int | xsmp_rx_xve_ready (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Handle received virtual Ethernet readiness message. More... | |
static int | xsmp_rx_xve (struct xsigo_manager *xcm, struct xsmp_xve_message *msg) |
Handle received virtual Ethernet message. More... | |
static void | xcm_close (struct xsigo_manager *xcm, int rc) |
Close configuration manager connection. More... | |
static void | xcm_step (struct xsigo_manager *xcm) |
Send data to configuration manager. More... | |
static int | xcm_deliver (struct xsigo_manager *xcm, struct io_buffer *iobuf, struct xfer_metadata *meta __unused) |
Receive data from configuration manager. More... | |
static void | xcm_reopen (struct retry_timer *timer, int fail __unused) |
Handle configuration manager connection timer expiry. More... | |
static void | xcm_keepalive (struct retry_timer *timer, int fail __unused) |
Handle configuration manager keepalive timer expiry. More... | |
static int | xcm_create (struct xsigo_device *xdev, struct xsigo_manager_id *id) |
Create configuration manager. More... | |
static struct xsigo_manager * | xcm_find (struct xsigo_device *xdev, struct xsigo_manager_id *id) |
Find configuration manager. More... | |
static void | xcm_destroy (struct xsigo_manager *xcm) |
Destroy configuration manager. More... | |
static int | xcm_list (struct xsigo_device *xdev, struct xsigo_manager_id *ids, unsigned int count) |
Synchronise list of configuration managers. More... | |
static void | xsigo_xcm_complete (struct ib_device *ibdev, struct ib_mad_interface *mi __unused, struct ib_mad_transaction *madx, int rc, union ib_mad *mad, struct ib_address_vector *av __unused) |
Handle configuration manager lookup completion. More... | |
static void | xsigo_xds_complete (struct ib_device *ibdev, struct ib_mad_interface *mi __unused, struct ib_mad_transaction *madx, int rc, union ib_mad *mad, struct ib_address_vector *av __unused) |
Handle directory service lookup completion. More... | |
static void | xsigo_discover (struct retry_timer *timer, int over __unused) |
Discover configuration managers. More... | |
static void | xsigo_ib_open (struct retry_timer *opener, int over __unused) |
Open link and start discovery. More... | |
static int | xsigo_ib_probe (struct ib_device *ibdev) |
Probe Xsigo device. More... | |
static void | xsigo_ib_notify (struct ib_device *ibdev) |
Handle device or link status change. More... | |
static void | xsigo_ib_remove (struct ib_device *ibdev) |
Remove Xsigo device. More... | |
static void | xsigo_net_notify (struct net_device *netdev, void *priv __unused) |
Handle device or link status change. More... | |
Variables | |
static union ib_guid | xcm_service_id |
Configuration manager service ID. More... | |
static struct interface_operation | xcm_xfer_op [] |
Configuration manager data transfer interface operations. More... | |
static struct interface_descriptor | xcm_xfer_desc |
Configuration manager data transfer interface descriptor. More... | |
static struct process_descriptor | xcm_process_desc |
Configuration manager process descriptor. More... | |
static struct xsigo_discovery | xsigo_xcm_discovery |
Configuration manager lookup discovery stage. More... | |
static struct xsigo_discovery | xsigo_xds_discovery |
Directory service lookup discovery stage. More... | |
struct ib_driver xsigo_ib_driver | __ib_driver |
Xsigo Infiniband driver. More... | |
struct net_driver xsigo_net_driver | __net_driver |
Xsigo network driver. More... | |
Xsigo virtual Ethernet devices.
Definition in file xsigo.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
List of all Xsigo devices.
|
static |
Free Xsigo device.
refcnt | Reference count |
Definition at line 142 of file xsigo.c.
References assert(), container_of, xsigo_device::discovery, free, xsigo_device::ibdev, ibdev_put(), list_empty, xsigo_device::madx, xsigo_device::managers, NULL, and xsigo_device::opener.
Referenced by xsigo_ib_probe().
|
static |
Free configuration manager.
refcnt | Reference count |
Definition at line 164 of file xsigo.c.
References assert(), container_of, free, xsigo_manager::keepalive, list_empty, xsigo_manager::nics, xsigo_manager::process, process_running(), ref_put, xsigo_device::refcnt, xsigo_manager::reopen, and xsigo_manager::xdev.
Referenced by xcm_create().
|
static |
Create virtual Ethernet device.
xcm | Configuration manager |
resource | Resource identifier |
mac | Ethernet MAC |
network | Network identifier |
name | Device name |
rc | Return status code |
Definition at line 198 of file xsigo.c.
References DBGC, ib_gid::dwords, ENOMEM, eoib_create(), ETH_ALEN, eth_ntoa(), free, ib_address_vector::gid, ib_address_vector::gid_present, htonl, htons, IB_GUID_ARGS, IB_GUID_FMT, IB_QPN_BROADCAST, xsigo_device::ibdev, xsigo_nic::list, list_add, list_del, mac, xsigo_nic::mac, memcpy(), memset(), xsigo_manager::name, xsigo_nic::name, name, xsigo_nic::network, xsigo_manager::nics, ib_device::pkey, qkey, ib_address_vector::qkey, ib_address_vector::qpn, rc, xsigo_nic::resource, snprintf(), strerror(), ib_gid::words, xsigo_nic::xcm, xsigo_manager::xdev, XVE_PREFIX, and zalloc().
Referenced by xsmp_rx_xve_install().
|
static |
Find virtual Ethernet device.
xcm | Configuration manager |
resource | Resource identifier |
xve | Virtual Ethernet device, or NULL |
Definition at line 263 of file xsigo.c.
References xsigo_nic::list, list_for_each_entry, memcmp(), xsigo_manager::nics, NULL, xsigo_nic::resource, and xsigo_nic::xcm.
Referenced by xsmp_rx_xve_delete(), xsmp_rx_xve_install(), and xsmp_rx_xve_modify().
|
static |
Destroy virtual Ethernet device.
xve | Virtual Ethernet device |
Definition at line 280 of file xsigo.c.
References DBGC, eoib_destroy(), eoib_find(), free, eoib_device::ibdev, xsigo_device::ibdev, xsigo_nic::list, list_del, xsigo_nic::mac, xsigo_nic::name, xsigo_nic::xcm, and xsigo_manager::xdev.
Referenced by xcm_destroy(), and xsmp_rx_xve_delete().
|
static |
Update virtual Ethernet device MTU.
xve | Virtual Ethernet device |
eoib | EoIB device |
mtu | New MTU (excluding Ethernet and EoIB headers) |
rc | Return status code |
Definition at line 306 of file xsigo.c.
References DBGC, ERANGE, IB_MAX_PAYLOAD_SIZE, max, net_device::max_pkt_len, mtu, net_device::mtu, xsigo_nic::name, eoib_device::netdev, and netdev.
Referenced by xsmp_rx_xve_modify().
|
static |
Open virtual Ethernet device.
xve | Virtual Ethernet device |
eoib | EoIB device |
open | New administrative state |
rc | Return status code |
Definition at line 340 of file xsigo.c.
References DBGC, xsigo_nic::name, eoib_device::netdev, netdev, netdev_is_open(), netdev_open(), rc, and strerror().
Referenced by xve_update_state().
|
static |
Close virtual Ethernet device.
xve | Virtual Ethernet device |
eoib | EoIB device |
Definition at line 365 of file xsigo.c.
References DBGC, xsigo_nic::name, eoib_device::netdev, netdev, netdev_close(), and netdev_is_open().
Referenced by xve_update_state().
|
static |
Update virtual Ethernet device administrative state.
xve | Virtual Ethernet device |
eoib | EoIB device |
open | New administrative state |
rc | Return status code |
Definition at line 385 of file xsigo.c.
References open(), xve_close(), and xve_open().
Referenced by xsmp_rx_xve_modify().
|
static |
Update gateway (TCA)
xve | Virtual Ethernet device |
eoib | EoIB device |
av | Address vector, or NULL if no gateway |
rc | Return status code |
Definition at line 405 of file xsigo.c.
References DBGC, eoib_set_gateway(), ib_address_vector::gid, IB_GID_ARGS, IB_GID_FMT, xsigo_nic::name, ib_address_vector::qkey, and ib_address_vector::qpn.
Referenced by xsmp_rx_xve_modify().
|
static |
Get session message name (for debugging)
type | Message type |
name | Message name |
Definition at line 441 of file xsigo.c.
References snprintf(), type, XSMP_SESSION_TYPE_CONFIRM, XSMP_SESSION_TYPE_HELLO, XSMP_SESSION_TYPE_REGISTER, XSMP_SESSION_TYPE_REJECT, and XSMP_SESSION_TYPE_SHUTDOWN.
|
static |
Extract chassis name (for debugging)
msg | Session message |
chassis | Chassis name |
Definition at line 462 of file xsigo.c.
References memcpy(), and msg().
Referenced by xsmp_rx_session_confirm(), xsmp_rx_session_reject(), and xsmp_rx_session_shutdown().
|
static |
Extract session name (for debugging)
msg | Session message |
session | Session name |
Definition at line 475 of file xsigo.c.
References memcpy(), and msg().
Referenced by xsmp_rx_session_confirm().
|
static |
Send session message.
xcm | Configuration manager |
type | Message type |
rc | Return status code |
Definition at line 489 of file xsigo.c.
References DBGC, DBGCP, DBGCP_HDA, ib_device::gid, ib_gid::guid, xsigo_manager_id::guid, htonl, htons, xsigo_device::ibdev, xsigo_manager::id, memcpy(), memset(), msg(), xsigo_manager::name, ntohl, rc, ib_gid::s, xsigo_manager::seq, strerror(), type, xsigo_manager::xdev, xsigo_manager::xfer, xfer_deliver_raw(), XSIGO_OS_TYPE_GENERIC, XSIGO_RESOURCE_NO_HA, XSIGO_RESOURCE_XVE, XSMP_BOOT_PXE, and XSMP_TYPE_SESSION.
Referenced by xsmp_tx_session_hello(), and xsmp_tx_session_register().
|
inlinestatic |
Send registration message.
xcm | Configuration manager |
rc | Return status code |
Definition at line 531 of file xsigo.c.
References DBGC, xsigo_manager_id::guid, IB_GUID_ARGS, IB_GUID_FMT, xsigo_manager::id, xsigo_manager::name, XSMP_SESSION_TYPE_REGISTER, and xsmp_tx_session().
Referenced by xcm_step().
|
static |
Send keepalive message.
xcm | Configuration manager |
rc | Return status code |
Definition at line 546 of file xsigo.c.
References XSMP_SESSION_TYPE_HELLO, and xsmp_tx_session().
Referenced by xcm_keepalive(), and xsmp_rx_session_hello().
|
static |
Handle received keepalive message.
xcm | Configuration manager |
msg | Keepalive message |
rc | Return status code |
Definition at line 559 of file xsigo.c.
References xsmp_tx_session_hello().
Referenced by xsmp_rx_session().
|
static |
Handle received registration confirmation message.
xcm | Configuration manager |
msg | Registration confirmation message |
rc | Return status code |
Definition at line 575 of file xsigo.c.
References DBGC, msg(), xsigo_manager::name, xsmp_chassis_name(), and xsmp_session_name().
Referenced by xsmp_rx_session().
|
static |
Handle received registration rejection message.
xcm | Configuration manager |
msg | Registration confirmation message |
rc | Return status code |
Definition at line 591 of file xsigo.c.
References DBGC, DBGC_HDA, EPERM, msg(), xsigo_manager::name, and xsmp_chassis_name().
Referenced by xsmp_rx_session().
|
static |
Handle received shutdown message.
xcm | Configuration manager |
msg | Registration confirmation message |
rc | Return status code |
Definition at line 608 of file xsigo.c.
References DBGC, DBGC_HDA, ENOTCONN, msg(), xsigo_manager::name, and xsmp_chassis_name().
Referenced by xsmp_rx_session().
|
static |
Handle received session message.
xcm | Configuration manager |
msg | Session message |
rc | Return status code |
Definition at line 625 of file xsigo.c.
References DBGC, DBGC_HDA, DBGCP, DBGCP_HDA, EPROTO, msg(), xsigo_manager::name, ntohl, xsmp_rx_session_confirm(), xsmp_rx_session_hello(), xsmp_rx_session_reject(), xsmp_rx_session_shutdown(), XSMP_SESSION_TYPE_CONFIRM, XSMP_SESSION_TYPE_HELLO, XSMP_SESSION_TYPE_REJECT, and XSMP_SESSION_TYPE_SHUTDOWN.
Referenced by xcm_deliver().
|
static |
Get virtual Ethernet message name (for debugging)
type | Message type |
name | Message name |
Definition at line 663 of file xsigo.c.
References snprintf(), type, XSMP_XVE_TYPE_DELETE, XSMP_XVE_TYPE_INSTALL, XSMP_XVE_TYPE_OPER_DOWN, XSMP_XVE_TYPE_OPER_REQ, XSMP_XVE_TYPE_OPER_UP, XSMP_XVE_TYPE_READY, and XSMP_XVE_TYPE_UPDATE.
|
static |
Send virtual Ethernet message.
xcm | Configuration manager |
msg | Partial message |
rc | Return status code |
Definition at line 687 of file xsigo.c.
References DBGC, DBGCP, DBGCP_HDA, ib_device::gid, ib_gid::guid, xsigo_manager_id::guid, htonl, htons, xsigo_device::ibdev, xsigo_manager::id, memcpy(), msg(), xsigo_manager::name, ntohl, rc, ib_gid::s, xsigo_manager::seq, strerror(), xsigo_manager::xdev, xsigo_manager::xfer, xfer_deliver_raw(), and XSMP_TYPE_XVE.
Referenced by xsmp_rx_xve_delete(), xsmp_tx_xve_nack(), and xsmp_tx_xve_params().
|
static |
Send virtual Ethernet message including current device parameters.
xcm | Configuration manager |
msg | Partial virtual Ethernet message |
xve | Virtual Ethernet device |
eoib | EoIB device |
rc | Return status code |
Definition at line 727 of file xsigo.c.
References bswap_64, DBGC, ib_queue_pair::ext_qpn, ib_device::gid, htonl, htons, xsigo_device::ibdev, net_device::max_pkt_len, msg(), xsigo_nic::name, eoib_device::netdev, netdev, netdev_is_open(), xsigo_nic::network, ntohl, ntohs, ib_device::pkey, ib_gid::prefix, ib_queue_pair::qkey, eoib_device::qp, ib_guid::qword, ib_gid::s, xsigo_manager::xdev, xsmp_tx_xve(), XSMP_XVE_TYPE_OPER_DOWN, XSMP_XVE_TYPE_OPER_REQ, and XSMP_XVE_TYPE_OPER_UP.
Referenced by xsmp_rx_xve_modify(), and xsmp_tx_xve_notify().
|
inlinestatic |
Send virtual Ethernet error response.
xcm | Configuration manager |
msg | Partial virtual Ethernet message |
rc | Return status code |
Definition at line 773 of file xsigo.c.
References msg(), xsmp_tx_xve(), and XSMP_XVE_CODE_ERROR.
Referenced by xsmp_rx_xve_install(), and xsmp_rx_xve_modify().
|
static |
Send virtual Ethernet notification.
xcm | Configuration manager |
type | Message type |
xve | Virtual Ethernet device |
eoib | EoIB device |
rc | Return status code |
Definition at line 794 of file xsigo.c.
References memcpy(), memset(), msg(), xsigo_nic::resource, type, and xsmp_tx_xve_params().
Referenced by xsmp_tx_xve_oper().
|
inlinestatic |
Send virtual Ethernet current operational state.
xcm | Configuration manager |
xve | Virtual Ethernet device |
eoib | EoIB device |
rc | Return status code |
Definition at line 817 of file xsigo.c.
References xsmp_tx_xve_notify(), and XSMP_XVE_TYPE_OPER_REQ.
Referenced by xsigo_net_notify().
|
static |
Handle received virtual Ethernet modification message.
xcm | Configuration manager |
msg | Virtual Ethernet message |
update | Update bitmask |
rc | Return status code |
Definition at line 833 of file xsigo.c.
References bswap_64, DBGC, ENOENT, eoib_find(), eoib_force_group_creation(), EPIPE, ib_address_vector::gid, ib_address_vector::gid_present, ib_gid::guid, IB_GUID_ARGS, IB_GUID_FMT, xsigo_device::ibdev, xsigo_nic::mac, memset(), msg(), mtu, xsigo_manager::name, xsigo_nic::name, ntohl, ntohs, NULL, ib_gid::prefix, ib_address_vector::qkey, ib_address_vector::qpn, ib_guid::qword, rc, ib_gid::s, xsigo_manager::xdev, xsmp_tx_xve_nack(), xsmp_tx_xve_params(), XSMP_XVE_UPDATE_GW_CHANGE, XSMP_XVE_UPDATE_GW_DOWN, XSMP_XVE_UPDATE_MTU, XSMP_XVE_UPDATE_STATE, xve_find(), xve_update_mtu(), xve_update_state(), and xve_update_tca().
Referenced by xsmp_rx_xve_install(), xsmp_rx_xve_oper_req(), xsmp_rx_xve_ready(), and xsmp_rx_xve_update().
|
static |
Handle received virtual Ethernet installation message.
xcm | Configuration manager |
msg | Virtual Ethernet message |
rc | Return status code |
Definition at line 931 of file xsigo.c.
References bswap_16, bswap_32, DBGC2, ETH_ALEN, eth_ntoa(), IB_GUID_ARGS, IB_GUID_FMT, mac, memcpy(), msg(), xsigo_manager::name, name, ntohl, ntohs, NULL, qkey, raw, rc, xsmp_rx_xve_modify(), xsmp_tx_xve_nack(), XSMP_XVE_UPDATE_GW_CHANGE, XSMP_XVE_UPDATE_MTU, XSMP_XVE_UPLINK, xve_create(), and xve_find().
Referenced by xsmp_rx_xve().
|
static |
Handle received virtual Ethernet deletion message.
xcm | Configuration manager |
msg | Virtual Ethernet message |
rc | Return status code |
Definition at line 985 of file xsigo.c.
References DBGC2, IB_GUID_ARGS, IB_GUID_FMT, msg(), xsigo_manager::name, xsigo_nic::xcm, xsmp_tx_xve(), xve_destroy(), and xve_find().
Referenced by xsmp_rx_xve().
|
static |
Handle received virtual Ethernet update message.
xcm | Configuration manager |
msg | Virtual Ethernet message |
rc | Return status code |
Definition at line 1010 of file xsigo.c.
References DBGC2, IB_GUID_ARGS, IB_GUID_FMT, msg(), xsigo_manager::name, ntohl, xsigo_nic::xcm, and xsmp_rx_xve_modify().
Referenced by xsmp_rx_xve().
|
static |
Handle received virtual Ethernet operational request message.
xcm | Configuration manager |
msg | Virtual Ethernet message |
rc | Return status code |
Definition at line 1028 of file xsigo.c.
References DBGC2, IB_GUID_ARGS, IB_GUID_FMT, msg(), xsigo_manager::name, xsigo_nic::xcm, and xsmp_rx_xve_modify().
Referenced by xsmp_rx_xve().
|
static |
Handle received virtual Ethernet readiness message.
xcm | Configuration manager |
msg | Virtual Ethernet message |
rc | Return status code |
Definition at line 1045 of file xsigo.c.
References DBGC2, IB_GUID_ARGS, IB_GUID_FMT, msg(), xsigo_manager::name, rc, xsigo_nic::xcm, xsmp_rx_xve_modify(), and XSMP_XVE_TYPE_OPER_REQ.
Referenced by xsmp_rx_xve().
|
static |
Handle received virtual Ethernet message.
xcm | Configuration manager |
msg | Virtual Ethernet message |
rc | Return status code |
Definition at line 1073 of file xsigo.c.
References DBGC, DBGC_HDA, DBGCP, DBGCP_HDA, EPROTO, msg(), xsigo_manager::name, ntohl, xsigo_nic::xcm, xsmp_rx_xve_delete(), xsmp_rx_xve_install(), xsmp_rx_xve_oper_req(), xsmp_rx_xve_ready(), xsmp_rx_xve_update(), XSMP_XVE_TYPE_DELETE, XSMP_XVE_TYPE_INSTALL, XSMP_XVE_TYPE_OPER_REQ, XSMP_XVE_TYPE_READY, and XSMP_XVE_TYPE_UPDATE.
Referenced by xcm_deliver().
|
static |
Close configuration manager connection.
xcm | Configuration manager |
rc | Reason for close |
Definition at line 1113 of file xsigo.c.
References DBGC, intf_restart(), xsigo_manager::keepalive, xsigo_manager::name, xsigo_manager::process, process_del(), rc, xsigo_manager::reopen, start_timer(), stop_timer(), strerror(), xsigo_nic::xcm, and xsigo_manager::xfer.
Referenced by xcm_deliver(), xcm_keepalive(), and xcm_step().
|
static |
Send data to configuration manager.
xcm | Configuration manager |
Definition at line 1135 of file xsigo.c.
References DBGC, xsigo_manager::name, NULL, xsigo_manager::pending, rc, strerror(), xsigo_nic::xcm, xcm_close(), XCM_TX_CONNECT, XCM_TX_REGISTER, xsigo_manager::xfer, xfer_deliver_raw(), xfer_window(), and xsmp_tx_session_register().
|
static |
Receive data from configuration manager.
xcm | Configuration manager |
iobuf | I/O buffer |
meta | Data transfer metadata |
rc | Return status code |
Definition at line 1179 of file xsigo.c.
References io_buffer::data, DBGC, DBGC_HDA, EPROTO, free_iob(), iob_len(), len, msg(), xsigo_manager::name, out, rc, xcm_close(), xsmp_rx_session(), xsmp_rx_xve(), XSMP_TYPE_SESSION, and XSMP_TYPE_XVE.
|
static |
Handle configuration manager connection timer expiry.
timer | Connection timer |
fail | Failure indicator |
Definition at line 1252 of file xsigo.c.
References container_of, DBGC, ECANCELED, gid, ib_device::gid, xsigo_manager_id::guid, ib_cmrc_open(), IB_GID_ARGS, IB_GID_FMT, xsigo_device::ibdev, xsigo_manager::id, intf_restart(), xsigo_manager::keepalive, memcpy(), xsigo_manager::name, xsigo_manager::pending, ib_gid::prefix, xsigo_manager::process, process_add(), process_del(), rc, xsigo_manager::reopen, ib_gid::s, xsigo_manager::seq, start_timer(), start_timer_fixed(), stop_timer(), strerror(), xcm_service_id, XCM_TX_CONNECT, XCM_TX_REGISTER, xsigo_manager::xdev, xsigo_manager::xfer, and XSIGO_KEEPALIVE_INTERVAL.
Referenced by xcm_create().
|
static |
Handle configuration manager keepalive timer expiry.
timer | Connection timer |
fail | Failure indicator |
Definition at line 1303 of file xsigo.c.
References container_of, xsigo_manager::keepalive, rc, start_timer_fixed(), xcm_close(), XSIGO_KEEPALIVE_INTERVAL, and xsmp_tx_session_hello().
Referenced by xcm_create().
|
static |
Create configuration manager.
xsigo | Xsigo device |
id | Configuration manager ID |
rc | Return status code |
Definition at line 1328 of file xsigo.c.
References DBGC, ENOMEM, xsigo_manager_id::guid, IB_GUID_ARGS, IB_GUID_FMT, id, xsigo_manager::id, INIT_LIST_HEAD, intf_init(), xsigo_manager::keepalive, xsigo_manager::list, list_add, xsigo_device::managers, memcpy(), xsigo_device::name, xsigo_manager::name, xsigo_manager::nics, ntohs, xsigo_manager::process, process_init_stopped(), ref_get, ref_init, xsigo_manager::refcnt, xsigo_device::refcnt, xsigo_manager::reopen, snprintf(), start_timer_nodelay(), xcm_free(), xcm_keepalive(), xcm_process_desc, xcm_reopen(), xcm_xfer_desc, xsigo_manager::xdev, xsigo_manager::xfer, and zalloc().
Referenced by xcm_list().
|
static |
Find configuration manager.
xsigo | Xsigo device |
id | Configuration manager ID |
xcm | Configuration manager, or NULL |
Definition at line 1365 of file xsigo.c.
References guid, xsigo_manager_id::guid, xsigo_manager::id, list_for_each_entry, xsigo_device::managers, memcmp(), and NULL.
Referenced by xcm_list().
|
static |
Destroy configuration manager.
xcm | Configuration manager |
Definition at line 1383 of file xsigo.c.
References DBGC, intf_shutdown(), xsigo_manager::keepalive, xsigo_manager::list, xsigo_nic::list, list_del, list_first_entry, xsigo_manager::name, xsigo_manager::nics, xsigo_manager::process, process_del(), ref_put, xsigo_manager::refcnt, xsigo_manager::reopen, stop_timer(), xsigo_nic::xcm, xsigo_manager::xfer, and xve_destroy().
Referenced by xcm_list().
|
static |
Synchronise list of configuration managers.
xdev | Xsigo device |
ids | List of manager IDs |
count | Number of manager IDs |
rc | Return status code |
Definition at line 1416 of file xsigo.c.
References count, DBGC, id, xsigo_manager::id, ids, INIT_LIST_HEAD, xsigo_manager_id::lid, xsigo_manager::list, list_add_tail, list_del, list_for_each_entry_safe, list_splice, xsigo_device::managers, xsigo_device::name, rc, xsigo_manager::reopen, start_timer_nodelay(), strerror(), tmp, xcm_create(), xcm_destroy(), and xcm_find().
Referenced by xsigo_ib_remove(), and xsigo_xcm_complete().
|
static |
Handle configuration manager lookup completion.
ibdev | Infiniband device |
mi | Management interface |
madx | Management transaction |
rc | Status code |
mad | Received MAD (or NULL on error) |
av | Source address vector (or NULL on error) |
Definition at line 1483 of file xsigo.c.
References container_of, xsigo_managers_reply::count, DBGC, xsigo_device::discovery, ENODEV, ib_device::gsi, ib_mad::hdr, htons, ib_destroy_madx(), ib_madx_get_ownerdata(), IB_MGMT_STATUS_OK, mad, xsigo_device::madx, xsigo_managers_reply::manager, xsigo_device::name, NULL, out, rc, xsigo_mad::reply, start_timer_fixed(), ib_mad_hdr::status, strerror(), xcm_list(), and XSIGO_DISCOVERY_SUCCESS_DELAY.
|
static |
Handle directory service lookup completion.
ibdev | Infiniband device |
mi | Management interface |
madx | Management transaction |
rc | Status code |
mad | Received MAD (or NULL on error) |
av | Source address vector (or NULL on error) |
Definition at line 1544 of file xsigo.c.
References _S2, build_id, container_of, ib_service_record::data16, ib_service_record::data64, DBGC, DBGC2, dest, ENODEV, fetch_string_setting(), ib_device::gid, ib_device::gsi, guid, ib_gid::guid, ib_mad::hdr, htonl, htons, ib_create_madx(), ib_destroy_madx(), IB_GUID_ARGS, IB_GUID_FMT, ib_madx_get_ownerdata(), ib_madx_set_ownerdata(), IB_MGMT_METHOD_GET, IB_MGMT_STATUS_OK, IB_QKEY_GSI, IB_QPN_GSI, mad, xsigo_device::madx, memcpy(), memset(), xsigo_device::name, ntohs, NULL, xsigo_discovery::op, out, product_short_name, product_version, rc, request, xsigo_mad::request, ib_gid::s, ib_mad::sa, ib_mad_sa::sa_data, ib_sa_data::service_record, ib_device::sm_sl, snprintf(), ib_mad_hdr::status, strerror(), XSIGO_ATTR_XCM_REQUEST, XSIGO_MGMT_CLASS, XSIGO_MGMT_CLASS_VERSION, XSIGO_OS_TYPE_GENERIC, XSIGO_RESOURCE_NO_HA, XSIGO_RESOURCE_XVE, XSIGO_RESOURCES_PRESENT, and xsigo_xcm_discovery.
|
static |
Discover configuration managers.
timer | Retry timer |
over | Failure indicator |
Definition at line 1648 of file xsigo.c.
References container_of, DBGC, xsigo_device::discovery, ib_device::gsi, ib_create_service_madx(), ib_destroy_madx(), ib_madx_set_ownerdata(), xsigo_device::ibdev, xsigo_device::madx, xsigo_device::name, xsigo_discovery::name, NULL, ib_mad_transaction::op, op, xsigo_discovery::op, start_timer_fixed(), XDS_SERVICE_NAME, XSIGO_DISCOVERY_FAILURE_DELAY, and xsigo_xds_discovery.
Referenced by xsigo_ib_probe().
|
static |
Open link and start discovery.
opener | Link opener |
over | Failure indicator |
Definition at line 1692 of file xsigo.c.
References container_of, DBGC, xsigo_device::discovery, ib_link_ok(), ib_open(), xsigo_device::ibdev, xsigo_device::name, xsigo_device::opener, rc, start_timer_fixed(), start_timer_nodelay(), strerror(), and XSIGO_OPEN_RETRY_DELAY.
Referenced by xsigo_ib_probe().
|
static |
Probe Xsigo device.
ibdev | Infiniband device |
rc | Return status code |
Definition at line 1718 of file xsigo.c.
References DBGC, xsigo_device::discovery, ENOMEM, ib_device::gid, ib_gid::guid, IB_GUID_ARGS, IB_GUID_FMT, xsigo_device::ibdev, ibdev_get(), INIT_LIST_HEAD, xsigo_device::list, list_add_tail, xsigo_device::managers, xsigo_device::name, ib_device::name, xsigo_device::opener, ref_init, xsigo_device::refcnt, ib_gid::s, start_timer_nodelay(), xsigo_discover(), xsigo_free(), xsigo_ib_open(), and zalloc().
|
static |
Handle device or link status change.
ibdev | Infiniband device |
Definition at line 1750 of file xsigo.c.
References xsigo_device::discovery, ib_device::gsi, ib_destroy_madx(), ib_link_ok(), xsigo_device::ibdev, xsigo_device::list, list_for_each_entry, xsigo_device::madx, NULL, start_timer_nodelay(), and stop_timer().
|
static |
Remove Xsigo device.
ibdev | Infiniband device |
Definition at line 1778 of file xsigo.c.
References DBGC, xsigo_device::discovery, ib_device::gsi, ib_close(), ib_destroy_madx(), xsigo_device::ibdev, xsigo_device::list, list_del, list_for_each_entry_safe, xsigo_device::madx, xsigo_device::name, NULL, xsigo_device::opener, ref_put, xsigo_device::refcnt, stop_timer(), tmp, and xcm_list().
|
static |
Handle device or link status change.
netdev | Network device |
priv | Private data |
Definition at line 1834 of file xsigo.c.
References eoib_find(), eoib_device::ibdev, xsigo_device::ibdev, eoib_device::list, list_for_each_entry, xsigo_nic::mac, xsigo_device::managers, eoib_device::netdev, netdev, xsigo_manager::nics, and xsmp_tx_xve_oper().
|
static |
Configuration manager service ID.
Definition at line 130 of file xsigo.c.
Referenced by xcm_reopen().
|
static |
Configuration manager data transfer interface operations.
|
static |
Configuration manager data transfer interface descriptor.
Definition at line 1239 of file xsigo.c.
Referenced by xcm_create().
|
static |
Configuration manager process descriptor.
Definition at line 1243 of file xsigo.c.
Referenced by xcm_create().
|
static |
Configuration manager lookup discovery stage.
Definition at line 1527 of file xsigo.c.
Referenced by xsigo_xds_complete().
|
static |
Directory service lookup discovery stage.
Definition at line 1635 of file xsigo.c.
Referenced by xsigo_discover().
struct ib_driver xsigo_ib_driver __ib_driver |
Xsigo Infiniband driver.
struct net_driver xsigo_net_driver __net_driver |
Xsigo network driver.