1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) 2 * 3 * Copyright 2013-2016 Freescale Semiconductor Inc. 4 * Copyright 2018-2023 NXP 5 * 6 */ 7 #ifndef __FSL_DPDMUX_H 8 #define __FSL_DPDMUX_H 9 10 #include <fsl_net.h> 11 12 struct fsl_mc_io; 13 14 /** @addtogroup dpdmux Data Path Demux API 15 * Contains API for handling DPDMUX topology and functionality 16 * @{ 17 */ 18 19 int dpdmux_open(struct fsl_mc_io *mc_io, 20 uint32_t cmd_flags, 21 int dpdmux_id, 22 uint16_t *token); 23 24 int dpdmux_close(struct fsl_mc_io *mc_io, 25 uint32_t cmd_flags, 26 uint16_t token); 27 28 /** 29 * DPDMUX general options 30 */ 31 32 /** 33 * Enable bridging between internal interfaces 34 */ 35 #define DPDMUX_OPT_BRIDGE_EN 0x0000000000000002ULL 36 37 /** 38 * Mask support for classification 39 */ 40 #define DPDMUX_OPT_CLS_MASK_SUPPORT 0x0000000000000020ULL 41 42 /** 43 * Automatic max frame length - maximum frame length for dpdmux interface will 44 * be changed automatically by connected dpni objects. 45 */ 46 #define DPDMUX_OPT_AUTO_MAX_FRAME_LEN 0x0000000000000040ULL 47 48 #define DPDMUX_IRQ_INDEX_IF 0x0000 49 #define DPDMUX_IRQ_INDEX 0x0001 50 51 /** 52 * IRQ event - Indicates that the link state changed 53 */ 54 #define DPDMUX_IRQ_EVENT_LINK_CHANGED 0x0001 55 56 /** 57 * enum dpdmux_manip - DPDMUX manipulation operations 58 * @DPDMUX_MANIP_NONE: No manipulation on frames 59 * @DPDMUX_MANIP_ADD_REMOVE_S_VLAN: Add S-VLAN on egress, remove it on ingress 60 */ 61 enum dpdmux_manip { 62 DPDMUX_MANIP_NONE = 0x0, 63 DPDMUX_MANIP_ADD_REMOVE_S_VLAN = 0x1 64 }; 65 66 /** 67 * enum dpdmux_method - DPDMUX method options 68 * @DPDMUX_METHOD_NONE: no DPDMUX method 69 * @DPDMUX_METHOD_C_VLAN_MAC: DPDMUX based on C-VLAN and MAC address 70 * @DPDMUX_METHOD_MAC: DPDMUX based on MAC address 71 * @DPDMUX_METHOD_C_VLAN: DPDMUX based on C-VLAN 72 * @DPDMUX_METHOD_S_VLAN: DPDMUX based on S-VLAN 73 */ 74 enum dpdmux_method { 75 DPDMUX_METHOD_NONE = 0x0, 76 DPDMUX_METHOD_C_VLAN_MAC = 0x1, 77 DPDMUX_METHOD_MAC = 0x2, 78 DPDMUX_METHOD_C_VLAN = 0x3, 79 DPDMUX_METHOD_S_VLAN = 0x4, 80 DPDMUX_METHOD_CUSTOM = 0x5, 81 }; 82 83 /** 84 * struct dpdmux_cfg - DPDMUX configuration parameters 85 * @method: Defines the operation method for the DPDMUX address table 86 * @manip: Required manipulation operation 87 * @num_ifs: Number of interfaces (excluding the uplink interface) 88 * @default_if: Default interface number (different from uplink, 89 maximum value num_ifs) 90 * @adv: Advanced parameters; default is all zeros; 91 * use this structure to change default settings 92 * @adv.options: DPDMUX options - combination of 'DPDMUX_OPT_<X>' flags. 93 * @adv.max_dmat_entries: Maximum entries in DPDMUX address table 94 * 0 - indicates default: 64 entries per interface. 95 * @adv.max_mc_groups: Number of multicast groups in DPDMUX table 96 * 0 - indicates default: 32 multicast groups. 97 * @adv.max_vlan_ids: Maximum vlan ids allowed in the system - 98 * relevant only case of working in mac+vlan method. 99 * 0 - indicates default 16 vlan ids. 100 * @adv.mem_size: Size of the memory used for internal buffers expressed as 101 * number of 256byte buffers. 102 */ 103 struct dpdmux_cfg { 104 enum dpdmux_method method; 105 enum dpdmux_manip manip; 106 uint16_t num_ifs; 107 uint16_t default_if; 108 struct { 109 uint64_t options; 110 uint16_t max_dmat_entries; 111 uint16_t max_mc_groups; 112 uint16_t max_vlan_ids; 113 uint16_t mem_size; 114 } adv; 115 }; 116 117 int dpdmux_create(struct fsl_mc_io *mc_io, 118 uint16_t dprc_token, 119 uint32_t cmd_flags, 120 const struct dpdmux_cfg *cfg, 121 uint32_t *obj_id); 122 123 int dpdmux_destroy(struct fsl_mc_io *mc_io, 124 uint16_t dprc_token, 125 uint32_t cmd_flags, 126 uint32_t object_id); 127 128 int dpdmux_enable(struct fsl_mc_io *mc_io, 129 uint32_t cmd_flags, 130 uint16_t token); 131 132 int dpdmux_disable(struct fsl_mc_io *mc_io, 133 uint32_t cmd_flags, 134 uint16_t token); 135 136 int dpdmux_is_enabled(struct fsl_mc_io *mc_io, 137 uint32_t cmd_flags, 138 uint16_t token, 139 int *en); 140 141 int dpdmux_reset(struct fsl_mc_io *mc_io, 142 uint32_t cmd_flags, 143 uint16_t token); 144 145 /** 146 *Setting 1 DPDMUX_RESET will not reset default interface 147 */ 148 #define DPDMUX_SKIP_DEFAULT_INTERFACE 0x01 149 /** 150 *Setting 1 DPDMUX_RESET will not reset unicast rules 151 */ 152 #define DPDMUX_SKIP_UNICAST_RULES 0x02 153 /** 154 *Setting 1 DPDMUX_RESET will not reset multicast rules 155 */ 156 #define DPDMUX_SKIP_MULTICAST_RULES 0x04 157 /** 158 *Setting 4 DPDMUX_RESET will not reset default interface 159 */ 160 #define DPDMUX_SKIP_RESET_DEFAULT_INTERFACE 0x08 161 162 int dpdmux_set_resetable(struct fsl_mc_io *mc_io, 163 uint32_t cmd_flags, 164 uint16_t token, 165 uint8_t skip_reset_flags); 166 167 int dpdmux_get_resetable(struct fsl_mc_io *mc_io, 168 uint32_t cmd_flags, 169 uint16_t token, 170 uint8_t *skip_reset_flags); 171 172 /** 173 * struct dpdmux_attr - Structure representing DPDMUX attributes 174 * @id: DPDMUX object ID 175 * @options: Configuration options (bitmap) 176 * @method: DPDMUX address table method 177 * @manip: DPDMUX manipulation type 178 * @num_ifs: Number of interfaces (excluding the uplink interface) 179 * @mem_size: DPDMUX frame storage memory size 180 * @default_if: Default interface number (different from uplink, 181 maximum value num_ifs) 182 */ 183 struct dpdmux_attr { 184 int id; 185 uint64_t options; 186 enum dpdmux_method method; 187 enum dpdmux_manip manip; 188 uint16_t num_ifs; 189 uint16_t mem_size; 190 uint16_t default_if; 191 uint16_t max_dmat_entries; 192 uint16_t max_mc_groups; 193 uint16_t max_vlan_ids; 194 }; 195 196 int dpdmux_get_attributes(struct fsl_mc_io *mc_io, 197 uint32_t cmd_flags, 198 uint16_t token, 199 struct dpdmux_attr *attr); 200 201 int dpdmux_set_max_frame_length(struct fsl_mc_io *mc_io, 202 uint32_t cmd_flags, 203 uint16_t token, 204 uint16_t max_frame_length); 205 206 int dpdmux_get_max_frame_length(struct fsl_mc_io *mc_io, 207 uint32_t cmd_flags, 208 uint16_t token, 209 uint16_t if_id, 210 uint16_t *max_frame_length); 211 212 /** 213 * enum dpdmux_counter_type - Counter types 214 * @DPDMUX_CNT_ING_FRAME: Counts ingress frames 215 * @DPDMUX_CNT_ING_BYTE: Counts ingress bytes 216 * @DPDMUX_CNT_ING_FLTR_FRAME: Counts filtered ingress frames 217 * @DPDMUX_CNT_ING_FRAME_DISCARD: Counts discarded ingress frames 218 * @DPDMUX_CNT_ING_MCAST_FRAME: Counts ingress multicast frames 219 * @DPDMUX_CNT_ING_MCAST_BYTE: Counts ingress multicast bytes 220 * @DPDMUX_CNT_ING_BCAST_FRAME: Counts ingress broadcast frames 221 * @DPDMUX_CNT_ING_BCAST_BYTES: Counts ingress broadcast bytes 222 * @DPDMUX_CNT_EGR_FRAME: Counts egress frames 223 * @DPDMUX_CNT_EGR_BYTE: Counts egress bytes 224 * @DPDMUX_CNT_EGR_FRAME_DISCARD: Counts discarded egress frames 225 * @DPDMUX_CNT_ING_NO_BUFFER_DISCARD: Counts ingress no buffer discard frames 226 */ 227 enum dpdmux_counter_type { 228 DPDMUX_CNT_ING_FRAME = 0x0, 229 DPDMUX_CNT_ING_BYTE = 0x1, 230 DPDMUX_CNT_ING_FLTR_FRAME = 0x2, 231 DPDMUX_CNT_ING_FRAME_DISCARD = 0x3, 232 DPDMUX_CNT_ING_MCAST_FRAME = 0x4, 233 DPDMUX_CNT_ING_MCAST_BYTE = 0x5, 234 DPDMUX_CNT_ING_BCAST_FRAME = 0x6, 235 DPDMUX_CNT_ING_BCAST_BYTES = 0x7, 236 DPDMUX_CNT_EGR_FRAME = 0x8, 237 DPDMUX_CNT_EGR_BYTE = 0x9, 238 DPDMUX_CNT_EGR_FRAME_DISCARD = 0xa, 239 DPDMUX_CNT_ING_NO_BUFFER_DISCARD = 0xb, 240 }; 241 242 /** 243 * enum dpdmux_accepted_frames_type - DPDMUX frame types 244 * @DPDMUX_ADMIT_ALL: The device accepts VLAN tagged, untagged and 245 * priority-tagged frames 246 * @DPDMUX_ADMIT_ONLY_VLAN_TAGGED: The device discards untagged frames or 247 * priority-tagged frames that are received on this 248 * interface 249 * @DPDMUX_ADMIT_ONLY_UNTAGGED: Untagged frames or priority-tagged frames 250 * received on this interface are accepted 251 */ 252 enum dpdmux_accepted_frames_type { 253 DPDMUX_ADMIT_ALL = 0, 254 DPDMUX_ADMIT_ONLY_VLAN_TAGGED = 1, 255 DPDMUX_ADMIT_ONLY_UNTAGGED = 2 256 }; 257 258 /** 259 * enum dpdmux_action - DPDMUX action for un-accepted frames 260 * @DPDMUX_ACTION_DROP: Drop un-accepted frames 261 * @DPDMUX_ACTION_REDIRECT_TO_CTRL: Redirect un-accepted frames to the 262 * control interface 263 */ 264 enum dpdmux_action { 265 DPDMUX_ACTION_DROP = 0, 266 DPDMUX_ACTION_REDIRECT_TO_CTRL = 1 267 }; 268 269 /** 270 * struct dpdmux_accepted_frames - Frame types configuration 271 * @type: Defines ingress accepted frames 272 * @unaccept_act: Defines action on frames not accepted 273 */ 274 struct dpdmux_accepted_frames { 275 enum dpdmux_accepted_frames_type type; 276 enum dpdmux_action unaccept_act; 277 }; 278 279 int dpdmux_if_set_accepted_frames(struct fsl_mc_io *mc_io, 280 uint32_t cmd_flags, 281 uint16_t token, 282 uint16_t if_id, 283 const struct dpdmux_accepted_frames *cfg); 284 285 /** 286 * struct dpdmux_if_attr - Structure representing frame types configuration 287 * @rate: Configured interface rate (in bits per second) 288 * @enabled: Indicates if interface is enabled 289 * @accept_frame_type: Indicates type of accepted frames for the interface 290 */ 291 struct dpdmux_if_attr { 292 uint32_t rate; 293 int enabled; 294 int is_default; 295 enum dpdmux_accepted_frames_type accept_frame_type; 296 }; 297 298 int dpdmux_if_get_attributes(struct fsl_mc_io *mc_io, 299 uint32_t cmd_flags, 300 uint16_t token, 301 uint16_t if_id, 302 struct dpdmux_if_attr *attr); 303 304 int dpdmux_if_enable(struct fsl_mc_io *mc_io, 305 uint32_t cmd_flags, 306 uint16_t token, 307 uint16_t if_id); 308 309 int dpdmux_if_disable(struct fsl_mc_io *mc_io, 310 uint32_t cmd_flags, 311 uint16_t token, 312 uint16_t if_id); 313 314 /** 315 * struct dpdmux_l2_rule - Structure representing L2 rule 316 * @mac_addr: MAC address 317 * @vlan_id: VLAN ID 318 */ 319 struct dpdmux_l2_rule { 320 uint8_t mac_addr[6]; 321 uint16_t vlan_id; 322 }; 323 324 int dpdmux_if_remove_l2_rule(struct fsl_mc_io *mc_io, 325 uint32_t cmd_flags, 326 uint16_t token, 327 uint16_t if_id, 328 const struct dpdmux_l2_rule *rule); 329 330 int dpdmux_if_add_l2_rule(struct fsl_mc_io *mc_io, 331 uint32_t cmd_flags, 332 uint16_t token, 333 uint16_t if_id, 334 const struct dpdmux_l2_rule *rule); 335 336 int dpdmux_if_get_counter(struct fsl_mc_io *mc_io, 337 uint32_t cmd_flags, 338 uint16_t token, 339 uint16_t if_id, 340 enum dpdmux_counter_type counter_type, 341 uint64_t *counter); 342 343 int dpdmux_ul_reset_counters(struct fsl_mc_io *mc_io, 344 uint32_t cmd_flags, 345 uint16_t token); 346 347 /** 348 * Enable auto-negotiation 349 */ 350 #define DPDMUX_LINK_OPT_AUTONEG 0x0000000000000001ULL 351 /** 352 * Enable half-duplex mode 353 */ 354 #define DPDMUX_LINK_OPT_HALF_DUPLEX 0x0000000000000002ULL 355 /** 356 * Enable pause frames 357 */ 358 #define DPDMUX_LINK_OPT_PAUSE 0x0000000000000004ULL 359 /** 360 * Enable a-symmetric pause frames 361 */ 362 #define DPDMUX_LINK_OPT_ASYM_PAUSE 0x0000000000000008ULL 363 364 /** 365 * struct dpdmux_link_cfg - Structure representing DPDMUX link configuration 366 * @rate: Rate 367 * @options: Mask of available options; use 'DPDMUX_LINK_OPT_<X>' values 368 */ 369 struct dpdmux_link_cfg { 370 uint32_t rate; 371 uint64_t options; 372 uint64_t advertising; 373 }; 374 375 int dpdmux_if_set_link_cfg(struct fsl_mc_io *mc_io, 376 uint32_t cmd_flags, 377 uint16_t token, 378 uint16_t if_id, 379 struct dpdmux_link_cfg *cfg); 380 /** 381 * struct dpdmux_link_state - Structure representing DPDMUX link state 382 * @rate: Rate 383 * @options: Mask of available options; use 'DPDMUX_LINK_OPT_<X>' values 384 * @up: 0 - down, 1 - up 385 * @state_valid: Ignore/Update the state of the link 386 * @supported: Speeds capability of the phy (bitmap) 387 * @advertising: Speeds that are advertised for autoneg (bitmap) 388 */ 389 struct dpdmux_link_state { 390 uint32_t rate; 391 uint64_t options; 392 int up; 393 int state_valid; 394 uint64_t supported; 395 uint64_t advertising; 396 }; 397 398 int dpdmux_if_get_link_state(struct fsl_mc_io *mc_io, 399 uint32_t cmd_flags, 400 uint16_t token, 401 uint16_t if_id, 402 struct dpdmux_link_state *state); 403 404 int dpdmux_if_set_default(struct fsl_mc_io *mc_io, 405 uint32_t cmd_flags, 406 uint16_t token, 407 uint16_t if_id); 408 409 int dpdmux_if_get_default(struct fsl_mc_io *mc_io, 410 uint32_t cmd_flags, 411 uint16_t token, 412 uint16_t *if_id); 413 414 int dpdmux_set_custom_key(struct fsl_mc_io *mc_io, 415 uint32_t cmd_flags, 416 uint16_t token, 417 uint64_t key_cfg_iova); 418 419 /** 420 * struct dpdmux_rule_cfg - Custom classification rule. 421 * 422 * @key_iova: DMA address of buffer storing the look-up value 423 * @mask_iova: DMA address of the mask used for TCAM classification. This 424 * parameter is used only if dpdmux was created using option 425 * DPDMUX_OPT_CLS_MASK_SUPPORT. 426 * @key_size: size, in bytes, of the look-up value. This must match the size 427 * of the look-up key defined using dpdmux_set_custom_key, otherwise the 428 * entry will never be hit 429 * @entry_index: rule index into the table. This parameter is used only when 430 * dpdmux object was created using option DPDMUX_OPT_CLS_MASK_SUPPORT. In 431 * this case the rule is masking and the current frame may be a hit for 432 * multiple rules. This parameter determines the order in which the rules 433 * will be checked (smaller entry_index first). 434 */ 435 struct dpdmux_rule_cfg { 436 uint64_t key_iova; 437 uint64_t mask_iova; 438 uint8_t key_size; 439 uint16_t entry_index; 440 }; 441 442 /** 443 * struct dpdmux_cls_action - Action to execute for frames matching the 444 * classification entry 445 * 446 * @dest_if: Interface to forward the frames to. Port numbering is similar to 447 * the one used to connect interfaces: 448 * - 0 is the uplink port, 449 * - all others are downlink ports. 450 */ 451 struct dpdmux_cls_action { 452 uint16_t dest_if; 453 }; 454 455 int dpdmux_add_custom_cls_entry(struct fsl_mc_io *mc_io, 456 uint32_t cmd_flags, 457 uint16_t token, 458 struct dpdmux_rule_cfg *rule, 459 struct dpdmux_cls_action *action); 460 461 int dpdmux_remove_custom_cls_entry(struct fsl_mc_io *mc_io, 462 uint32_t cmd_flags, 463 uint16_t token, 464 struct dpdmux_rule_cfg *rule); 465 466 int dpdmux_get_api_version(struct fsl_mc_io *mc_io, 467 uint32_t cmd_flags, 468 uint16_t *major_ver, 469 uint16_t *minor_ver); 470 471 enum dpdmux_congestion_unit { 472 DPDMUX_TAIDLROP_DROP_UNIT_BYTE = 0, 473 DPDMUX_TAILDROP_DROP_UNIT_FRAMES, 474 DPDMUX_TAILDROP_DROP_UNIT_BUFFERS 475 }; 476 477 /** 478 * struct dpdmux_taildrop_cfg - interface taildrop configuration 479 * @enable - enable (1 ) or disable (0) taildrop 480 * @units - taildrop units 481 * @threshold - taildtop threshold 482 */ 483 struct dpdmux_taildrop_cfg { 484 char enable; 485 enum dpdmux_congestion_unit units; 486 uint32_t threshold; 487 }; 488 489 int dpdmux_if_set_taildrop(struct fsl_mc_io *mc_io, uint32_t cmd_flags, uint16_t token, 490 uint16_t if_id, struct dpdmux_taildrop_cfg *cfg); 491 492 int dpdmux_if_get_taildrop(struct fsl_mc_io *mc_io, uint32_t cmd_flags, uint16_t token, 493 uint16_t if_id, struct dpdmux_taildrop_cfg *cfg); 494 495 #define DPDMUX_MAX_KEY_SIZE 56 496 497 enum dpdmux_table_type { 498 DPDMUX_DMAT_TABLE = 1, 499 DPDMUX_MISS_TABLE = 2, 500 DPDMUX_PRUNE_TABLE = 3, 501 }; 502 503 int dpdmux_dump_table(struct fsl_mc_io *mc_io, 504 uint32_t cmd_flags, 505 uint16_t token, 506 uint16_t table_type, 507 uint16_t table_index, 508 uint64_t iova_addr, 509 uint32_t iova_size, 510 uint16_t *num_entries); 511 512 /** 513 * Discard bit. This bit must be used together with other bits in DPDMUX_ERROR_ACTION_CONTINUE 514 * to disable discarding of frames containing errors 515 */ 516 #define DPDMUX_ERROR_DISC 0x80000000 517 /** 518 * MACSEC is enabled 519 */ 520 #define DPDMUX_ERROR_MS 0x40000000 521 /** 522 * PTP event frame 523 */ 524 #define DPDMUX_ERROR_PTP 0x08000000 525 /** 526 * This is a multicast frame 527 */ 528 #define DPDMUX_ERROR_MC 0x04000000 529 /** 530 * This is a broadcast frame 531 */ 532 #define DPDMUX_ERROR_BC 0x02000000 533 /** 534 * Invalid Key composition or key size error 535 */ 536 #define DPDMUX_ERROR_KSE 0x00040000 537 /** 538 * Extract out of frame header 539 */ 540 #define DPDMUX_ERROR_EOFHE 0x00020000 541 /** 542 * Maximum number of chained lookups is reached 543 */ 544 #define DPDMUX_ERROR_MNLE 0x00010000 545 /** 546 * Invalid table ID 547 */ 548 #define DPDMUX_ERROR_TIDE 0x00008000 549 /** 550 * Policer initialization entry error 551 */ 552 #define DPDMUX_ERROR_PIEE 0x00004000 553 /** 554 * Frame length error 555 */ 556 #define DPDMUX_ERROR_FLE 0x00002000 557 /** 558 * Frame physical error 559 */ 560 #define DPDMUX_ERROR_FPE 0x00001000 561 /** 562 * Cycle limit is exceeded and frame parsing is forced to terminate early 563 */ 564 #define DPDMUX_ERROR_PTE 0x00000080 565 /** 566 * Invalid softparse instruction is encountered 567 */ 568 #define DPDMUX_ERROR_ISP 0x00000040 569 /** 570 * Parsing header error 571 */ 572 #define DPDMUX_ERROR_PHE 0x00000020 573 /* 574 * Block limit is exceeded. Maximum data that can be read and parsed is 256 575 * bytes. 576 * Parser will set this bit if it needs more that this limit to parse. 577 */ 578 #define DPDMUX_ERROR_BLE 0x00000010 579 /** 580 * L3 checksum validation 581 */ 582 #define DPDMUX__ERROR_L3CV 0x00000008 583 /** 584 * L3 checksum error 585 */ 586 #define DPDMUX__ERROR_L3CE 0x00000004 587 /** 588 * L4 checksum validation 589 */ 590 #define DPDMUX__ERROR_L4CV 0x00000002 591 /** 592 * L4 checksum error 593 */ 594 #define DPDMUX__ERROR_L4CE 0x00000001 595 596 #define DPDMUX_ALL_ERRORS (DPDMUX__ERROR_L4CE | \ 597 DPDMUX__ERROR_L4CV | \ 598 DPDMUX__ERROR_L3CE | \ 599 DPDMUX__ERROR_L3CV | \ 600 DPDMUX_ERROR_BLE | \ 601 DPDMUX_ERROR_PHE | \ 602 DPDMUX_ERROR_ISP | \ 603 DPDMUX_ERROR_PTE | \ 604 DPDMUX_ERROR_FPE | \ 605 DPDMUX_ERROR_FLE | \ 606 DPDMUX_ERROR_PIEE | \ 607 DPDMUX_ERROR_TIDE | \ 608 DPDMUX_ERROR_MNLE | \ 609 DPDMUX_ERROR_EOFHE | \ 610 DPDMUX_ERROR_KSE) 611 612 enum dpdmux_error_action { 613 DPDMUX_ERROR_ACTION_DISCARD = 0, 614 DPDMUX_ERROR_ACTION_CONTINUE = 1 615 }; 616 617 /** 618 * Configure how dpdmux interface behaves on errors 619 * @errors - or'ed combination of DPDMUX_ERROR_* 620 * @action - set to DPDMUX_ERROR_ACTION_DISCARD or DPDMUX_ERROR_ACTION_CONTINUE 621 */ 622 struct dpdmux_error_cfg { 623 uint32_t errors; 624 enum dpdmux_error_action error_action; 625 }; 626 627 int dpdmux_if_set_errors_behavior(struct fsl_mc_io *mc_io, uint32_t cmd_flags, 628 uint16_t token, uint16_t if_id, struct dpdmux_error_cfg *cfg); 629 630 /** 631 * SP Profile on Ingress DPDMUX 632 */ 633 #define DPDMUX_SP_PROFILE_INGRESS 0x1 634 /** 635 * SP Profile on Egress DPDMUX 636 */ 637 #define DPDMUX_SP_PROFILE_EGRESS 0x2 638 639 int dpdmux_set_sp_profile(struct fsl_mc_io *mc_io, uint32_t cmd_flags, uint16_t token, 640 uint8_t sp_profile[], uint8_t type); 641 642 int dpdmux_sp_enable(struct fsl_mc_io *mc_io, uint32_t cmd_flags, uint16_t token, 643 uint16_t if_id, uint8_t type, uint8_t en); 644 645 #endif /* __FSL_DPDMUX_H */ 646