1
1

This commit adds comments regarding IP Aliases and the default behavior when

determining which IP address to use when transmitting data.  Also it adds logic
to prevent usage of more than one of the btl_openib_if_include,
btl_openib_if_exclude, btl_openib_ipaddr_include, or btl_openib_ipaddr_exclude
MCA parameters.

This should complete the code modifications needed for ticket 1665.

This commit was SVN r20052.
Этот коммит содержится в:
Jon Mason 2008-12-02 22:42:01 +00:00
родитель 44109e0084
Коммит 91b26eba67
4 изменённых файлов: 48 добавлений и 8 удалений

Просмотреть файл

@ -2029,6 +2029,7 @@ btl_openib_component_init(int *num_btl_modules,
int index, value;
bool found;
mca_base_param_source_t source;
int list_count = 0;
/* initialization */
*num_btl_modules = 0;
@ -2208,12 +2209,23 @@ btl_openib_component_init(int *num_btl_modules,
mca_btl_openib_component.if_include_list =
mca_btl_openib_component.if_exclude_list =
mca_btl_openib_component.if_list = NULL;
if (NULL != mca_btl_openib_component.if_include &&
NULL != mca_btl_openib_component.if_exclude) {
if (NULL != mca_btl_openib_component.if_include)
list_count++;
if (NULL != mca_btl_openib_component.if_exclude)
list_count++;
if (NULL != mca_btl_openib_component.ipaddr_include)
list_count++;
if (NULL != mca_btl_openib_component.ipaddr_exclude)
list_count++;
if (list_count > 1) {
orte_show_help("help-mpi-btl-openib.txt",
"specified include and exclude", true,
mca_btl_openib_component.if_include,
mca_btl_openib_component.if_exclude, NULL);
mca_btl_openib_component.if_exclude,
mca_btl_openib_component.ipaddr_include,
mca_btl_openib_component.ipaddr_exclude, NULL);
goto no_btls;
} else if (NULL != mca_btl_openib_component.if_include) {
mca_btl_openib_component.if_include_list =

Просмотреть файл

@ -68,6 +68,18 @@ static char *stringify(uint32_t addr)
}
#endif
/* Note that each device port can have multiple IP addresses associated with it
* (aka IP aliasing). However, the openib module only knows about (device,port)
* tuples -- not IP addresses (only the RDMA CM CPC knows which IP addresses are
* associated with each (device,port) tuple). Thus, any searching of device
* list for the IP Address or subnets may not work as one might expect. The
* current behavior is to return the IP address (or subnet) of the *first*
* instance of the device on the list. This behavior is uniform for subnet and
* IP addresses and thus should not cause any mismatches. If this behavior is
* not preferred by the user, the MCA parameters to include/exclude specific IP
* addresses can be used to precisely specify which addresses are used (e.g., to
* effect specific subnet routing).
*/
uint64_t mca_btl_openib_get_iwarp_subnet_id(struct ibv_device *ib_dev)
{
opal_list_item_t *item;
@ -93,6 +105,13 @@ uint64_t mca_btl_openib_get_iwarp_subnet_id(struct ibv_device *ib_dev)
return 0;
}
/* This function should not be necessary, as rdma_get_local_addr would be more
* correct in returning the IP address given the cm_id (and not necessitate
* having to do a list look up). Unfortunately, the subnet and IP address look
* up needs to match or there could be a mismatch if IP Aliases are being used.
* For more information on this, please read comment above
* mca_btl_openib_get_iwarp_subnet_id.
*/
uint32_t mca_btl_openib_rdma_get_ipv4addr(struct ibv_context *verbs,
uint8_t port)
{
@ -157,7 +176,6 @@ static int dev_specified(char *name, int port)
static int ipaddr_specified(struct sockaddr_in *ipaddr, uint32_t netmask)
{
if (NULL != mca_btl_openib_component.ipaddr_include) {
char **list;
int i;

Просмотреть файл

@ -1601,7 +1601,14 @@ static int ipaddrcheck(id_context_t *context,
int server_tcp_port = rdma_get_src_port(context->id);
char *str;
/* Look up the IP address of this device/port */
/* Look up the IP address of this device/port. This call should not be
* necessary, as rdma_get_local_addr would be more correct in returning the
* IP address given the cm_id (and not necessitate having to do a list look
* up). Unfortunately, the subnet and IP address look up needs to match or
* there could be a mismatch if IP Aliases are being used. For more
* information on this, please read comment above
* mca_btl_openib_get_iwarp_subnet_id in btl_openib_iwarp.c
*/
ipaddr =
mca_btl_openib_rdma_get_ipv4addr(openib_btl->device->ib_dev_context,
openib_btl->port_num);

Просмотреть файл

@ -300,14 +300,17 @@ recompiling Open MPI against your OpenFabrics library installation to
get more information.
#
[specified include and exclude]
ERROR: You have specified both the btl_openib_if_include and
btl_openib_if_exclude MCA parameters. These two parameters are
mutually exclusive; you can only specify one or the other.
ERROR: You have specified more than one of the btl_openib_if_include,
btl_openib_if_exclude, btl_openib_ipaddr_include, or btl_openib_ipaddr_exclude
MCA parameters. These four parameters are mutually exclusive; you can only
specify one.
For reference, the values that you specified are:
btl_openib_if_include: %s
btl_openib_if_exclude: %s
btl_openib_ipaddr_include: %s
btl_openib_ipaddr_exclude: %s
#
[nonexistent port]
WARNING: One or more nonexistent OpenFabrics devices/ports were