int.h (31673B)
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_INT_H 12 #define BCMINT_LTSW_MBCM_INT_H 13 14 #if defined(INCLUDE_INT) 15 16 #include <bcm/int.h> 17 18 #include <bcm_int/ltsw/int.h> 19 #include <bcm_int/ltsw/int_int.h> 20 21 #include <sal/sal_types.h> 22 23 /*! 24 * \brief Init INT module. 25 * 26 * \param [in] unit Unit Number. 27 * 28 * \retval SHR_E_NONE No errors. 29 * \retval !SHR_E_NONE Failure. 30 */ 31 typedef int (*int_init_f)(int unit); 32 33 /*! 34 * \brief Detach INT module. 35 * 36 * \param [in] unit Unit Number. 37 * 38 * \retval SHR_E_NONE No errors. 39 * \retval !SHR_E_NONE Failure. 40 */ 41 typedef int (*int_detach_f)(int unit); 42 43 /*! 44 * \brief Specify INT switch control behaviors. 45 * 46 * \param [in] unit Unit Number. 47 * \param [in] control The desired configuration parameter to modify. 48 * \param [in] value The value with which to set the parameter. 49 * 50 * \retval SHR_E_NONE No errors. 51 * \retval !SHR_E_NONE Failure. 52 */ 53 typedef int (*int_control_set_f)( 54 int unit, 55 bcmi_ltsw_int_control_t control, 56 uint32_t value); 57 58 /*! 59 * \brief Retrieve INT switch control behaviors. 60 * 61 * \param [in] unit Unit Number. 62 * \param [in] control The desired configuration parameter to retrieve. 63 * \param [out] value Pointer to where the retrieved value will be written. 64 * 65 * \retval SHR_E_NONE No errors. 66 * \retval !SHR_E_NONE Failure. 67 */ 68 typedef int (*int_control_get_f)( 69 int unit, 70 bcmi_ltsw_int_control_t control, 71 uint32_t *value); 72 73 /*! 74 * \brief Add a vector match for INT. 75 * 76 * \param [in] unit Unit Number. 77 * \param [in] options Add options. 78 * \param [in/out] vector_match Vector match criteria. 79 * 80 * \retval SHR_E_NONE No errors. 81 * \retval !SHR_E_NONE Failure. 82 */ 83 typedef int (*int_vector_match_add_f)( 84 int unit, 85 uint32 options, 86 bcmi_ltsw_int_vector_match_t *vector_match); 87 88 /*! 89 * \brief Get a vector match for INT. 90 * 91 * \param [in] unit Unit Number. 92 * \param [out] vector_match Vector match criteria. 93 * 94 * \retval SHR_E_NONE No errors. 95 * \retval !SHR_E_NONE Failure. 96 */ 97 typedef int (*int_vector_match_get_f)( 98 int unit, 99 bcmi_ltsw_int_vector_match_t *vector_match); 100 101 /*! 102 * \brief Delete a vector match for INT. 103 * 104 * \param [in] unit Unit Number. 105 * \param [in] vector_match Vector match criteria. 106 * 107 * \retval SHR_E_NONE No errors. 108 * \retval !SHR_E_NONE Failure. 109 */ 110 typedef int (*int_vector_match_del_f)( 111 int unit, 112 bcmi_ltsw_int_vector_match_t *vector_match); 113 114 /*! 115 * \brief Delete all vector matches for INT. 116 * 117 * \param [in] unit Unit Number. 118 * \param [in] type Vector match type. 119 * 120 * \retval SHR_E_NONE No errors. 121 * \retval !SHR_E_NONE Failure. 122 */ 123 typedef int (*int_vector_match_del_all_f)( 124 int unit, 125 bcmi_ltsw_int_vector_match_type_t type); 126 127 /*! 128 * \brief Traverse all vector matches for IFA. 129 * 130 * \param [in] unit Unit Number. 131 * \param [in] trav_fn A pointer to the callback function to call for each vector match. 132 * \param [in] cb A pointer to the callback function to call for construct ifa info from int. 133 * \param [in] user_data Pointer to user data to supply in the callback. 134 * 135 * \retval SHR_E_NONE No errors. 136 * \retval !SHR_E_NONE Failure. 137 */ 138 typedef int (*int_vector_match_ifa_traverse_f)( 139 int unit, 140 bcm_int_ifa_vector_match_traverse_cb trav_fn, 141 bcmi_ltsw_int_ifa_vector_match_from_int_cb_f cb, 142 void *user_data); 143 144 /*! 145 * \brief Traverse all vector matches for IOAM. 146 * 147 * \param [in] unit Unit Number. 148 * \param [in] trav_fn A pointer to the callback function to call for each vector match. 149 * \param [in] cb A pointer to the callback function to call for construct ioam info from int. 150 * \param [in] user_data Pointer to user data to supply in the callback. 151 * 152 * \retval SHR_E_NONE No errors. 153 * \retval !SHR_E_NONE Failure. 154 */ 155 typedef int (*int_vector_match_ioam_traverse_f)( 156 int unit, 157 bcm_int_ioam_vector_match_traverse_cb trav_fn, 158 bcmi_ltsw_int_ioam_vector_match_from_int_cb_f cb, 159 void *user_data); 160 161 /*! 162 * \brief Traverse all vector matches for INT-DP. 163 * 164 * \param [in] unit Unit Number. 165 * \param [in] trav_fn A pointer to the callback function to call for each vector match. 166 * \param [in] cb A pointer to the callback function to call for construct int-dp info from int. 167 * \param [in] user_data Pointer to user data to supply in the callback. 168 * 169 * \retval SHR_E_NONE No errors. 170 * \retval !SHR_E_NONE Failure. 171 */ 172 typedef int (*int_vector_match_dp_traverse_f)( 173 int unit, 174 bcm_int_dp_vector_match_traverse_cb trav_fn, 175 bcmi_ltsw_int_dp_vector_match_from_int_cb_f cb, 176 void *user_data); 177 178 /*! 179 * \brief Create the INT action profile. 180 * 181 * \param [in] unit Unit Number. 182 * \param [in] flags INT Action profile table management flags. 183 * \param [in/out] profile_id Action profile ID. 184 * \param [in] profile Action profile. 185 * 186 * \retval SHR_E_NONE No errors. 187 * \retval !SHR_E_NONE Failure. 188 */ 189 typedef int (*int_action_profile_create_f)( 190 int unit, 191 uint32 flags, 192 int *profile_id, 193 bcmi_ltsw_int_action_profile_t *profile); 194 195 /*! 196 * \brief Get the INT action profile. 197 * 198 * \param [in] unit Unit Number. 199 * \param [in] flags INT Action profile table management flags. 200 * \param [in] profile_id Action profile ID. 201 * \param [out] profile Action profile. 202 * 203 * \retval SHR_E_NONE No errors. 204 * \retval !SHR_E_NONE Failure. 205 */ 206 typedef int (*int_action_profile_get_f)( 207 int unit, 208 uint32 flags, 209 int profile_id, 210 bcmi_ltsw_int_action_profile_t *profile); 211 212 /*! 213 * \brief Delete the INT action profile. 214 * 215 * \param [in] unit Unit Number. 216 * \param [in] flags INT Action profile table management flags. 217 * \param [in] type Action profile type. 218 * \param [in] profile_id Action profile ID. 219 * 220 * \retval SHR_E_NONE No errors. 221 * \retval !SHR_E_NONE Failure. 222 */ 223 typedef int (*int_action_profile_del_f)( 224 int unit, 225 uint32 flags, 226 bcmi_ltsw_int_action_profile_type_t type, 227 int profile_id); 228 229 /*! 230 * \brief Traverse all action profiles for IFA. 231 * 232 * \param [in] unit Unit Number. 233 * \param [in] trav_fn A pointer to the callback function to call for each action profile. 234 * \param [in] cb A pointer to the callback function to call for construct ifa info from int. 235 * \param [in] user_data Pointer to user data to supply in the callback. 236 * 237 * \retval SHR_E_NONE No errors. 238 * \retval !SHR_E_NONE Failure. 239 */ 240 typedef int (*int_action_profile_ifa_traverse_f)( 241 int unit, 242 bcm_int_ifa_action_profile_traverse_cb trav_fn, 243 bcmi_ltsw_int_ifa_action_profile_from_int_cb_f cb, 244 void *user_data); 245 246 /*! 247 * \brief Traverse all action profiles for IOAM. 248 * 249 * \param [in] unit Unit Number. 250 * \param [in] trav_fn A pointer to the callback function to call for each action profile. 251 * \param [in] cb A pointer to the callback function to call for construct ioam info from int. 252 * \param [in] user_data Pointer to user data to supply in the callback. 253 * 254 * \retval SHR_E_NONE No errors. 255 * \retval !SHR_E_NONE Failure. 256 */ 257 typedef int (*int_action_profile_ioam_traverse_f)( 258 int unit, 259 bcm_int_ioam_action_profile_traverse_cb trav_fn, 260 bcmi_ltsw_int_ioam_action_profile_from_int_cb_f cb, 261 void *user_data); 262 263 /*! 264 * \brief Traverse all action profiles for INT-DP. 265 * 266 * \param [in] unit Unit Number. 267 * \param [in] trav_fn A pointer to the callback function to call for each action profile. 268 * \param [in] cb A pointer to the callback function to call for construct int-dp info from int. 269 * \param [in] user_data Pointer to user data to supply in the callback. 270 * 271 * \retval SHR_E_NONE No errors. 272 * \retval !SHR_E_NONE Failure. 273 */ 274 typedef int (*int_action_profile_dp_traverse_f)( 275 int unit, 276 bcm_int_dp_action_profile_traverse_cb trav_fn, 277 bcmi_ltsw_int_dp_action_profile_from_int_cb_f cb, 278 void *user_data); 279 280 /*! 281 * \brief Create the opaque data profile for INT metadata construction. 282 * 283 * \param [in] unit Unit Number. 284 * \param [in] flags INT opaque data profile table management flags. 285 * \param [in/out] profile_id Opaque data profile ID. 286 * \param [in] profile Opaque data profile. 287 * 288 * \retval SHR_E_NONE No errors. 289 * \retval !SHR_E_NONE Failure. 290 */ 291 typedef int (*int_opaque_data_profile_create_f)( 292 int unit, 293 uint32 flags, 294 int *profile_id, 295 bcm_int_opaque_data_profile_t *profile); 296 297 /*! 298 * \brief Get the opaque data profile for INT metadata construction. 299 * 300 * \param [in] unit Unit Number. 301 * \param [in] flags INT opaque data profile table management flags. 302 * \param [in] profile_id Opaque data profile ID. 303 * \param [out] profile Opaque data profile. 304 * 305 * \retval SHR_E_NONE No errors. 306 * \retval !SHR_E_NONE Failure. 307 */ 308 typedef int (*int_opaque_data_profile_get_f)( 309 int unit, 310 uint32 flags, 311 int profile_id, 312 bcm_int_opaque_data_profile_t *profile); 313 314 /*! 315 * \brief Delete the opaque data profile for INT metadata construction. 316 * 317 * \param [in] unit Unit Number. 318 * \param [in] flags INT opaque data profile table management flags. 319 * \param [in] profile_id Opaque data profile ID. 320 * 321 * \retval SHR_E_NONE No errors. 322 * \retval !SHR_E_NONE Failure. 323 */ 324 typedef int (*int_opaque_data_profile_del_f)( 325 int unit, 326 uint32 flags, 327 int profile_id); 328 329 /*! 330 * \brief Traverse all opaque data profiles INT metadata construction. 331 * 332 * \param [in] unit Unit Number. 333 * \param [in] cb A pointer to the callback function to call for each opaque data profile. 334 * \param [in] user_data Pointer to user data to supply in the callback. 335 * 336 * \retval SHR_E_NONE No errors. 337 * \retval !SHR_E_NONE Failure. 338 */ 339 typedef int (*int_opaque_data_profile_traverse_f)( 340 int unit, 341 bcm_int_opaque_data_profile_traverse_cb cb, 342 void *user_data); 343 344 /*! 345 * \brief Set various configurations for INT cosq stat. 346 * 347 * \param [in] unit Unit Number. 348 * \param [in] config Cosq stat configurations. 349 * 350 * \retval SHR_E_NONE No errors. 351 * \retval !SHR_E_NONE Failure. 352 */ 353 typedef int (*int_cosq_stat_config_set_f)( 354 int unit, 355 bcm_int_cosq_stat_config_t *config); 356 357 /*! 358 * \brief Get various configurations for INT cosq stat. 359 * 360 * \param [in] unit Unit Number. 361 * \param [out] config Cosq stat configurations. 362 * 363 * \retval SHR_E_NONE No errors. 364 * \retval !SHR_E_NONE Failure. 365 */ 366 typedef int (*int_cosq_stat_config_get_f)( 367 int unit, 368 bcm_int_cosq_stat_config_t *config); 369 370 /*! 371 * \brief Create the metadata profile. 372 * 373 * \param [in] unit Unit Number. 374 * \param [in] flags Metadata profile table management flags. 375 * \param [in/out] profile_id Metadata profile ID. 376 * 377 * \retval SHR_E_NONE No errors. 378 * \retval !SHR_E_NONE Failure. 379 */ 380 typedef int (*int_metadata_profile_create_f)( 381 int unit, 382 uint32 flags, 383 int *profile_id); 384 385 /*! 386 * \brief Get the metadata profile. 387 * 388 * \param [in] unit Unit Number. 389 * \param [in] flags Metadata profile table management flags. 390 * \param [in] profile_id Metadata profile ID. 391 * \param [in] array_size Metadata field array size. 392 * \param [out] entry_array Metadata field entry array. 393 * \param [out] field_count Metadata field count. 394 * 395 * \retval SHR_E_NONE No errors. 396 * \retval !SHR_E_NONE Failure. 397 */ 398 typedef int (*int_metadata_profile_get_f)( 399 int unit, 400 uint32 flags, 401 int profile_id, 402 int array_size, 403 bcm_int_metadata_field_entry_t *entry_array, 404 int *field_count); 405 406 /*! 407 * \brief Delete the metadata profile. 408 * 409 * \param [in] unit Unit Number. 410 * \param [in] flags Metadata profile table management flags. 411 * \param [in] profile_id Metadata profile ID. 412 * 413 * \retval SHR_E_NONE No errors. 414 * \retval !SHR_E_NONE Failure. 415 */ 416 typedef int (*int_metadata_profile_del_f)( 417 int unit, 418 uint32 flags, 419 int profile_id); 420 421 /*! 422 * \brief Traverse all metadata profiles. 423 * 424 * \param [in] unit Unit Number. 425 * \param [in] cb A pointer to the callback function to call for each metadata profile. 426 * \param [in] user_data Pointer to user data to supply in the callback. 427 * 428 * \retval SHR_E_NONE No errors. 429 * \retval !SHR_E_NONE Failure. 430 */ 431 typedef int (*int_metadata_profile_traverse_f)( 432 int unit, 433 bcm_int_metadata_profile_traverse_cb cb, 434 void *user_data); 435 436 /*! 437 * \brief Add the metadata field to the metadata profile. 438 * 439 * \param [in] unit Unit Number. 440 * \param [in] profile_id Metadata profile ID. 441 * \param [in] field_entry Metadata field entry. 442 * 443 * \retval SHR_E_NONE No errors. 444 * \retval !SHR_E_NONE Failure. 445 */ 446 typedef int (*int_metadata_field_add_f)( 447 int unit, 448 int profile_id, 449 bcm_int_metadata_field_entry_t *field_entry); 450 451 /*! 452 * \brief Delete the metadata field from the metadata profile. 453 * 454 * \param [in] unit Unit Number. 455 * \param [in] profile_id Metadata profile ID. 456 * \param [in] field_entry Metadata field entry. 457 * 458 * \retval SHR_E_NONE No errors. 459 * \retval !SHR_E_NONE Failure. 460 */ 461 typedef int (*int_metadata_field_delete_f)( 462 int unit, 463 int profile_id, 464 bcm_int_metadata_field_entry_t *field_entry); 465 466 /*! 467 * \brief Delete all the metadata field from the metadata profile. 468 * 469 * \param [in] unit Unit Number. 470 * \param [in] profile_id Metadata profile ID. 471 * 472 * \retval SHR_E_NONE No errors. 473 * \retval !SHR_E_NONE Failure. 474 */ 475 typedef int (*int_metadata_field_delete_all_f)( 476 int unit, 477 int profile_id); 478 479 /*! 480 * \brief Get the metadata field select information. 481 * 482 * \param [in] unit Unit Number. 483 * \param [in] field Metadata field. 484 * \param [out] field_select_info Metadata field select information. 485 * 486 * \retval SHR_E_NONE No errors. 487 * \retval !SHR_E_NONE Failure. 488 */ 489 typedef int (*int_metadata_field_select_info_get_f)( 490 int unit, 491 bcm_int_metadata_field_t field, 492 bcm_int_metadata_field_select_info_t *field_select_info); 493 494 /*! 495 * \brief Get metadata field info. 496 * 497 * \param [in] unit Unit Number. 498 * \param [out] field_info Metadata field info. 499 * 500 * \retval SHR_E_NONE No errors. 501 * \retval !SHR_E_NONE Failure. 502 */ 503 typedef int (*int_md_field_info_get_f)( 504 int unit, 505 bcmint_int_md_field_info_t **field_info); 506 507 /*! 508 * \brief Int driver structure. 509 */ 510 typedef struct mbcm_ltsw_int_drv_s { 511 512 /*! Init INT module. */ 513 int_init_f int_init; 514 515 /*! Detach INT module. */ 516 int_detach_f int_detach; 517 518 /*! Specify INT switch control behaviors. */ 519 int_control_set_f int_control_set; 520 521 /*! Retrieve INT switch control behaviors. */ 522 int_control_get_f int_control_get; 523 524 /*! Add a vector match for INT. */ 525 int_vector_match_add_f int_vector_match_add; 526 527 /*! Get a vector match for INT. */ 528 int_vector_match_get_f int_vector_match_get; 529 530 /*! Delete a vector match for INT. */ 531 int_vector_match_del_f int_vector_match_del; 532 533 /*! Delete all vector matches for INT. */ 534 int_vector_match_del_all_f int_vector_match_del_all; 535 536 /*! Traverse all vector matches for IFA. */ 537 int_vector_match_ifa_traverse_f int_vector_match_ifa_traverse; 538 539 /*! Traverse all vector matches for IOAM. */ 540 int_vector_match_ioam_traverse_f int_vector_match_ioam_traverse; 541 542 /*! Traverse all vector matches for INT-DP. */ 543 int_vector_match_dp_traverse_f int_vector_match_dp_traverse; 544 545 /*! Create the INT action profile. */ 546 int_action_profile_create_f int_action_profile_create; 547 548 /*! Get the INT action profile. */ 549 int_action_profile_get_f int_action_profile_get; 550 551 /*! Delete the INT action profile. */ 552 int_action_profile_del_f int_action_profile_del; 553 554 /*! Traverse all action profiles for IFA. */ 555 int_action_profile_ifa_traverse_f int_action_profile_ifa_traverse; 556 557 /*! Traverse all action profiles for IOAM. */ 558 int_action_profile_ioam_traverse_f int_action_profile_ioam_traverse; 559 560 /*! Traverse all action profiles for INT-DP. */ 561 int_action_profile_dp_traverse_f int_action_profile_dp_traverse; 562 563 /*! Create the opaque data profile for INT metadata construction. */ 564 int_opaque_data_profile_create_f int_opaque_data_profile_create; 565 566 /*! Get the opaque data profile for INT metadata construction. */ 567 int_opaque_data_profile_get_f int_opaque_data_profile_get; 568 569 /*! Delete the opaque data profile for INT metadata construction. */ 570 int_opaque_data_profile_del_f int_opaque_data_profile_del; 571 572 /*! Traverse all opaque data profiles INT metadata construction. */ 573 int_opaque_data_profile_traverse_f int_opaque_data_profile_traverse; 574 575 /*! Set various configurations for INT cosq stat. */ 576 int_cosq_stat_config_set_f int_cosq_stat_config_set; 577 578 /*! Get various configurations for INT cosq stat. */ 579 int_cosq_stat_config_get_f int_cosq_stat_config_get; 580 581 /*! Create the metadata profile. */ 582 int_metadata_profile_create_f int_metadata_profile_create; 583 584 /*! Get the metadata profile. */ 585 int_metadata_profile_get_f int_metadata_profile_get; 586 587 /*! Delete the metadata profile. */ 588 int_metadata_profile_del_f int_metadata_profile_del; 589 590 /*! Traverse all metadata profiles. */ 591 int_metadata_profile_traverse_f int_metadata_profile_traverse; 592 593 /*! Add the metadata field to the metadata profile. */ 594 int_metadata_field_add_f int_metadata_field_add; 595 596 /*! Delete the metadata field from the metadata profile. */ 597 int_metadata_field_delete_f int_metadata_field_delete; 598 599 /*! Delete all the metadata field from the metadata profile. */ 600 int_metadata_field_delete_all_f int_metadata_field_delete_all; 601 602 /*! Get the metadata field select information. */ 603 int_metadata_field_select_info_get_f int_metadata_field_select_info_get; 604 605 /*! Get metadata field info. */ 606 int_md_field_info_get_f int_md_field_info_get; 607 608 } mbcm_ltsw_int_drv_t; 609 610 /*! 611 * \brief Set the INT driver of the device. 612 * 613 * \param [in] unit Unit Number. 614 * \param [in] drv Int driver to set. 615 * 616 * \retval SHR_E_NONE No errors. 617 * \retval !SHR_E_NONE Failure. 618 */ 619 extern int 620 mbcm_ltsw_int_drv_set( 621 int unit, 622 mbcm_ltsw_int_drv_t *drv); 623 624 /*! 625 * \brief Init INT module. 626 * 627 * \param [in] unit Unit Number. 628 * 629 * \retval SHR_E_NONE No errors. 630 * \retval !SHR_E_NONE Failure. 631 */ 632 extern int 633 mbcm_ltsw_int_init(int unit); 634 635 /*! 636 * \brief Detach INT module. 637 * 638 * \param [in] unit Unit Number. 639 * 640 * \retval SHR_E_NONE No errors. 641 * \retval !SHR_E_NONE Failure. 642 */ 643 extern int 644 mbcm_ltsw_int_detach(int unit); 645 646 /*! 647 * \brief Specify INT switch control behaviors. 648 * 649 * \param [in] unit Unit Number. 650 * \param [in] control The desired configuration parameter to modify. 651 * \param [in] value The value with which to set the parameter. 652 * 653 * \retval SHR_E_NONE No errors. 654 * \retval !SHR_E_NONE Failure. 655 */ 656 extern int 657 mbcm_ltsw_int_control_set( 658 int unit, 659 bcmi_ltsw_int_control_t control, 660 uint32_t value); 661 662 /*! 663 * \brief Retrieve INT switch control behaviors. 664 * 665 * \param [in] unit Unit Number. 666 * \param [in] control The desired configuration parameter to retrieve. 667 * \param [out] value Pointer to where the retrieved value will be written. 668 * 669 * \retval SHR_E_NONE No errors. 670 * \retval !SHR_E_NONE Failure. 671 */ 672 extern int 673 mbcm_ltsw_int_control_get( 674 int unit, 675 bcmi_ltsw_int_control_t control, 676 uint32_t *value); 677 678 /*! 679 * \brief Add a vector match for INT. 680 * 681 * \param [in] unit Unit Number. 682 * \param [in] options Add options. 683 * \param [in/out] vector_match Vector match criteria. 684 * 685 * \retval SHR_E_NONE No errors. 686 * \retval !SHR_E_NONE Failure. 687 */ 688 extern int 689 mbcm_ltsw_int_vector_match_add( 690 int unit, 691 uint32 options, 692 bcmi_ltsw_int_vector_match_t *vector_match); 693 694 /*! 695 * \brief Get a vector match for INT. 696 * 697 * \param [in] unit Unit Number. 698 * \param [out] vector_match Vector match criteria. 699 * 700 * \retval SHR_E_NONE No errors. 701 * \retval !SHR_E_NONE Failure. 702 */ 703 extern int 704 mbcm_ltsw_int_vector_match_get( 705 int unit, 706 bcmi_ltsw_int_vector_match_t *vector_match); 707 708 /*! 709 * \brief Delete a vector match for INT. 710 * 711 * \param [in] unit Unit Number. 712 * \param [in] vector_match Vector match criteria. 713 * 714 * \retval SHR_E_NONE No errors. 715 * \retval !SHR_E_NONE Failure. 716 */ 717 extern int 718 mbcm_ltsw_int_vector_match_del( 719 int unit, 720 bcmi_ltsw_int_vector_match_t *vector_match); 721 722 /*! 723 * \brief Delete all vector matches for INT. 724 * 725 * \param [in] unit Unit Number. 726 * \param [in] type Vector match type. 727 * 728 * \retval SHR_E_NONE No errors. 729 * \retval !SHR_E_NONE Failure. 730 */ 731 extern int 732 mbcm_ltsw_int_vector_match_del_all( 733 int unit, 734 bcmi_ltsw_int_vector_match_type_t type); 735 736 /*! 737 * \brief Traverse all vector matches for IFA. 738 * 739 * \param [in] unit Unit Number. 740 * \param [in] trav_fn A pointer to the callback function to call for each vector match. 741 * \param [in] cb A pointer to the callback function to call for construct ifa info from int. 742 * \param [in] user_data Pointer to user data to supply in the callback. 743 * 744 * \retval SHR_E_NONE No errors. 745 * \retval !SHR_E_NONE Failure. 746 */ 747 extern int 748 mbcm_ltsw_int_vector_match_ifa_traverse( 749 int unit, 750 bcm_int_ifa_vector_match_traverse_cb trav_fn, 751 bcmi_ltsw_int_ifa_vector_match_from_int_cb_f cb, 752 void *user_data); 753 754 /*! 755 * \brief Traverse all vector matches for IOAM. 756 * 757 * \param [in] unit Unit Number. 758 * \param [in] trav_fn A pointer to the callback function to call for each vector match. 759 * \param [in] cb A pointer to the callback function to call for construct ioam info from int. 760 * \param [in] user_data Pointer to user data to supply in the callback. 761 * 762 * \retval SHR_E_NONE No errors. 763 * \retval !SHR_E_NONE Failure. 764 */ 765 extern int 766 mbcm_ltsw_int_vector_match_ioam_traverse( 767 int unit, 768 bcm_int_ioam_vector_match_traverse_cb trav_fn, 769 bcmi_ltsw_int_ioam_vector_match_from_int_cb_f cb, 770 void *user_data); 771 772 /*! 773 * \brief Traverse all vector matches for INT-DP. 774 * 775 * \param [in] unit Unit Number. 776 * \param [in] trav_fn A pointer to the callback function to call for each vector match. 777 * \param [in] cb A pointer to the callback function to call for construct int-dp info from int. 778 * \param [in] user_data Pointer to user data to supply in the callback. 779 * 780 * \retval SHR_E_NONE No errors. 781 * \retval !SHR_E_NONE Failure. 782 */ 783 extern int 784 mbcm_ltsw_int_vector_match_dp_traverse( 785 int unit, 786 bcm_int_dp_vector_match_traverse_cb trav_fn, 787 bcmi_ltsw_int_dp_vector_match_from_int_cb_f cb, 788 void *user_data); 789 790 /*! 791 * \brief Create the INT action profile. 792 * 793 * \param [in] unit Unit Number. 794 * \param [in] flags INT Action profile table management flags. 795 * \param [in/out] profile_id Action profile ID. 796 * \param [in] profile Action profile. 797 * 798 * \retval SHR_E_NONE No errors. 799 * \retval !SHR_E_NONE Failure. 800 */ 801 extern int 802 mbcm_ltsw_int_action_profile_create( 803 int unit, 804 uint32 flags, 805 int *profile_id, 806 bcmi_ltsw_int_action_profile_t *profile); 807 808 /*! 809 * \brief Get the INT action profile. 810 * 811 * \param [in] unit Unit Number. 812 * \param [in] flags INT Action profile table management flags. 813 * \param [in] profile_id Action profile ID. 814 * \param [out] profile Action profile. 815 * 816 * \retval SHR_E_NONE No errors. 817 * \retval !SHR_E_NONE Failure. 818 */ 819 extern int 820 mbcm_ltsw_int_action_profile_get( 821 int unit, 822 uint32 flags, 823 int profile_id, 824 bcmi_ltsw_int_action_profile_t *profile); 825 826 /*! 827 * \brief Delete the INT action profile. 828 * 829 * \param [in] unit Unit Number. 830 * \param [in] flags INT Action profile table management flags. 831 * \param [in] type Action profile type. 832 * \param [in] profile_id Action profile ID. 833 * 834 * \retval SHR_E_NONE No errors. 835 * \retval !SHR_E_NONE Failure. 836 */ 837 extern int 838 mbcm_ltsw_int_action_profile_del( 839 int unit, 840 uint32 flags, 841 bcmi_ltsw_int_action_profile_type_t type, 842 int profile_id); 843 844 /*! 845 * \brief Traverse all action profiles for IFA. 846 * 847 * \param [in] unit Unit Number. 848 * \param [in] trav_fn A pointer to the callback function to call for each action profile. 849 * \param [in] cb A pointer to the callback function to call for construct ifa info from int. 850 * \param [in] user_data Pointer to user data to supply in the callback. 851 * 852 * \retval SHR_E_NONE No errors. 853 * \retval !SHR_E_NONE Failure. 854 */ 855 extern int 856 mbcm_ltsw_int_action_profile_ifa_traverse( 857 int unit, 858 bcm_int_ifa_action_profile_traverse_cb trav_fn, 859 bcmi_ltsw_int_ifa_action_profile_from_int_cb_f cb, 860 void *user_data); 861 862 /*! 863 * \brief Traverse all action profiles for IOAM. 864 * 865 * \param [in] unit Unit Number. 866 * \param [in] trav_fn A pointer to the callback function to call for each action profile. 867 * \param [in] cb A pointer to the callback function to call for construct ioam info from int. 868 * \param [in] user_data Pointer to user data to supply in the callback. 869 * 870 * \retval SHR_E_NONE No errors. 871 * \retval !SHR_E_NONE Failure. 872 */ 873 extern int 874 mbcm_ltsw_int_action_profile_ioam_traverse( 875 int unit, 876 bcm_int_ioam_action_profile_traverse_cb trav_fn, 877 bcmi_ltsw_int_ioam_action_profile_from_int_cb_f cb, 878 void *user_data); 879 880 /*! 881 * \brief Traverse all action profiles for INT-DP. 882 * 883 * \param [in] unit Unit Number. 884 * \param [in] trav_fn A pointer to the callback function to call for each action profile. 885 * \param [in] cb A pointer to the callback function to call for construct int-dp info from int. 886 * \param [in] user_data Pointer to user data to supply in the callback. 887 * 888 * \retval SHR_E_NONE No errors. 889 * \retval !SHR_E_NONE Failure. 890 */ 891 extern int 892 mbcm_ltsw_int_action_profile_dp_traverse( 893 int unit, 894 bcm_int_dp_action_profile_traverse_cb trav_fn, 895 bcmi_ltsw_int_dp_action_profile_from_int_cb_f cb, 896 void *user_data); 897 898 /*! 899 * \brief Create the opaque data profile for INT metadata construction. 900 * 901 * \param [in] unit Unit Number. 902 * \param [in] flags INT opaque data profile table management flags. 903 * \param [in/out] profile_id Opaque data profile ID. 904 * \param [in] profile Opaque data profile. 905 * 906 * \retval SHR_E_NONE No errors. 907 * \retval !SHR_E_NONE Failure. 908 */ 909 extern int 910 mbcm_ltsw_int_opaque_data_profile_create( 911 int unit, 912 uint32 flags, 913 int *profile_id, 914 bcm_int_opaque_data_profile_t *profile); 915 916 /*! 917 * \brief Get the opaque data profile for INT metadata construction. 918 * 919 * \param [in] unit Unit Number. 920 * \param [in] flags INT opaque data profile table management flags. 921 * \param [in] profile_id Opaque data profile ID. 922 * \param [out] profile Opaque data profile. 923 * 924 * \retval SHR_E_NONE No errors. 925 * \retval !SHR_E_NONE Failure. 926 */ 927 extern int 928 mbcm_ltsw_int_opaque_data_profile_get( 929 int unit, 930 uint32 flags, 931 int profile_id, 932 bcm_int_opaque_data_profile_t *profile); 933 934 /*! 935 * \brief Delete the opaque data profile for INT metadata construction. 936 * 937 * \param [in] unit Unit Number. 938 * \param [in] flags INT opaque data profile table management flags. 939 * \param [in] profile_id Opaque data profile ID. 940 * 941 * \retval SHR_E_NONE No errors. 942 * \retval !SHR_E_NONE Failure. 943 */ 944 extern int 945 mbcm_ltsw_int_opaque_data_profile_del( 946 int unit, 947 uint32 flags, 948 int profile_id); 949 950 /*! 951 * \brief Traverse all opaque data profiles INT metadata construction. 952 * 953 * \param [in] unit Unit Number. 954 * \param [in] cb A pointer to the callback function to call for each opaque data profile. 955 * \param [in] user_data Pointer to user data to supply in the callback. 956 * 957 * \retval SHR_E_NONE No errors. 958 * \retval !SHR_E_NONE Failure. 959 */ 960 extern int 961 mbcm_ltsw_int_opaque_data_profile_traverse( 962 int unit, 963 bcm_int_opaque_data_profile_traverse_cb cb, 964 void *user_data); 965 966 /*! 967 * \brief Set various configurations for INT cosq stat. 968 * 969 * \param [in] unit Unit Number. 970 * \param [in] config Cosq stat configurations. 971 * 972 * \retval SHR_E_NONE No errors. 973 * \retval !SHR_E_NONE Failure. 974 */ 975 extern int 976 mbcm_ltsw_int_cosq_stat_config_set( 977 int unit, 978 bcm_int_cosq_stat_config_t *config); 979 980 /*! 981 * \brief Get various configurations for INT cosq stat. 982 * 983 * \param [in] unit Unit Number. 984 * \param [out] config Cosq stat configurations. 985 * 986 * \retval SHR_E_NONE No errors. 987 * \retval !SHR_E_NONE Failure. 988 */ 989 extern int 990 mbcm_ltsw_int_cosq_stat_config_get( 991 int unit, 992 bcm_int_cosq_stat_config_t *config); 993 994 /*! 995 * \brief Create the metadata profile. 996 * 997 * \param [in] unit Unit Number. 998 * \param [in] flags Metadata profile table management flags. 999 * \param [in/out] profile_id Metadata profile ID. 1000 * 1001 * \retval SHR_E_NONE No errors. 1002 * \retval !SHR_E_NONE Failure. 1003 */ 1004 extern int 1005 mbcm_ltsw_int_metadata_profile_create( 1006 int unit, 1007 uint32 flags, 1008 int *profile_id); 1009 1010 /*! 1011 * \brief Get the metadata profile. 1012 * 1013 * \param [in] unit Unit Number. 1014 * \param [in] flags Metadata profile table management flags. 1015 * \param [in] profile_id Metadata profile ID. 1016 * \param [in] array_size Metadata field array size. 1017 * \param [out] entry_array Metadata field entry array. 1018 * \param [out] field_count Metadata field count. 1019 * 1020 * \retval SHR_E_NONE No errors. 1021 * \retval !SHR_E_NONE Failure. 1022 */ 1023 extern int 1024 mbcm_ltsw_int_metadata_profile_get( 1025 int unit, 1026 uint32 flags, 1027 int profile_id, 1028 int array_size, 1029 bcm_int_metadata_field_entry_t *entry_array, 1030 int *field_count); 1031 1032 /*! 1033 * \brief Delete the metadata profile. 1034 * 1035 * \param [in] unit Unit Number. 1036 * \param [in] flags Metadata profile table management flags. 1037 * \param [in] profile_id Metadata profile ID. 1038 * 1039 * \retval SHR_E_NONE No errors. 1040 * \retval !SHR_E_NONE Failure. 1041 */ 1042 extern int 1043 mbcm_ltsw_int_metadata_profile_del( 1044 int unit, 1045 uint32 flags, 1046 int profile_id); 1047 1048 /*! 1049 * \brief Traverse all metadata profiles. 1050 * 1051 * \param [in] unit Unit Number. 1052 * \param [in] cb A pointer to the callback function to call for each metadata profile. 1053 * \param [in] user_data Pointer to user data to supply in the callback. 1054 * 1055 * \retval SHR_E_NONE No errors. 1056 * \retval !SHR_E_NONE Failure. 1057 */ 1058 extern int 1059 mbcm_ltsw_int_metadata_profile_traverse( 1060 int unit, 1061 bcm_int_metadata_profile_traverse_cb cb, 1062 void *user_data); 1063 1064 /*! 1065 * \brief Add the metadata field to the metadata profile. 1066 * 1067 * \param [in] unit Unit Number. 1068 * \param [in] profile_id Metadata profile ID. 1069 * \param [in] field_entry Metadata field entry. 1070 * 1071 * \retval SHR_E_NONE No errors. 1072 * \retval !SHR_E_NONE Failure. 1073 */ 1074 extern int 1075 mbcm_ltsw_int_metadata_field_add( 1076 int unit, 1077 int profile_id, 1078 bcm_int_metadata_field_entry_t *field_entry); 1079 1080 /*! 1081 * \brief Delete the metadata field from the metadata profile. 1082 * 1083 * \param [in] unit Unit Number. 1084 * \param [in] profile_id Metadata profile ID. 1085 * \param [in] field_entry Metadata field entry. 1086 * 1087 * \retval SHR_E_NONE No errors. 1088 * \retval !SHR_E_NONE Failure. 1089 */ 1090 extern int 1091 mbcm_ltsw_int_metadata_field_delete( 1092 int unit, 1093 int profile_id, 1094 bcm_int_metadata_field_entry_t *field_entry); 1095 1096 /*! 1097 * \brief Delete all the metadata field from the metadata profile. 1098 * 1099 * \param [in] unit Unit Number. 1100 * \param [in] profile_id Metadata profile ID. 1101 * 1102 * \retval SHR_E_NONE No errors. 1103 * \retval !SHR_E_NONE Failure. 1104 */ 1105 extern int 1106 mbcm_ltsw_int_metadata_field_delete_all( 1107 int unit, 1108 int profile_id); 1109 1110 /*! 1111 * \brief Get the metadata field select information. 1112 * 1113 * \param [in] unit Unit Number. 1114 * \param [in] field Metadata field. 1115 * \param [out] field_select_info Metadata field select information. 1116 * 1117 * \retval SHR_E_NONE No errors. 1118 * \retval !SHR_E_NONE Failure. 1119 */ 1120 extern int 1121 mbcm_ltsw_int_metadata_field_select_info_get( 1122 int unit, 1123 bcm_int_metadata_field_t field, 1124 bcm_int_metadata_field_select_info_t *field_select_info); 1125 1126 /*! 1127 * \brief Get metadata field info. 1128 * 1129 * \param [in] unit Unit Number. 1130 * \param [out] field_info Metadata field info. 1131 * 1132 * \retval SHR_E_NONE No errors. 1133 * \retval !SHR_E_NONE Failure. 1134 */ 1135 extern int 1136 mbcm_ltsw_int_md_field_info_get( 1137 int unit, 1138 bcmint_int_md_field_info_t **field_info); 1139 1140 #endif /* INCLUDE_INT */ 1141 1142 #endif /* BCMINT_LTSW_MBCM_INT_H */