AM263Px MCU+ SDK: enet_mod_macport.h Source File

| AM263Px MCU+ SDK 26.00.00 |

enet_mod_macport.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) Texas Instruments Incorporated 2020
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
47 #ifndef ENET_MOD_MACPORT_H_
48 #define ENET_MOD_MACPORT_H_
49
50 /* ========================================================================== */
51 /* Include Files */
52 /* ========================================================================== */
53
54 #include <stdint.h>
55 #include <include/core/enet_types.h>
56 #include <include/core/enet_ioctl.h>
57 #include <include/core/enet_mod_port.h>
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62
63 /* ========================================================================== */
64 /* Macros */
65 /* ========================================================================== */
66
68 #define ENET_MACPORT_PUBLIC_IOCTL(x) (ENET_IOCTL_TYPE_PUBLIC | \
69 ENET_IOCTL_MACPORT_BASE | \
70 ENET_IOCTL_MIN(x))
71
73 #define ENET_MACPORT_PRIVATE_IOCTL(x) (ENET_IOCTL_TYPE_PRIVATE | \
74 ENET_IOCTL_MACPORT_BASE | \
75 ENET_IOCTL_MIN(x))
76 /* ========================================================================== */
77 /* Structures and Enums */
78 /* ========================================================================== */
79
83 typedef enum EnetMacPort_Ioctl_e
84 {
92 ENET_MACPORT_IOCTL_GET_VERSION = ENET_MACPORT_PUBLIC_IOCTL(0U),
93
101 ENET_MACPORT_IOCTL_PRINT_REGS = ENET_MACPORT_PUBLIC_IOCTL(1U),
102
119 ENET_MACPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(2U),
120
128 ENET_MACPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(3U),
129
137 ENET_MACPORT_IOCTL_SET_PRI_REGEN_MAP = ENET_MACPORT_PUBLIC_IOCTL(4U),
138
146 ENET_MACPORT_IOCTL_GET_PRI_REGEN_MAP = ENET_MACPORT_PUBLIC_IOCTL(5U),
147
155 ENET_MACPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(6U),
156
164 ENET_MACPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(7U),
165
173 ENET_MACPORT_IOCTL_ENABLE_EGRESS_TRAFFIC_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(8U),
174
182 ENET_MACPORT_IOCTL_DISABLE_EGRESS_TRAFFIC_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(9U),
183
191 ENET_MACPORT_IOCTL_GET_EGRESS_TRAFFIC_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(10U),
192
200 ENET_MACPORT_IOCTL_GET_MAXLEN = ENET_MACPORT_PUBLIC_IOCTL(11U),
201
209 ENET_MACPORT_IOCTL_GET_LINK_CFG = ENET_MACPORT_PUBLIC_IOCTL(12U),
210
218 ENET_MACPORT_IOCTL_SET_CREDIT_BASED_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(13U),
219
227 ENET_MACPORT_IOCTL_GET_CREDIT_BASED_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(14U),
228
236 ENET_MACPORT_IOCTL_IET_RELEASE_PREEMPT_TRAFFIC = ENET_MACPORT_PUBLIC_IOCTL(15U),
237
245 ENET_MACPORT_IOCTL_IET_HOLD_PREEMPT_TRAFFIC = ENET_MACPORT_PUBLIC_IOCTL(16U),
246
254 ENET_MACPORT_IOCTL_GET_QUEUE_PREEMPT_STATUS = ENET_MACPORT_PUBLIC_IOCTL(17U),
255
263 ENET_MACPORT_IOCTL_SET_PREEMPT_QUEUE = ENET_MACPORT_PUBLIC_IOCTL(18U),
264
272 ENET_MACPORT_IOCTL_GET_PREEMPT_MIN_FRAG_SIZE = ENET_MACPORT_PUBLIC_IOCTL(19U),
273
281 ENET_MACPORT_IOCTL_SET_PREEMPT_MIN_FRAG_SIZE = ENET_MACPORT_PUBLIC_IOCTL(20U),
282
290 ENET_MACPORT_IOCTL_GET_PREEMPT_VERIFY_STATUS = ENET_MACPORT_PUBLIC_IOCTL(21U),
291
299 ENET_MACPORT_IOCTL_DISABLE_PREEMPT_VERIFICATION = ENET_MACPORT_PUBLIC_IOCTL(22U),
300
308 ENET_MACPORT_IOCTL_ENABLE_PREEMPT_VERIFICATION = ENET_MACPORT_PUBLIC_IOCTL(23U),
309
317 ENET_MACPORT_IOCTL_GET_PREEMPTION_ACTIVE_STATUS = ENET_MACPORT_PUBLIC_IOCTL(24U),
318
326 ENET_MACPORT_IOCTL_GET_PREEMPTION_ENABLE_STATUS = ENET_MACPORT_PUBLIC_IOCTL(25U),
327
335 ENET_MACPORT_IOCTL_DISABLE_PREEMPTION = ENET_MACPORT_PUBLIC_IOCTL(26U),
336
344 ENET_MACPORT_IOCTL_ENABLE_PREEMPTION = ENET_MACPORT_PUBLIC_IOCTL(27U),
345
346 #if ENET_CFG_IS_ON(CPSW_CUTTHRU)
347
354 ENET_MACPORT_IOCTL_SET_CUT_THRU_PARAMS = ENET_MACPORT_PUBLIC_IOCTL(28U),
355
363 ENET_MACPORT_IOCTL_GET_CUT_THRU_PARAMS = ENET_MACPORT_PUBLIC_IOCTL(29U),
364 #endif
365 } EnetMacPort_Ioctl;
366
370 typedef enum EnetMac_LayerType_e
371 {
373 ENET_MAC_LAYER_MII = 1U,
374
376 ENET_MAC_LAYER_GMII = 0U,
377
379 ENET_MAC_LAYER_XGMII = 2U,
380 } EnetMac_LayerType;
381
385 typedef enum EnetMac_SublayerType_e
386 {
388 ENET_MAC_SUBLAYER_STANDARD = 0U,
389
391 ENET_MAC_SUBLAYER_REDUCED,
392
394 ENET_MAC_SUBLAYER_SERIAL,
395
397 ENET_MAC_SUBLAYER_QUAD_SERIAL_MAIN,
398
400 ENET_MAC_SUBLAYER_QUAD_SERIAL_SUB,
401 } EnetMac_SublayerType;
402
406 typedef enum EnetMac_VariantType_e
407 {
409 ENET_MAC_VARIANT_NONE = 0U,
410
412 ENET_MAC_VARIANT_FORCED,
413 } EnetMac_VariantType;
414
418 typedef enum EnetMac_SgmiiMode_e
419 {
421 ENET_MAC_SGMIIMODE_INVALID = 0U,
422
424 ENET_MAC_SGMIIMODE_FIBER_WITH_PHY,
425
427 ENET_MAC_SGMIIMODE_SGMII_WITH_PHY,
428
430 ENET_MAC_SGMIIMODE_SGMII_AUTONEG_MASTER,
431
433 ENET_MAC_SGMIIMODE_SGMII_AUTONEG_SLAVE,
434
436 ENET_MAC_SGMIIMODE_SGMII_FORCEDLINK,
437 } EnetMac_SgmiiMode;
438
442 typedef struct EnetMacPort_Interface_s
443 {
445 EnetMac_LayerType layerType;
446
448 EnetMac_SublayerType sublayerType;
449
451 EnetMac_VariantType variantType;
452 } EnetMacPort_Interface;
453
457 typedef struct EnetMacPort_LinkCfg_s
458 {
460 Enet_Speed speed;
461
463 Enet_Duplexity duplexity;
464 } EnetMacPort_LinkCfg;
465
469 typedef enum EnetMacPort_VlanType_e
470 {
472 ENET_MACPORT_VLAN_TYPE_NONE = 0x00U,
473
475 ENET_MACPORT_VLAN_TYPE_SINGLE_TAG = 0x01U,
476
478 ENET_MACPORT_VLAN_TYPE_STACKED_TAGS = 0x02U,
479 } EnetMacPort_VlanType;
480
484 typedef struct EnetMacPort_GenericInArgs_s
485 {
487 Enet_MacPort macPort;
488 } EnetMacPort_GenericInArgs;
489
493 typedef struct EnetMacPort_SetIngressDscpPriorityMapInArgs_s
494 {
496 Enet_MacPort macPort;
497
499 EnetPort_DscpPriorityMap dscpPriorityMap;
500 } EnetMacPort_SetIngressDscpPriorityMapInArgs;
501
505 typedef struct EnetMacPort_SetPriorityRegenMapInArgs_s
506 {
508 Enet_MacPort macPort;
509
511 EnetPort_PriorityMap priorityRegenMap;
512 } EnetMacPort_SetPriorityRegenMapInArgs;
513
517 typedef struct EnetMacPort_SetEgressPriorityMapInArgs_s
518 {
520 Enet_MacPort macPort;
521
523 EnetPort_PriorityMap priorityMap;
524 } EnetMacPort_SetEgressPriorityMapInArgs;
525
529 typedef struct EnetMacPort_EnableEgressTrafficShapingInArgs_s
530 {
532 Enet_MacPort macPort;
533
535 EnetPort_TrafficShapingCfg trafficShapingCfg;
536 } EnetMacPort_EnableEgressTrafficShapingInArgs;
537
541 typedef struct EnetMacPort_SetCreditBasedShaperInArgs_s
542 {
544 Enet_MacPort macPort;
545
547 EnetPort_CreditBasedShapingCfg cbsCfg;
548 } EnetMacPort_SetCreditBasedShaperInArgs;
549
553 typedef struct EnetMacPort_GetCreditBasedShaperInArgs_s
554 {
556 Enet_MacPort macPort;
557
559 uint32_t trafficClass;
560 } EnetMacPort_GetCreditBasedShaperInArgs;
561
565 typedef enum EnetMacPort_PreemptVerifyStatus_e
566 {
568 ENET_MAC_VERIFYSTATUS_UNKNOWN = 0U,
569
571 ENET_MAC_VERIFYSTATE_INITIAL,
572
574 ENET_MAC_VERIFYSTATE_VERIFYING,
575
577 ENET_MAC_VERIFYSTATUS_SUCCEEDED,
578
580 ENET_MAC_VERIFYSTATUS_FAILED,
581
583 ENET_MAC_VERIFYSTATUS_DISABLED,
584
586 ENET_MAC_VERIFYSTATUS_RXRESPOND_ERROR,
587
589 ENET_MAC_VERIFYSTATUS_RXVERIFY_ERROR,
590 } EnetMacPort_PreemptVerifyStatus;
591
596 typedef struct EnetMacPort_SetPreemptMinFragSizeInArgs_s
597 {
599 Enet_MacPort macPort;
600
603 uint8_t preemptMinFragSize;
604 } EnetMacPort_SetPreemptMinFragSizeInArgs;
605
609 typedef enum EnetMacPort_QueuePreemptMode_e
610 {
612 ENET_MAC_QUEUE_PREEMPT_MODE_EXPRESS,
613
615 ENET_MAC_QUEUE_PREEMPT_MODE_PREEMPT,
616 } EnetMacPort_QueuePreemptMode;
617
621 typedef struct EnetMacPort_QueuePreemptCfg_s
622 {
624 EnetMacPort_QueuePreemptMode preemptMode[ENET_PRI_NUM];
625 } EnetMacPort_QueuePreemptCfg;
626
631 typedef struct EnetMacPort_SetPreemptQueueInArgs_s
632 {
634 Enet_MacPort macPort;
635
637 EnetMacPort_QueuePreemptCfg queuePreemptCfg;
638 } EnetMacPort_SetPreemptQueueInArgs;
639
640 #if ENET_CFG_IS_ON(CPSW_CUTTHRU)
641
644 typedef struct EnetMacPort_CutThruParams_s
645 {
647 Enet_MacPort macPort;
648
650 EnetPort_CutThruParams cutThruCfg;
651 } EnetMacPort_CutThruParams;
652 #endif
653
654 /* ========================================================================== */
655 /* Global Variables Declarations */
656 /* ========================================================================== */
657
658 /* None */
659
660 /* ========================================================================== */
661 /* Function Declarations */
662 /* ========================================================================== */
663
671 static inline bool EnetMacPort_isMii(const EnetMacPort_Interface *mii);
672
680 static inline bool EnetMacPort_isRmii(const EnetMacPort_Interface *mii);
681
689 static inline bool EnetMacPort_isGmii(const EnetMacPort_Interface *mii);
690
698 static inline bool EnetMacPort_isRgmii(const EnetMacPort_Interface *mii);
699
707 static inline bool EnetMacPort_isSgmii(const EnetMacPort_Interface *mii);
708
716 static inline bool EnetMacPort_isQsgmii(const EnetMacPort_Interface *mii);
717
725 static inline bool EnetMacPort_isXfi(const EnetMacPort_Interface *mii);
726
727 /* ========================================================================== */
728 /* Deprecated Function Declarations */
729 /* ========================================================================== */
730
731 /* None */
732
733 /* ========================================================================== */
734 /* Static Function Definitions */
735 /* ========================================================================== */
736
737 static inline bool EnetMacPort_isMii(const EnetMacPort_Interface *mii)
738 {
739 return (mii->layerType == ENET_MAC_LAYER_MII) &&
740 (mii->sublayerType == ENET_MAC_SUBLAYER_STANDARD);
741 }
742
743 static inline bool EnetMacPort_isRmii(const EnetMacPort_Interface *mii)
744 {
745 return (mii->layerType == ENET_MAC_LAYER_MII) &&
746 (mii->sublayerType == ENET_MAC_SUBLAYER_REDUCED);
747 }
748
749 static inline bool EnetMacPort_isGmii(const EnetMacPort_Interface *mii)
750 {
751 return (mii->layerType == ENET_MAC_LAYER_GMII) &&
752 (mii->sublayerType == ENET_MAC_SUBLAYER_STANDARD);
753 }
754
755 static inline bool EnetMacPort_isRgmii(const EnetMacPort_Interface *mii)
756 {
757 return (mii->layerType == ENET_MAC_LAYER_GMII) &&
758 (mii->sublayerType == ENET_MAC_SUBLAYER_REDUCED);
759 }
760
761 static inline bool EnetMacPort_isSgmii(const EnetMacPort_Interface *mii)
762 {
763 return (mii->layerType == ENET_MAC_LAYER_GMII) &&
764 (mii->sublayerType == ENET_MAC_SUBLAYER_SERIAL);
765 }
766
767 static inline bool EnetMacPort_isQsgmii(const EnetMacPort_Interface *mii)
768 {
769 return (mii->layerType == ENET_MAC_LAYER_GMII) &&
770 ((mii->sublayerType == ENET_MAC_SUBLAYER_QUAD_SERIAL_MAIN) ||
771 (mii->sublayerType == ENET_MAC_SUBLAYER_QUAD_SERIAL_SUB));
772 }
773
774 static inline bool EnetMacPort_isXfi(const EnetMacPort_Interface *mii)
775 {
776 return (mii->layerType == ENET_MAC_LAYER_XGMII) &&
777 (mii->sublayerType == ENET_MAC_SUBLAYER_STANDARD);
778 }
779
780 #ifdef __cplusplus
781 }
782 #endif
783
784 #endif /* ENET_MOD_MACPORT_H_ */
785
EnetMacPort_SetIngressDscpPriorityMapInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:496
EnetMacPort_PreemptVerifyStatus
EnetMacPort_PreemptVerifyStatus
MacPort IET Verification status.
Definition: enet_mod_macport.h:566
ENET_MACPORT_IOCTL_DISABLE_EGRESS_TRAFFIC_SHAPING
@ ENET_MACPORT_IOCTL_DISABLE_EGRESS_TRAFFIC_SHAPING
Disable egress traffic shaping configuration.
Definition: enet_mod_macport.h:182
EnetPort_PriorityMap
Priority map.
Definition: enet_mod_port.h:132
ENET_MACPORT_IOCTL_SET_CREDIT_BASED_SHAPING
@ ENET_MACPORT_IOCTL_SET_CREDIT_BASED_SHAPING
Set Idleslope for Credit Based Shaper on MAC Port.
Definition: enet_mod_macport.h:218
EnetMacPort_SetEgressPriorityMapInArgs::priorityMap
EnetPort_PriorityMap priorityMap
Definition: enet_mod_macport.h:523
ENET_MAC_SGMIIMODE_INVALID
@ ENET_MAC_SGMIIMODE_INVALID
Definition: enet_mod_macport.h:421
ENET_MACPORT_VLAN_TYPE_STACKED_TAGS
@ ENET_MACPORT_VLAN_TYPE_STACKED_TAGS
Definition: enet_mod_macport.h:478
EnetMacPort_GetCreditBasedShaperInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:556
ENET_MAC_VERIFYSTATUS_FAILED
@ ENET_MAC_VERIFYSTATUS_FAILED
Definition: enet_mod_macport.h:580
ENET_MACPORT_IOCTL_GET_MAXLEN
@ ENET_MACPORT_IOCTL_GET_MAXLEN
Get MRU and MTU.
Definition: enet_mod_macport.h:200
ENET_MAC_SGMIIMODE_FIBER_WITH_PHY
@ ENET_MAC_SGMIIMODE_FIBER_WITH_PHY
Definition: enet_mod_macport.h:424
ENET_MAC_LAYER_GMII
@ ENET_MAC_LAYER_GMII
Definition: enet_mod_macport.h:376
ENET_MAC_SGMIIMODE_SGMII_FORCEDLINK
@ ENET_MAC_SGMIIMODE_SGMII_FORCEDLINK
Definition: enet_mod_macport.h:436
ENET_MAC_SGMIIMODE_SGMII_AUTONEG_SLAVE
@ ENET_MAC_SGMIIMODE_SGMII_AUTONEG_SLAVE
Definition: enet_mod_macport.h:433
EnetMacPort_Interface::variantType
EnetMac_VariantType variantType
Definition: enet_mod_macport.h:451
ENET_MAC_VERIFYSTATUS_UNKNOWN
@ ENET_MAC_VERIFYSTATUS_UNKNOWN
Definition: enet_mod_macport.h:568
EnetMacPort_isMii
static bool EnetMacPort_isMii(const EnetMacPort_Interface *mii)
Check if interface is MII.
Definition: enet_mod_macport.h:737
ENET_MACPORT_IOCTL_SET_PRI_REGEN_MAP
@ ENET_MACPORT_IOCTL_SET_PRI_REGEN_MAP
Set VLAN priority regeneration map.
Definition: enet_mod_macport.h:137
EnetMacPort_SetPreemptMinFragSizeInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:599
ENET_MACPORT_IOCTL_ENABLE_EGRESS_TRAFFIC_SHAPING
@ ENET_MACPORT_IOCTL_ENABLE_EGRESS_TRAFFIC_SHAPING
Enable egress traffic shaping configuration.
Definition: enet_mod_macport.h:173
ENET_MACPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP
@ ENET_MACPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP
Get QoS egress priority map.
Definition: enet_mod_macport.h:164
Enet_Speed
Enet_Speed
MAC interface speed.
Definition: enet_types.h:346
EnetMacPort_LinkCfg
Link speed and duplexity configuration.
Definition: enet_mod_macport.h:458
EnetMacPort_SetPreemptQueueInArgs
Input args for ENET_MACPORT_IOCTL_SET_PREEMPT_QUEUE.
Definition: enet_mod_macport.h:632
ENET_MAC_SGMIIMODE_SGMII_AUTONEG_MASTER
@ ENET_MAC_SGMIIMODE_SGMII_AUTONEG_MASTER
Definition: enet_mod_macport.h:430
ENET_MAC_SGMIIMODE_SGMII_WITH_PHY
@ ENET_MAC_SGMIIMODE_SGMII_WITH_PHY
Definition: enet_mod_macport.h:427
ENET_MAC_SUBLAYER_SERIAL
@ ENET_MAC_SUBLAYER_SERIAL
Definition: enet_mod_macport.h:394
enet_mod_port.h
This file contains the type definitions and helper macros that are common for host and MAC ports.
ENET_MACPORT_IOCTL_GET_PREEMPT_VERIFY_STATUS
@ ENET_MACPORT_IOCTL_GET_PREEMPT_VERIFY_STATUS
Get IET verification status.
Definition: enet_mod_macport.h:290
ENET_MAC_SUBLAYER_QUAD_SERIAL_SUB
@ ENET_MAC_SUBLAYER_QUAD_SERIAL_SUB
Definition: enet_mod_macport.h:400
ENET_MAC_QUEUE_PREEMPT_MODE_EXPRESS
@ ENET_MAC_QUEUE_PREEMPT_MODE_EXPRESS
Definition: enet_mod_macport.h:612
enet_types.h
This file contains the basic types using across the Enet driver.
EnetMacPort_EnableEgressTrafficShapingInArgs
Input args for ENET_MACPORT_IOCTL_ENABLE_EGRESS_TRAFFIC_SHAPING command.
Definition: enet_mod_macport.h:530
ENET_MACPORT_IOCTL_SET_PREEMPT_MIN_FRAG_SIZE
@ ENET_MACPORT_IOCTL_SET_PREEMPT_MIN_FRAG_SIZE
Set minimum fragment size.
Definition: enet_mod_macport.h:281
EnetMacPort_isGmii
static bool EnetMacPort_isGmii(const EnetMacPort_Interface *mii)
Check if interface is GMII.
Definition: enet_mod_macport.h:749
Enet_MacPort
Enet_MacPort
MAC port.
Definition: enet_types.h:412
EnetMacPort_LinkCfg::speed
Enet_Speed speed
Definition: enet_mod_macport.h:460
EnetMacPort_SetPreemptQueueInArgs::queuePreemptCfg
EnetMacPort_QueuePreemptCfg queuePreemptCfg
Definition: enet_mod_macport.h:637
ENET_MACPORT_IOCTL_GET_PREEMPTION_ACTIVE_STATUS
@ ENET_MACPORT_IOCTL_GET_PREEMPTION_ACTIVE_STATUS
Get preemption active status.
Definition: enet_mod_macport.h:317
ENET_MACPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP
@ ENET_MACPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP
Get ingress DSCP priority (TOS) map.
Definition: enet_mod_macport.h:128
EnetMacPort_isQsgmii
static bool EnetMacPort_isQsgmii(const EnetMacPort_Interface *mii)
Check if interface is QSGMII.
Definition: enet_mod_macport.h:767
enet_ioctl.h
This file contains the type definitions and helper macros for the Enet IOCTL interface.
EnetMacPort_SetCreditBasedShaperInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:544
EnetMac_LayerType
EnetMac_LayerType
MAC interface layer type.
Definition: enet_mod_macport.h:371
ENET_MACPORT_IOCTL_SET_PREEMPT_QUEUE
@ ENET_MACPORT_IOCTL_SET_PREEMPT_QUEUE
Set macport queue preemption mode.
Definition: enet_mod_macport.h:263
ENET_MACPORT_IOCTL_GET_QUEUE_PREEMPT_STATUS
@ ENET_MACPORT_IOCTL_GET_QUEUE_PREEMPT_STATUS
Get macport queue preemption status.
Definition: enet_mod_macport.h:254
ENET_MAC_LAYER_XGMII
@ ENET_MAC_LAYER_XGMII
Definition: enet_mod_macport.h:379
ENET_MACPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP
@ ENET_MACPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP
Set QoS egress priority map.
Definition: enet_mod_macport.h:155
ENET_MAC_SUBLAYER_STANDARD
@ ENET_MAC_SUBLAYER_STANDARD
Definition: enet_mod_macport.h:388
ENET_MAC_LAYER_MII
@ ENET_MAC_LAYER_MII
Definition: enet_mod_macport.h:373
EnetMacPort_GetCreditBasedShaperInArgs::trafficClass
uint32_t trafficClass
Definition: enet_mod_macport.h:559
EnetMacPort_GenericInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:487
EnetMacPort_QueuePreemptCfg
MacPort Queue Preempt Config.
Definition: enet_mod_macport.h:622
ENET_MAC_VARIANT_FORCED
@ ENET_MAC_VARIANT_FORCED
Definition: enet_mod_macport.h:412
EnetPort_DscpPriorityMap
DSCP priority map.
Definition: enet_mod_port.h:142
EnetMacPort_GenericInArgs
Generic MAC port input args.
Definition: enet_mod_macport.h:485
ENET_MAC_VERIFYSTATUS_DISABLED
@ ENET_MAC_VERIFYSTATUS_DISABLED
Definition: enet_mod_macport.h:583
EnetMacPort_SetPreemptMinFragSizeInArgs::preemptMinFragSize
uint8_t preemptMinFragSize
Definition: enet_mod_macport.h:603
ENET_MACPORT_IOCTL_GET_PRI_REGEN_MAP
@ ENET_MACPORT_IOCTL_GET_PRI_REGEN_MAP
Get VLAN priority regeneration map.
Definition: enet_mod_macport.h:146
ENET_MACPORT_VLAN_TYPE_NONE
@ ENET_MACPORT_VLAN_TYPE_NONE
Definition: enet_mod_macport.h:472
EnetMacPort_Interface::sublayerType
EnetMac_SublayerType sublayerType
Definition: enet_mod_macport.h:448
EnetMacPort_isRmii
static bool EnetMacPort_isRmii(const EnetMacPort_Interface *mii)
Check if interface is RMII.
Definition: enet_mod_macport.h:743
EnetMacPort_VlanType
EnetMacPort_VlanType
VLAN usage type.
Definition: enet_mod_macport.h:470
EnetMacPort_SetCreditBasedShaperInArgs
Input args for ENET_MACPORT_IOCTL_SET_CREDIT_BASED_SHAPING command.
Definition: enet_mod_macport.h:542
EnetMacPort_EnableEgressTrafficShapingInArgs::trafficShapingCfg
EnetPort_TrafficShapingCfg trafficShapingCfg
Definition: enet_mod_macport.h:535
ENET_MACPORT_PUBLIC_IOCTL
#define ENET_MACPORT_PUBLIC_IOCTL(x)
Helper macro to create IOCTL commands for MAC port module.
Definition: enet_mod_macport.h:68
ENET_MACPORT_IOCTL_DISABLE_PREEMPT_VERIFICATION
@ ENET_MACPORT_IOCTL_DISABLE_PREEMPT_VERIFICATION
Disable IET verification.
Definition: enet_mod_macport.h:299
ENET_PRI_NUM
#define ENET_PRI_NUM
Packet priority.
Definition: enet_types.h:165
ENET_MACPORT_IOCTL_GET_LINK_CFG
@ ENET_MACPORT_IOCTL_GET_LINK_CFG
Get MAC port's speed and duplexity.
Definition: enet_mod_macport.h:209
EnetMacPort_Interface
MAC port interface.
Definition: enet_mod_macport.h:443
ENET_MAC_SUBLAYER_REDUCED
@ ENET_MAC_SUBLAYER_REDUCED
Definition: enet_mod_macport.h:391
Enet_Duplexity
Enet_Duplexity
MAC interface duplexity.
Definition: enet_types.h:364
EnetMacPort_SetPriorityRegenMapInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:508
ENET_MAC_VERIFYSTATE_INITIAL
@ ENET_MAC_VERIFYSTATE_INITIAL
Definition: enet_mod_macport.h:571
ENET_MACPORT_IOCTL_ENABLE_PREEMPT_VERIFICATION
@ ENET_MACPORT_IOCTL_ENABLE_PREEMPT_VERIFICATION
Enable IET verification.
Definition: enet_mod_macport.h:308
EnetMac_VariantType
EnetMac_VariantType
MAC interface variant (only for specific interface types).
Definition: enet_mod_macport.h:407
ENET_MACPORT_IOCTL_IET_RELEASE_PREEMPT_TRAFFIC
@ ENET_MACPORT_IOCTL_IET_RELEASE_PREEMPT_TRAFFIC
IET release preemptible traffic.
Definition: enet_mod_macport.h:236
ENET_MACPORT_IOCTL_GET_CREDIT_BASED_SHAPING
@ ENET_MACPORT_IOCTL_GET_CREDIT_BASED_SHAPING
Get Idleslope of Credit Based Shaper on MAC Port queue.
Definition: enet_mod_macport.h:227
ENET_MAC_QUEUE_PREEMPT_MODE_PREEMPT
@ ENET_MAC_QUEUE_PREEMPT_MODE_PREEMPT
Definition: enet_mod_macport.h:615
ENET_MACPORT_IOCTL_GET_PREEMPTION_ENABLE_STATUS
@ ENET_MACPORT_IOCTL_GET_PREEMPTION_ENABLE_STATUS
Get preemption enable status.
Definition: enet_mod_macport.h:326
ENET_MAC_VERIFYSTATUS_SUCCEEDED
@ ENET_MAC_VERIFYSTATUS_SUCCEEDED
Definition: enet_mod_macport.h:577
EnetMacPort_EnableEgressTrafficShapingInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:532
EnetMacPort_SetPreemptMinFragSizeInArgs
Input args for ENET_MACPORT_IOCTL_SET_PREEMPT_MIN_FRAG_SIZE.
Definition: enet_mod_macport.h:597
ENET_MAC_SUBLAYER_QUAD_SERIAL_MAIN
@ ENET_MAC_SUBLAYER_QUAD_SERIAL_MAIN
Definition: enet_mod_macport.h:397
EnetMacPort_Interface::layerType
EnetMac_LayerType layerType
Definition: enet_mod_macport.h:445
EnetMacPort_Ioctl
EnetMacPort_Ioctl
MAC port IOCTL commands.
Definition: enet_mod_macport.h:84
EnetMacPort_SetEgressPriorityMapInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:520
EnetMacPort_SetPriorityRegenMapInArgs::priorityRegenMap
EnetPort_PriorityMap priorityRegenMap
Definition: enet_mod_macport.h:511
EnetPort_TrafficShapingCfg
Traffic shaping configuration for all priorities.
Definition: enet_mod_port.h:120
ENET_MACPORT_IOCTL_DISABLE_PREEMPTION
@ ENET_MACPORT_IOCTL_DISABLE_PREEMPTION
Disable frame preemption.
Definition: enet_mod_macport.h:335
ENET_MACPORT_VLAN_TYPE_SINGLE_TAG
@ ENET_MACPORT_VLAN_TYPE_SINGLE_TAG
Definition: enet_mod_macport.h:475
ENET_MACPORT_IOCTL_PRINT_REGS
@ ENET_MACPORT_IOCTL_PRINT_REGS
Print MAC port registers.
Definition: enet_mod_macport.h:101
EnetMacPort_GetCreditBasedShaperInArgs
Input args for ENET_MACPORT_IOCTL_GET_CREDIT_BASED_SHAPING command.
Definition: enet_mod_macport.h:554
EnetMacPort_SetCreditBasedShaperInArgs::cbsCfg
EnetPort_CreditBasedShapingCfg cbsCfg
Definition: enet_mod_macport.h:547
EnetMacPort_SetPriorityRegenMapInArgs
Input args for ENET_MACPORT_IOCTL_SET_PRI_REGEN_MAP command.
Definition: enet_mod_macport.h:506
EnetMacPort_SetPreemptQueueInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_macport.h:634
ENET_MAC_VERIFYSTATUS_RXRESPOND_ERROR
@ ENET_MAC_VERIFYSTATUS_RXRESPOND_ERROR
Definition: enet_mod_macport.h:586
EnetMacPort_LinkCfg::duplexity
Enet_Duplexity duplexity
Definition: enet_mod_macport.h:463
EnetMacPort_SetIngressDscpPriorityMapInArgs::dscpPriorityMap
EnetPort_DscpPriorityMap dscpPriorityMap
Definition: enet_mod_macport.h:499
ENET_MAC_VERIFYSTATUS_RXVERIFY_ERROR
@ ENET_MAC_VERIFYSTATUS_RXVERIFY_ERROR
Definition: enet_mod_macport.h:589
EnetMacPort_SetIngressDscpPriorityMapInArgs
Input args for ENET_MACPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP command.
Definition: enet_mod_macport.h:494
ENET_MAC_VERIFYSTATE_VERIFYING
@ ENET_MAC_VERIFYSTATE_VERIFYING
Definition: enet_mod_macport.h:574
ENET_MACPORT_IOCTL_GET_PREEMPT_MIN_FRAG_SIZE
@ ENET_MACPORT_IOCTL_GET_PREEMPT_MIN_FRAG_SIZE
Get minimum fragment size.
Definition: enet_mod_macport.h:272
EnetMacPort_QueuePreemptMode
EnetMacPort_QueuePreemptMode
Queue preemptive mode: express or preemptive.
Definition: enet_mod_macport.h:610
ENET_MACPORT_IOCTL_GET_VERSION
@ ENET_MACPORT_IOCTL_GET_VERSION
Get the hardware version of the MAC port module.
Definition: enet_mod_macport.h:92
EnetMacPort_isXfi
static bool EnetMacPort_isXfi(const EnetMacPort_Interface *mii)
Check if interface is XFI.
Definition: enet_mod_macport.h:774
EnetMac_SublayerType
EnetMac_SublayerType
MAC interface sublayer type.
Definition: enet_mod_macport.h:386
EnetMacPort_SetEgressPriorityMapInArgs
Input args for ENET_MACPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP command.
Definition: enet_mod_macport.h:518
ENET_MACPORT_IOCTL_GET_EGRESS_TRAFFIC_SHAPING
@ ENET_MACPORT_IOCTL_GET_EGRESS_TRAFFIC_SHAPING
Get egress traffic shaping configuration.
Definition: enet_mod_macport.h:191
EnetMacPort_isRgmii
static bool EnetMacPort_isRgmii(const EnetMacPort_Interface *mii)
Check if interface is RGMII.
Definition: enet_mod_macport.h:755
ENET_MACPORT_IOCTL_IET_HOLD_PREEMPT_TRAFFIC
@ ENET_MACPORT_IOCTL_IET_HOLD_PREEMPT_TRAFFIC
IET hold preemptible traffic.
Definition: enet_mod_macport.h:245
ENET_MACPORT_IOCTL_ENABLE_PREEMPTION
@ ENET_MACPORT_IOCTL_ENABLE_PREEMPTION
Enable IET frame preemption.
Definition: enet_mod_macport.h:344
ENET_MACPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP
@ ENET_MACPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP
Set ingress DSCP priority (TOS) map.
Definition: enet_mod_macport.h:119
ENET_MAC_VARIANT_NONE
@ ENET_MAC_VARIANT_NONE
Definition: enet_mod_macport.h:409
EnetMacPort_isSgmii
static bool EnetMacPort_isSgmii(const EnetMacPort_Interface *mii)
Check if interface is SGMII.
Definition: enet_mod_macport.h:761
EnetMac_SgmiiMode
EnetMac_SgmiiMode
SGMII mode.
Definition: enet_mod_macport.h:419
EnetPort_CreditBasedShapingCfg
Credit Based shaping parameters (idleSlope).
Definition: enet_mod_port.h:108