Files
@ d0a14f973771
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/vds/vmkapi_vds_portset.h
d0a14f973771
130.1 KiB
text/x-chdr
ESXi-5.0-U1
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 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 | /***********************************************************
* Copyright 2008 - 2010 VMware, Inc. All rights reserved.
***********************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* VDS */ /**
* \addtogroup Network
* @{
* \defgroup VDS VDS Portset Interfaces
*
* The VDSwitch is an abstraction representation of multiple hosts
* defining the same vSwitch (same name, same network policy) and
* portgroup, which are needed to facilitate the concept of VM being
* connected to the same network as it migrates among multiple hosts.
*
* Portsets are groups of ports which, together with policies for frame
* routing, form virtual networks. Virtual nics connected to the ports
* may forward packets to each other. The analogy is to a box (like a
* a hub or a switch) containing some type of backplane for connecting
* multiple ports in the physical world. If multiple hosts have virtual
* nics connected to a VDS, each of the hosts should have a portset
* implementation in ESX.
*
* @{
***********************************************************************
*/
#ifndef _VMKAPI_VDS_PORTSET_H_
#define _VMKAPI_VDS_PORTSET_H_
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */
#include "net/vmkapi_net_types.h"
#include "net/vmkapi_net_uplink.h"
#include "net/vmkapi_net_dcb.h"
#include "net/vmkapi_net_pt.h"
#include "vds/vmkapi_vds_ether.h"
#include "vds/vmkapi_vds_respools.h"
/**
* \brief Identifier for a portset.
*/
typedef struct Portset vmk_Portset;
/**
* \brief Query ops to get portset implementation information.
*/
typedef enum vmk_PortsetQueryID {
VMK_PORTSET_QUERY_PORTUPLINKPOLICY,
VMK_PORTSET_QUERY_PORTUPLINKSTATUS,
} vmk_PortsetQueryID;
/**
* \brief Values returned by a port uplink status request.
*/
typedef enum vmk_PortsetPortUplinkStatus {
/* All the uplinks that the port uses are link down */
VMK_PORTSET_PORT_UPLINK_DOWN,
/* All the uplinks that the port uses are link up */
VMK_PORTSET_PORT_UPLINK_NORMAL,
/* Some uplinks that the port uses are link down; at least
* one uplink that the port uses is link up */
VMK_PORTSET_PORT_UPLINK_REDUNDANCYLOSS,
} vmk_PortsetPortUplinkStatus;
/**
* \brief Structure used with VMK_PORTSET_QUERY_PORTUPLINKSTATUS.
*
* Used by portset implementation to ask the uplink device status, including
* link up/down, link speed and duplex.
*/
typedef struct vmk_PortsetQueryPortUplinkStatusData {
/** the port being asked about */
vmk_SwitchPortID portID;
/** (output) uplink status */
vmk_PortsetPortUplinkStatus *status;
} vmk_PortsetQueryPortUplinkStatusData;
/**
* \brief Uplink policy flags
*/
typedef enum vmk_UplinkPolicyFlags {
/**
* Etherchannel static mode is configured on physical switch
* for the uplinks. (LACP or other negociation are excluded)
*/
VMK_UPLINK_POLICY_ETHERCHANNEL_STATIC = 0x1,
} vmk_UplinkPolicyFlags;
/**
* \brief Uplink attribute.
*
* This attribute indicates whether the uplink is populated
* or not.
*/
typedef enum vmk_UplinkAttribute {
/** Backed by a physical device */
VMK_UPLINK_ATTRIBUTE_POPULATED = 0x0,
/** Not backed by a physical device */
VMK_UPLINK_ATTRIBUTE_UNPOPULATED = 0x1,
} vmk_UplinkAttribute;
/**
* \brief Structure used with VMK_PORTSET_QUERY_PORTUPLINKPOLICY.
*
* Used to ask the portset implementation for the uplink policy information,
* i.e. uplinks that are associated to the queried port, and flags
* indicating whether teaming policy requires additional physical switch
* setting.
*/
typedef struct vmk_PortsetQueryPortUplinkPolicyData {
/** The port being asked about */
vmk_SwitchPortID portID;
/** Uplink policy flag */
vmk_UplinkPolicyFlags policyFlags;
/** Number of uplinks in policy info (output) */
vmk_uint32 nUplinks;
/**
* Name of each uplink in policy info (output), including
* active/standby uplinks.
* The user is responsible for both allocating and freeing
* the array. The buffer must be large enough to contain
* at most uplinkNameArraySz elements.
*/
vmk_Name *uplinkName;
/** Flag indicating if the associated uplink is an empty
* ('logical') link on a vDS implementation
*/
vmk_UplinkAttribute *uplinkAttribute;
/** Number of names that can be stored in uplinkName */
vmk_uint32 uplinkNameArraySz;
} vmk_PortsetQueryPortUplinkPolicyData;
/**
* \brief Port filter class.
*
* This class allows 3rd party module to interpret properly
* the filter being passed.
*/
typedef enum vmk_PortFilterClass {
/** Invalid filter */
VMK_PORT_FILTER_NONE = 0x0,
/** Mac address filter */
VMK_PORT_FILTER_MACADDR = 0x1,
/** Vlan tag filter */
VMK_PORT_FILTER_VLAN = 0x2,
/** Vlan tag + mac addr filter */
VMK_PORT_FILTER_VLANMACADDR = 0x3,
} vmk_PortFilterClass;
/**
* \brief Filter properties.
*
* These properties are used to classify
* a filter. They can be interpreted differently
* according to the place they are involved with.
* To know more about the way each property is
* handled, refer to the used API for example
* vmk_UplinkApplyPortFilter() if a filter
* is to be advertised on an uplink.
*/
typedef enum vmk_PortFilterProperties {
/** None */
VMK_PORT_FILTER_PROP_NONE = 0x0,
/** Management filter */
VMK_PORT_FILTER_PROP_MGMT = 0x1,
} vmk_PortFilterProperties;
/**
* \brief Filter information advertised by a port.
*
* A port filter is used by portset modules for traffics filtering
* purposes. One instance is the load balancer algorithm running in
* the uplink layer (refer to vmk_UplinkApplyPortFilter()).
*/
typedef struct vmk_PortFilter {
/** Port advertising this filter */
vmk_SwitchPortID portID;
/** Filter class */
vmk_PortFilterClass class;
union {
/** Filter class mac only */
vmk_uint8 macaddr[6];
/** Filter class vlan tag only */
vmk_uint16 vlan_id;
/** Filter class vlan tag + mac */
struct {
vmk_uint8 macaddr[6];
vmk_uint16 vlan_id;
} vlanmac;
} filter;
/** Filter properties */
vmk_PortFilterProperties prop;
} vmk_PortFilter;
/**
* \brief Port state update operations.
*
* The operations are processed by the portset implementation's
* vmk_PortUpdate handler.
*/
typedef enum vmk_PortUpdateOp {
/** port client link change */
VMK_PORT_UPDATE_LINK_CHANGE = 1,
/** vNic port FRP update */
VMK_PORT_UPDATE_ETH_FRP = 2,
/** vNic port VLAN update */
VMK_PORT_UPDATE_VLAN = 3,
/** port DCB setting change */
VMK_PORT_UPDATE_DCB_CHANGE = 4,
/** port VM UUID update */
VMK_PORT_UPDATE_VMUUID = 5,
/** Port VF update */
VMK_PORT_UPDATE_VF = 6,
} vmk_PortUpdateOp;
/**
* \brief Argument type of PortUpdate for uplink change.
*
* This structure is used to give PortUpdate information on
* VMK_PORT_UPDATE_LINK_CHANGE event concerning a transition
* that occured on an port.
*/
typedef enum vmk_PortUpdateLinkEvent {
/* Port client is connected to portset */
VMK_PORT_CLIENT_DISCONNECTED,
/* Port client is disconnected to portset */
VMK_PORT_CLIENT_CONNECTED,
/* Port client is link up */
VMK_PORT_CLIENT_LINK_UP,
/* Port client is link down */
VMK_PORT_CLIENT_LINK_DOWN,
} vmk_PortUpdateLinkEvent;
/**
* \brief Argument structure of PortUpdate for guest VLANs.
*
* This structure is used to give PortUpdate information on
* VMK_PORT_UPDATE_VLAN event concerning a change in the VLAN
* membership of a guest.
*/
typedef struct vmk_PortUpdateVLANData {
/**
* VLAN bitmap, each bit corresponds to one VLAN.
*/
const struct vmk_VLANBitmap *vlanGroups;
} vmk_PortUpdateVLANData;
/**
* \brief VF operations for a port.
*/
typedef enum vmk_PortVFOps {
/** Acquire a VF for a port */
VMK_PORT_VF_ACQUIRE = 0x1,
/** Release a VF previously acquired for a port. */
VMK_PORT_VF_RELEASE = 0x2,
} vmk_PortVFOps;
/**
* \brief Argument structure for the VMK_PORT_VF_ACQUIRE operation.
*
* This structure is used to exchange information with PortUpdate on
* VMK_PORT_VF_ACQUIRE operation.
*/
typedef struct vmk_PortVFAcquireData {
/**
* The passthru type the VF will be used for.
* This field is populated by the caller.
*/
vmk_NetPTType ptType;
/**
* The requirements for the VF returned.
* This field is populated by the caller.
*/
vmk_NetVFRequirements req;
/** The VF returned by the callee. */
vmk_VFDesc vfDesc;
} vmk_PortVFAcquireData;
/**
* \brief Argument structure for the VMK_PORT_VF_RELEASE operation.
*
* This structure is used to exchange information with PortUpdate on
* VMK_PORT_VF_RELEASE operation.
*/
typedef struct vmk_PortVFReleaseData {
/** The VF to be released. */
vmk_VFDesc vfDesc;
} vmk_PortVFReleaseData;
/**
* \brief Argument structure for VF operations.
*
* This structure is used to exchange information with PortUpdate on
* VMK_PORT_UPDATE_VF event.
*/
typedef struct vmk_PortUpdateVFData {
/** The operation requested */
vmk_PortVFOps vfOp;
union {
/** When VMK_PORT_VF_ACQUIRE operation is requested */
vmk_PortVFAcquireData acq;
/** When VMK_PORT_VF_RELEASE operation is requested */
vmk_PortVFReleaseData rel;
} u;
} vmk_PortUpdateVFData;
/**
* \brief Portset Ops flag.
*/
typedef enum vmk_PortsetOpsFlag {
/** Normal portset activate/deactivate */
VMK_PORTSETOPS_FLAG_NONE = 0x0,
/** Activate/deactivate as part of hotswap operation */
VMK_PORTSETOPS_FLAG_HOTSWAP = 0x1,
} vmk_PortsetOpsFlag;
/**
* \brief Event ids of portset events.
*/
typedef enum vmk_PortsetEvent {
/** None */
VMK_PORTSET_EVENT_NONE = 0,
/**
* Set number of maximum access ports in a portset. Access ports
* are used to connect to vmknics and vNICs. Should be called when
* a portset has limited number of access ports. Typically used
* when each access port is backed by some hardware resource.
*
* If number of maximum access ports is not set for a portset, all
* ports in the portset are available for vmknic/vNIC connection by
* default.
*/
VMK_PORTSET_EVENT_NUMACCESSPORT_CHANGE,
/**
* To notify when the uplinks associated with vmk management interface
* changes.
*/
VMK_PORTSET_EVENT_VMKBACKING_CHANGE,
/**
* An Opaque portset property has changed.
* Opaque property is partner defined portset property defined in partner
* solution. For defining opaque portset properties, see
* vmk_VDSClientPortsetRegister function documentation.
*/
VMK_PORTSET_EVENT_OPAQUE_CHANGE,
} vmk_PortsetEvent;
/**
* \brief Client name length.
*/
#define VMK_PORT_CLIENT_NAME_MAX 1040
/**
* \brief Client display name of a port on a vNetwork Distributed Switch.
*/
typedef char vmk_PortClientName[VMK_PORT_CLIENT_NAME_MAX];
/**
* \brief Portset name length.
*/
#define VMK_PORTSET_NAME_MAX (32 * 4)
/*
***********************************************************************
* vmk_PortPrivDataDestructor -- */ /**
*
* \brief Destructor callback for port private data.
*
* This callback should be registered in vmk_PortPrivDataSet(). It's an
* optional callback. See the description of vmk_PortPrivDataSet().
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] data Port private data that should be
* destroyed
***********************************************************************
*/
typedef void (*vmk_PortPrivDataDestructor)(vmk_SwitchPortID portID,
void *data);
/*
***********************************************************************
* vmk_PortsetDispatch -- */ /**
*
* \brief Callback to dispatch packets entering a port.
*
* Any packet still left on the pktList when dispatch() returns is
* released, regardless of success or failure of the function.
*
* \note For performance it is recommended to dispatch to uplinks last
* with mayModify=VMK_TRUE when calling vmk_PortOutput() if
* possible. It is likely that an uplink needs to modify the
* packets prior to transmit.
*
* \note vmk_PortsetSchedBillToPort() must be used within dispatch().
* See the functions documentation for more details.
*
* \note This is a required callback.
*
* \note This function will not block.
*
* \param[in] ps Immutable handle to a portset.
* \param[in] pktList List of packets to process
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK dispatch was successful
* \retval VMK_* Implementation specific error code,
* to be reported by framework.
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetDispatch)(vmk_Portset *ps,
vmk_PktList pktList,
vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetPortConnect -- */ /**
*
* \brief Optional callback for port connection.
*
* This callback does implementation specific handling of port connection.
* Set to NULL if not needed.
*
* \note This callback cannot block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK Port connected
* \retval VMK_* Implementation specific error code,
* connection is rejected.
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetPortConnect)(vmk_Portset *ps,
vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetPortDisconnect -- */ /**
*
* \brief Optional callback for port disconnect.
*
* This callback does implementation specific handling of port disconnect.
* Set to NULL if not needed. Must return VMK_OK if implemented.
*
* \note This callback cannot block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK Port disconnected
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetPortDisconnect)(vmk_Portset *ps,
vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetPortEnable -- */ /**
*
* \brief Optional callback for port enable.
*
* This callback does implementation specific handling of port enable.
* Set to NULL if not needed. Always invoked after successful port connect
* and prior to vmk_PortsetDispatch() is called on the port to perform I/O.
*
* \note This callback cannot block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK Port is enabled
* \retval VMK_* Implementation specific error code.
* Port is not enabled.
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetPortEnable)(vmk_Portset *ps,
vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetPortDisable -- */ /**
*
* \brief Optional callback for port disable.
*
* This callback does implementation specific handling of port disable.
* Set to NULL if not needed. Always invoked after I/O has been stopped
* on the port.
*
* \note This function must return VMK_OK.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK Port is disabled
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetPortDisable)(vmk_Portset *ps,
vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetActivate -- */ /**
*
* \brief Required callback to activate a portset.
*
* This callback does implementation specific handling of portset activation.
* It is invoked when portset is created, before any virtual NIC connects
* to the portset.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] flag Reason for activation
*
* \retval VMK_OK Portset is activated
* \retval VMK_* Implementation specific error code.
* Portset is not activated.
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetActivate)(vmk_Portset *ps,
vmk_PortsetOpsFlag flag);
/*
***********************************************************************
* vmk_PortsetDeactivate -- */ /**
*
* \brief Required callback for portset deactivation.
*
* This callback does implementation specific handling of portset
* deactivation. Called as part of portset destruction, after all virtual
* and physical NICs are disconnected.
*
* Must return VMK_OK.
*
* \note This callback cannot block.
*
* \param[in] ps Mutable handle to a portset.
*
* \retval VMK_OK Portset is activated
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetDeactivate)(vmk_Portset *ps,
vmk_PortsetOpsFlag flag);
/*
***********************************************************************
* vmk_PortUpdate -- */ /**
*
* \brief Required callback for handling port update notifications.
*
* VMK_PORT_UPDATE_LINK_CHANGE: data is of (vmk_PortUpdateLinkEvent *)
* type
*
* VMK_PORT_UPDATE_ETH_FRP: data is of (vmk_EthFRP *) type. The
* requestedFilter is read-only, the callback can set acceptedFilter.
*
* VMK_PORT_UPDATE_VLAN: data is of (vmk_PortUpdateVLANData *) type
*
* VMK_PORT_UPDATE_DCB_CHANGE: there is no data
*
* VMK_PORT_UPDATE_VMUUID: there is no data
*
* VMK_PORT_UPDATE_VF: data is of (vmk_PortUpdateVFData *) type
*
* \note This callback cannot block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] portID Numeric ID of the virtual port
* \param[in] opcode Kind of update
* \param[in,out] data Data specific to operation
*
* \retval VMK_OK Update is successful
* \retval VMK_NOT_SUPPORTED The request is not supported
* \retval Other status Update failure
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortUpdate)(vmk_Portset *ps,
vmk_SwitchPortID portID,
vmk_PortUpdateOp opcode,
void *data);
/*
***********************************************************************
* vmk_PortsetQuery -- */ /**
*
* \brief Optional callback for handling of portset queries.
*
* VMK_PORTSET_QUERY_PORTUPLINKPOLICY: queryData is of
* (vmk_PortsetQueryPortUplinkPolicyData *) type
*
* VMK_PORTSET_QUERY_PFLIST: queryData is of
* (vmk_PortsetQueryPFListData *) type
*
* VMK_PORTSET_QUERY_PORTUPLINKSTATUS: queryData is of
* (vmk_PortsetQueryPortUplinkStatusData *) type
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] queryID ID of query being performed
* \param[in,out] queryData Query-specific data
*
* \retval VMK_OK Query succeeded
* \retval Other status Query failed
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetQuery)(vmk_Portset *ps,
vmk_PortsetQueryID queryID,
void *queryData);
/*
***********************************************************************
* vmk_PortsetPortReserve -- */ /**
*
* \brief Optional callback for port reservation before port connect.
*
* If port connect fails, vmk_PortsetPortUnreserve must be called
* to cancel reservation. Otherwise the reserved port won't be freed
* even though no entity is connected to it.
*
* vmk_PortsetPortReserve may be called on more than one host for a
* given vdsPort without vmk_PortsetPortUnreserve being called on the
* hosts where the vdsPort was previously reserved.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] portID Numeric ID of the virtual port
*
* \retval VMK_OK If the specified port is successfully reserved
* \retval Other status If the specified port cannot be reserved
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetPortReserve)(vmk_Portset *ps,
vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetPortUnreserve -- */ /**
*
* \brief Optional callback for cancelling port reservation.
*
* This callback is invoked after a successful vmk_PortsetPortReserve.
* The port is in disconnected state.
*
* \note This callback cannot block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] portID Numeric ID of the virtual port
*
* \retval VMK_OK
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetPortUnreserve)(vmk_Portset *ps,
vmk_SwitchPortID portID);
/*
************************************************************************
* vmk_PortGetStats -- */ /**
*
* \brief Optional callback for getting statistics on special uplink ports.
*
* Special uplinks include passthroughed hidden uplinks, whose stats are
* maintained in passthroughed device drivers or portsets. For portsets
* not using passthroughed uplink device, this callback is not needed.
*
* \note This function will not block.
*
* \param[in] ps Immutable handle to a portset.
* \param[in] portID Numeric ID of the virtual port
* \param[out] stats Port statistics
*
* \retval VMK_OK If port stats are successfully fetched
* \retval other value If port stats are not successfully
* fetched
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortGetStats)(vmk_Portset *ps,
vmk_SwitchPortID portID,
vmk_VDSPortStatistics *stats);
/*
* \brief Version number for portset ops structure.
*/
#define VMK_PORTSET_OPS_VERSION_0 0
#define VMK_PORTSET_OPS_VERSION_CURRENT VMK_PORTSET_OPS_VERSION_0
/**
* \brief Structure to register portset callbacks.
*/
typedef struct {
/** Version of portset ops structure; always set to current version */
vmk_uint32 version;
/** Handler for implementation-specific action during portset deactivation */
vmk_PortsetDeactivate deactivate;
/** Handler for implementation-specific action for Pkt dispatch */
vmk_PortsetDispatch dispatch;
/** Handler for implementation-specific action during port connect */
vmk_PortsetPortConnect portConnect;
/** Handler for implementation-specific action during port disconnect */
vmk_PortsetPortDisconnect portDisconnect;
/** Handler for implementation-specific action during port enable */
vmk_PortsetPortEnable portEnable;
/** Handler for implementation-specific action during port disable */
vmk_PortsetPortDisable portDisable;
/** Handler for implementation-specific action during port updates */
vmk_PortUpdate portUpdate;
/** Handler for portset query operations */
vmk_PortsetQuery query;
/** Handler for port reservation before port connect */
vmk_PortsetPortReserve portReserve;
/** Handler for cancel port reservation after port connect fails */
vmk_PortsetPortUnreserve portUnreserve;
/**
* Handler for getting port statistics, only needed for special
* uplink ports, i.e. passthroughed hidden uplinks
*/
vmk_PortGetStats portGetStats;
} vmk_PortsetOps;
/**
* \brief Portset handle context.
*
* When requesting a portset handle, the caller specifies a particular
* context for the handle depending on which actions it wishes to take.
* In general, the immutable handle is provides read-only, non-exclusive
* access to the configuration of a portset and its ports, whereas the
* mutable handle can be used for updating this configuration.
*
* \see vmk_PortsetAcquireByName().
* \see vmk_PortsetAcquireByPortID().
* \see vmk_PortsetAcquireByVDSID().
*/
typedef enum vmk_PortsetHandleContext {
/** \brief Handle context with unmodifiable access to the portset. */
VMK_PORTSET_HANDLE_IMMUTABLE = 1,
/** \brief Handle context with modifiable access to the portset. */
VMK_PORTSET_HANDLE_MUTABLE,
} vmk_PortsetHandleContext;
/*
***********************************************************************
* vmk_PortsetAcquireByName -- *//**
*
* \brief Acquire a handle to a portset in the requested context.
*
* A particular thread may hold at most one portset handle. By
* extension, this means that a portset implementation may not
* re-acquire a portset handle, and may not acquire a new portset handle
* while in a callback where a portset handle is provided as a
* parameter.
*
* Each vmkapi function that requires the caller to hold a portset
* handle will note this requirement in its doxygen header. If a
* particular handle context is required, it will be explicitly noted;
* otherwise, any handle context is acceptable.
*
* A thread should not hold a portset handle any longer than necessary.
* While it holds the handle, it is not blockable and may not sleep or
* call any blocking function calls. There are several vmkapi function
* calls that explicitly state that they cannot be called by a thread
* holding a portset handle.
*
* The mutable context should not be used unless absolutely necessary,
* as it may temporarily halt all traffic traversing the portset.
*
* \note The caller must not hold any spin locks while invoking
* this function.
*
* \note This function will not block.
*
* \param[in] psName Portset name.
* \param[in] context Requested handle context.
* \param[out] ps Portset handle.
*
* \retval VMK_OK Successfully acquired the handle.
* \retval VMK_BAD_PARAM Invalid arguments.
* \retval VMK_NOT_FOUND The named portset was not found.
* \retval VMK_FAILURE The requested portset handle cannot be
* acquired in the current calling context.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetAcquireByName(const char *psName,
vmk_PortsetHandleContext context,
vmk_Portset **ps);
/*
***********************************************************************
* vmk_PortsetAcquireByPortID -- *//**
*
* \brief Acquire a handle to a portset in the requested context.
*
* A particular thread may hold at most one portset handle. By
* extension, this means that a portset implementation may not
* re-acquire a portset handle, and may not acquire a new portset handle
* while in a callback where a portset handle is provided as a
* parameter.
*
* Each vmkapi function that requires the caller to hold a portset
* handle will note this requirement in its doxygen header. If a
* particular handle context is required, it will be explicitly noted;
* otherwise, any handle context is acceptable.
*
* A thread should not hold a portset handle any longer than necessary.
* While it holds the handle, it is not blockable and may not sleep or
* call any blocking function calls. There are several vmkapi function
* calls that explicitly state that they cannot be called by a thread
* holding a portset handle.
*
* The mutable context should not be used unless absolutely necessary,
* as it may temporarily halt all traffic traversing the portset.
*
* \note The caller must not hold any spin locks while invoking
* this function.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] context Requested handle context.
* \param[out] ps Portset handle.
*
* \retval VMK_OK Successfully acquired the handle.
* \retval VMK_BAD_PARAM Invalid arguments.
* \retval VMK_NOT_FOUND The port was not found.
* \retval VMK_FAILURE The requested portset handle cannot be
* acquired in the current calling context.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetAcquireByPortID(vmk_SwitchPortID portID,
vmk_PortsetHandleContext context,
vmk_Portset **ps);
/*
***********************************************************************
* vmk_PortsetAcquireByVDSID -- *//**
*
* \brief Acquire a handle to a portset in the requested context.
*
* A particular thread may hold at most one portset handle. By
* extension, this means that a portset implementation may not
* re-acquire a portset handle, and may not acquire a new portset handle
* while in a callback where a portset handle is provided as a
* parameter.
*
* Each vmkapi function that requires the caller to hold a portset
* handle will note this requirement in its doxygen header. If a
* particular handle context is required, it will be explicitly noted;
* otherwise, any handle context is acceptable.
*
* A thread should not hold a portset handle any longer than necessary.
* While it holds the handle, it is not blockable and may not sleep or
* call any blocking function calls. There are several vmkapi function
* calls that explicitly state that they cannot be called by a thread
* holding a portset handle.
*
* The mutable context should not be used unless absolutely necessary,
* as it may temporarily halt all traffic traversing the portset.
*
* \note The caller must not hold any spin locks while invoking
* this function.
*
* \note This function will not block.
*
* \param[in] vdsID vDS switch ID string.
* \param[in] context Requested handle context.
* \param[out] ps Portset handle.
*
* \retval VMK_OK Successfully acquired the handle.
* \retval VMK_BAD_PARAM Invalid arguments.
* \retval VMK_NOT_FOUND The vDS switch was not found.
* \retval VMK_FAILURE The requested portset handle cannot be
* acquired in the current calling context.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetAcquireByVDSID(const char *vdsID,
vmk_PortsetHandleContext context,
vmk_Portset **ps);
/*
***********************************************************************
* vmk_PortsetRelease -- *//**
*
* \brief Release a handle to a portset.
*
* This function should only be called on handles that have been
* explicitly acquired via vmk_PortsetAcquire().
*
* This function must not be used to release a handle that has been
* provided as an argument to a callback. Such usage is strictly
* disallowed by vmkernel.
*
* \note The caller must not hold any spin locks.
*
* \note This function will not block.
*
* \param[in,out] ps Portset handle, which will be reset to NULL.
*
***********************************************************************
*/
void vmk_PortsetRelease(vmk_Portset **ps);
/*
***********************************************************************
* vmk_PortsetAddResPool -- */ /**
*
* \brief Create a resource pool.
*
* \note This function will not block.
*
* \param[in] psName Portset name.
* \param[in] poolName Pool name.
* \param[out] poolID Resource pool identifier
*
* \retval VMK_OK the resource pool has been created
* \retval VMK_EXISTS the resource pool already exists
* \retval VMK_LIMIT_EXCEEDED the limit of resource pools on the host
* is reached
* \retval VMK_NO_MEMORY allocation failure
* \retval VMK_BAD_PARAM input params are not valid
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetAddResPool(const char *psName,
const char *poolName,
vmk_PortsetResPoolID *poolID);
/*
***********************************************************************
* vmk_PortsetRemoveResPool -- */ /**
*
* \brief Remove a resource pool.
*
* \note This function will not block.
*
* \param[in] poolID Resource pool identifier
*
* \retval VMK_OK the resource pool has been removed
* \retval VMK_NOT_FOUND the resource pool does not exist
* \retval VMK_BUSY users are still using the resource pool
* \retval VMK_BAD_PARAM input params are not valid
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetRemoveResPool(vmk_PortsetResPoolID poolID);
/*
***********************************************************************
* vmk_PortsetGetResPoolTag -- */ /**
*
* \brief Retrieve the tag.
*
* Retrieves the tag of a given resource pool and increment its
* associated users reference counter.
*
* \note This function will not block.
*
* \param[in] poolID Resource pool identifier
*
* \retval vmk_PortsetResPoolTag resource pool exists
* \retval VMK_PORTSET_INVALID_RESPOOL_TAG otherwise
* \retval VMK_BAD_PARAM input params are not valid
***********************************************************************
*/
vmk_PortsetResPoolTag vmk_PortsetGetResPoolTag(vmk_PortsetResPoolID poolID);
/*
***********************************************************************
* vmk_PortsetPutResPoolTag -- */ /**
*
* \brief Release the resource pool.
*
* Releases the resource pool associated the given tag and decrement
* the users reference counter.
*
* \note This function will not block.
*
* \param[in] poolTag Resource pool tag
*
* \retval VMK_OK the resource pool tag is valid
* \retval VMK_BAD_PARAM input params are not valid
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPutResPoolTag(vmk_PortsetResPoolTag poolTag);
/*
***********************************************************************
* vmk_PortsetPortApplyResPoolCfg -- */ /**
*
* \brief Apply a resource pool configuration to a port.
*
* Old configuraion if existing, is overwritten on success and may be
* lost on failure. Values outside the range allowed by system max values
* are substituted with system max values.
*
* \note Currently only supported on uplink port, future version
* might start supporting it on more port types.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified port.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] poolID Pool ID of the aimed resource pool.
* \param[in] poolCfg Resource pool configuration.
*
* \retval VMK_OK The configuration has been
* applied.
* \retval VMK_NOT_FOUND The resource pool cannot be
* found.
* \retval VMK_NO_MEMORY Allocation failure.
* \retval VMK_BAD_PARAM Input params are not valid.
* \retval VMK_FAILURE Resource pool scheduling not
* activated on the port
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
* \retval VMK_NOT_SUPPORTED Port type is not supported.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPortApplyResPoolCfg(vmk_SwitchPortID portID,
vmk_PortsetResPoolID poolID,
vmk_PortsetResPoolCfg *poolCfg);
/*
***********************************************************************
* vmk_PortsetPortRemoveResPoolCfg -- */ /**
*
* \brief Remove a resource pool configuration from a port.
*
* \note Currently only supported on uplink port, future version
* might start supporting it on more port types.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified port.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] poolID Pool ID of the aimed resource pool.
*
* \retval VMK_OK The configuration has been
* removed.
* \retval VMK_NOT_FOUND The resource pool cannot be
* found.
* \retval VMK_BAD_PARAM Input params are not valid.
* \retval VMK_FAILURE Resource pool scheduling not
* activated on the port
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
* \retval VMK_NOT_SUPPORTED Port type is not supported.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPortRemoveResPoolCfg(vmk_SwitchPortID portID,
vmk_PortsetResPoolID poolID);
/*
***********************************************************************
* vmk_PortsetPortGetResPoolStats -- */ /**
*
* \brief Get resource pool stats.
*
* \note Currently only supported on uplink port, future version
* might start supporting it on more port types.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified port.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] poolID Pool ID of the aimed resource pool.
* \param[out] poolStats Resource pool stats.
*
* \retval VMK_OK Stats successfully returned.
* \retval VMK_NOT_FOUND The resource pool cannot be
* found.
* \retval VMK_BAD_PARAM Input params are not valid.
* \retval VMK_FAILURE Resource pool scheduling not
* activated on the port
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
* \retval VMK_NOT_SUPPORTED Port type is not supported.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPortGetResPoolStats(vmk_SwitchPortID portID,
vmk_PortsetResPoolID poolID,
vmk_PortsetResPoolStats *poolStats);
/*
***********************************************************************
* vmk_PortsetActivateResPoolsSched -- */ /**
*
* \brief Activate resource pools scheduling on portset.
*
* \note This function will not block.
*
* \param[in] ps Mutable portset handle.
*
* \retval VMK_OK Resource pools scheduling
* activated.
* \retval VMK_NO_MEMORY Allocation failure.
* \retval VMK_BAD_PARAM Input params are not valid
* \retval VMK_NOT_FOUND Portset not found.
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetActivateResPoolsSched(vmk_Portset *ps);
/*
***********************************************************************
* vmk_PortsetDeactivateResPoolsSched -- */ /**
*
* \brief Deactivate resource pools scheduling on portset. Applied
* resource pools configuration on the ports won't be persisted.
*
* \note This function will not block.
*
* \param[in] ps Mutable portset handle.
*
* \retval VMK_OK Resource pools scheduling
* activated.
* \retval VMK_NO_MEMORY Allocation failure.
* \retval VMK_BAD_PARAM Input params are not valid
* \retval VMK_NOT_FOUND Portset not found.
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetDeactivateResPoolsSched(vmk_Portset *ps);
/*
***********************************************************************
* vmk_PortsetPortActivateResPoolsSched -- */ /**
*
* \brief Activate resource pools scheduling on a port.
*
* \note Currently only supported on uplink port, future version
* might start supporting it on more port types.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified port.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK Resource pools scheduling
* activated.
* \retval VMK_BAD_PARAM Input params are not valid.
* \retval VMK_NO_MEMORY Allocation failure.
* \retval VMK_NOT_SUPPORTED Port type is not supported.
* \retval VMK_NOT_FOUND The specified port was not
* found.
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPortActivateResPoolsSched(vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetPortDeactivateResPoolsSched -- */ /**
*
* \brief Deactivate resource pools.
*
* This function deactivates resource pools scheduling on a port.
* Resource pools configuration on the port won't be persisted.
*
* \note Currently only supported on uplink port, future version
* might start supporting it on more port types.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified port.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK Resource pools scheduling
* activated.
* \retval VMK_BAD_PARAM Input params are not valid.
* \retval VMK_NO_MEMORY Allocation failure.
* \retval VMK_NOT_SUPPORTED Port type is not supported.
* \retval VMK_NOT_FOUND The specified port was not
* found.
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPortDeactivateResPoolsSched(vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetSize -- */ /**
*
* \brief Retrieve the number of ports in a portset.
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset
*
* \retval vmk_uint32 Number of ports in portset, or 0 on
* failure.
***********************************************************************
*/
vmk_uint32 vmk_PortsetSize(vmk_Portset *ps);
/*
***********************************************************************
* vmk_PortsetNotifyChange -- */ /**
*
* \brief Send an event to notify the change of a portset property.
*
* It is not required that all runtime property updates need accompanying
* events, the guidelines to generate events should be -
* 1) if there is a user visible screen for the property.
* 2) if there is some reason that the state needs to be persisted right
* away.
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset
* \param[in] eventType Type of event
* \param[in] data Data for the event (only for
* VMK_PORTSET_EVENT_NUMACCESSPORT_CHANGE)
*
* \retval VMK_OK Event notified successfully.
* \retval VMK_NOT_FOUND Portset cannot be found.
* \retval VMK_NO_MEMORY Could not allocate memory.
* \retval VMK_LIMIT_EXCEEDED Data longer than expected.
* \retval VMK_NOT_SUPPORTED Event type not supported.
* \retval VMK_BAD_PARAM NumAccessPorts is bigger than portset size
* or numAccessPorts is less than number of
* connected access ports or numAccessPorts
* is zero.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetNotifyChange (vmk_Portset *ps,
vmk_uint32 eventType,
void *data);
/*
***********************************************************************
* vmk_PortsetPortIndex -- */ /**
*
* \brief Retrieve the index of a port in the portset.
*
* \note The caller must hold a handle for the portset
* associated with the specified port.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of the virtual port
* \param[out] index Index of the port on its portset.
*
* \retval VMK_OK Success.
* \retval VMK_NOT_FOUND There is no port with the given portID.
* \retval VMK_BAD_PARAM Invalid portID or index is NULL.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPortIndex(vmk_SwitchPortID portID,
vmk_uint32 *index);
/*
***********************************************************************
* vmk_PortsetGetPortFromIndex -- */ /**
*
* \brief Retrieve the port in the portset given an index
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset.
* \param[in] index The index of the port in the portset
* \param[out] portID Numeric ID of the virtual port
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Either ps or portID is NULL.
* \retval VMK_NOT_FOUND The index is out of bounds for this
* portset.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetGetPortFromIndex(vmk_Portset *ps,
vmk_uint32 index,
vmk_SwitchPortID *portID);
/*
***********************************************************************
* vmk_PortFunction -- */ /**
*
* \brief Callback type for function called by vmk_PortsetForAllPorts.
*
* \note The portset handle is the same one that was passed to
* vmk_PortsetForAllPorts().
*
* \note This function must not release the portset handle.
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset.
* \param[in] portID Numeric ID of a virtual port
* \param[in] arg User-specified argument for operation
* (callback context cookie)
*
* \retval VMK_OK Success.
* \retval Other status Implementation specific error code.
***********************************************************************
*/
typedef VMK_ReturnStatus vmk_PortFunction(vmk_Portset *ps,
vmk_SwitchPortID portID,
void *arg);
/*
***********************************************************************
* vmk_PortsetForAllPorts -- */ /**
*
* \brief Iterate over all in-use ports.
*
* This function iterates over all in-use ports on the specified portset,
* calling the specified function on each port.
*
* \note This function will abort port traversal if func returns any
* value other than VMK_OK.
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset
* \param[in] func Operation to be performed
* \param[in] arg User-specified callback context cookie,
* passed to func for each port
*
* \retval VMK_OK If func returns VMK_OK on all ports.
* \retval VMK_BAD_PARAM Either ps or func is NULL.
* \retval Other status Implementation specific error code from
* func.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetForAllPorts(vmk_Portset *ps,
vmk_PortFunction *func,
void *arg);
/*
***********************************************************************
* vmk_PortsetName -- */ /**
*
* \brief Retrieve the portset name.
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset
*
* \retval char* Portset name string
***********************************************************************
*/
char *vmk_PortsetName(vmk_Portset *ps);
/*
***********************************************************************
* vmk_PortsetPrivDataSet -- */ /**
*
* \brief Set per-portset private data
*
* Only one private data can be set in each portset.
*
* Any module using this API must destroy the private data and call
* vmk_PortsetPrivDataSet to set portset private data to NULL, if
* private data is no longer used (i.e. before setting a new privData,
* during portset deactivate).
*
* \note The caller must hold a mutable portset handle.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset
* \param[in] data Memory location of private data
*
* \retval VMK_OK Private data is
* successfully set
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
* \retval VMK_EXISTS Private data is already set
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetPrivDataSet(vmk_Portset *ps, void *data);
/*
***********************************************************************
* vmk_PortsetPrivDataGet -- */ /**
*
* \brief Get per-portset private data
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset
*
* \retval void * Pointer to memory location of private data
***********************************************************************
*/
void *vmk_PortsetPrivDataGet(vmk_Portset *ps);
/*
***********************************************************************
* vmk_PortPrivDataSet -- */ /**
*
* \brief Set per-port private data.
*
* Only one private data can be set on each port.
*
* This API should be called during port reserve or connect time
* (i.e. in portset callbacks).
* The destructor is optional. If provided, the destructor will be
* called to free the existing private data during
* (1) port unreserve time and (2) setting a new private data
* on the port
*
* If caller does not provide destructor, caller must free private
* data explicitly in port unreserve callback. If caller wants to
* set new private data, it must first
* destroy previous private data and call vmk_PortsetPrivDataSet
* to reset existing private data and destructor to NULL. Otherwsie,
* there is memory leak in the old private data.
*
* \note The caller must hold a mutable portset handle for the
* portset associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] data Memory location of private data
* \param[in] destructor Optional destructor function
*
* \retval VMK_OK PrivData and destructor are
* succesfully set
* \retval VMK_NOT_FOUND portID is invalid or port
* not found
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
* \retval VMK_EXISTS Private data is already set
***********************************************************************
*/
VMK_ReturnStatus vmk_PortPrivDataSet(vmk_SwitchPortID portID, void *data,
vmk_PortPrivDataDestructor destructor);
/*
***********************************************************************
* vmk_PortPrivDataGet -- */ /**
*
* \brief Get per-port private data
*
* The caller must not cache private data or change its value without
* proper synchronization.
*
* \note If caller does not change value in private data, immutable
* portset handle should be acquired; Otherwise, mutable portset
* handle should be acquired.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[out] data Pointer to memory location of private data
*
* \retval VMK_OK Successfully get privData
* \retval VMK_NOT_FOUND portID is invalid or port not found
* \retval VMK_FAILURE The caller did not hold immutable or
* mutable portset handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortPrivDataGet(vmk_SwitchPortID portID,
void **data);
/*
***********************************************************************
* vmk_PortsetOpsSet -- */ /**
*
* \brief Setup portset callbacks.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] ops Pointer to structure containing callbacks
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Either ps or ops is NULL.
* \retval VMK_NOT_SUPPORTED The version specified in ops is not
* compatible with vmkernel.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetOpsSet(vmk_Portset *ps,
const vmk_PortsetOps *ops);
/*
***********************************************************************
* vmk_PortsetClassRegister -- */ /**
*
* \brief Register a portset class.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function will not block.
*
* \param[in] psClass A string identifying the implementation
* \param[in] activateFcn The activation callback for this class
*
* \retval VMK_OK
* \retval VMK_EXISTS The psClass is already registered
* \retval VMK_NO_RESOURCES No room for new portset classes
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetClassRegister(char *psClass,
vmk_PortsetActivate activateFcn);
/*
***********************************************************************
* vmk_PortsetClassUnregister -- */ /**
*
* \brief Register a portset class.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function will not block.
*
* \param[in] psClass The implementaiton class to unregister
*
* \retval VMK_OK
* \retval VMK_NOT_FOUND psClass not registered
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetClassUnregister(char *psClass);
/*
***********************************************************************
* vmk_PortOutput -- */ /**
*
* \brief Send a list of packets out of a port.
*
* This function can be used when a portset sends packets to a port
* for transmission. This function is intended for internal use by
* portset only. Other clients within VMkernel have to use
* vmk_PortInput() to inject packets and it is the portsets'
* responsibility to decide on which port packets will be sent out of.
*
* The VMkernel may apply further processing on packets (e.g. DVFilters)
* as part of vmk_PortOutput() before they are delivered to the port
* client.
*
* \note In case of mayModify being VMK_TRUE, on success or failure,
* the pktList will be cleared and all packets will be released.
*
* \note By setting mayModify to VMK_FALSE the portset can optimize
* performance in case it wants to pass the same PktList
* to multiple recipients. Note that mayModify set to VMK_FALSE
* does not imply that packets will reach the port client
* unmodified, as VMkernel may take (shallow) packet copies
* that it can modify and deliver those instead.
*
* \note This function should be called inside vmk_PortsetOps's callback
* functions.
*
* \note The caller must hold a handle for the porset associated
* with the specified portID. For performance reasons, it is
* recommended that this function be invoked with an immutable
* handle.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] pktList List of packets to send
* \param[in] mayModify If set to VMK_FALSE, VMkernel will not
* modify the PktList nor any of the
* contained packets. If set to VMK_TRUE,
* VMkernel is free to perform any
* modification.
*
* \retval VMK_OK The PktList is processed successfully
* \retval VMK_IS_DISABLED The port is disabled
* \retval VMK_NOT_FOUND PortID is invalid or port not found
* \retval VMK_NO_RESOURCES Allocation failure
* \retval Other status The PktList couldn't be delivered
***********************************************************************
*/
VMK_ReturnStatus vmk_PortOutput(vmk_SwitchPortID portID,
vmk_PktList pktList,
vmk_Bool mayModify);
/*
***********************************************************************
* vmk_PortInput -- */ /**
*
* \brief Send a list of packets into a port.
*
* The input is from the portset's pespective. The function is used when
* port client sends packets to portset. The packet list will be emptied
* on success or failure.
*
* The VMkernel may apply further processing on packets (e.g. DVFilters)
* as part of vmk_PortInput() before they are delivered to the portset.
*
* \note The caller must hold an immutable handle for the porset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] pktList List of packets to send
*
* \retval VMK_OK If the PktList is processed successfully
* \retval VMK_NOT_FOUND If the supplied port was invalid
* \retval VMK_IS_DISABLED If the port is disabled or blocked
* \retval Other status If the PktList cannot be processed
***********************************************************************
*/
VMK_ReturnStatus vmk_PortInput(vmk_SwitchPortID portID,
vmk_PktList pktList);
/*
***********************************************************************
* vmk_PortUpdateEthFRP -- */ /**
*
* \brief Update ethernet frame routing policy.
*
* This function may be used on ports that were created through the
* vmk_PortsetConnectPort() API. It is used to inform the portset
* implementation about the kind of ethernet packets, as specified in
* ethFilter, the port client expects to receive.
*
* \note The caller must hold a mutable portset handle for the
* portset associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] ethFilter Ethernet address filter
*
* \retval VMK_OK The new FRP is successfully installed.
* \retval VMK_BAD_PARAM ethFilter is not a valid ethernet
* address filter.
* \retval VMK_NOT_FOUND Port doesn't exist.
* \retval VMK_NO_MEMORY Allocation failure.
* \retval VMK_NO_PERMISSION This port was not created using
* vmk_PortsetConnectPort().
* \retval Other Failed to notify portset of new FRP.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortUpdateEthFRP(vmk_SwitchPortID portID,
vmk_EthFilter *ethFilter);
/*
***********************************************************************
* vmk_PortGetVMUUID -- */ /**
*
* \brief Query the VM UUID of the VM the port is attached to.
*
* \note Please call vmk_VMUUIDGetMaxLength() to size the buffer
* appropriately.
*
* \note VM UUIDs are identification numbers assigned to each VM.
*
* \note This UUID can change at run time, in which case the portset is
* notified by a VMK_PORT_UPDATE_VMUUID event that can be handled by
* the switch implementation in vmk_PortUpdate().
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Handle to a virtual port.
* \param[out] uuid Pointer to a buffer to fill in with the UUID.
* \param[in] len Length of the supplied buffer.
*
* \retval VMK_NOT_FOUND VM UUID could not be found.
* \retval VMK_NOT_INITIALIZED No VM UUID has been set for this VM.
* \retval VMK_BUF_TOO_SMALL Supplied buffer is too small.
* \retval VMK_BAD_PARAM NULL buffer or 0 length.
* \retval VMK_OK Success.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortGetVMUUID(vmk_SwitchPortID portID,
vmk_UUID uuid,
vmk_ByteCount len);
/*
***********************************************************************
* vmk_PortsetClaimHiddenUplink -- */ /**
*
* \brief Claim hidden uplink devices.
*
* Hidden uplink devices are uplink devices used by portset implementation
* to perform I/O, but are not visible to management plane.
*
* Vmkernel will connect the claimed hidden uplinks to the portset.
* Vmkernel assumes that only one portset instance will claim hidden
* uplinks.
*
* \note Only hidden devices with VMK_UPLINK_CAP_UPT capability are
* allowed to be claimed. This API is only for certain devices
* that expose hidden uplinks to vmkernel. Regular
* uplinks must be connected through the management.
*
* \note This function should be called in the portset activate
* callback before vNIC/vmknic are connected to portset.
*
* \note During portset deactivate, the claimed hidden uplinks will be
* disconnected by vmkernel. No additional call is needed.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] uplinkCap Capabilities of hidden uplinks.
*
* \retval VMK_BAD_PARAM Ps is NULL or uplinkCap is zero
* \retval VMK_FAILURE No hidden uplink successfully connected
* to the portset
* \retval VMK_NOT_SUPPORTED UplinkCap is not accepted for claiming
* \retval VMK_OK One or more hidden uplinks succeed to
* connect to portset
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetClaimHiddenUplink(vmk_Portset *ps,
vmk_uint32 uplinkCap);
/*
***********************************************************************
* vmk_PortsetFindUplinkPort -- */ /**
*
* \brief Find the first connected uplink port.
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset
* \param[out] portID Numeric port ID of the uplink port.
*
* \retval VMK_OK Success.
* \retval VMK_NOT_FOUND No connected team uplink port.
* \retval VMK_BAD_PARAM An argument is NULL.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetFindUplinkPort(vmk_Portset *ps,
vmk_SwitchPortID *portID);
/*
***********************************************************************
* vmk_PortsetReserveMgmtPort -- */ /**
*
* \brief Reserve an internal management port.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM The ps argument is NULL.
* \retval Other status Reserving/connecting the management
* port failed.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetReserveMgmtPort(vmk_Portset *ps);
/*
***********************************************************************
* vmk_PortsetGetMgmtPort -- */ /**
*
* \brief Retrieve the management port on a portset
*
* \note This function will not block.
*
* \param[in] ps Handle to a portset.
* \param[out] portID Numeric ID of a virtual port.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM Either ps or portID is NULL.
* \retval VMK_NOT_FOUND No management port reserved on this
* portset.
* \retval VMK_FAILURE The caller did not hold immutable or
* mutable portset handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetGetMgmtPort(vmk_Portset *ps,
vmk_SwitchPortID *portID);
/*
***********************************************************************
* vmk_PortsetPortRxFunc -- */ /**
*
* \brief Callback that is invoked upon reception of packets on a port.
*
* The callback is free to perform any modification to the passed in
* pktList and the packets contained within it.
*
* Any packet still left on the pktList when this function returns is
* released, regardless of success or failure of the function.
*
* \note This function will not block.
*
* \param[in] ps Immutable handle to a portset.
* \param[in] portID Numeric ID of the port.
* \param[in] fxFuncData Private data that was provided to
* vmk_PortsetConnectPort().
* \param[in] pktList List of received packets.
*
* \return VMK_ReturnStatus Ignored.
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_PortsetPortRxFunc)(vmk_Portset *ps,
vmk_SwitchPortID portID,
void *rxFuncData,
vmk_PktList pktList);
/*
***********************************************************************
* vmk_PortsetConnectPort -- */ /**
*
* \brief Connect a port to the given portset and enable the port.
*
* The port starts enabled, but possibly blocked by the portset. The
* portset is free to block the port at any time. The portset is
* expected to honor the ports configuration and forward frames that
* match the Frame Routing Policy (FRP) of the port. However, the
* portset MAY choose to not honor it to satisfy stricter security
* policies. In the desire to improve interoperability, portsets
* MUST offer a way to turn off such a stricter security policies.
*
* \note The VMkernel is allowed to interpose processing of the packets
* between the port client and the portset (e.g. DVFilters)
*
* \note The fixedAddr value is just informational. Injected packets may
* use a different source MAC address, but the portset may use
* the fixedAddr to enforce strict security policies. Also, the
* portset is free to ignore this MAC address when delivering
* packets to this port client. The value of fixedAddr is used to
* set the initial FRP (see vmk_PortUpdateEthFRP()), but the FRP
* can be changed later.
*
* \note No multicast or broadcast addresses are allowed for fixedAddr
*
* \note May be called during vmk_PortsetActivate()
*
* \note While the port can be disconnected explicitly by calling
* vmk_PortsetDisconnectPort(), it will also automatically be
* disconnected if the portset is destroyed. In order to properly
* manage the lifetime of rxFuncData, it is recommended to use a
* port property and call vmk_PortsetDisconnectPort() during its
* clear() callback to do the cleanup.
*
* \note This function will not block.
*
* \param[in] ps Mutable handle to a portset.
* \param[in] clientName Client name of the port. Used for display
* purposes only. Must not be NULL.
* \param[in] fixedAddr MAC address of this port client. Injected
* packets may use different source MAC
* addresses.
* \param[in] rxFunc Callback that is invoked when the port
* client receives packets
* \param[in] rxFuncData This value is passed back to the rxFunc
* on every invocation
* \param[out] portID Pointer to vmk_SwitchPortID, to be updated
* with the portID of the newly connect port
*
* \retval VMK_OK Successfully connected to port
* \retval VMK_BAD_PARAM Invalid parameter supplied
* \retval Other status Failed to connect to port
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetConnectPort(vmk_Portset *ps,
vmk_PortClientName clientName,
vmk_EthAddress fixedAddr,
vmk_PortsetPortRxFunc rxFunc,
void *rxFuncData,
vmk_SwitchPortID *portID);
/*
***********************************************************************
* vmk_PortsetDisconnectPort -- */ /**
*
* \brief Disonnect a port to the given portset.
*
* This function may be used on ports that were created through the
* vmk_PortsetConnectPort() API. It's typically called at VDS destroy time.
*
* \note The caller must hold a mutable portset handle for the
* portset associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
*
* \retval VMK_OK Success.
* \retval VMK_NO_PERMISSION This port was not created using
* vmk_PortsetConnectPort().
* \retval Other status Failed to disconnect to port.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetDisconnectPort(vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortsetSchedSamplingActive -- */ /**
*
* \brief Get whether system service accounting is active.
*
* \note This function will not block.
*
* \retval VMK_TRUE system service accounting is active
* \retval VMK_FALSE system service accouting is inactive
***********************************************************************
*/
vmk_Bool vmk_PortsetSchedSamplingActive(void);
/*
***********************************************************************
* vmk_PortsetSchedBillToPort -- */ /**
*
* \brief Set the current port that is billed for Rx processing.
*
* In order for Rx packet processing to be accounted properly, the portset
* implementation must use this API to notify the scheduling subsystem
* which port to bill for all the Rx processing.
*
* \note This function must be called inside vmk_PortsetOps's dispatch
* callback. After dispatching all packets, dispatch callback can
* use a random algorithm to select a port from all destination
* ports of packets, and provide the selected portID to this function.
*
* \note Before calling this function, vmk_PortsetSchedSamplingActive()
* must be called to check whether system account is active. If
* sampling is not active, there is no need to call
* vmk_PortsetSchedBillToPort().
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] totalNumPkts Number of packets currently being processed
*
* \retval VMK_OK Successfully billed packet count to port.
* \retval VMK_NOT_FOUND Port was not found.
* \retval VMK_BAD_PARAM The totalNumPkts argument is 0.
* \retval Other status Failed to bill packet count to port.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetSchedBillToPort(vmk_SwitchPortID portID,
vmk_uint64 totalNumPkts);
/*
***********************************************************************
* vmk_PortBlock -- */ /**
*
* \brief Disallow I/O traffic through a port.
*
* Portset implementations call this interface to stop traffic.
*
* \param[in] portID Numeric ID of a virtual port
*
* \note This function may fail for reasons not listed below
* due to errors in 3rd party modules invoked during the operation.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \retval VMK_OK Operation was successful
* \retval VMK_NO_MEMORY Insufficient memory to complete the operation
***********************************************************************
*/
VMK_ReturnStatus vmk_PortBlock(vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortUnblock -- */ /**
*
* \brief Allow I/O traffic through a port.
*
* A port always starts blocked following portset creation.
* Portset implementations call this interface when ready to
* accept traffic. This applies to uplink ports as well as ports
* connected to virtual NICs.
*
* \note This function may fail for reasons not listed below
* depending on the portset implementation.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
*
* \retval VMK_OK
* \retval VMK_NO_MEMORY Insufficient memory to complete the operation
***********************************************************************
*/
VMK_ReturnStatus vmk_PortUnblock(vmk_SwitchPortID portID);
/*
***********************************************************************
* vmk_PortGetFRP -- */ /**
*
* \brief Retrieve ethernet frame routing policy on a port.
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[out] ethFRP Ethernet frame routing policy on port
*
* \retval VMK_OK Successfully get port ethFRP
* \retval VMK_NOT_FOUND Portset is not active or port not found
* \retval VMK_BAD_PARAM The ethFRP argument is NULL.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortGetFRP(vmk_SwitchPortID portID,
vmk_EthFRP *ethFRP);
/*
***********************************************************************
* vmk_PortIsOutputActive -- */ /**
*
* \brief Check if a port permit outgoing traffic.
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[out] isActive Whether output traffic is permitted
*
* \retval VMK_OK Successfully get port's active state
* \retval VMK_NOT_FOUND Portset is not active or port is not found
***********************************************************************
*/
VMK_ReturnStatus vmk_PortIsOutputActive(vmk_SwitchPortID portID,
vmk_Bool *isActive);
/*
***********************************************************************
* vmk_PortIsUplink -- */ /**
*
* \brief Check if a port is connected to an uplink.
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Port identifier
* \param[out] isUplink VMK_TRUE if this is an uplink port,
* otherwise VMK_FALSE.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM isUplink is NULL.
* \retval VMK_NOT_FOUND Couldn't find a port with a matching
* port identifier.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortIsUplink(vmk_SwitchPortID portID,
vmk_Bool *isUplink);
/*
***********************************************************************
* vmk_PortGetUplink -- */ /**
*
* \brief Get the underlying uplink of a port.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] uplink Pointer to hold the associated uplink
*
* \retval VMK_OK Successfully found underlying uplink
* \retval VMK_BAD_PARAM if the port is not connected to an uplink
* \retval VMK_NOT_FOUND if the port id is not valid
***********************************************************************
*/
VMK_ReturnStatus vmk_PortGetUplink(vmk_SwitchPortID portID,
vmk_Uplink *uplink);
/*
***********************************************************************
* vmk_PortLinkStatusSet -- */ /**
*
* \brief Set link status of vNic connected to a port.
*
* vNetwork admin may disable/enable a virtual port. When this
* happens, the portset implementation calls this interface to
* notify guest vNic that link is down and I/O traffic is no
* longer flowing. The link down status will be visible to the
* guest administrator. If the port is not connected to a VM's vNic,
* the interface is a no-op.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port
* \param[in] linkUp Whether link should be up
*
* \retval VMK_OK Success.
* \retval VMK_NOT_FOUND The specified port was not found.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortLinkStatusSet(vmk_SwitchPortID portID,
vmk_Bool linkUp);
/*
***********************************************************************
* vmk_PortClientNameGet -- */ /**
*
* \brief Get name of the client connected to the port.
*
* The client name string should be used for display and debugging
* purposes only; it should not be parsed. The string is valid for the
* lifetime of the ephemeral port.
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \note Port client name is configured at port connect time. If this
* function is called in portReserve callback, VMK_NOT_FOUND
* may be returned.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] clientName The buffer for the NULL-terminated client
* name string.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM An argument is NULL.
* \retval VMK_NOT_FOUND The port was not found or the port has
* not set client name
***********************************************************************
*/
VMK_ReturnStatus vmk_PortClientNameGet(vmk_SwitchPortID portID,
vmk_PortClientName clientName);
/*
***********************************************************************
* vmk_PortClientFixedEthAddrGet -- */ /**
*
* \brief Get fixed mac address of the client connected to the port.
*
* Called from portset implementation to get VM's mac address assigned
* by vSphere admin. The returned information is owned by framework
* and remains valid while the port is connected. The VM cannot change
* the "fixed" mac address, but is free to send packets with different
* source mac addresses. The fixed mac address is typically used to
* enforce security policies, such as preventing mac address forging.
*
* \note The caller must hold a handle for the portset
* associated with the specified portID.
*
* \note This function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] addr Buffer to hold ethernet address
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM The provided addr is NULL.
* \retval VMK_NOT_FOUND Couldn't find a port with a matching port
* identifier.
***********************************************************************
*/
VMK_ReturnStatus vmk_PortClientFixedEthAddrGet(vmk_SwitchPortID portID,
vmk_EthAddress addr);
/**
* \brief Handle for a vDS Portset Client.
*/
typedef struct VDSPortsetClient *vmk_VDSPortsetClient;
/**
* \brief Flags passed to VDSClient Portset/Port ops.
*/
typedef enum {
/** None */
VMK_VDS_CLIENT_OPS_FLAG_NONE = 0x0,
/** Ops flags for calls within an initialization */
VMK_VDS_CLIENT_OPS_FLAG_INIT = 0x1,
/** Ops flags for calls within a cleanup */
VMK_VDS_CLIENT_OPS_FLAG_CLEANUP = 0x2,
} vmk_VDSClientOpsFlags;
/*
***********************************************************************
* vmk_VDSPortsetClientWrite -- */ /**
*
* \brief Write callback for a portset property of a VDS Portset client.
*
* \note This function will not block.
*
* \param[in] ps Mutable portset handle.
* \param[in] dataName Data name (name of portset property)
* \param[in] data Data to set for name
* \param[in] dataLen Length of data
* \param[in] flags Flags
*
* \retval VMK_OK Portset client accepts value written to dataName
* \retval Other status Portset client does not accept change of dataName value
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_VDSPortsetClientWrite)(
vmk_Portset *ps,
char *dataName,
void *data, int dataLen,
vmk_VDSClientOpsFlags flags);
/*
************************************************************************
* vmk_VDSPortsetClientBlockableWrite -- */ /**
*
* \brief Write callback for a portset property of a VDS Portset client.
*
* This callback is invoked in a blockable context, but it should not
* take more than a reasonable amount of time (a few seconds). This
* callback can only be implemented on selected properties defined
* by VMware.
*
* \note vDS properties may be queried from this callback, but they may
* not be set or cleared.
*
* \note This function may block.
*
* \param[in] psName Portset name.
* \param[in] dataName Data name (name of portset property)
* \param[in] data Data to set for name
* \param[in] dataLen Length of data
* \param[in] flags Flags
*
************************************************************************
*/
typedef void (*vmk_VDSPortsetClientBlockableWrite)(const char *psName,
char *dataName,
void *data,
int dataLen,
vmk_VDSClientOpsFlags flags);
/*
***********************************************************************
* vmk_VDSPortsetClientClear -- */ /**
*
* \brief Clear callback for a portset property of a VDS Portset client.
*
* \note This callback is invoked from a non-blockable context, even for
* blockable properties.
*
* \note This function will not block.
*
* \param[in] ps Mutable portset handle.
* \param[in] dataName Data name (name of portset property)
*
* \retval VMK_OK Portset client accepts clear of property value
* \retval Other status Portset client does not accept clear of property value
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_VDSPortsetClientClear)(vmk_Portset *ps,
char *dataName);
/**
* \brief Argument structure for registering portset property handlers.
*/
typedef struct vmk_VDSPortsetClientOps {
/** handler for writes to non-blockable portset properties */
vmk_VDSPortsetClientWrite write;
/** handler for writes to blockable portset properties */
vmk_VDSPortsetClientBlockableWrite blockableWrite;
/** handler for clearing portset properties */
vmk_VDSPortsetClientClear clear;
} vmk_VDSPortsetClientOps;
/*
***********************************************************************
* vmk_VDSClientPortsetRegister -- */ /**
*
* \brief Register VDS Portset property handlers.
*
* \note At most one client may be registered for a given property (data
* name) on a given portset
*
* \note Clients for non-blockable properties must register write() and
* clear() callbacks. Clients for blockable properties must
* register blockableWrite() and clear() callbacks.
*
* \note We only support blockable callback for write operation of
* VMK_VDSPROP_HOST_PROXY_STATE property. All other callbacks
* for other properties cannot be registered as blockable.
*
* \note This function will not block.
*
* \param[out] client Ptr to handle for VDS Portset Client
* \param[in] psName Portset name
* \param[in] dataName Data name
* \param[in] ops VDSClient portset ops to use
* \param[in] blockable Whether write callback is blockable
*
* \retval VMK_OK VDSClient registered successfully
* \retval VMK_EXISTS A client already exists for the given
* portset & dataname
* \retval VMK_NO_MEMORY Insufficient memory to perform
* registration
* \retval VMK_BAD_PARAM A required callback is unspecified
* (NULL)
* \retval VMK_NOT_SUPPORTED The specified portset client cannot be
* registered as blockable
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSClientPortsetRegister(vmk_VDSPortsetClient *client,
const char *psName,
const char *dataName,
const vmk_VDSPortsetClientOps *ops,
vmk_Bool blockable);
/*
***********************************************************************
* vmk_VDSClientPortsetUnregister -- */ /**
*
* \brief Unregister VDS Portset property handlers.
*
* \note This function will not block.
*
* \param[in] client Handle for VDS Portset Client
*
* \retval VMK_OK VDSClient unregistered successfully
* \retval VMK_NOT_FOUND The specified client does not exist
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSClientPortsetUnregister(vmk_VDSPortsetClient client);
/**
* \brief Handle for a VDSClient Port Client.
*/
typedef struct VDSPortClient *vmk_VDSPortClient;
/*
***********************************************************************
* vmk_VDSPortClientWrite -- */ /**
*
* \brief Write callback for a port property of a VDS client.
*
* \note Refer to the documentation for vmk_VDSPortDataSet()
* for a description of how this callback is used.
*
* \note This callback cannot block.
*
* \param[in] ps Mutable portset handle.
* \param[in] portID Port ID
* \param[in] dataName Data name
* \param[in] data Data to set for name
* \param[in] dataLen Length of data
* \param[in] flags Flags
*
* \retval VMK_OK Port client accepts value change of the
* data name (property) on the port
* \retval Other status Port client does not accept the value change
* of the data name (property) on the port
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_VDSClientPortWrite)(vmk_Portset *ps,
vmk_SwitchPortID portID,
char *dataName, void *data,
int dataLen,
vmk_VDSClientOpsFlags flags);
/*
***********************************************************************
* vmk_VDSClientPortRead -- */ /**
*
* \brief Read callback for a port property of a VDS client.
*
* \note Refer to the documentation for vmk_VDSPortDataGet()
* for a description of how this callback is used.
*
* \note This callback cannot block.
*
* \param[in] ps Immutable portset handle.
* \param[in] portID Port ID
* \param[in] dataName Data name
* \param[in] data Data to set for name
* \param[in] dataLen Length of data
* \param[in] flags Flags
*
* \retval VMK_OK Port client successfully retrieved value of
* the data name (property) on the port
* \retval Other status Port client could not retrieve the value
* of the specified data name (property) on
* the port
***********************************************************************
*/
typedef VMK_ReturnStatus (*vmk_VDSClientPortRead)(vmk_Portset *ps,
vmk_SwitchPortID portID,
char *dataName, void *data,
int dataLen,
vmk_VDSClientOpsFlags flags);
/*
***********************************************************************
* vmk_VDSClientPortPoll -- */ /**
*
* \brief Poll callback for a port property of a VDS client.
*
* \note Refer to the documentation for vmk_VDSPortDataGet()
* for a description of how this callback is used.
*
* \note This callback cannot block.
*
* \param[in] ps Immutable portset handle.
* \param[in] portID Port ID
* \param[in] dataName Data name
* \param[out] dataLenPtr Ptr to length of data available to be read
*
* \retval VMK_TRUE If the specified data name (property)
* has a new value to be read; in this case
* *dataLenPtr is set to the length of
* the data available to be read.
* \retval VMK_FALSE If the specified data name (property)
* has no new data value to be read.
***********************************************************************
*/
typedef vmk_Bool (*vmk_VDSClientPortPoll)(vmk_Portset *ps,
vmk_SwitchPortID portID,
char *dataName, int *dataLengthPtr);
/*
***********************************************************************
* vmk_VDSClientPortCleanup -- */ /**
*
* \brief Cleanup callback for a port property of a VDS client.
*
* \note This callback is called when disabling a port, or when an
* enable operation fails; it should clean up and free any
* resources associated with the specified data name (port
* property) for the specified port.
*
* \note This callback cannot block.
*
* \param[in] ps Mutable portset handle.
* \param[in] portID Port ID
* \param[in] dataName Data name
*
* \return None No return value
***********************************************************************
*/
typedef void (*vmk_VDSClientPortCleanup)(vmk_Portset *ps,
vmk_SwitchPortID portID,
char *dataName);
/**
* \brief Argument structure when registering port property handlers
*/
typedef struct vmk_VDSPortClientOps {
/**
* Mandatory handler for writing to port properties.
*/
vmk_VDSClientPortWrite write;
/**
* Optional handler for reading port properties.
*/
vmk_VDSClientPortRead read;
/**
* Optional handler for polling port properties; must be provided if
* a read callback is provided.
*/
vmk_VDSClientPortPoll poll;
/**
* Optional handler for cleaning up port properties.
*/
vmk_VDSClientPortCleanup cleanup;
} vmk_VDSPortClientOps;
/*
***********************************************************************
* vmk_VDSClientPortRegister -- */ /**
*
* \brief Register Port Operations for a VDS Client.
*
* \note At most one client may be registered for a given property
* (data name) on a specified port and portset.
*
* \note This function will not block.
*
* \param[out] client Ptr to handle for VDS Port Client
* \param[in] psName Portset name
* \param[in] dataName Data name
* \param[in] ops VDSClient port ops to use
*
* \retval VMK_OK VDSClient registered successfully
* \retval VMK_EXISTS A client already exists for the given
* portset & dataName
* \retval VMK_NO_MEMORY Insufficient memory to perform
* registration
* \retval VMK_BAD_PARAM A required callback is unspecified (NULL)
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSClientPortRegister(vmk_VDSPortClient *client,
const char *psName,
const char *dataName,
const vmk_VDSPortClientOps *ops);
/*
***********************************************************************
* vmk_VDSClientPortUnregister -- */ /**
*
* \brief Unregister a VDS Port Client.
*
* \note This function will not block.
*
* \param[in] client Handle for VDS Port Client
*
* \retval VMK_OK VDSClient unregistered successfully
* \retval VMK_NOT_FOUND The specified client does not exist
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSClientPortUnregister(vmk_VDSPortClient client);
/*
***********************************************************************
* vmk_VDSHostPropLookup -- */ /**
*
* \brief Lookup a host property by name.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function may block.
*
* \param[in] psName Portset name.
* \param[in] dataName Name of data item to look up
* \param[out] dataValue Pointer to block of data to associated
* with the name
* \param[out] dataLength Length of the block at dataValue
*
* \retval VMK_OK Success; in this case *entryp is updated
* \retval VMK_NOT_FOUND The switch or specified property cannot
* be found.
* \retval VMK_BAD_PARAM The provided psName, dataName, dataValue
* or dataLength is invalid
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSHostPropLookup(const char *psName,
const char *dataName,
void **dataValue,
vmk_uint32 *dataLength);
/*
***********************************************************************
* vmk_VDSHostPropSet -- */ /**
*
* \brief Set a host property (name, value) pair.
*
* The property value to be set must not be NULL; dataLength should
* not be zero; dataName should not be empty. To clean up property
* value, use vmk_VDSHostPropClear.
*
* \note This operation will call the VDS portset client's
* vmk_VDSPortsetClientWrite() callback to set the value of the
* property. If this succeeds, the value written will also be
* saved in the cache.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function may block.
*
* \param[in] psName Portset name.
* \param[in] dataName Name of the data item to set
* \param[in] dataValue Pointer to block of data to associated
* with the name
* \param[in] dataLength Length of the block at dataValue
*
* \retval VMK_OK Success; the host property (name, value)
* pair has been updated
* \retval VMK_NOT_FOUND The switch cannot be found.
* \retval VMK_BAD_PARAM The provided psName, dataName, dataValue
* or dataLength is invalid
* \retval VMK_NO_MEMORY Insufficient memory for storing the
* (name, value) pair
* \retval Other status vmk_VDSPortsetClientWrite callback failed
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSHostPropSet(const char *psName,
const char *dataName,
const void *dataValue,
vmk_uint32 dataLength);
/*
***********************************************************************
* vmk_VDSHostPropClear -- */ /**
*
* \brief Clear host property with specified data name
*
* \note This operation will call the VDS portset client's
* vmk_VDSPortsetClientClear() callback to clear the value of the
* property. If succeeds, the portset client for this property
* will be removed.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function may block.
*
* \param[in] psName Portset name.
* \param[in] dataName Name of the data item to clear
*
* \retval VMK_OK Success; the host property with dataName
* has been cleared
* \retval VMK_NOT_FOUND The switch or named data cannot be found.
* \retval VMK_BAD_PARAM The provided psName or dataName is
* invalid
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSHostPropClear(const char *psName,
const char *dataName);
/*
***********************************************************************
* vmk_VDSHostStatusSet -- *//**
*
* \brief Set VDS host status and display string.
*
* The display string will be copied inside the function, and the
* copied string will be propogated to Virtual Center in events.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function may block.
*
* \param[in] psName Portset name.
* \param[in] vdsStatus VDS Host status to be set
* \param[in] displayStr Detailed status string less than
* 256 characters
*
* \retval VMK_OK Success; the host status has been updated
* \retval VMK_NOT_FOUND VDS is not found
* \retval VMK_NAME_TOO_LONG displayStr is longer than 256 characters
* \retval VMK_FAILURE Failure; host status has not been updated
* \retval VMK_NO_MEMORY No memory
* \retval VMK_BAD_PARAM The provided psName or displayStr is
* invalid
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSHostStatusSet(const char *psName,
vmk_VDSHostStatus vdsStatus,
const char *displayStr);
/*
***********************************************************************
* vmk_VDSPortDataGet -- */ /**
*
* \brief Get the value part of a specified port data (name, value) pair.
*
* This operation will call the VDS Port Client's
* vmk_VDSClientPortPoll() callback to find out if there
* is new data to be read. If so, the client's
* vmk_VDSClientPortRead() callback will be called to
* obtain the new data. This new data will also be
* saved in a cache. If the poll operation reports
* that new data is not available, then the previously
* cached value will be returned.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function may block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] dataName Name of port data.
* \param[out] dataValue Buffer for value to associated
* with the name.
* \param[out] dataLength Length of data returned.
*
*
* \retval VMK_OK Success; dataValuePtr and DataLengthPtr
* updated
* \retval VMK_BAD_PARAM The provided dataName, dataValue, or
* dataLength is invalid
* \retval VMK_NOT_FOUND The specified port cannot be found or
* the port is not associated with vds port;
* the named data cannot be found.
* \retval Other status vmk_VDSClientPortPoll or
* vmk_VDSClientPortRead callback failed
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSPortDataGet(vmk_SwitchPortID portID,
const char *dataName,
void **dataValue,
vmk_uint32 *dataLength);
/*
***********************************************************************
* vmk_VDSPortDataSet -- */ /**
*
* \brief Set a port data (name, value) pair.
*
* This operation will call the VDS Port Client's
* vmk_VDSClientPortWrite() callback to set the value
* of the property. If this succeeds, the value written
* will also be saved in the cache. See the description
* of vmk_VDSPortDataGet() and vmk_VDSPortDataClear().
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function may block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] dataName Name of port data
* \param[in] dataValue Value to associate with the name
* \param[in] dataLength Length of data
*
* \retval VMK_OK Success
* \retval VMK_BAD_PARAM The provided dataName, dataValue, or
* dataLength is invalid
* \retval VMK_NOT_FOUND The specified port cannot be found or
* port is not associated with vds port
* \retval VMK_FAILURE No value provided to associated with
* the name
* \retval VMK_NO_MEMORY Insufficient memory for storing the
* (name, value) pair
* \retval Other status vmk_VDSClientPortWrite callback failed
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSPortDataSet(vmk_SwitchPortID portID,
const char *dataName,
const void *dataValue,
vmk_uint32 dataLength);
/*
***********************************************************************
* vmk_VDSPortDataClear -- */ /**
*
* \brief Set a port data (name, value) pair.
*
* This operation will call the VDS Port Client's
* vmk_VDSClientPortCleanup() callback to clean up the property.
* If this succeeds, the property data will be removed from cache,
* and port client will also be removed.
*
* \note The caller must not hold any locks or portset handles.
*
* \note This function may block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] dataName Name of port data
*
* \retval VMK_OK Success
* \retval VMK_BAD_PARAM The provided dataName is invalid
* \retval VMK_NOT_FOUND The specified port or named data cannot
* be found.
* \retval VMK_FAILURE vmk_VDSClientPortCleanup callback returns
* failure or other failure conditions
* \retval Other status vmk_VDSClientPortCleanup callback failed
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSPortDataClear(vmk_SwitchPortID portID,
const char *dataName);
/*
***********************************************************************
* vmk_VDSLocalCachePortDataSet -- */ /**
*
* \brief Set port data in vDS host local cache.
*
* This API should be called during port reserve or connect
* time (i.e. in portset callbacks) in order to seed port property
* value.
*
* \note This operation will not call property client (i.e.
* vmk_VDSClientPortWrite()).
*
* \note The caller must hold a mutable handle for the portset.
*
* \note The function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] dataName Name of port data
* \param[in] dataValue Value to associate with the name
* \param[in] dataLength Length of data
*
* \retval VMK_OK Success
* \retval VMK_BAD_PARAM The provided dataName,
* dataValue, or dataLength is
* invalid
* \retval VMK_NOT_FOUND The specified port cannot be
* found or port is not
* associated with vds port
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
* \retval VMK_NO_MEMORY Insufficient memory for
* storing the (name, value) pair
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSLocalCachePortDataSet(vmk_SwitchPortID portID,
const char *dataName,
const void *dataValue,
vmk_uint32 dataLength);
/*
***********************************************************************
* vmk_VDSLocalCachePortDataGet -- */ /**
*
* \brief Get port data value from vDS host local cache.
*
* \note This operation will not call property client (i.e.
* vmk_VDSClientPortRead()).
*
* \note The caller must hold a mutable handle for the portset.
*
* \note The function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[in] dataName Name of port data
* \param[in] dataValue Value to associate with the name
* \param[in] dataLength Length of data
*
* \retval VMK_OK Success
* \retval VMK_NOT_FOUND The specified port or named
* data cannot be found.
* \retval VMK_BAD_PARAM The provided dataName,
* dataValue, or dataLength is
* invalid
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_VDSLocalCachePortDataGet(vmk_SwitchPortID portID,
const char *dataName,
void **dataValue,
vmk_uint32 *dataLength);
/*
***********************************************************************
* vmk_PortLookupVDSPortAlias -- *//**
*
* \brief Retrieves the vDS port alias for the specified ephemeral port.
*
* \note The port alias string is constant for the lifetime of the
* ephemeral port.
*
* \note If the vDS port alias is not configured, then this function
* will succeed and the string returned in vdsName will be
* "unknown".
*
* \note The caller must provide a buffer that is
* VMK_VDS_PORT_ALIAS_MAX_LEN bytes in length.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified portID.
*
* \note The function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] vdsPortAlias The buffer for the NULL-terminated vDS
* port alias string.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM An argument is NULL.
* \retval VMK_NOT_FOUND The vDS port or vDS port alias
* was not found
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortLookupVDSPortAlias(vmk_SwitchPortID portID,
char *vdsPortAlias);
/*
***********************************************************************
* vmk_PortLookupVDSPortID -- *//**
*
* \brief Retrieves the vDS port ID for the specified ephemeral port.
*
* \note The port ID string is constant for the lifetime of the
* ephemeral port.
*
* \note The caller must provide a buffer that is
* VMK_VDS_PORT_ID_MAX_LEN bytes in length.
*
* \note The caller must hold a mutable handle for the portset
* associated with the specified portID.
*
* \note The function will not block.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] vdsPortID The buffer for the NULL-terminated vDS port ID
* string.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM An argument is NULL.
* \retval VMK_NOT_FOUND The vDS port or vDS port ID
* was not found
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortLookupVDSPortID(vmk_SwitchPortID portID,
char *vdsPortID);
/*
***********************************************************************
* vmk_PortsetLookupVDSID -- *//**
*
* \brief Retrieves the vDS switch ID for the specified portset.
*
* \note The vDS switch ID is constant for the lifetime of the portset.
*
* \note The caller must provide a buffer that is VMK_VDS_ID_MAX_LEN
* bytes in length.
*
* \note The function will not block.
*
* \param[in] ps Mutable portset handle.
* \param[out] vdsID The buffer for the NULL-terminated vDS ID string.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM An argument is NULL.
* \retval VMK_NOT_FOUND There is no vDS associated with this portset
* or vDS switch ID was not found
* \retval VMK_FAILURE The caller did not hold a immutable/mutable
* handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetLookupVDSID(vmk_Portset *ps,
char *vdsID);
/*
***********************************************************************
* vmk_PortsetLookupVDSName -- *//**
*
* \brief Retrieves the vDS switch name for the specified portset.
*
* \note The vDS switch name is constant for the lifetime of the
* portset.
*
* \note If the vDS switch name is not configured, then this function
* will succeed and the string returned in vdsName will be
* "unknown".
*
* \note The caller must provide a buffer that is VMK_VDS_NAME_MAX_LEN
* bytes in length.
*
* \note The function will not block.
*
* \param[in] ps Mutable portset handle.
* \param[out] vdsName The buffer for the NULL-terminated vDS name
* string.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM An argument is NULL.
* \retval VMK_NOT_FOUND There is no vDS associated
* with this portset or vDS switch
* name was not found
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetLookupVDSName(vmk_Portset *ps,
char *vdsName);
/*
***********************************************************************
* vmk_PortsetLookupVDSClassName -- *//**
*
* \brief Retrieves the vDS switch class name for the specified portset.
*
* \note The vDS class name is constant for the lifetime of the portset.
*
* \note The caller provide a buffer that is VMK_VDS_CLASS_NAME_MAX_LEN
* bytes in length.
*
* \note The function will not block.
*
* \param[in] ps Portset handle.
* \param[out] vdsClassName The buffer for the NULL-terminated vDS
* class name string.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM An argument is NULL.
* \retval VMK_NOT_FOUND There is no vDS associated
* with this portset or vDS
* switch class name was not
* found
* \retval VMK_PORTSET_HANDLE_NOT_MUTABLE The caller did not hold a
* mutable handle
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetLookupVDSClassName(vmk_Portset *ps,
char *vdsClassName);
/*
***********************************************************************
* vmk_PortFindByVDSPortID -- *//**
*
* \brief Retrieves the numeric port identifier for the ephemeral port.
*
* \note The caller must not hold any locks or portset handles.
*
* \note The function will not block.
*
* \param[in] vdsID VDS switch ID string.
* \param[in] vdsPortID VDS port ID string.
* \param[out] portID Numeric ID of a virtual port.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM One or more parameters are NULL.
* \retval VMK_NOT_FOUND The specified vdsPort could not be found,
* or is not associated with an ephemeral
* port.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortFindByVDSPortID(const char *vdsID,
const char *vdsPortID,
vmk_SwitchPortID *portID);
/*
***********************************************************************
* vmk_PortsetFindByVDSID -- *//**
*
* \brief Retrieves the name of the portset.
*
* \note The caller must provide a buffer that is VMK_PORTSET_NAME_MAX
* bytes in length.
*
* \note The caller must not hold any locks or portset handles.
*
* \note The function will not block.
*
* \param[in] vdsID VDS switch ID string.
* \param[out] psName Buffer for the portset name string.
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM One or more parameters are NULL.
* \retval VMK_NOT_FOUND The specified vds could not be found,
* or is not associated with an ephemeral
* port.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetFindByVDSID(const char *vdsID,
char *psName);
/*
***********************************************************************
* vmk_PortDCBIsDCBEnabled -- */ /**
*
* \brief Check DCB support on the device connected to a vDS port.
*
* \note This function may block. No locks should be held while calling
* this function.
*
* \note Currently only supported on uplink port.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] enabled Used to store the DCB state of the device.
* \param[out] version Used to store the DCB version supported by
* the device.
*
* \retval VMK_OK If the call completes successfully.
* \retval VMK_NOT_SUPPORTED If the device is not DCB capable or if
* the driver doesn't support the operation.
* \retval VMK_NOT_FOUND If the port is not an uplink port, or
* if the uplink is not found or not opened.
* \retval VMK_FAILURE If the call fails.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortDCBIsDCBEnabled(vmk_SwitchPortID portID,
vmk_Bool *enabled,
vmk_DCBVersion *version);
/*
***********************************************************************
* vmk_PortDCBGetNumTCs -- */ /**
*
* \brief Get Traffic Classes from the device connected to a vDS port.
*
* \note This function may block. No locks should be held while calling
* this function.
*
* \note Currently only supported on uplink port.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] numTCs Used to store the Traffic Class information.
*
* \retval VMK_OK If the call completes successfully.
* \retval VMK_NOT_SUPPORTED If the device is not DCB capable or if
* the driver doesn't support the operation.
* \retval VMK_NOT_FOUND If the port is not an uplink port, or
* if the uplink is not found or not opened.
* \retval VMK_FAILURE If the call fails.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortDCBGetNumTCs(vmk_SwitchPortID portID,
vmk_DCBNumTCs *numTCs);
/*
***********************************************************************
* vmk_PortDCBGetPriorityGroup -- */ /**
*
* \brief Get DCB Priority Group from the device connected to a vDS port.
*
* \note This function may block. No locks should be held while calling
* this function.
* \note Currently only supported on uplink port.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] pg Used to stored the current PG setting.
*
* \retval VMK_OK If the call completes successfully.
* \retval VMK_NOT_SUPPORTED If the device is not DCB capable or if
* the driver doesn't support the operation.
* \retval VMK_NOT_FOUND If the port is not an uplink port, or
* if the uplink is not found or not opened.
* \retval VMK_FAILURE If the call fails.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortDCBGetPriorityGroup(vmk_SwitchPortID portID,
vmk_DCBPriorityGroup *pg);
/*
***********************************************************************
* vmk_PortDCBGetPFCCfg -- */ /**
*
* \brief Retrieve Priority-based Flow Control configurations.
*
* Get Priority-based Flow Control configurations from the device connected
* to a vDS port.
*
* \note vmk_PortDCBIsPFCEnabled should be call first to check if
* PFC support is enabled on the device before calling this
* function.
* \note This function may block. No locks should be held while calling
* this function.
* \note Currently only supported on uplink port.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] pfcCfg Used to stored the current PFC configuration.
*
* \retval VMK_OK If the call completes successfully.
* \retval VMK_NOT_SUPPORTED If the device is not DCB capable or if
* the driver doesn't support the operation.
* \retval VMK_NOT_FOUND If the port is not an uplink port, or
* if the uplink is not found or not opened.
* \retval VMK_FAILURE If the call fails.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortDCBGetPFCCfg(vmk_SwitchPortID portID,
vmk_DCBPriorityFlowControlCfg *pfcCfg);
/*
***********************************************************************
* vmk_PortDCBIsPFCEnabled -- */ /**
*
* \brief Check if Priority-based Flow Control support is enabled.
*
* \note This function may block. No locks should be held while calling
* this function.
*
* \note Currently only supported on uplink port.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] enabled Used to stored the current PFC support state.
*
* \retval VMK_OK If the call completes successfully.
* \retval VMK_NOT_SUPPORTED If the device is not DCB capable or if
* the driver doesn't support the operation.
* \retval VMK_NOT_FOUND If the port is not an uplink port, or
* if the uplink is not found or not opened.
* \retval VMK_FAILURE If the call fails.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortDCBIsPFCEnabled(vmk_SwitchPortID portID,
vmk_Bool *enabled);
/*
***********************************************************************
* vmk_PortDCBGetApplications -- */ /**
*
* \brief Retrieve all DCB Application Protocols settings.
*
* Get DCB Application Protocol settings from the device connected
* to a vDS port.
*
* \note This function may block. No locks should be held while
* calling this function.
*
* \note Currently only supported on uplink port.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] apps Used to store the DCB Applications
* settings of the device.
*
* \retval VMK_OK If the call completes successfully.
* \retval VMK_NOT_SUPPORTED If the device is not DCB capable or if
* the driver doesn't support the operation.
* \retval VMK_NOT_FOUND If the port is not an uplink port, or
* if the uplink is not found or not opened.
* \retval VMK_FAILURE If the call fails.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortDCBGetApplications(vmk_SwitchPortID portID,
vmk_DCBApplications *apps);
/*
***********************************************************************
* vmk_PortDCBGetCapabilities -- */ /**
*
* \brief Retrieve DCB capabilities information.
*
* Get DCB capabilities from the device connected to a vDS port.
*
* \note This function may block. No locks should be held while calling
* this function.
* \note Currently only supported on uplink port.
*
* \param[in] portID Numeric ID of a virtual port.
* \param[out] caps Used to store the DCB capabilities
* information of the device.
*
* \retval VMK_OK If the call completes successfully.
* \retval VMK_NOT_SUPPORTED If the device is not DCB capable or if
* the driver doesn't support the operation.
* \retval VMK_NOT_FOUND If the port is not an uplink port, or
* if the uplink is not found or not opened.
* \retval VMK_FAILURE If the call fails.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortDCBGetCapabilities(vmk_SwitchPortID portID,
vmk_DCBCapabilities *caps);
#endif
/** @} */
/** @} */
|