/usr/include/infiniband/opensm/osm_port.h is in libopensm-dev 3.3.20-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 | /*
* Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved.
* Copyright (c) 2002-2011 Mellanox Technologies LTD. All rights reserved.
* Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* OpenIB.org BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
/*
* Abstract:
* Declaration of port related objects.
* These objects comprise an IBA port.
* These objects are part of the OpenSM family of objects.
*/
#ifndef _OSM_PORT_H_
#define _OSM_PORT_H_
#include <complib/cl_qmap.h>
#include <iba/ib_types.h>
#include <opensm/osm_base.h>
#include <opensm/osm_subnet.h>
#include <opensm/osm_madw.h>
#include <opensm/osm_path.h>
#include <opensm/osm_pkey.h>
#ifdef __cplusplus
# define BEGIN_C_DECLS extern "C" {
# define END_C_DECLS }
#else /* !__cplusplus */
# define BEGIN_C_DECLS
# define END_C_DECLS
#endif /* __cplusplus */
BEGIN_C_DECLS
/*
Forward references.
*/
struct osm_port;
struct osm_node;
struct osm_mgrp;
struct osm_sm;
/****h* OpenSM/Physical Port
* NAME
* Physical Port
*
* DESCRIPTION
* The Physical Port object encapsulates the information needed by the
* OpenSM to manage physical ports. The OpenSM allocates one Physical Port
* per physical port in the IBA subnet.
*
* In a switch, one multiple Physical Port objects share the same port GUID.
* In an end-point, Physical Ports do not share GUID values.
*
* The Physical Port is not thread safe, thus callers must provide
* serialization.
*
* These objects should be treated as opaque and should be
* manipulated only through the provided functions.
*
* AUTHOR
* Steve King, Intel
*
*********/
/****s* OpenSM: Physical Port/osm_physp_t
* NAME
* osm_physp_t
*
* DESCRIPTION
* This object represents a physical port on a switch, router or end-point.
*
* The osm_physp_t object should be treated as opaque and should
* be manipulated only through the provided functions.
*
* SYNOPSIS
*/
typedef struct osm_physp {
ib_port_info_t port_info;
ib_mlnx_ext_port_info_t ext_port_info;
ib_net64_t port_guid;
ib_net64_t (*p_guids)[];
uint8_t port_num;
struct osm_node *p_node;
struct osm_physp *p_remote_physp;
boolean_t healthy;
uint8_t vl_high_limit;
unsigned need_update;
unsigned is_prof_ignored;
osm_dr_path_t dr_path;
osm_pkey_tbl_t pkeys;
ib_vl_arb_table_t vl_arb[4];
cl_ptr_vector_t slvl_by_port;
uint8_t hop_wf;
union {
struct {
ib_sw_cong_setting_t sw_cong_setting;
} sw;
struct {
ib_ca_cong_setting_t ca_cong_setting;
ib_cc_tbl_t cc_tbl[OSM_CCT_ENTRY_MAD_BLOCKS];
} ca;
} cc;
} osm_physp_t;
/*
* FIELDS
* port_info
* The IBA defined PortInfo data for this port.
*
* ext_port_info
* Mellanox vendor specific ExtendedPortInfo data for this port.
*
* port_guid
* Port GUID value of this port. For switches,
* all ports share the same GUID value.
*
* p_guids
* Pointer to array of GUIDs obtained from GUIDInfo.
* This pointer is null for switch physical/external ports
* (used for endports only).
*
* port_num
* The port number of this port. The PortInfo also
* contains a port_number, but that number is not
* the port number of this port, but rather the number
* of the port that received the SMP during discovery.
* Therefore, we must keep a separate record for this
* port's port number.
*
* p_node
* Pointer to the parent Node object of this Physical Port.
*
* p_remote_physp
* Pointer to the Physical Port on the other side of the wire.
* If this pointer is NULL no link exists at this port.
*
* healthy
* Tracks the health of the port. Normally should be TRUE but
* might change as a result of incoming traps indicating the port
* healthy is questionable.
*
* vl_high_limit
* PortInfo:VLHighLimit value which installed by QoS manager
* and should be uploaded to port's PortInfo
*
* need_update
* When set indicates that port was probably reset and port
* related tables (PKey, SL2VL, VLArb) require refreshing.
*
* is_prof_ignored
* When set indicates that switch port will be ignored by
* the link load equalization algorithm.
*
* dr_path
* The directed route path to this port.
*
* pkeys
* osm_pkey_tbl_t object holding the port PKeys.
*
* vl_arb[]
* Each Physical Port has 4 sections of VL Arbitration table.
*
* slvl_by_port
* A vector of pointers to the sl2vl tables (ordered by input port).
* Switches have an entry for every other input port (inc SMA=0).
* On CAs only one per port.
*
* hop_wf
* Hop weighting factor to be used in the routing.
*
* sw_cong_setting
* Physical port switch congestion settings (switches only)
*
* ca_cong_setting
* Physical port ca congestion settings (cas only)
*
* cc_tbl
* Physical port ca congestion control table (cas only)
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Physical Port/osm_physp_construct
* NAME
* osm_physp_construct
*
* DESCRIPTION
* Constructs a Physical Port.
*
* SYNOPSIS
*/
void osm_physp_construct(IN osm_physp_t * p_physp);
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object to initialize.
*
* RETURN VALUES
* This function does not return a value.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_init
* NAME
* osm_physp_init
*
* DESCRIPTION
* Initializes a Physical Port for use.
*
* SYNOPSIS
*/
void osm_physp_init(IN osm_physp_t * p_physp, IN ib_net64_t port_guid,
IN uint8_t port_num, IN const struct osm_node *p_node,
IN osm_bind_handle_t h_bind, IN uint8_t hop_count,
IN const uint8_t * p_initial_path);
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object to initialize.
*
* port_guid
* [in] GUID value of this port. Switch ports all share
* the same value.
* Caller should use 0 if the guid is unknown.
*
* port_num
* [in] The port number of this port.
*
* p_node
* [in] Pointer to the parent Node object of this Physical Port.
*
* h_bind
* [in] Bind handle on which this port is accessed.
* Caller should use OSM_BIND_INVALID_HANDLE if the bind
* handle to this port is unknown.
*
* hop_count
* [in] Directed route hop count to reach this port.
* Caller should use 0 if the hop count is unknown.
*
* p_initial_path
* [in] Pointer to the directed route path to reach this node.
* Caller should use NULL if the path is unknown.
*
* RETURN VALUES
* This function does not return a value.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Port/void osm_physp_destroy
* NAME
* osm_physp_destroy
*
* DESCRIPTION
* This function destroys a Port object.
*
* SYNOPSIS
*/
void osm_physp_destroy(IN osm_physp_t * p_physp);
/*
* PARAMETERS
* p_port
* [in] Pointer to a PhysPort object to destroy.
*
* RETURN VALUE
* This function does not return a value.
*
* NOTES
* Performs any necessary cleanup of the specified PhysPort object.
* Further operations should not be attempted on the destroyed object.
* This function should only be called after a call to osm_physp_construct or
* osm_physp_init.
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Physical Port/osm_physp_is_valid
* NAME
* osm_physp_is_valid
*
* DESCRIPTION
* Returns TRUE if the Physical Port has been successfully initialized.
* FALSE otherwise.
*
* SYNOPSIS
*/
static inline boolean_t osm_physp_is_valid(IN const osm_physp_t * p_physp)
{
CL_ASSERT(p_physp);
return (p_physp->port_guid != 0);
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns TRUE if the Physical Port has been successfully initialized.
* FALSE otherwise.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_is_healthy
* NAME
* osm_physp_is_healthy
*
* DESCRIPTION
* Returns TRUE if the Physical Port has been maked as healthy
* FALSE otherwise.
*
* SYNOPSIS
*/
static inline boolean_t osm_physp_is_healthy(IN const osm_physp_t * p_physp)
{
CL_ASSERT(p_physp);
return p_physp->healthy;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns TRUE if the Physical Port has been maked as healthy
* FALSE otherwise.
* All physical ports are initialized as "healthy" but may be marked
* otherwise if a received trap claims otherwise.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_link_is_healthy
* NAME
* osm_link_is_healthy
*
* DESCRIPTION
* Returns TRUE if the link given by the physical port is health,
* and FALSE otherwise. Link is healthy if both its physical ports are
* healthy
*
* SYNOPSIS
*/
boolean_t osm_link_is_healthy(IN const osm_physp_t * p_physp);
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* TRUE if both physical ports on the link are healthy, and FALSE otherwise.
* All physical ports are initialized as "healthy" but may be marked
* otherwise if a received trap claiming otherwise.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_set_health
* NAME
* osm_physp_set_health
*
* DESCRIPTION
* Sets the port health flag. TRUE means the port is healthy and
* should be used for packet routing. FALSE means it should be avoided.
*
* SYNOPSIS
*/
static inline void osm_physp_set_health(IN osm_physp_t * p_physp,
IN boolean_t is_healthy)
{
CL_ASSERT(p_physp);
p_physp->healthy = is_healthy;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* is_healthy
* [in] The health value to be assigned to the port.
* TRUE if the Physical Port should been maked as healthy
* FALSE otherwise.
*
* RETURN VALUES
* NONE
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_set_port_info
* NAME
* osm_physp_set_port_info
*
* DESCRIPTION
* Copies the PortInfo attribute into the Physical Port object
* based on the PortState.
*
* SYNOPSIS
*/
void osm_physp_set_port_info(IN osm_physp_t * p_physp,
IN const ib_port_info_t * p_pi,
IN const struct osm_sm * p_sm);
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* p_pi
* [in] Pointer to the IBA defined PortInfo at this port number.
*
* p_sm
* [in] Pointer to an osm_sm_t object.
*
* RETURN VALUES
* This function does not return a value.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_set_base_lid
* NAME
* osm_physp_set_base_lid
*
* DESCRIPTION
* Sets the base lid for this Physical Port.
*
* SYNOPSIS
*/
static inline void osm_physp_set_base_lid(IN osm_physp_t * p_physp,
IN ib_net16_t base_lid)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
p_physp->port_info.base_lid = base_lid;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* base_lid
* [in] Lid to set.
*
* NOTES
*
* SEE ALSO
*********/
/****f* OpenSM: Physical Port/osm_physp_set_pkey_tbl
* NAME
* osm_physp_set_pkey_tbl
*
* DESCRIPTION
* Copies the P_Key table into the Physical Port object.
*
* SYNOPSIS
*/
void osm_physp_set_pkey_tbl(IN osm_log_t * p_log, IN const osm_subn_t * p_subn,
IN osm_physp_t * p_physp,
IN ib_pkey_table_t * p_pkey_tbl,
IN uint16_t block_num,
IN boolean_t is_set);
/*
* PARAMETERS
* p_log
* [in] Pointer to a log object.
*
* p_subn
* [in] Pointer to the subnet data structure.
*
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* p_pkey_tbl
* [in] Pointer to the IBA defined P_Key table for this port
* number.
*
* block_num
* [in] The part of the P_Key table as defined in the IBA
* (valid values 0-2047, and is further limited by the
* partitionCap).
*
* RETURN VALUES
* This function does not return a value.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_get_pkey_tbl
* NAME
* osm_physp_get_pkey_tbl
*
* DESCRIPTION
* Returns a pointer to the P_Key table object of the Physical Port object.
*
* SYNOPSIS
*/
static inline const osm_pkey_tbl_t *osm_physp_get_pkey_tbl(IN const osm_physp_t
* p_physp)
{
CL_ASSERT(osm_physp_is_valid(p_physp));
/*
(14.2.5.7) - the block number valid values are 0-2047, and are
further limited by the size of the P_Key table specified by the
PartitionCap on the node.
*/
return &p_physp->pkeys;
};
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* The pointer to the P_Key table object.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_set_slvl_tbl
* NAME
* osm_physp_set_slvl_tbl
*
* DESCRIPTION
* Copies the SLtoVL attribute into the Physical Port object.
*
* SYNOPSIS
*/
static inline void osm_physp_set_slvl_tbl(IN osm_physp_t * p_physp,
IN ib_slvl_table_t * p_slvl_tbl,
IN uint8_t in_port_num)
{
ib_slvl_table_t *p_tbl;
CL_ASSERT(p_slvl_tbl);
CL_ASSERT(osm_physp_is_valid(p_physp));
p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
*p_tbl = *p_slvl_tbl;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* p_slvl_tbl
* [in] Pointer to the IBA defined SLtoVL map table for this
* port number.
*
* in_port_num
* [in] Input Port Number for this SLtoVL.
*
* RETURN VALUES
* This function does not return a value.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_get_slvl_tbl
* NAME
* osm_physp_get_slvl_tbl
*
* DESCRIPTION
* Returns a pointer to the SLtoVL attribute of the Physical Port object.
*
* SYNOPSIS
*/
static inline ib_slvl_table_t *osm_physp_get_slvl_tbl(IN const osm_physp_t *
p_physp,
IN uint8_t in_port_num)
{
ib_slvl_table_t *p_tbl;
CL_ASSERT(osm_physp_is_valid(p_physp));
p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num);
return p_tbl;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* in_port_num
* [in] Input Port Number for this SLtoVL.
*
* RETURN VALUES
* The pointer to the slvl table
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_set_vla_tbl
* NAME
* osm_physp_set_vla_tbl
*
* DESCRIPTION
* Copies the VL Arbitration attribute into the Physical Port object.
*
* SYNOPSIS
*/
static inline void osm_physp_set_vla_tbl(IN osm_physp_t * p_physp,
IN ib_vl_arb_table_t * p_vla_tbl,
IN uint8_t block_num)
{
CL_ASSERT(p_vla_tbl);
CL_ASSERT(osm_physp_is_valid(p_physp));
CL_ASSERT((1 <= block_num) && (block_num <= 4));
p_physp->vl_arb[block_num - 1] = *p_vla_tbl;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* p_vla_tbl
* [in] Pointer to the IBA defined VL Arbitration table for this
* port number.
*
* block_num
* [in] The part of the VL arbitration as defined in the IBA
* (valid values 1-4)
*
* RETURN VALUES
* This function does not return a value.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_get_vla_tbl
* NAME
* osm_physp_get_vla_tbl
*
* DESCRIPTION
* Returns a pointer to the VL Arbitration table of the Physical Port object.
*
* SYNOPSIS
*/
static inline ib_vl_arb_table_t *osm_physp_get_vla_tbl(IN osm_physp_t * p_physp,
IN uint8_t block_num)
{
CL_ASSERT(osm_physp_is_valid(p_physp));
CL_ASSERT((1 <= block_num) && (block_num <= 4));
return &(p_physp->vl_arb[block_num - 1]);
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* block_num
* [in] The part of the VL arbitration as defined in the IBA
* (valid values 1-4)
*
* RETURN VALUES
* The pointer to the VL Arbitration table
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_get_remote
* NAME
* osm_physp_get_remote
*
* DESCRIPTION
* Returns a pointer to the Physical Port on the other side the wire.
*
* SYNOPSIS
*/
static inline osm_physp_t *osm_physp_get_remote(IN const osm_physp_t * p_physp)
{
CL_ASSERT(osm_physp_is_valid(p_physp));
return p_physp->p_remote_physp;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns a pointer to the Physical Port on the other side of
* the wire. A return value of NULL means there is no link at this port.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_get_port_guid
* NAME
* osm_physp_get_port_guid
*
* DESCRIPTION
* Returns the port guid of this physical port.
*
* SYNOPSIS
*/
static inline ib_net64_t osm_physp_get_port_guid(IN const osm_physp_t * p_physp)
{
CL_ASSERT(osm_physp_is_valid(p_physp));
return p_physp->port_guid;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns the port guid of this physical port.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_get_subnet_prefix
* NAME
* osm_physp_get_subnet_prefix
*
* DESCRIPTION
* Returns the subnet prefix for this physical port.
*
* SYNOPSIS
*/
static inline ib_net64_t
osm_physp_get_subnet_prefix(IN const osm_physp_t * p_physp)
{
CL_ASSERT(osm_physp_is_valid(p_physp));
return p_physp->port_info.subnet_prefix;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns the subnet prefix for this physical port.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_link_exists
* NAME
* osm_physp_link_exists
*
* DESCRIPTION
* Returns TRUE if the Physical Port has a link to the specified port.
* FALSE otherwise.
*
* SYNOPSIS
*/
static inline boolean_t osm_physp_link_exists(IN const osm_physp_t * p_physp,
IN const osm_physp_t * p_remote_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
CL_ASSERT(p_remote_physp);
CL_ASSERT(osm_physp_is_valid(p_remote_physp));
return ((p_physp->p_remote_physp == p_remote_physp) &&
(p_remote_physp->p_remote_physp == p_physp));
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* p_remote_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns TRUE if the Physical Port has a link to another port.
* FALSE otherwise.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_link
* NAME
* osm_physp_link
*
* DESCRIPTION
* Sets the pointers to the Physical Ports on the other side the wire.
*
* SYNOPSIS
*/
static inline void osm_physp_link(IN osm_physp_t * p_physp,
IN osm_physp_t * p_remote_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(p_remote_physp);
p_physp->p_remote_physp = p_remote_physp;
p_remote_physp->p_remote_physp = p_physp;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object to link.
*
* p_remote_physp
* [in] Pointer to the adjacent osm_physp_t object to link.
*
* RETURN VALUES
* None.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_unlink
* NAME
* osm_physp_unlink
*
* DESCRIPTION
* Clears the pointers to the Physical Port on the other side the wire.
*
* SYNOPSIS
*/
static inline void osm_physp_unlink(IN osm_physp_t * p_physp,
IN osm_physp_t * p_remote_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(p_remote_physp);
CL_ASSERT(osm_physp_link_exists(p_physp, p_remote_physp));
p_physp->p_remote_physp = NULL;
p_remote_physp->p_remote_physp = NULL;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object to link.
*
* p_remote_physp
* [in] Pointer to the adjacent osm_physp_t object to link.
*
* RETURN VALUES
* None.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_has_any_link
* NAME
* osm_physp_has_any_link
*
* DESCRIPTION
* Returns TRUE if the Physical Port has a link to another port.
* FALSE otherwise.
*
* SYNOPSIS
*/
static inline boolean_t osm_physp_has_any_link(IN const osm_physp_t * p_physp)
{
CL_ASSERT(p_physp);
if (osm_physp_is_valid(p_physp))
return (p_physp->p_remote_physp != NULL);
else
return FALSE;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns TRUE if the Physical Port has a link to another port.
* FALSE otherwise.
*
* NOTES
*
* SEE ALSO
* Port, Physical Port
*********/
/****f* OpenSM: Physical Port/osm_physp_get_port_num
* NAME
* osm_physp_get_port_num
*
* DESCRIPTION
* Returns the local port number of this Physical Port.
*
* SYNOPSIS
*/
static inline uint8_t osm_physp_get_port_num(IN const osm_physp_t * p_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
return p_physp->port_num;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns the local port number of this Physical Port.
*
* NOTES
*
* SEE ALSO
*********/
/****f* OpenSM: Physical Port/osm_physp_get_node_ptr
* NAME
* osm_physp_get_node_ptr
*
* DESCRIPTION
* Returns a pointer to the parent Node object for this port.
*
* SYNOPSIS
*/
static inline struct osm_node *osm_physp_get_node_ptr(IN const osm_physp_t *
p_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
return p_physp->p_node;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns a pointer to the parent Node object for this port.
*
* NOTES
*
* SEE ALSO
*********/
/****f* OpenSM: Physical Port/osm_physp_get_port_state
* NAME
* osm_physp_get_port_state
*
* DESCRIPTION
* Returns the port state of this Physical Port.
*
* SYNOPSIS
*/
static inline uint8_t osm_physp_get_port_state(IN const osm_physp_t * p_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
return ib_port_info_get_port_state(&p_physp->port_info);
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns the local port number of this Physical Port.
*
* NOTES
*
* SEE ALSO
*********/
/****f* OpenSM: Physical Port/osm_physp_get_base_lid
* NAME
* osm_physp_get_base_lid
*
* DESCRIPTION
* Returns the base lid of this Physical Port.
*
* SYNOPSIS
*/
static inline ib_net16_t osm_physp_get_base_lid(IN const osm_physp_t * p_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
return p_physp->port_info.base_lid;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns the base lid of this Physical Port.
*
* NOTES
*
* SEE ALSO
*********/
/****f* OpenSM: Physical Port/osm_physp_get_lmc
* NAME
* osm_physp_get_lmc
*
* DESCRIPTION
* Returns the LMC value of this Physical Port.
*
* SYNOPSIS
*/
static inline uint8_t osm_physp_get_lmc(IN const osm_physp_t * p_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
return ib_port_info_get_lmc(&p_physp->port_info);
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* RETURN VALUES
* Returns the LMC value of this Physical Port.
*
* NOTES
*
* SEE ALSO
*********/
/****f* OpenSM: Physical Port/osm_physp_get_dr_path_ptr
* NAME
* osm_physp_get_dr_path_ptr
*
* DESCRIPTION
* Returns a pointer to the directed route path for this port.
*
* SYNOPSIS
*/
static inline osm_dr_path_t *osm_physp_get_dr_path_ptr(IN const osm_physp_t *
p_physp)
{
CL_ASSERT(p_physp);
CL_ASSERT(osm_physp_is_valid(p_physp));
return (osm_dr_path_t *) & p_physp->dr_path;
}
/*
* PARAMETERS
* p_physp
* [in] Pointer to a Physical Port object.
*
* RETURN VALUES
* Returns a pointer to the directed route path for this port.
*
* NOTES
*
* SEE ALSO
* Physical Port object
*********/
/****h* OpenSM/Port
* NAME
* Port
*
* DESCRIPTION
* The Port object encapsulates the information needed by the
* OpenSM to manage ports. The OpenSM allocates one Port object
* per port in the IBA subnet.
*
* Each Port object is associated with a single port GUID. A Port object
* contains 1 or more Physical Port objects. An end point node has
* one Physical Port per Port. A switch node has more than
* one Physical Port per Port.
*
* The Port object is not thread safe, thus callers must provide
* serialization.
*
* These objects should be treated as opaque and should be
* manipulated only through the provided functions.
*
* AUTHOR
* Steve King, Intel
*
*********/
/****s* OpenSM: Port/osm_port_t
* NAME
* osm_port_t
*
* DESCRIPTION
* This object represents a logical port on a switch, router, or CA.
*
* The osm_port_t object should be treated as opaque and should
* be manipulated only through the provided functions.
*
* SYNOPSIS
*/
typedef struct osm_port {
cl_map_item_t map_item;
cl_list_item_t list_item;
struct osm_node *p_node;
ib_net64_t guid;
uint32_t discovery_count;
unsigned is_new;
osm_physp_t *p_physp;
cl_qlist_t mcm_list;
int flag;
int use_scatter;
unsigned int cc_timeout_count;
int cc_unavailable_flag;
void *priv;
ib_net16_t lid;
} osm_port_t;
/*
* FIELDS
* map_item
* Linkage structure for cl_qmap. MUST BE FIRST MEMBER!
*
* list_item
* Linkage structure for cl_qlist. Used by ucast mgr during
* LFT calculation.
*
* p_node
* Points to the Node object that owns this port.
*
* guid
* Manufacturer assigned GUID for this port.
*
* discovery_count
* The number of times this port has been discovered
* during the current fabric sweep. This number is reset
* to zero at the start of a sweep.
*
* p_physp
* The pointer to physical port used when physical
* characteristics contained in the Physical Port are needed.
*
* mcm_list
* Multicast member list
*
* flag
* Utility flag for port management
*
* cc_timeout_count
* Count number of times congestion control config times out.
*
* cc_unavailable_flag
* Flag indicating if congestion control is not supported.
*
* SEE ALSO
* Port, Physical Port, Physical Port Table
*********/
/****f* OpenSM: Port/osm_port_delete
* NAME
* osm_port_delete
*
* DESCRIPTION
* This function destroys and deallocates a Port object.
*
* SYNOPSIS
*/
void osm_port_delete(IN OUT osm_port_t ** pp_port);
/*
* PARAMETERS
* pp_port
* [in][out] Pointer to a pointer to a Port object to delete.
* On return, this pointer is NULL.
*
* RETURN VALUE
* This function does not return a value.
*
* NOTES
* Performs any necessary cleanup of the specified Port object.
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_port_new
* NAME
* osm_port_new
*
* DESCRIPTION
* This function allocates and initializes a Port object.
*
* SYNOPSIS
*/
osm_port_t *osm_port_new(IN const ib_node_info_t * p_ni,
IN struct osm_node *p_parent_node);
/*
* PARAMETERS
* p_ni
* [in] Pointer to the NodeInfo attribute relevant for this port.
*
* p_parent_node
* [in] Pointer to the initialized parent osm_node_t object
* that owns this port.
*
* RETURN VALUE
* Pointer to the initialize Port object.
*
* NOTES
* Allows calling other port methods.
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_port_get_base_lid
* NAME
* osm_port_get_base_lid
*
* DESCRIPTION
* Gets the base LID of a port.
*
* SYNOPSIS
*/
static inline ib_net16_t osm_port_get_base_lid(IN const osm_port_t * p_port)
{
CL_ASSERT(p_port->p_physp && osm_physp_is_valid(p_port->p_physp));
return osm_physp_get_base_lid(p_port->p_physp);
}
/*
* PARAMETERS
* p_port
* [in] Pointer to a Port object.
*
* RETURN VALUE
* Base LID of the port.
* If the return value is 0, then this port has no assigned LID.
*
* NOTES
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_port_get_lmc
* NAME
* osm_port_get_lmc
*
* DESCRIPTION
* Gets the LMC value of a port.
*
* SYNOPSIS
*/
static inline uint8_t osm_port_get_lmc(IN const osm_port_t * p_port)
{
CL_ASSERT(p_port->p_physp && osm_physp_is_valid(p_port->p_physp));
return osm_physp_get_lmc(p_port->p_physp);
}
/*
* PARAMETERS
* p_port
* [in] Pointer to a Port object.
*
* RETURN VALUE
* Gets the LMC value of a port.
*
* NOTES
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_port_get_guid
* NAME
* osm_port_get_guid
*
* DESCRIPTION
* Gets the GUID of a port.
*
* SYNOPSIS
*/
static inline ib_net64_t osm_port_get_guid(IN const osm_port_t * p_port)
{
return p_port->guid;
}
/*
* PARAMETERS
* p_port
* [in] Pointer to a Port object.
*
* RETURN VALUE
* Manufacturer assigned GUID of the port.
*
* NOTES
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_port_get_lid_range_ho
* NAME
* osm_port_get_lid_range_ho
*
* DESCRIPTION
* Returns the HOST ORDER lid min and max values for this port,
* based on the lmc value.
*
* SYNOPSIS
*/
void osm_port_get_lid_range_ho(IN const osm_port_t * p_port,
OUT uint16_t * p_min_lid,
OUT uint16_t * p_max_lid);
/*
* PARAMETERS
* p_port
* [in] Pointer to a Port object.
*
* p_min_lid
* [out] Pointer to the minimum LID value occupied by this port.
*
* p_max_lid
* [out] Pointer to the maximum LID value occupied by this port.
*
* RETURN VALUE
* None.
*
* NOTES
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Physical Port/osm_physp_calc_link_mtu
* NAME
* osm_physp_calc_link_mtu
*
* DESCRIPTION
* Calculate the Port MTU based on current and remote
* physical ports MTU CAP values.
*
* SYNOPSIS
*/
uint8_t osm_physp_calc_link_mtu(IN osm_log_t * p_log,
IN const osm_physp_t * p_physp,
IN uint8_t current_mtu);
/*
* PARAMETERS
* p_log
* [in] Pointer to a log object.
*
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* current_mtu
* [in] Current neighbor mtu on this port
*
* RETURN VALUES
* The MTU of the link to be used.
*
* NOTES
*
* SEE ALSO
* PhysPort object
*********/
/****f* OpenSM: Physical Port/osm_physp_calc_link_op_vls
* NAME
* osm_physp_calc_link_op_vls
*
* DESCRIPTION
* Calculate the Port OP_VLS based on current and remote
* physical ports VL CAP values. Allowing user option for a max limit.
*
* SYNOPSIS
*/
uint8_t osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
IN const osm_subn_t * p_subn,
IN const osm_physp_t * p_physp,
IN uint8_t current_op_vls);
/*
* PARAMETERS
* p_log
* [in] Pointer to a log object.
*
* p_subn
* [in] Pointer to the subnet object for accessing of the options.
*
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* current_op_vls
* [in] Current operational VL on the port
*
* RETURN VALUES
* The OP_VLS of the link to be used.
*
* NOTES
*
* SEE ALSO
* PhysPort object
*********/
/****f* OpenSM: Physical Port/osm_physp_replace_dr_path_with_alternate_dr_path
* NAME
* osm_physp_replace_dr_path_with_alternate_dr_path
*
* DESCRIPTION
* Replace the direct route path for the given phys port with an
* alternate path going through forien set of phys port.
*
* SYNOPSIS
*/
void
osm_physp_replace_dr_path_with_alternate_dr_path(IN osm_log_t * p_log,
IN osm_subn_t const *p_subn,
IN osm_physp_t const *p_physp,
IN osm_bind_handle_t * h_bind);
/*
* PARAMETERS
* p_log
* [in] Pointer to a log object.
*
* p_subn
* [in] Pointer to the subnet object for accessing of the options.
*
* p_physp
* [in] Pointer to an osm_physp_t object.
*
* h_bind
* [in] Pointer to osm_bind_handle_t object.
*
* RETURN VALUES
* NONE
*
* NOTES
*
* SEE ALSO
* PhysPort object
*********/
/****s* OpenSM: Port/osm_alias_guid_t
* NAME
* osm_alias_guid_t
*
* DESCRIPTION
* This object represents an alias guid for an endport.
*
* The osm_alias_guid_t object should be treated as opaque and should
* be manipulated only through the provided functions.
*
* SYNOPSIS
*/
typedef struct osm_alias_guid {
cl_map_item_t map_item;
ib_net64_t alias_guid;
osm_port_t *p_base_port;
} osm_alias_guid_t;
/*
* FIELDS
* map_item
* Linkage structure for cl_qmap. MUST BE FIRST MEMBER!
*
* alias_guid
* Alias GUID for port obtained from SM GUIDInfo attribute
*
* p_base_port
* Pointer to osm_port_t for base port GUID
*
* SEE ALSO
* Port, Physical Port, Physical Port Table
*/
/****f* OpenSM: Port/osm_alias_guid_new
* NAME
* osm_alias_guid_new
*
* DESCRIPTION
* This function allocates and initializes an alias guid object.
*
* SYNOPSIS
*/
osm_alias_guid_t *osm_alias_guid_new(IN const ib_net64_t alias_guid,
IN osm_port_t *p_base_port);
/*
* PARAMETERS
* alias_guid
* [in] Alias GUID in network order
*
* p_base_port
* [in] Pointer to the port for this base GUID
*
* RETURN VALUE
* Pointer to the initialized alias guid object.
*
* NOTES
* Allows calling other alias guid methods.
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_alias_guid_delete
* NAME
* osm_alias_guid_delete
*
* DESCRIPTION
* This function destroys and deallocates an alias guid object.
*
* SYNOPSIS
*/
void osm_alias_guid_delete(IN OUT osm_alias_guid_t ** pp_alias_guid);
/*
* PARAMETERS
* pp_alias_guid
* [in][out] Pointer to a pointer to an alias guid object to delete.
* On return, this pointer is NULL.
*
* RETURN VALUE
* This function does not return a value.
*
* NOTES
* Performs any necessary cleanup of the specified alias guid object.
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_alias_guid_get_alias_guid
* NAME
* osm_alias_guid_get_alias_guid
*
* DESCRIPTION
* This function retrieves alias guid from alias guid object.
*
* SYNOPSIS
*/
static inline ib_net64_t osm_alias_guid_get_alias_guid(IN osm_alias_guid_t *p_alias_guid)
{
CL_ASSERT(p_alias_guid);
return p_alias_guid->alias_guid;
}
/*
* PARAMETERS
* p_alias_guid
* [in] Pointer to a pointer to an alias guid object.
*
* RETURN VALUE
* This function returns the alias guid or NULL if fails.
*
* NOTES
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_alias_guid_get_base_guid
* NAME
* osm_alias_guid_get_base_guid
*
* DESCRIPTION
* This function retrieves base guid from alias guid object.
*
* SYNOPSIS
*/
static inline ib_net64_t osm_alias_guid_get_base_guid(IN osm_alias_guid_t *p_alias_guid)
{
CL_ASSERT(p_alias_guid);
return osm_port_get_guid(p_alias_guid->p_base_port);
}
/*
* PARAMETERS
* p_alias_guid
* [in] Pointer to a pointer to an alias guid object.
*
* RETURN VALUE
* This function returns the base guid or NULL if fails.
*
* NOTES
*
* SEE ALSO
* Port
*********/
/****f* OpenSM: Port/osm_port_clear_base_lid
* NAME
* osm_port_clear_base_lid
*
* DESCRIPTION
* Clear the base lid of a given port.
*
* SYNOPSIS
*/
static inline void osm_port_clear_base_lid(OUT osm_port_t * p_port)
{
CL_ASSERT(p_port);
p_port->lid = 0;
osm_physp_set_base_lid(p_port->p_physp, 0);
}
/*
* PARAMETERS
* p_port
* [out] Pointer to a Port object.
*
* RETURN VALUE
* None
*
* NOTES
*
* SEE ALSO
* Port
*********/
END_C_DECLS
#endif /* _OSM_PORT_H_ */
|