dlb.h (37073B)
1 /* 2 * DO NOT EDIT THIS FILE! 3 * This file is auto-generated. 4 * Edits to this file will be lost when it is regenerated. 5 * 6 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 7 * 8 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 9 */ 10 11 #ifndef BCMINT_LTSW_MBCM_DLB_H 12 #define BCMINT_LTSW_MBCM_DLB_H 13 14 #include <bcm/types.h> 15 16 #include <bcm_int/ltsw/dlb.h> 17 #include <bcm_int/ltsw/generated/dlb_ha.h> 18 19 #include <sal/sal_types.h> 20 21 /*! 22 * \brief Get chip-specific sub-features for DLB. 23 * 24 * \param [in] unit Unit Number. 25 * \param [out] features Trunk Type. 26 * 27 * \retval SHR_E_NONE No errors. 28 * \retval !SHR_E_NONE Failure. 29 */ 30 typedef int (*dlb_feature_get_f)( 31 int unit, 32 uint32_t *features); 33 34 /*! 35 * \brief Get chip-specific sub-features for DLB. 36 * 37 * \param [in] unit Unit Number. 38 * \param [in] dlb_type Dynamic Load Balance type. 39 * \param [out] cap Type-based capability for DLB. 40 * 41 * \retval SHR_E_NONE No errors. 42 * \retval !SHR_E_NONE Failure. 43 */ 44 typedef int (*dlb_capability_get_f)( 45 int unit, 46 bcmi_ltsw_dlb_type_t dlb_type, 47 bcmi_ltsw_dlb_capability_t *cap); 48 49 /*! 50 * \brief Initialize the dlb module. 51 * 52 * \param [in] unit Unit Number. 53 * 54 * \retval SHR_E_NONE No errors. 55 * \retval !SHR_E_NONE Failure. 56 */ 57 typedef int (*dlb_init_f)(int unit); 58 59 /*! 60 * \brief De-init the dlb module. 61 * 62 * \param [in] unit Unit Number. 63 * 64 * \retval SHR_E_NONE No errors. 65 * \retval !SHR_E_NONE Failure. 66 */ 67 typedef int (*dlb_deinit_f)(int unit); 68 69 /*! 70 * \brief Initialize the dlb module. 71 * 72 * \param [in] unit Unit Number. 73 * \param [in] dlb_type Dynamic Load Balance type. 74 * 75 * \retval SHR_E_NONE No errors. 76 * \retval !SHR_E_NONE Failure. 77 */ 78 typedef int (*dlb_type_init_f)( 79 int unit, 80 bcmi_ltsw_dlb_type_t dlb_type); 81 82 /*! 83 * \brief De-init the dlb module. 84 * 85 * \param [in] unit Unit Number. 86 * \param [in] dlb_type Dynamic Load Balance type. 87 * 88 * \retval SHR_E_NONE No errors. 89 * \retval !SHR_E_NONE Failure. 90 */ 91 typedef int (*dlb_type_deinit_f)( 92 int unit, 93 bcmi_ltsw_dlb_type_t dlb_type); 94 95 /*! 96 * \brief Validate DLB configurations. 97 * 98 * \param [in] unit Unit Number. 99 * \param [in] dlb_type Dynamic Load Balance type. 100 * \param [in] dlb_config DLB configurations. 101 * 102 * \retval SHR_E_NONE No errors. 103 * \retval !SHR_E_NONE Failure. 104 */ 105 typedef int (*dlb_config_validate_f)( 106 int unit, 107 bcmi_ltsw_dlb_type_t dlb_type, 108 bcmi_ltsw_dlb_config_t *dlb_config); 109 110 /*! 111 * \brief Set configurations of a DLB group. 112 * 113 * \param [in] unit Unit Number. 114 * \param [in] dlb_type Dynamic Load Balance type. 115 * \param [in] dlb_id Dynamic Load Balance Id. 116 * \param [in] dlb_config DLB configurations. 117 * 118 * \retval SHR_E_NONE No errors. 119 * \retval !SHR_E_NONE Failure. 120 */ 121 typedef int (*dlb_config_set_f)( 122 int unit, 123 bcmi_ltsw_dlb_type_t dlb_type, 124 bcmi_ltsw_dlb_id_t dlb_id, 125 bcmi_ltsw_dlb_config_t *dlb_config); 126 127 /*! 128 * \brief Get configurations of a DLB group. 129 * 130 * \param [in] unit Unit Number. 131 * \param [in] dlb_type Dynamic Load Balance type. 132 * \param [in] dlb_id Dynamic Load Balance Id. 133 * \param [out] dlb_config DLB configurations. 134 * 135 * \retval SHR_E_NONE No errors. 136 * \retval !SHR_E_NONE Failure. 137 */ 138 typedef int (*dlb_config_get_f)( 139 int unit, 140 bcmi_ltsw_dlb_type_t dlb_type, 141 bcmi_ltsw_dlb_id_t dlb_id, 142 bcmi_ltsw_dlb_config_t *dlb_config); 143 144 /*! 145 * \brief Clear configurations of a DLB group. 146 * 147 * \param [in] unit Unit Number. 148 * \param [in] dlb_type Dynamic Load Balance type. 149 * \param [in] dlb_id Dynamic Load Balance Id. 150 * 151 * \retval SHR_E_NONE No errors. 152 * \retval !SHR_E_NONE Failure. 153 */ 154 typedef int (*dlb_config_clear_f)( 155 int unit, 156 bcmi_ltsw_dlb_type_t dlb_type, 157 bcmi_ltsw_dlb_id_t dlb_id); 158 159 /*! 160 * \brief Validate DLB monitor configurations. 161 * 162 * \param [in] unit Unit Number. 163 * \param [in] dlb_type Dynamic Load Balance type. 164 * \param [in] monitor DLB monitoring configurations. 165 * 166 * \retval SHR_E_NONE No errors. 167 * \retval !SHR_E_NONE Failure. 168 */ 169 typedef int (*dlb_monitor_validate_f)( 170 int unit, 171 bcmi_ltsw_dlb_type_t dlb_type, 172 bcmi_ltsw_dlb_monitor_t *monitor); 173 174 /*! 175 * \brief Set DLB monitor. 176 * 177 * \param [in] unit Unit Number. 178 * \param [in] dlb_type Dynamic Load Balance type. 179 * \param [in] dlb_id Dynamic Load Balance Id. 180 * \param [in] monitor DLB monitoring configurations. 181 * 182 * \retval SHR_E_NONE No errors. 183 * \retval !SHR_E_NONE Failure. 184 */ 185 typedef int (*dlb_monitor_set_f)( 186 int unit, 187 bcmi_ltsw_dlb_type_t dlb_type, 188 bcmi_ltsw_dlb_id_t dlb_id, 189 bcmi_ltsw_dlb_monitor_t *monitor); 190 191 /*! 192 * \brief Get DLB monitor configurations. 193 * 194 * \param [in] unit Unit Number. 195 * \param [in] dlb_type Dynamic Load Balance type. 196 * \param [in] dlb_id Dynamic Load Balance Id. 197 * \param [out] monitor DLB monitoring configurations. 198 * 199 * \retval SHR_E_NONE No errors. 200 * \retval !SHR_E_NONE Failure. 201 */ 202 typedef int (*dlb_monitor_get_f)( 203 int unit, 204 bcmi_ltsw_dlb_type_t dlb_type, 205 bcmi_ltsw_dlb_id_t dlb_id, 206 bcmi_ltsw_dlb_monitor_t *monitor); 207 208 /*! 209 * \brief Clear DLB monitor configurations. 210 * 211 * \param [in] unit Unit Number. 212 * \param [in] dlb_type Dynamic Load Balance type. 213 * \param [in] dlb_id Dynamic Load Balance Id. 214 * 215 * \retval SHR_E_NONE No errors. 216 * \retval !SHR_E_NONE Failure. 217 */ 218 typedef int (*dlb_monitor_clear_f)( 219 int unit, 220 bcmi_ltsw_dlb_type_t dlb_type, 221 bcmi_ltsw_dlb_id_t dlb_id); 222 223 /*! 224 * \brief Format DLB member quality map. 225 * 226 * \param [in] unit Unit Number. 227 * \param [in] quality_map_profile DLB member quality map profile structure. 228 * \param [out] quality_map_profile_format Format output for DLB quality map profile. 229 * 230 * \retval SHR_E_NONE No errors. 231 * \retval !SHR_E_NONE Failure. 232 */ 233 typedef int (*dlb_member_quality_map_profile_format_f)( 234 int unit, 235 bcmint_dlb_quality_map_profile_t *quality_map_profile, 236 uint32_t *quality_map_profile_format); 237 238 /*! 239 * \brief Traslate the qualify map profile to id. 240 * 241 * \param [in] unit Unit Number. 242 * \param [in] dlb_type Dynamic Load Balance type. 243 * \param [in] quality_map_profile_count DLB member quality map profile count. 244 * \param [in] quality_map_profile DLB member quality map profile structure. 245 * \param [in] profile_index Logical DLB quality map profile index. 246 * \param [out] quality_map_id DLB quality map Id. 247 * 248 * \retval SHR_E_NONE No errors. 249 * \retval !SHR_E_NONE Failure. 250 */ 251 typedef int (*dlb_member_quality_map_profile2id_f)( 252 int unit, 253 bcmi_ltsw_dlb_type_t dlb_type, 254 int quality_map_profile_count, 255 bcmint_dlb_quality_map_profile_t *quality_map_profile, 256 int profile_index, 257 int *quality_map_id); 258 259 /*! 260 * \brief Traslate the qualify map id to profile. 261 * 262 * \param [in] unit Unit Number. 263 * \param [in] dlb_type Dynamic Load Balance type. 264 * \param [in] quality_map_profile_count DLB member quality map profile count. 265 * \param [in] quality_map_profile DLB member quality map profile structure. 266 * \param [in] quality_map_id DLB quality map Id. 267 * \param [out] profile_index Logical DLB quality map profile index. 268 * 269 * \retval SHR_E_NONE No errors. 270 * \retval !SHR_E_NONE Failure. 271 */ 272 typedef int (*dlb_member_quality_map_id2profile_f)( 273 int unit, 274 bcmi_ltsw_dlb_type_t dlb_type, 275 int quality_map_profile_count, 276 bcmint_dlb_quality_map_profile_t *quality_map_profile, 277 int quality_map_id, 278 int *profile_index); 279 280 /*! 281 * \brief Set the DLB member quality map table. 282 * 283 * \param [in] unit Unit Number. 284 * \param [in] dlb_type Dynamic Load Balance type. 285 * \param [in] quality_map_id DLB quality map Id. 286 * \param [in] load_percent Dlb loading percent. 287 * \param [in] qsize_percent Dlb queue size percent. 288 * 289 * \retval SHR_E_NONE No errors. 290 * \retval !SHR_E_NONE Failure. 291 */ 292 typedef int (*dlb_member_quality_map_set_f)( 293 int unit, 294 bcmi_ltsw_dlb_type_t dlb_type, 295 int quality_map_id, 296 int load_percent, 297 int qsize_percent); 298 299 /*! 300 * \brief Clear the qualify map table. 301 * 302 * \param [in] unit Unit Number. 303 * \param [in] dlb_type Dynamic Load Balance type. 304 * \param [in] quality_map_id DLB quality map Id. 305 * 306 * \retval SHR_E_NONE No errors. 307 * \retval !SHR_E_NONE Failure. 308 */ 309 typedef int (*dlb_member_quality_map_clear_f)( 310 int unit, 311 bcmi_ltsw_dlb_type_t dlb_type, 312 int quality_map_id); 313 314 /*! 315 * \brief Get the DLB member port bitmap for warmboot. 316 * 317 * \param [in] unit Unit Number. 318 * \param [out] pbmp DLB member port bitmap. 319 * 320 * \retval SHR_E_NONE No errors. 321 * \retval !SHR_E_NONE Failure. 322 */ 323 typedef int (*dlb_member_pbmp_get_f)( 324 int unit, 325 bcm_pbmp_t *pbmp); 326 327 /*! 328 * \brief Validate DLB member port attributes. 329 * 330 * \param [in] unit Unit Number. 331 * \param [in] dlb_type Dynamic Load Balance type. 332 * \param [in] attribute Type-based DLB member port attribute. 333 * 334 * \retval SHR_E_NONE No errors. 335 * \retval !SHR_E_NONE Failure. 336 */ 337 typedef int (*dlb_member_attribute_validate_f)( 338 int unit, 339 bcmi_ltsw_dlb_type_t dlb_type, 340 bcmi_ltsw_dlb_member_attribute_t *attribute); 341 342 /*! 343 * \brief Set DLB member port attributes. 344 * 345 * \param [in] unit Unit Number. 346 * \param [in] port Port Number. 347 * \param [in] dlb_type Dynamic Load Balance type. 348 * \param [in] scaling_factor Scaling factor. 349 * \param [in] quality_map_id DLB member quality map profile Id. 350 * 351 * \retval SHR_E_NONE No errors. 352 * \retval !SHR_E_NONE Failure. 353 */ 354 typedef int (*dlb_member_attribute_set_f)( 355 int unit, 356 bcm_port_t port, 357 bcmi_ltsw_dlb_type_t dlb_type, 358 int scaling_factor, 359 int quality_map_id); 360 361 /*! 362 * \brief Get DLB member port attributes. 363 * 364 * \param [in] unit Unit Number. 365 * \param [in] port Port Number. 366 * \param [in] dlb_type Dynamic Load Balance type. 367 * \param [out] scaling_factor Scaling factor. 368 * \param [out] quality_map_id DLB member quality map profile Id. 369 * 370 * \retval SHR_E_NONE No errors. 371 * \retval !SHR_E_NONE Failure. 372 */ 373 typedef int (*dlb_member_attribute_get_f)( 374 int unit, 375 bcm_port_t port, 376 bcmi_ltsw_dlb_type_t dlb_type, 377 int *scaling_factor, 378 int *quality_map_id); 379 380 /*! 381 * \brief Clear DLB member port attributes. 382 * 383 * \param [in] unit Unit Number. 384 * \param [in] port Port Number. 385 * \param [in] dlb_type Dynamic Load Balance type. 386 * 387 * \retval SHR_E_NONE No errors. 388 * \retval !SHR_E_NONE Failure. 389 */ 390 typedef int (*dlb_member_attribute_clear_f)( 391 int unit, 392 bcm_port_t port, 393 bcmi_ltsw_dlb_type_t dlb_type); 394 395 /*! 396 * \brief Set DLB member status. 397 * 398 * \param [in] unit Unit Number. 399 * \param [in] port Port Number. 400 * \param [in] dlb_type Dynamic Load Balance type. 401 * \param [in] status Type-based DLB member status. 402 * 403 * \retval SHR_E_NONE No errors. 404 * \retval !SHR_E_NONE Failure. 405 */ 406 typedef int (*dlb_member_status_set_f)( 407 int unit, 408 bcm_port_t port, 409 bcmi_ltsw_dlb_type_t dlb_type, 410 int status); 411 412 /*! 413 * \brief Get DLB member status. 414 * 415 * \param [in] unit Unit Number. 416 * \param [in] port Port Number. 417 * \param [in] dlb_type Dynamic Load Balance type. 418 * \param [out] status Type-based DLB member status. 419 * 420 * \retval SHR_E_NONE No errors. 421 * \retval !SHR_E_NONE Failure. 422 */ 423 typedef int (*dlb_member_status_get_f)( 424 int unit, 425 bcm_port_t port, 426 bcmi_ltsw_dlb_type_t dlb_type, 427 int *status); 428 429 /*! 430 * \brief Set DLB Eligibility Ethertype. 431 * 432 * \param [in] unit Unit Number. 433 * \param [in] flags Flags. 434 * \param [in] ethertype_count Ethertype array count. 435 * \param [in] ethertype_array Ethertype array. 436 * 437 * \retval SHR_E_NONE No errors. 438 * \retval !SHR_E_NONE Failure. 439 */ 440 typedef int (*dlb_ethertype_set_f)( 441 int unit, 442 uint32_t flags, 443 int ethertype_count, 444 int *ethertype_array); 445 446 /*! 447 * \brief Get DLB Eligibility Ethertype. 448 * 449 * \param [in] unit Unit Number. 450 * \param [in] ethertype_count_max Max ethertype array count. 451 * \param [out] flags Flags. 452 * \param [out] ethertype_array Ethertype array. 453 * \param [out] ethertype_count Actual ethertype array count. 454 * 455 * \retval SHR_E_NONE No errors. 456 * \retval !SHR_E_NONE Failure. 457 */ 458 typedef int (*dlb_ethertype_get_f)( 459 int unit, 460 int ethertype_count_max, 461 uint32_t *flags, 462 int *ethertype_array, 463 int *ethertype_count); 464 465 /*! 466 * \brief Validate the DLB controlling information value according to information. 467 * 468 * \param [in] unit Unit Number. 469 * \param [in] dlb_type Dynamic Load Balance type. 470 * \param [in] ctrl_info Dynamic Load Balance controlling information. 471 * \param [in] type Dynamic Load Balance controlling type. 472 * \param [in] value Type-based controlling value for DLB. 473 * 474 * \retval SHR_E_NONE No errors. 475 * \retval !SHR_E_NONE Failure. 476 */ 477 typedef int (*dlb_control_info_value_validate_f)( 478 int unit, 479 bcmi_ltsw_dlb_type_t dlb_type, 480 bcmint_dlb_ctrl_info_t **ctrl_info, 481 bcmi_ltsw_dlb_control_type_t type, 482 uint64_t value); 483 484 /*! 485 * \brief Set DLB controlling information with information. 486 * 487 * \param [in] unit Unit Number. 488 * \param [in] dlb_type Dynamic Load Balance type. 489 * \param [in] ctrl_info Dynamic Load Balance controlling information. 490 * \param [in] type Dynamic Load Balance controlling type. 491 * \param [in] value Type-based controlling value for DLB. 492 * 493 * \retval SHR_E_NONE No errors. 494 * \retval !SHR_E_NONE Failure. 495 */ 496 typedef int (*dlb_control_info_set_f)( 497 int unit, 498 bcmi_ltsw_dlb_type_t dlb_type, 499 bcmint_dlb_ctrl_info_t **ctrl_info, 500 bcmi_ltsw_dlb_control_type_t type, 501 uint64_t value); 502 503 /*! 504 * \brief Get DLB controlling information from information. 505 * 506 * \param [in] unit Unit Number. 507 * \param [in] dlb_type Dynamic Load Balance type. 508 * \param [in] ctrl_info Dynamic Load Balance controlling information. 509 * \param [in] type Dynamic Load Balance controlling type. 510 * \param [out] value Type-based controlling value for DLB. 511 * 512 * \retval SHR_E_NONE No errors. 513 * \retval !SHR_E_NONE Failure. 514 */ 515 typedef int (*dlb_control_info_get_f)( 516 int unit, 517 bcmi_ltsw_dlb_type_t dlb_type, 518 bcmint_dlb_ctrl_info_t **ctrl_info, 519 bcmi_ltsw_dlb_control_type_t type, 520 uint64_t *value); 521 522 /*! 523 * \brief Validate the DLB controlling type. 524 * 525 * \param [in] unit Unit Number. 526 * \param [in] dlb_type Dynamic Load Balance type. 527 * \param [in] type Dynamic Load Balance controlling type. 528 * 529 * \retval SHR_E_NONE No errors. 530 * \retval !SHR_E_NONE Failure. 531 */ 532 typedef int (*dlb_control_type_validate_f)( 533 int unit, 534 bcmi_ltsw_dlb_type_t dlb_type, 535 bcmi_ltsw_dlb_control_type_t type); 536 537 /*! 538 * \brief Validate the DLB controlling information value. 539 * 540 * \param [in] unit Unit Number. 541 * \param [in] dlb_type Dynamic Load Balance type. 542 * \param [in] type Dynamic Load Balance controlling type. 543 * \param [in] value Type-based controlling value for DLB. 544 * 545 * \retval SHR_E_NONE No errors. 546 * \retval !SHR_E_NONE Failure. 547 */ 548 typedef int (*dlb_control_value_validate_f)( 549 int unit, 550 bcmi_ltsw_dlb_type_t dlb_type, 551 bcmi_ltsw_dlb_control_type_t type, 552 uint64_t value); 553 554 /*! 555 * \brief Set DLB controlling information. 556 * 557 * \param [in] unit Unit Number. 558 * \param [in] dlb_type Dynamic Load Balance type. 559 * \param [in] type Dynamic Load Balance controlling type. 560 * \param [in] value Type-based controlling value for DLB. 561 * 562 * \retval SHR_E_NONE No errors. 563 * \retval !SHR_E_NONE Failure. 564 */ 565 typedef int (*dlb_control_set_f)( 566 int unit, 567 bcmi_ltsw_dlb_type_t dlb_type, 568 bcmi_ltsw_dlb_control_type_t type, 569 uint64_t value); 570 571 /*! 572 * \brief Get DLB controlling information. 573 * 574 * \param [in] unit Unit Number. 575 * \param [in] dlb_type Dynamic Load Balance type. 576 * \param [in] type Dynamic Load Balance controlling type. 577 * \param [out] value Type-based controlling value for DLB. 578 * 579 * \retval SHR_E_NONE No errors. 580 * \retval !SHR_E_NONE Failure. 581 */ 582 typedef int (*dlb_control_get_f)( 583 int unit, 584 bcmi_ltsw_dlb_type_t dlb_type, 585 bcmi_ltsw_dlb_control_type_t type, 586 uint64_t *value); 587 588 /*! 589 * \brief Set statistics for a DLB group. 590 * 591 * \param [in] unit Unit Number. 592 * \param [in] dlb_type Dynamic Load Balance type. 593 * \param [in] dlb_id Dynamic Load Balance Id. 594 * \param [in] stat DLB configurations. 595 * 596 * \retval SHR_E_NONE No errors. 597 * \retval !SHR_E_NONE Failure. 598 */ 599 typedef int (*dlb_stat_set_f)( 600 int unit, 601 bcmi_ltsw_dlb_type_t dlb_type, 602 bcmi_ltsw_dlb_id_t dlb_id, 603 bcmi_ltsw_dlb_stat_t *stat); 604 605 /*! 606 * \brief Get statistics for a DLB group. 607 * 608 * \param [in] unit Unit Number. 609 * \param [in] dlb_type Dynamic Load Balance type. 610 * \param [in] dlb_id Dynamic Load Balance Id. 611 * \param [in] sync_mode sync from HW. 612 * \param [out] stat DLB configurations. 613 * 614 * \retval SHR_E_NONE No errors. 615 * \retval !SHR_E_NONE Failure. 616 */ 617 typedef int (*dlb_stat_get_f)( 618 int unit, 619 bcmi_ltsw_dlb_type_t dlb_type, 620 bcmi_ltsw_dlb_id_t dlb_id, 621 bool sync_mode, 622 bcmi_ltsw_dlb_stat_t *stat); 623 624 /*! 625 * \brief Dlb driver structure. 626 */ 627 typedef struct mbcm_ltsw_dlb_drv_s { 628 629 /*! Get chip-specific sub-features for DLB. */ 630 dlb_feature_get_f dlb_feature_get; 631 632 /*! Get chip-specific sub-features for DLB. */ 633 dlb_capability_get_f dlb_capability_get; 634 635 /*! Initialize the dlb module. */ 636 dlb_init_f dlb_init; 637 638 /*! De-init the dlb module. */ 639 dlb_deinit_f dlb_deinit; 640 641 /*! Initialize the dlb module. */ 642 dlb_type_init_f dlb_type_init; 643 644 /*! De-init the dlb module. */ 645 dlb_type_deinit_f dlb_type_deinit; 646 647 /*! Validate DLB configurations. */ 648 dlb_config_validate_f dlb_config_validate; 649 650 /*! Set configurations of a DLB group. */ 651 dlb_config_set_f dlb_config_set; 652 653 /*! Get configurations of a DLB group. */ 654 dlb_config_get_f dlb_config_get; 655 656 /*! Clear configurations of a DLB group. */ 657 dlb_config_clear_f dlb_config_clear; 658 659 /*! Validate DLB monitor configurations. */ 660 dlb_monitor_validate_f dlb_monitor_validate; 661 662 /*! Set DLB monitor. */ 663 dlb_monitor_set_f dlb_monitor_set; 664 665 /*! Get DLB monitor configurations. */ 666 dlb_monitor_get_f dlb_monitor_get; 667 668 /*! Clear DLB monitor configurations. */ 669 dlb_monitor_clear_f dlb_monitor_clear; 670 671 /*! Format DLB member quality map. */ 672 dlb_member_quality_map_profile_format_f dlb_member_quality_map_profile_format; 673 674 /*! Traslate the qualify map profile to id. */ 675 dlb_member_quality_map_profile2id_f dlb_member_quality_map_profile2id; 676 677 /*! Traslate the qualify map id to profile. */ 678 dlb_member_quality_map_id2profile_f dlb_member_quality_map_id2profile; 679 680 /*! Set the DLB member quality map table. */ 681 dlb_member_quality_map_set_f dlb_member_quality_map_set; 682 683 /*! Clear the qualify map table. */ 684 dlb_member_quality_map_clear_f dlb_member_quality_map_clear; 685 686 /*! Get the DLB member port bitmap for warmboot. */ 687 dlb_member_pbmp_get_f dlb_member_pbmp_get; 688 689 /*! Validate DLB member port attributes. */ 690 dlb_member_attribute_validate_f dlb_member_attribute_validate; 691 692 /*! Set DLB member port attributes. */ 693 dlb_member_attribute_set_f dlb_member_attribute_set; 694 695 /*! Get DLB member port attributes. */ 696 dlb_member_attribute_get_f dlb_member_attribute_get; 697 698 /*! Clear DLB member port attributes. */ 699 dlb_member_attribute_clear_f dlb_member_attribute_clear; 700 701 /*! Set DLB member status. */ 702 dlb_member_status_set_f dlb_member_status_set; 703 704 /*! Get DLB member status. */ 705 dlb_member_status_get_f dlb_member_status_get; 706 707 /*! Set DLB Eligibility Ethertype. */ 708 dlb_ethertype_set_f dlb_ethertype_set; 709 710 /*! Get DLB Eligibility Ethertype. */ 711 dlb_ethertype_get_f dlb_ethertype_get; 712 713 /*! Validate the DLB controlling information value according to information. */ 714 dlb_control_info_value_validate_f dlb_control_info_value_validate; 715 716 /*! Set DLB controlling information with information. */ 717 dlb_control_info_set_f dlb_control_info_set; 718 719 /*! Get DLB controlling information from information. */ 720 dlb_control_info_get_f dlb_control_info_get; 721 722 /*! Validate the DLB controlling type. */ 723 dlb_control_type_validate_f dlb_control_type_validate; 724 725 /*! Validate the DLB controlling information value. */ 726 dlb_control_value_validate_f dlb_control_value_validate; 727 728 /*! Set DLB controlling information. */ 729 dlb_control_set_f dlb_control_set; 730 731 /*! Get DLB controlling information. */ 732 dlb_control_get_f dlb_control_get; 733 734 /*! Set statistics for a DLB group. */ 735 dlb_stat_set_f dlb_stat_set; 736 737 /*! Get statistics for a DLB group. */ 738 dlb_stat_get_f dlb_stat_get; 739 740 } mbcm_ltsw_dlb_drv_t; 741 742 /*! 743 * \brief Set the DLB driver of the device. 744 * 745 * \param [in] unit Unit Number. 746 * \param [in] drv Dlb driver to set. 747 * 748 * \retval SHR_E_NONE No errors. 749 * \retval !SHR_E_NONE Failure. 750 */ 751 extern int 752 mbcm_ltsw_dlb_drv_set( 753 int unit, 754 mbcm_ltsw_dlb_drv_t *drv); 755 756 /*! 757 * \brief Get chip-specific sub-features for DLB. 758 * 759 * \param [in] unit Unit Number. 760 * \param [out] features Trunk Type. 761 * 762 * \retval SHR_E_NONE No errors. 763 * \retval !SHR_E_NONE Failure. 764 */ 765 extern int 766 mbcm_ltsw_dlb_feature_get( 767 int unit, 768 uint32_t *features); 769 770 /*! 771 * \brief Get chip-specific sub-features for DLB. 772 * 773 * \param [in] unit Unit Number. 774 * \param [in] dlb_type Dynamic Load Balance type. 775 * \param [out] cap Type-based capability for DLB. 776 * 777 * \retval SHR_E_NONE No errors. 778 * \retval !SHR_E_NONE Failure. 779 */ 780 extern int 781 mbcm_ltsw_dlb_capability_get( 782 int unit, 783 bcmi_ltsw_dlb_type_t dlb_type, 784 bcmi_ltsw_dlb_capability_t *cap); 785 786 /*! 787 * \brief Initialize the dlb module. 788 * 789 * \param [in] unit Unit Number. 790 * 791 * \retval SHR_E_NONE No errors. 792 * \retval !SHR_E_NONE Failure. 793 */ 794 extern int 795 mbcm_ltsw_dlb_init(int unit); 796 797 /*! 798 * \brief De-init the dlb module. 799 * 800 * \param [in] unit Unit Number. 801 * 802 * \retval SHR_E_NONE No errors. 803 * \retval !SHR_E_NONE Failure. 804 */ 805 extern int 806 mbcm_ltsw_dlb_deinit(int unit); 807 808 /*! 809 * \brief Initialize the dlb module. 810 * 811 * \param [in] unit Unit Number. 812 * \param [in] dlb_type Dynamic Load Balance type. 813 * 814 * \retval SHR_E_NONE No errors. 815 * \retval !SHR_E_NONE Failure. 816 */ 817 extern int 818 mbcm_ltsw_dlb_type_init( 819 int unit, 820 bcmi_ltsw_dlb_type_t dlb_type); 821 822 /*! 823 * \brief De-init the dlb module. 824 * 825 * \param [in] unit Unit Number. 826 * \param [in] dlb_type Dynamic Load Balance type. 827 * 828 * \retval SHR_E_NONE No errors. 829 * \retval !SHR_E_NONE Failure. 830 */ 831 extern int 832 mbcm_ltsw_dlb_type_deinit( 833 int unit, 834 bcmi_ltsw_dlb_type_t dlb_type); 835 836 /*! 837 * \brief Validate DLB configurations. 838 * 839 * \param [in] unit Unit Number. 840 * \param [in] dlb_type Dynamic Load Balance type. 841 * \param [in] dlb_config DLB configurations. 842 * 843 * \retval SHR_E_NONE No errors. 844 * \retval !SHR_E_NONE Failure. 845 */ 846 extern int 847 mbcm_ltsw_dlb_config_validate( 848 int unit, 849 bcmi_ltsw_dlb_type_t dlb_type, 850 bcmi_ltsw_dlb_config_t *dlb_config); 851 852 /*! 853 * \brief Set configurations of a DLB group. 854 * 855 * \param [in] unit Unit Number. 856 * \param [in] dlb_type Dynamic Load Balance type. 857 * \param [in] dlb_id Dynamic Load Balance Id. 858 * \param [in] dlb_config DLB configurations. 859 * 860 * \retval SHR_E_NONE No errors. 861 * \retval !SHR_E_NONE Failure. 862 */ 863 extern int 864 mbcm_ltsw_dlb_config_set( 865 int unit, 866 bcmi_ltsw_dlb_type_t dlb_type, 867 bcmi_ltsw_dlb_id_t dlb_id, 868 bcmi_ltsw_dlb_config_t *dlb_config); 869 870 /*! 871 * \brief Get configurations of a DLB group. 872 * 873 * \param [in] unit Unit Number. 874 * \param [in] dlb_type Dynamic Load Balance type. 875 * \param [in] dlb_id Dynamic Load Balance Id. 876 * \param [out] dlb_config DLB configurations. 877 * 878 * \retval SHR_E_NONE No errors. 879 * \retval !SHR_E_NONE Failure. 880 */ 881 extern int 882 mbcm_ltsw_dlb_config_get( 883 int unit, 884 bcmi_ltsw_dlb_type_t dlb_type, 885 bcmi_ltsw_dlb_id_t dlb_id, 886 bcmi_ltsw_dlb_config_t *dlb_config); 887 888 /*! 889 * \brief Clear configurations of a DLB group. 890 * 891 * \param [in] unit Unit Number. 892 * \param [in] dlb_type Dynamic Load Balance type. 893 * \param [in] dlb_id Dynamic Load Balance Id. 894 * 895 * \retval SHR_E_NONE No errors. 896 * \retval !SHR_E_NONE Failure. 897 */ 898 extern int 899 mbcm_ltsw_dlb_config_clear( 900 int unit, 901 bcmi_ltsw_dlb_type_t dlb_type, 902 bcmi_ltsw_dlb_id_t dlb_id); 903 904 /*! 905 * \brief Validate DLB monitor configurations. 906 * 907 * \param [in] unit Unit Number. 908 * \param [in] dlb_type Dynamic Load Balance type. 909 * \param [in] monitor DLB monitoring configurations. 910 * 911 * \retval SHR_E_NONE No errors. 912 * \retval !SHR_E_NONE Failure. 913 */ 914 extern int 915 mbcm_ltsw_dlb_monitor_validate( 916 int unit, 917 bcmi_ltsw_dlb_type_t dlb_type, 918 bcmi_ltsw_dlb_monitor_t *monitor); 919 920 /*! 921 * \brief Set DLB monitor. 922 * 923 * \param [in] unit Unit Number. 924 * \param [in] dlb_type Dynamic Load Balance type. 925 * \param [in] dlb_id Dynamic Load Balance Id. 926 * \param [in] monitor DLB monitoring configurations. 927 * 928 * \retval SHR_E_NONE No errors. 929 * \retval !SHR_E_NONE Failure. 930 */ 931 extern int 932 mbcm_ltsw_dlb_monitor_set( 933 int unit, 934 bcmi_ltsw_dlb_type_t dlb_type, 935 bcmi_ltsw_dlb_id_t dlb_id, 936 bcmi_ltsw_dlb_monitor_t *monitor); 937 938 /*! 939 * \brief Get DLB monitor configurations. 940 * 941 * \param [in] unit Unit Number. 942 * \param [in] dlb_type Dynamic Load Balance type. 943 * \param [in] dlb_id Dynamic Load Balance Id. 944 * \param [out] monitor DLB monitoring configurations. 945 * 946 * \retval SHR_E_NONE No errors. 947 * \retval !SHR_E_NONE Failure. 948 */ 949 extern int 950 mbcm_ltsw_dlb_monitor_get( 951 int unit, 952 bcmi_ltsw_dlb_type_t dlb_type, 953 bcmi_ltsw_dlb_id_t dlb_id, 954 bcmi_ltsw_dlb_monitor_t *monitor); 955 956 /*! 957 * \brief Clear DLB monitor configurations. 958 * 959 * \param [in] unit Unit Number. 960 * \param [in] dlb_type Dynamic Load Balance type. 961 * \param [in] dlb_id Dynamic Load Balance Id. 962 * 963 * \retval SHR_E_NONE No errors. 964 * \retval !SHR_E_NONE Failure. 965 */ 966 extern int 967 mbcm_ltsw_dlb_monitor_clear( 968 int unit, 969 bcmi_ltsw_dlb_type_t dlb_type, 970 bcmi_ltsw_dlb_id_t dlb_id); 971 972 /*! 973 * \brief Format DLB member quality map. 974 * 975 * \param [in] unit Unit Number. 976 * \param [in] quality_map_profile DLB member quality map profile structure. 977 * \param [out] quality_map_profile_format Format output for DLB quality map profile. 978 * 979 * \retval SHR_E_NONE No errors. 980 * \retval !SHR_E_NONE Failure. 981 */ 982 extern int 983 mbcm_ltsw_dlb_member_quality_map_profile_format( 984 int unit, 985 bcmint_dlb_quality_map_profile_t *quality_map_profile, 986 uint32_t *quality_map_profile_format); 987 988 /*! 989 * \brief Traslate the qualify map profile to id. 990 * 991 * \param [in] unit Unit Number. 992 * \param [in] dlb_type Dynamic Load Balance type. 993 * \param [in] quality_map_profile_count DLB member quality map profile count. 994 * \param [in] quality_map_profile DLB member quality map profile structure. 995 * \param [in] profile_index Logical DLB quality map profile index. 996 * \param [out] quality_map_id DLB quality map Id. 997 * 998 * \retval SHR_E_NONE No errors. 999 * \retval !SHR_E_NONE Failure. 1000 */ 1001 extern int 1002 mbcm_ltsw_dlb_member_quality_map_profile2id( 1003 int unit, 1004 bcmi_ltsw_dlb_type_t dlb_type, 1005 int quality_map_profile_count, 1006 bcmint_dlb_quality_map_profile_t *quality_map_profile, 1007 int profile_index, 1008 int *quality_map_id); 1009 1010 /*! 1011 * \brief Traslate the qualify map id to profile. 1012 * 1013 * \param [in] unit Unit Number. 1014 * \param [in] dlb_type Dynamic Load Balance type. 1015 * \param [in] quality_map_profile_count DLB member quality map profile count. 1016 * \param [in] quality_map_profile DLB member quality map profile structure. 1017 * \param [in] quality_map_id DLB quality map Id. 1018 * \param [out] profile_index Logical DLB quality map profile index. 1019 * 1020 * \retval SHR_E_NONE No errors. 1021 * \retval !SHR_E_NONE Failure. 1022 */ 1023 extern int 1024 mbcm_ltsw_dlb_member_quality_map_id2profile( 1025 int unit, 1026 bcmi_ltsw_dlb_type_t dlb_type, 1027 int quality_map_profile_count, 1028 bcmint_dlb_quality_map_profile_t *quality_map_profile, 1029 int quality_map_id, 1030 int *profile_index); 1031 1032 /*! 1033 * \brief Set the DLB member quality map table. 1034 * 1035 * \param [in] unit Unit Number. 1036 * \param [in] dlb_type Dynamic Load Balance type. 1037 * \param [in] quality_map_id DLB quality map Id. 1038 * \param [in] load_percent Dlb loading percent. 1039 * \param [in] qsize_percent Dlb queue size percent. 1040 * 1041 * \retval SHR_E_NONE No errors. 1042 * \retval !SHR_E_NONE Failure. 1043 */ 1044 extern int 1045 mbcm_ltsw_dlb_member_quality_map_set( 1046 int unit, 1047 bcmi_ltsw_dlb_type_t dlb_type, 1048 int quality_map_id, 1049 int load_percent, 1050 int qsize_percent); 1051 1052 /*! 1053 * \brief Clear the qualify map table. 1054 * 1055 * \param [in] unit Unit Number. 1056 * \param [in] dlb_type Dynamic Load Balance type. 1057 * \param [in] quality_map_id DLB quality map Id. 1058 * 1059 * \retval SHR_E_NONE No errors. 1060 * \retval !SHR_E_NONE Failure. 1061 */ 1062 extern int 1063 mbcm_ltsw_dlb_member_quality_map_clear( 1064 int unit, 1065 bcmi_ltsw_dlb_type_t dlb_type, 1066 int quality_map_id); 1067 1068 /*! 1069 * \brief Get the DLB member port bitmap for warmboot. 1070 * 1071 * \param [in] unit Unit Number. 1072 * \param [out] pbmp DLB member port bitmap. 1073 * 1074 * \retval SHR_E_NONE No errors. 1075 * \retval !SHR_E_NONE Failure. 1076 */ 1077 extern int 1078 mbcm_ltsw_dlb_member_pbmp_get( 1079 int unit, 1080 bcm_pbmp_t *pbmp); 1081 1082 /*! 1083 * \brief Validate DLB member port attributes. 1084 * 1085 * \param [in] unit Unit Number. 1086 * \param [in] dlb_type Dynamic Load Balance type. 1087 * \param [in] attribute Type-based DLB member port attribute. 1088 * 1089 * \retval SHR_E_NONE No errors. 1090 * \retval !SHR_E_NONE Failure. 1091 */ 1092 extern int 1093 mbcm_ltsw_dlb_member_attribute_validate( 1094 int unit, 1095 bcmi_ltsw_dlb_type_t dlb_type, 1096 bcmi_ltsw_dlb_member_attribute_t *attribute); 1097 1098 /*! 1099 * \brief Set DLB member port attributes. 1100 * 1101 * \param [in] unit Unit Number. 1102 * \param [in] port Port Number. 1103 * \param [in] dlb_type Dynamic Load Balance type. 1104 * \param [in] scaling_factor Scaling factor. 1105 * \param [in] quality_map_id DLB member quality map profile Id. 1106 * 1107 * \retval SHR_E_NONE No errors. 1108 * \retval !SHR_E_NONE Failure. 1109 */ 1110 extern int 1111 mbcm_ltsw_dlb_member_attribute_set( 1112 int unit, 1113 bcm_port_t port, 1114 bcmi_ltsw_dlb_type_t dlb_type, 1115 int scaling_factor, 1116 int quality_map_id); 1117 1118 /*! 1119 * \brief Get DLB member port attributes. 1120 * 1121 * \param [in] unit Unit Number. 1122 * \param [in] port Port Number. 1123 * \param [in] dlb_type Dynamic Load Balance type. 1124 * \param [out] scaling_factor Scaling factor. 1125 * \param [out] quality_map_id DLB member quality map profile Id. 1126 * 1127 * \retval SHR_E_NONE No errors. 1128 * \retval !SHR_E_NONE Failure. 1129 */ 1130 extern int 1131 mbcm_ltsw_dlb_member_attribute_get( 1132 int unit, 1133 bcm_port_t port, 1134 bcmi_ltsw_dlb_type_t dlb_type, 1135 int *scaling_factor, 1136 int *quality_map_id); 1137 1138 /*! 1139 * \brief Clear DLB member port attributes. 1140 * 1141 * \param [in] unit Unit Number. 1142 * \param [in] port Port Number. 1143 * \param [in] dlb_type Dynamic Load Balance type. 1144 * 1145 * \retval SHR_E_NONE No errors. 1146 * \retval !SHR_E_NONE Failure. 1147 */ 1148 extern int 1149 mbcm_ltsw_dlb_member_attribute_clear( 1150 int unit, 1151 bcm_port_t port, 1152 bcmi_ltsw_dlb_type_t dlb_type); 1153 1154 /*! 1155 * \brief Set DLB member status. 1156 * 1157 * \param [in] unit Unit Number. 1158 * \param [in] port Port Number. 1159 * \param [in] dlb_type Dynamic Load Balance type. 1160 * \param [in] status Type-based DLB member status. 1161 * 1162 * \retval SHR_E_NONE No errors. 1163 * \retval !SHR_E_NONE Failure. 1164 */ 1165 extern int 1166 mbcm_ltsw_dlb_member_status_set( 1167 int unit, 1168 bcm_port_t port, 1169 bcmi_ltsw_dlb_type_t dlb_type, 1170 int status); 1171 1172 /*! 1173 * \brief Get DLB member status. 1174 * 1175 * \param [in] unit Unit Number. 1176 * \param [in] port Port Number. 1177 * \param [in] dlb_type Dynamic Load Balance type. 1178 * \param [out] status Type-based DLB member status. 1179 * 1180 * \retval SHR_E_NONE No errors. 1181 * \retval !SHR_E_NONE Failure. 1182 */ 1183 extern int 1184 mbcm_ltsw_dlb_member_status_get( 1185 int unit, 1186 bcm_port_t port, 1187 bcmi_ltsw_dlb_type_t dlb_type, 1188 int *status); 1189 1190 /*! 1191 * \brief Set DLB Eligibility Ethertype. 1192 * 1193 * \param [in] unit Unit Number. 1194 * \param [in] flags Flags. 1195 * \param [in] ethertype_count Ethertype array count. 1196 * \param [in] ethertype_array Ethertype array. 1197 * 1198 * \retval SHR_E_NONE No errors. 1199 * \retval !SHR_E_NONE Failure. 1200 */ 1201 extern int 1202 mbcm_ltsw_dlb_ethertype_set( 1203 int unit, 1204 uint32_t flags, 1205 int ethertype_count, 1206 int *ethertype_array); 1207 1208 /*! 1209 * \brief Get DLB Eligibility Ethertype. 1210 * 1211 * \param [in] unit Unit Number. 1212 * \param [in] ethertype_count_max Max ethertype array count. 1213 * \param [out] flags Flags. 1214 * \param [out] ethertype_array Ethertype array. 1215 * \param [out] ethertype_count Actual ethertype array count. 1216 * 1217 * \retval SHR_E_NONE No errors. 1218 * \retval !SHR_E_NONE Failure. 1219 */ 1220 extern int 1221 mbcm_ltsw_dlb_ethertype_get( 1222 int unit, 1223 int ethertype_count_max, 1224 uint32_t *flags, 1225 int *ethertype_array, 1226 int *ethertype_count); 1227 1228 /*! 1229 * \brief Validate the DLB controlling information value according to information. 1230 * 1231 * \param [in] unit Unit Number. 1232 * \param [in] dlb_type Dynamic Load Balance type. 1233 * \param [in] ctrl_info Dynamic Load Balance controlling information. 1234 * \param [in] type Dynamic Load Balance controlling type. 1235 * \param [in] value Type-based controlling value for DLB. 1236 * 1237 * \retval SHR_E_NONE No errors. 1238 * \retval !SHR_E_NONE Failure. 1239 */ 1240 extern int 1241 mbcm_ltsw_dlb_control_info_value_validate( 1242 int unit, 1243 bcmi_ltsw_dlb_type_t dlb_type, 1244 bcmint_dlb_ctrl_info_t **ctrl_info, 1245 bcmi_ltsw_dlb_control_type_t type, 1246 uint64_t value); 1247 1248 /*! 1249 * \brief Set DLB controlling information with information. 1250 * 1251 * \param [in] unit Unit Number. 1252 * \param [in] dlb_type Dynamic Load Balance type. 1253 * \param [in] ctrl_info Dynamic Load Balance controlling information. 1254 * \param [in] type Dynamic Load Balance controlling type. 1255 * \param [in] value Type-based controlling value for DLB. 1256 * 1257 * \retval SHR_E_NONE No errors. 1258 * \retval !SHR_E_NONE Failure. 1259 */ 1260 extern int 1261 mbcm_ltsw_dlb_control_info_set( 1262 int unit, 1263 bcmi_ltsw_dlb_type_t dlb_type, 1264 bcmint_dlb_ctrl_info_t **ctrl_info, 1265 bcmi_ltsw_dlb_control_type_t type, 1266 uint64_t value); 1267 1268 /*! 1269 * \brief Get DLB controlling information from information. 1270 * 1271 * \param [in] unit Unit Number. 1272 * \param [in] dlb_type Dynamic Load Balance type. 1273 * \param [in] ctrl_info Dynamic Load Balance controlling information. 1274 * \param [in] type Dynamic Load Balance controlling type. 1275 * \param [out] value Type-based controlling value for DLB. 1276 * 1277 * \retval SHR_E_NONE No errors. 1278 * \retval !SHR_E_NONE Failure. 1279 */ 1280 extern int 1281 mbcm_ltsw_dlb_control_info_get( 1282 int unit, 1283 bcmi_ltsw_dlb_type_t dlb_type, 1284 bcmint_dlb_ctrl_info_t **ctrl_info, 1285 bcmi_ltsw_dlb_control_type_t type, 1286 uint64_t *value); 1287 1288 /*! 1289 * \brief Validate the DLB controlling type. 1290 * 1291 * \param [in] unit Unit Number. 1292 * \param [in] dlb_type Dynamic Load Balance type. 1293 * \param [in] type Dynamic Load Balance controlling type. 1294 * 1295 * \retval SHR_E_NONE No errors. 1296 * \retval !SHR_E_NONE Failure. 1297 */ 1298 extern int 1299 mbcm_ltsw_dlb_control_type_validate( 1300 int unit, 1301 bcmi_ltsw_dlb_type_t dlb_type, 1302 bcmi_ltsw_dlb_control_type_t type); 1303 1304 /*! 1305 * \brief Validate the DLB controlling information value. 1306 * 1307 * \param [in] unit Unit Number. 1308 * \param [in] dlb_type Dynamic Load Balance type. 1309 * \param [in] type Dynamic Load Balance controlling type. 1310 * \param [in] value Type-based controlling value for DLB. 1311 * 1312 * \retval SHR_E_NONE No errors. 1313 * \retval !SHR_E_NONE Failure. 1314 */ 1315 extern int 1316 mbcm_ltsw_dlb_control_value_validate( 1317 int unit, 1318 bcmi_ltsw_dlb_type_t dlb_type, 1319 bcmi_ltsw_dlb_control_type_t type, 1320 uint64_t value); 1321 1322 /*! 1323 * \brief Set DLB controlling information. 1324 * 1325 * \param [in] unit Unit Number. 1326 * \param [in] dlb_type Dynamic Load Balance type. 1327 * \param [in] type Dynamic Load Balance controlling type. 1328 * \param [in] value Type-based controlling value for DLB. 1329 * 1330 * \retval SHR_E_NONE No errors. 1331 * \retval !SHR_E_NONE Failure. 1332 */ 1333 extern int 1334 mbcm_ltsw_dlb_control_set( 1335 int unit, 1336 bcmi_ltsw_dlb_type_t dlb_type, 1337 bcmi_ltsw_dlb_control_type_t type, 1338 uint64_t value); 1339 1340 /*! 1341 * \brief Get DLB controlling information. 1342 * 1343 * \param [in] unit Unit Number. 1344 * \param [in] dlb_type Dynamic Load Balance type. 1345 * \param [in] type Dynamic Load Balance controlling type. 1346 * \param [out] value Type-based controlling value for DLB. 1347 * 1348 * \retval SHR_E_NONE No errors. 1349 * \retval !SHR_E_NONE Failure. 1350 */ 1351 extern int 1352 mbcm_ltsw_dlb_control_get( 1353 int unit, 1354 bcmi_ltsw_dlb_type_t dlb_type, 1355 bcmi_ltsw_dlb_control_type_t type, 1356 uint64_t *value); 1357 1358 /*! 1359 * \brief Set statistics for a DLB group. 1360 * 1361 * \param [in] unit Unit Number. 1362 * \param [in] dlb_type Dynamic Load Balance type. 1363 * \param [in] dlb_id Dynamic Load Balance Id. 1364 * \param [in] stat DLB configurations. 1365 * 1366 * \retval SHR_E_NONE No errors. 1367 * \retval !SHR_E_NONE Failure. 1368 */ 1369 extern int 1370 mbcm_ltsw_dlb_stat_set( 1371 int unit, 1372 bcmi_ltsw_dlb_type_t dlb_type, 1373 bcmi_ltsw_dlb_id_t dlb_id, 1374 bcmi_ltsw_dlb_stat_t *stat); 1375 1376 /*! 1377 * \brief Get statistics for a DLB group. 1378 * 1379 * \param [in] unit Unit Number. 1380 * \param [in] dlb_type Dynamic Load Balance type. 1381 * \param [in] dlb_id Dynamic Load Balance Id. 1382 * \param [in] sync_mode sync from HW. 1383 * \param [out] stat DLB configurations. 1384 * 1385 * \retval SHR_E_NONE No errors. 1386 * \retval !SHR_E_NONE Failure. 1387 */ 1388 extern int 1389 mbcm_ltsw_dlb_stat_get( 1390 int unit, 1391 bcmi_ltsw_dlb_type_t dlb_type, 1392 bcmi_ltsw_dlb_id_t dlb_id, 1393 bool sync_mode, 1394 bcmi_ltsw_dlb_stat_t *stat); 1395 1396 #endif /* BCMINT_LTSW_MBCM_DLB_H */