#ifndef __IFX_PPA_API_H__20081031_1913__ #define __IFX_PPA_API_H__20081031_1913__ /******************************************************************************* ** ** FILE NAME : ifx_ppa_api.h ** PROJECT : PPA ** MODULES : PPA API (Routing/Bridging Acceleration APIs) ** ** DATE : 31 OCT 2008 ** AUTHOR : Xu Liang ** DESCRIPTION : PPA Protocol Stack Hook API Header File ** COPYRIGHT : Copyright (c) 2009 ** Lantiq Deutschland GmbH ** Am Campeon 3; 85579 Neubiberg, Germany ** ** For licensing information, see the file 'LICENSE' in the root folder of ** this software module. ** ** HISTORY ** $Date $Author $Comment ** 31 OCT 2008 Xu Liang Initiate Version *******************************************************************************/ /*! \file ifx_ppa_api.h \brief This file contains es. provide PPA API. */ /** \defgroup PPA_API PPA Kernel Hook and Userspace Function API \brief PPA is a loadable network module. Hence, it exports its API though function pointer hooks. Callers need to check that hooks are non-NULL before invoking them. The hooks are initialized when the PPA is initialized. Certain API which are control / configuration related are also exposed to user space applications through the ioctl API. The PPA Kernel and Userspace API are discussed in the following sections: */ /* @{*/ /** \defgroup PPA_IOCTL PPA Userspace API \brief The subset of PPA API which is exposed to userspace for control and configuration of the PPA is invoked through an ioctls()/system call interface as described in this section. The API is defined in the following two source files: - ifx_ppa_api.h: Header file for PPA API - ifx_ppa_api.c: C Implementation file for PPA API */ /** \defgroup PPA_HOOK_API PPA Hook API \brief PPA is a loadable network module. Hence, it exports its API though function pointer hooks. Callers need to check that hooks are non-NULL before invoking them. The hooks are initialized when the PPA is initialized. - ifx_ppa_hook.h: Header file for PPA API - ifx_ppa_hook.c: C Implementation file for PPA API */ /** \defgroup PPA_PWM_API PPA Power Management API \brief PPA Power Management API provide PPA Power Management and IOCTL API The API is defined in the following two source files - ifx_ppa_api_pwm.h: Header file for PPA API - ifx_ppa_api_pwm.c: C Implementation file for PPA Power management API - ifx_ppa_api_pwm_logic.c: C impelementation file for Powr management Logic and interface with PPE driver */ /** \defgroup PPA_API_DIRECTPATH PPA Direct Path API \brief This section describes the PPA DirectPath API that allows a driver on a CPU to bypass the protocol stack and send and receive packets directly from the PPA acceleration function. For a 2-CPU system, this API is used to communicate with devices whose drivers are running on the 2nd CPU (or Core 1) - usually Core 1 is not running any protocol stack, and all protocol stack intelligence is on Core 0. This API is not yet implemented for PPE D4 or A4 firmware. It is provided as advance information on the DirectPath interfaces.The PPA DirectPath aims to accelerate packet processing by reducing CPU load when the protocol stack processes the packet. It allows a CPU-bound driver to directly talk to the PPA and to the PPE engine bypassing the stack path and providing a short-cut. - ifx_ppa_api_directpath.h: Header file for PPA API - ifx_ppa_api_directpath.c: C Implementation file for PPA API */ /** \defgroup PPA_ADAPTATION_LAYER PPA Stack Adaptation API \brief PPA module aims for OS and Protocol stack independence, and the core PPA logic does not access any OS or Protocol stack implementation specific structures directly. The PPA Protocol Stack Adaptation layer provides API that allows for straight-forward and structured OS / protocol stack porting of the PPA just by porting the Adaptation Layer (AL) API. The AL API is defined in the following two source files - ifx_ppa_stack_al.h: Header file for AL layer - ifx_ppa_stack_al.c: C Implementation file for AL API */ /* @}*/ #include #include #ifdef __KERNEL__ #include #endif /* * #################################### * Definition * #################################### */ /*! \brief PPA_MAX_IFS_NUM */ #define PPA_MAX_IFS_NUM 10 /*!< Maximum interface number supported */ /*! \brief PPA_MAX_MC_IFS_NUM */ #define PPA_MAX_MC_IFS_NUM 8 /*!< Maximum number of Multicast supporting interfaces */ /*! \brief PPA_MAX_VLAN_FILTER */ #define PPA_MAX_VLAN_FILTER 32 /*!< Maximum number of VLAN fitler */ /*! \brief PPA_IOC_MAGIC */ #define PPA_IOC_MAGIC ((uint32_t)'p') /*!< Magic number to differentiate PPA ioctl commands */ /*! \brief IFX_SUCCESS */ #define IFX_SUCCESS 0 /*!< Operation was successful. */ /*! \brief IFX_FAILURE */ #define IFX_FAILURE -1 /*!< Operation failed */ /*! \brief IFX_EPERM */ #define IFX_EPERM -2 /*!< not permitted */ /*! \brief IFX_EIO */ #define IFX_EIO -5 /*!< I/O/Hardware/Firmware error */ /*! \brief IFX_EAGAIN */ #define IFX_EAGAIN -11 /*!< try again later */ /*! \brief IFX_ENOMEM */ #define IFX_ENOMEM -12 /*!< out of memory */ /*! \brief IFX_EACCESS */ #define IFX_EACCESS IFX_EPERM /*! \brief IFX_EFAULT */ #define IFX_EFAULT -14 /*!< bad address */ /*! \brief IFX_EBUSY */ #define IFX_EBUSY -16 /*!< busy */ /*! \brief IFX_EINVAL */ #define IFX_EINVAL -22 /*!< invalid argument */ /*! \brief IFX_ENOTAVAIL */ #define IFX_ENOTAVAIL -97 /*! \brief IFX_ENOTPOSSIBLE */ #define IFX_ENOTPOSSIBLE -98 /*! \brief IFX_ENOTIMPL */ #define IFX_ENOTIMPL -99 /*!< not implemented */ /*! \brief IFX_ENABLED */ #define IFX_ENABLED 1 /*!< Status enabled / Device was enabled */ /*! \brief IFX_DISABLED */ #define IFX_DISABLED 0 /*!< Status disabled / Device was disabled. */ /* * flags */ /*! \brief PPA_F_BEFORE_NAT_TRANSFORM \note PPA Routing Session add hook is called before NAT transform has taken place. \n In Linux OS, this NSFORM corresponds to the netfilter PREROUTING hook */ #define PPA_F_BEFORE_NAT_TRANSFORM 0x00000001 /*! \brief PPA_F_SESSION_ORG_DIR \note Packet in original direction of session i.e. the direction in which the session was established */ #define PPA_F_SESSION_ORG_DIR 0x00000010 /*! \brief PPA_F_SESSION_REPLY_DIR \note Packet in reply direction of session i.e. opposite to the direction in which session was initiated. */ #define PPA_F_SESSION_REPLY_DIR 0x00000020 /*! \brief PPA_F_SESSION_BIDIRECTIONAL \note For PPA Session add, add a bidirectional session, else unidirection session is assumed. */ #define PPA_F_SESSION_BIDIRECTIONAL (PPA_F_SESSION_ORG_DIR | PPA_F_SESSION_REPLY_DIR) /*! \brief PPA_F_BRIDGED_SESSION \note Denotes that the PPA session is bridged */ #define PPA_F_BRIDGED_SESSION 0x00000100 /*! \brief PPA_F_SESSION_NEW_DSCP \note Denotes that the PPA session has DSCP remarking enabled */ #define PPA_F_SESSION_NEW_DSCP 0x00001000 /*! \brief PPA_F_SESSION_VLAN \note Denotes that the PPA session has VLAN tagging enabled. */ #define PPA_F_SESSION_VLAN 0x00002000 /*! \brief PPA_F_MTU \note Denotes that the PPA session has a MTU limit specified */ #define PPA_F_MTU 0x00004000 /*! \brief PPA_F_SESSION_OUT_VLAN \note Denotes that the PPA session has Outer VLAN tagging enable */ #define PPA_F_SESSION_OUT_VLAN 0x00008000 /*! \brief PPA_F_BRIDGE_LOCAL \note Denotes that the PPA bridge session is for a flow terminated at the CPE (i.e. not bridged out). Such an entry will not be accelerated */ #define PPA_F_BRIDGE_LOCAL 0x00010000 /*! \brief PPA_F_LAN_IF \note Indicates that the interface is a LAN interface */ #define PPA_F_LAN_IF 0x01000000 /*! \brief PPA_F_STATIC_ENTRY \note Indicates that it is a static entry */ #define PPA_F_STATIC_ENTRY 0x20000000 /*! \brief PPA_F_DROP_PACKET \note Denotes that the PPA session has a drop action specified. In other words, this acts as a fast path \n packet filter drop action */ #define PPA_F_DROP_PACKET 0x40000000 /*! \brief PPA_F_BRIDGE_ACCEL_MODE \note Flag denoting that the PPA should accelerate bridging sessions. Reserved currently */ #define PPA_F_BRIDGE_ACCEL_MODE 0x80000000 /* * interface flags */ /*! \brief IFX_PPA_SESSION_NOT_ADDED */ #define IFX_PPA_SESSION_NOT_ADDED -1 /*!< PPA Session Add failed. This can happen either because the Session is not yet ready for addition or \n that PPA cannot accelerate the session because the packet is looped back */ /*! \brief IFX_PPA_SESSION_ADDED */ #define IFX_PPA_SESSION_ADDED 0 /*!< Indicates PPA was able to successfully add the session */ /*! \brief IFX_PPA_SESSION_EXISTS */ #define IFX_PPA_SESSION_EXISTS 1 /*!< Indicates PPA already has the session added. This is also a success indication */ /* * ifx_ppa_inactivity_status return value */ /*! \brief IFX_PPA_HIT \note PPA Session is active i.e. was hit with packets within the configured inactivity time inter */ #define IFX_PPA_HIT 0 /*! \brief IFX_PPA_TIMEOUT \note PPA Session is inactive and hence has timed out */ #define IFX_PPA_TIMEOUT 1 /*! \brief PPA_F_VLAN_FILTER_IFNAME */ #define PPA_F_VLAN_FILTER_IFNAME 0 /*!< Port based VLAN */ /*! \brief PPA_F_VLAN_FILTER_IP_SRC */ #define PPA_F_VLAN_FILTER_IP_SRC 1 /*!< SRC IP based VLAN */ /*! \brief PPA_F_VLAN_FILTER_ETH_PROTO */ #define PPA_F_VLAN_FILTER_ETH_PROTO 2 /*!< Ethernet Type based VLAN */ /*! \brief PPA_F_VLAN_FILTER_VLAN_TAG */ #define PPA_F_VLAN_FILTER_VLAN_TAG 3 /*!< Vlan tag based VLAN */ /*! \brief PPA_INVALID_QID */ #define PPA_INVALID_QID 0xFFFF /*!< Invalid VLAN ID. Note, it is used only in IOCTL */ /*! \brief PPA_VLAN_TAG_MASK */ #define PPA_VLAN_TAG_MASK 0xFFFF1FFF /*!< VLAN MASK to remove VLAN priority*/ /*! \brief MAX_HOOK_NAME_LEN */ #define MAX_HOOK_NAME_LEN 71 /*!< maximum hook name length */ #define VLAN_ID_SPLIT(full_id, pri, cfi, vid) pri=( (full_id) >> 13 ) & 7; cfi=( (full_id) >>12) & 1; vid= (full_id) & 0xFFF #define VLAN_ID_CONBINE(full_id, pri, cfi, vid) full_id =( ( (uint16_t)(pri) & 7) << 13 ) | ( ( (uint16_t)( cfi) & 1) << 12 ) | ((uint16_t) (vid) & 0xFFF ) /* * #################################### * Data Type * #################################### */ /* -------------------------------------------------------------------------- */ /* Structure and Enumeration Type Defintions */ /* -------------------------------------------------------------------------- */ /** \addtogroup PPA_HOOK_API */ /*@{*/ /*! \brief This is the data structure for PPA Interface Info specification. */ typedef struct { PPA_IFNAME *ifname; /*!< Name of the stack interface */ uint32_t if_flags; /*!< Flags for Interface. Valid values are below: PPA_F_LAN_IF and PPA_F_WAN_IF */ } PPA_IFINFO; /*! \brief This is the data structure for PPA Packet header verification checks. */ typedef struct ppa_verify_checks { uint32_t f_ip_verify :1; /*!< Enable/Disable IP verification checks. Valid values are IFX_ENABLED or IFX_DISABLED */ uint32_t f_tcp_udp_verify :1; /*!< Enable/Disable TCP/UDP verification checks. Valid values are IFX_ENABLED or IFX_DISABLED */ uint32_t f_tcp_udp_err_drop :1; /*!< Enable/Disable drop packet if TCP/UDP checksum is wrong. \n If packet is not dropped, then it is forwarded to the control CPU. \n Valid values are IFX_ENABLED or IFX_DISABLED */ uint32_t f_drop_on_no_hit :1; /*!< Drop unicast packets on no hit, forward to MIPS/Control CPU otherwise (default). Valid values are IFX_ENABLED or IFX_DISABLED */ uint32_t f_mc_drop_on_no_hit :1; /*!< Drop multicast on no hit, forward to MIPS/Control CPU otherwise (default). Valid values are IFX_ENABLED or IFX_DISABLED */ } PPA_VERIFY_CHECKS; /*! \brief This is the data structure for PPA Initialization kernel hook function */ typedef struct { PPA_VERIFY_CHECKS lan_rx_checks; /*!< LAN Ingress packet checks */ PPA_VERIFY_CHECKS wan_rx_checks; /*!< WAN Ingress packet checks */ uint32_t num_lanifs; /*!< Number of LAN side interfaces */ PPA_IFINFO *p_lanifs; /*!< Pointer to array of LAN Interfaces. */ uint32_t num_wanifs; /*!< Number of WAN side interfaces */ PPA_IFINFO *p_wanifs; /*!< Pointer to array of WAN Interfaces. */ uint32_t max_lan_source_entries; /*!< Maximum Number of session entries with LAN source */ uint32_t max_wan_source_entries; /*!< Maximum Number of session entries with WAN source */ uint32_t max_mc_entries; /*!< Maximum Number of multicast sessions */ uint32_t max_bridging_entries; /*!< Maximum Number of bridging entries */ uint32_t add_requires_min_hits; /*!< Minimum number of calls to ppa_add_session() before session would be added in h/w - calls from the same hook position in stack. Currently, set to 1 */ } PPA_INIT_INFO; /*! \brief This is the data structure for additional session related information for the PPA. It specifies on a per session basis attributes like VLAN tagging, DSCP remarking etc. This structure depends on the PPE acceleration firmware capabilities. New versions of PPA will only support the capabilities as in PPE A4/D4 firmware, The current PPA driver (for PPE A4/D4 firmware) supports 2-level of VLANs (or stacked VLANs). The outer VLAN is the one used for separating LAN and WAN traffic on a switch (for Ethernet WAN). Inner VLAN tag is application specific VLAN. In case, there is no outer VLAN tag required (for LAN/WAN separation on the switch), then this field is not specified. */ typedef struct { uint32_t new_dscp :6; /*!< New DSCP code point value for the session.Valid values are 0-63. */ uint32_t dscp_remark :1; /*!< DSCP remarking needs to be carried out for the session.Valid values are:IFX_ENABLED and IFX_DISABLED */ uint32_t vlan_insert :1; /*!< If inner VLAN tag should be inserted into the frame at egress. Valid values are: IFX_ENABLED and IFX_DISABLED */ uint32_t vlan_remove :1; /*!< If inner VLAN untagging should be performed on the received frame. Untagging, if enabled, is \n carried out before any VLAN tag insert. Valid values are:IFX_ENABLED and IFX_DISABLED */ uint32_t out_vlan_insert :1; /*!< If outer VLAN tag should be inserted into the frame at egress. Valid values are: IFX_ENABLED and IFX_DISABLED */ uint32_t out_vlan_remove :1; /*!< If outer VLAN untagging should be performed on the received frame. Untagging, if enabled, is \n carried out before any VLAN tag insert. Valid values are:IFX_ENABLED and IFX_DISABLED */ uint16_t dslwan_qid_remark :1; /*!< if dslwan qid should be set. Valid values are: IFX_ENABLED and IFX_DISABLED */ uint32_t reserved1 :4; /*!< reserved */ uint32_t vlan_prio :3; /*!< 802.1p VLAN priority configuration. Valid values are 0-7. */ uint32_t vlan_cfi :1; /*!< lways set to 1 for Ethernet frames */ uint32_t vlan_id :12;/*!< VLAN Id to be used to tag the frame. Valid values are 0-4095. */ uint16_t mtu; /*!< MTU of frames classified to this session */ uint16_t dslwan_qid; /*!< dslwan_qid. Valid values are 0 ~ 16 */ uint32_t session_flags; /*!< Session flags used to identify which fields in the PPA_SESSION_EXTRA structure are valid in \n a call to the PPA Session Modify API. \n Valid values are one or more of: \n PPA_F_SESSION_NEW_DSCP \n PPA_F_SESSION_VLAN \n PPA_F_SESSION_OUT_VLAN \n PPA_F_MTU \n */ uint32_t out_vlan_tag; /*!< VLAN tag value including VLAN Id */ } PPA_SESSION_EXTRA; /*! \brief This is the data structure which specifies an interface and its TTL value as applicable for multicast routing. */ typedef struct { PPA_IFNAME *ifname; /*!< Pointer to interface name. */ uint8_t ttl; /*!< Time to Live (TTL) value of interface which is used for multicast routing to decide if a packet can be routed onto that interface Note, it is not used at present. */ } IF_TTL_ENTRY; /*! \brief This is the data structure for PPA Multicast Group membership. It specifies the interfaces which are members of the specified IP Multicast Group address. Please see the discussion on outer and inner VLAN tags in the section on PPA_SESSION_EXTRA data structure. */ typedef struct { IPADDR ip_mc_group; /*!< Multicast IP address group */ int8_t num_ifs; /*!< Number of Interfaces which are member of this Multicast IP group address */ IF_TTL_ENTRY array_mem_ifs[PPA_MAX_MC_IFS_NUM]; /*!< Array of interface elements of maximum PPA_MAX_MC_IFS_NUM elements. Actual number of entries is specified by num_ifs */ uint8_t if_mask; /*!< Mask of Interfaces corresponding to num_ifs interfaces specified in array_mem_ifs. For internaly use only. */ PPA_IFNAME *src_ifname; /*!< the source interface of specified multicast IP address group */ uint32_t vlan_insert :1; /*!< If inner VLAN tag should be inserted into the frame at egress. Valid values are: IFX_ENABLED and IFX_DISABLED */ uint32_t vlan_remove :1; /*!< If inner VLAN untagging should be performed on the received frame. Untagging, if enabled, is carried out before any VLAN tag insert. Valid values are:IFX_ENABLED and IFX_DISABLED */ uint32_t out_vlan_insert :1; /*!< If outer VLAN tag should be inserted into the frame at egress. Valid values are: IFX_ENABLED and IFX_DISABLED */ uint32_t out_vlan_remove :1; /*!< If outer VLAN untagging should be performed on the received frame. Untagging, if enabled, is carried out before any VLAN tag insert. Valid values are:IFX_ENABLED and IFX_DISABLED */ uint32_t dslwan_qid_remark:1; /*!< not use at present */ uint32_t reserved1 :3; /*!< valid in A4/A5 */ uint32_t vlan_prio :3; /*!< 802.1p VLAN priority configuration. Valid values are 0-7. */ uint32_t vlan_cfi :1; /*!< Always set to 1 for Ethernet frames */ uint32_t vlan_id :12; /*!< VLAN Id to be used to tag the frame. Valid values are 0-4095 */ uint32_t out_vlan_tag; /*!< Outer VLAN tag value including VLAN Id. */ uint32_t new_dscp_en :1; /*!< If new dscp value should be set. Valid values are:IFX_ENABLED and IFX_DISABLED */ uint32_t res :15; /*!< reserved */ uint32_t new_dscp :16; /*!< New DSCP code point value for the session.Valid values are 0-63. */ uint16_t dslwan_qid; /*!< not use at present */ uint32_t bridging_flag; /*!< 0 - routing mode/igmp proxy, 1 - bring mode/igmp snooping. */ uint8_t mac[PPA_ETH_ALEN]; /*!< reserved for future */ } PPA_MC_GROUP; /*! \brief This data structure is an abstraction for unicast and multicast routing sessions. Pointer to any kind of PPA session */ typedef void PPA_U_SESSION; /*! \brief This is the data structure for standard packet and byte statistics for an interface. */ typedef struct { uint32_t tx_pkts; /*!< Number of transmitted packets through the interface */ uint32_t rx_pkts; /*!< Number of received packets through the interface */ uint32_t tx_discard_pkts; /*!< Number of packets discarded while transmitting through the interface. */ uint32_t tx_error_pkts; /*!< Number of transmit errors through the interface. */ uint32_t rx_discard_pkts; /*!< Number of received packets through the interface that were discarded */ uint32_t rx_error_pkts; /*!< Number of received errors through the interface. */ uint32_t tx_bytes; /*!< Number of transmit bytes through the interface */ uint32_t rx_bytes; /*!< Number of received bytes through the interface */ } PPA_IF_STATS; /*! \brief This is the data structure for PPA accelerated statistics for an interface. Depending on the platform and acceleration capabilities, some of the statistics may not be available. */ typedef struct { uint32_t fast_routed_tcp_pkts; /*!< Fastpath routed TCP unicast packets Tx */ uint32_t fast_routed_udp_pkts; /*!< Fastpath routed UDP unicast packets Tx */ uint32_t fast_routed_udp_mcast_pkts; /*!< Fastpath routed UDP multicast packets Tx */ uint32_t fast_drop_pkts; /*!< Fastpath ingress pkts dropped */ uint32_t fast_drop_bytes; /*!< Fastpath ingress bytes dropped */ uint32_t fast_ingress_cpu_pkts; /*!< Fastpath ingress CPU pkts */ uint32_t fast_ingress_cpu_bytes; /*!< Fastpath ingress CPU bytes */ uint32_t rx_pkt_errors; /*!< Fastpath packet error */ uint32_t fast_bridged_ucast_pkts; /*!< Fastpath bridged unicast pkts */ uint32_t fast_bridged_mcast_pkts; /*!< Fastpath bridged multicast pkts */ uint32_t fast_bridged_bcast_pkts; /*!< Fastpath bridged broadcast pkts */ uint32_t fast_bridged_bytes; /*!< Fastpath bridged bytes */ } PPA_ACCEL_STATS; /*! \brief This is the data structure for VLAN tag control on a per interface basis. It is currently supported only for bridging paths. For PPE A4 firmware, 2 levels of VLAN is configurable, while for older PPE D4 firmware, only inner VLAN tag is configurable. Please see discussion in section PPA_SESSION_EXTRA. Briefly, couter VLAN tag configuration is used for LAN and WAN isolation on the same external switch, while the other set of VLAN tag configuration is driven from application needs (i.e. not stripped off when the packet hits the wire). */ typedef struct { uint32_t unmodified :1; /*!< Indicates if there is no VLAN tag modification. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t insertion :1; /*!< Indicates if there is a VLAN tag inserted. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t remove :1; /*!< Indicates if there is a VLAN tag removed. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t replace :1; /*!< Indicates if there is a VLAN tag replaced. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t out_unmodified :1; /*!< Indicates if there is no outer VLAN tag modification. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t out_insertion :1; /*!< Indicates if there is a outer VLAN tag inserted. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t out_remove :1; /*!< Indicates if there is a outer VLAN tag removed. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t out_replace :1; /*!< Indicates if there is a outerVLAN tag replaced. Valid values are IFX_ENABLED and IFX_DISABLED */ } PPA_VLAN_TAG_CTRL; /*! \brief This is the data structure for VLAN configuration control on a per interface basis. It is currently supported only for bridging paths. */ typedef struct { uint32_t src_ip_based_vlan :1; /*!< Indicates if Source IP address filter based VLAN tagging is enabled for this interface. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t eth_type_based_vlan :1; /*!< Indicates if Ethernet header type based VLAN tagging is enabled for this interface. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t vlanid_based_vlan :1; /*!< Indicates if VLAN re-tagging is enabled based on existing VLAN Id of received frame. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t port_based_vlan :1; /*!< Indicates if port based VLAN tagging is enabled for this interface. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t vlan_aware :1; /*!< Indicates if bridge is VLAN aware and enforces VLAN based forwarding for this interface. Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t out_vlan_aware :1; /*!< Indicates if bridge is outer VLAN aware and enforces VLAN based forwarding for this interface. If this field is not enabled, then outer VLAN processing is don't care. interface. If this field is not enabled, then outer VLAN processing is don't care. Valid values are IFX_ENABLED and IFX_DISABLED */ } PPA_VLAN_CFG; /*! \brief Union of PPA VLAN filter criteria. */ typedef union { PPA_IFNAME *ifname; /*!< Pointer to interface name on which VLAN filter match is to be performed. */ IPADDR ip_src; /*!< IP source address of ingress frame for VLAN filter matching. */ uint32_t eth_protocol; /*!< Ethernet protocol as a match filter for VLAN filter matching */ uint32_t ingress_vlan_tag; /*!< Ingress frame VLAN tag as match criteria for VLAN filter matching */ } match_criteria_vlan; /*! \brief This data structure specifies the filter or match criteria for applying VLAN transforms based on rules. It is currently supported only for bridging paths. */ typedef struct { match_criteria_vlan match_field; /*!< Union of VLAN filter criteria */ uint32_t match_flags; /*!< Indicates which VLAN filter criteria is specified in this VLAN match entry. Valid values are one of the following: \n PPA_F_VLAN_FILTER_IFNAME \n PPA_F_VLAN_FILTER_IP_SRC \n PPA_F_VLAN_FILTER_ETH_PROTO \n PPA_F_VLAN_FILTER_VLAN_TAG \n */ } PPA_VLAN_MATCH_FIELD; /*! \brief This is the data structure for PPA VLAN configuration ioctl() on a per interface basis from userspace. It is currently supported only for bridging paths. */ typedef struct { uint16_t vlan_vci; /*!< VLAN Information including VLAN Id, 802.1p and CFI bits. */ uint16_t qid; /*!< queue index */ uint32_t out_vlan_id; /*!< out vlan id */ uint32_t inner_vlan_tag_ctrl;/*!< none(0)/remove(1)/insert(2)/replac(3), for vlan tag based only. */ uint32_t out_vlan_tag_ctrl; /*!< none(0)/remove(1)/insert(2)/replac(3), for vlan tag based only. */ uint16_t num_ifs; /*!< Number of interfaces in the array of PPA_IFINFO structures. */ PPA_IFINFO *vlan_if_membership; /*!< Pointer to array of interface info structures for each interface which is a member of this VLAN group. The number of entries is given by num_ifs. */ } PPA_VLAN_INFO; /*! \brief This is the data structure for PPA VLAN filter configuration. It is currently supported only for bridging paths */ typedef struct { PPA_VLAN_MATCH_FIELD match_field; /*!< VLAN Match field information */ PPA_VLAN_INFO vlan_info; /*!< VLAN Group and Membership Info */ } PPA_VLAN_FILTER_CONFIG; /*! \brief This is the data structure for cout information, like lan interface count, LAN acceleration count and so on */ typedef struct { uint32_t count; /*!< the number */ uint32_t flag; /*!< the flag */ } PPA_CMD_COUNT_INFO; /*! \brief This is the data structure for get some structure size */ typedef struct { uint32_t rout_session_size; /*!< the structure size of one routing session */ uint32_t mc_session_size; /*!< the structure size of one multicast session */ uint32_t br_session_size; /*!< the structure size of one bridge session */ uint32_t netif_size; /*!< the structure size of one network interface information*/ } PPA_CMD_SIZE_INFO; /*@}*/ /* PPA_HOOK_API */ /* * ioctl command structures */ /** \addtogroup PPA_IOCTL */ /*@{*/ /*! \brief This is the data structure for PPA Interface information used from the userspacef */ typedef struct { PPA_IFNAME ifname[PPA_IF_NAME_SIZE]; /*!< Name of the stack interface ( provide storage buffer ) */ uint32_t if_flags; /*!< Flags for Interface. Valid values are below: PPA_F_LAN_IF and PPA_F_WAN_IF */ } PPA_CMD_IFINFO; /*! \brief This is the data structure for PPA Init used from the userspace */ typedef struct { PPA_VERIFY_CHECKS lan_rx_checks; /*!< LAN Ingress checks */ PPA_VERIFY_CHECKS wan_rx_checks; /*!< WAN Ingress checks */ uint32_t num_lanifs; /*!< Number of LAN side interfaces */ PPA_CMD_IFINFO p_lanifs[PPA_MAX_IFS_NUM]; /*!< Array of LAN Interface Info structures (provides storage buffer). */ uint32_t num_wanifs; /*!< Number of WAN side interfaces */ PPA_CMD_IFINFO p_wanifs[PPA_MAX_IFS_NUM]; /*!< Array of WAN Interface Info structures (provides storage buffer). */ uint32_t max_lan_source_entries; /*!< Number of session entries with LAN source */ uint32_t max_wan_source_entries; /*!< Number of session entries with WAN source */ uint32_t max_mc_entries; /*!< Number of multicast sessions */ uint32_t max_bridging_entries; /*!< Number of bridging entries */ uint32_t add_requires_min_hits; /*!< Minimum number of calls to ppa_add before session would be added in h/w */ uint32_t flags; /*!< Flags for PPA Initialization. Currently this field is reserved. */ } PPA_CMD_INIT_INFO; /*! \brief This is the data structure for PPA Acceleration Enable / Disable configuration */ typedef struct { uint32_t lan_rx_ppa_enable; /*!< lan Interface specific flags. Current Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t wan_rx_ppa_enable; /*!< wan Interface specific flags. Current Valid values are IFX_ENABLED and IFX_DISABLED */ uint32_t flags; /*!< Reserved currently */ } PPA_CMD_ENABLE_INFO; /*! \brief This is the data structure for MAC table entry used in PPA ioctl interface */ typedef struct { IPADDR mcast_addr; /*!< MAC address of the entry */ PPA_SESSION_EXTRA mc_extra; /*!< Pointer to PPA Multicast session parameters like VLAN configuration, DSCP remarking */ uint32_t flags; /*!< Flags for the PPA Multicast entry info structure. Reserved currently. */ } PPA_CMD_MC_ENTRY; /*! \brief This is the data structure for learned MAC address used in PPA ioctl interface */ typedef struct { uint8_t mac_addr[PPA_ETH_ALEN]; /*!< MAC address learned */ PPA_IFNAME ifname[PPA_IF_NAME_SIZE]; /*!< The interface which learned the MAC address */ uint32_t flags; /*!< for future */ } PPA_CMD_MAC_ENTRY; /*! \brief This is the data structure for PPA VLAN configuration ioctl() on a per interface basis from userspace. It is currently supported only for bridging paths. */ typedef struct { PPA_IFNAME if_name[PPA_IF_NAME_SIZE]; /*!< Pointer to interface name for which VLAN related configuration is specified. */ PPA_VLAN_TAG_CTRL vlan_tag_ctrl; /*!< VLAN Tag Control structure for the interface */ PPA_VLAN_CFG vlan_cfg; /*!< VLAN Configuration control structure for the interface */ uint32_t flags; /*!< Flags field. Reserved currently and omitted in implementation. */ } PPA_CMD_BR_IF_VLAN_CONFIG; /*! \brief Union for VLAN filter matching criteria. */ typedef union { PPA_IFNAME ifname[PPA_IF_NAME_SIZE]; /*!< Pointer to interface name on which VLAN filter match is to be performed. */ IPADDR ip_src; /*!< IP source address of ingress frame for VLAN filter matching. */ uint32_t eth_protocol; /*!< Ethernet protocol as a match filter for VLAN filter matching. */ uint32_t ingress_vlan_tag; /*!< Ingress frame VLAN tag as match criteria for VLAN filter matching. */ } filter_criteria; /*! \brief This data structure specifies the filter or match criteria for applying VLAN transforms based on rules. It is currently supported only for bridging paths. */ typedef struct { filter_criteria match_field; /*!< Union for VLAN filter criteria. */ uint32_t match_flags; /*!< Indicates which VLAN filter criteria is specified in this VLAN match entry. \n Valid values are one of the following: \n - PPA_F_VLAN_FILTER_IFNAME \n - PPA_F_VLAN_FILTER_IP_SRC \n - PPA_F_VLAN_FILTER_ETH_PROTO \n - PPA_F_VLAN_FILTER_VLAN_TAG */ } PPA_CMD_VLAN_MATCH_FIELD; /*! \brief This is the data structure for PPA VLAN configuration ioctl() on a per interface basis from userspace. It is currently supported only for bridging paths. */ typedef struct { uint16_t vlan_vci; /*!< VLAN Information including VLAN Id, 802.1p and CFI bits */ uint16_t qid; /*!< dest_qos */ uint32_t out_vlan_id; /*!< new out vlan id */ uint32_t out_vlan_tag_ctrl; /*!< unmodify(0)/remove(1)/insert(2)/replac(3), for vlan tag based only. */ uint32_t inner_vlan_tag_ctrl;/*!< unmodify(0)/remove(1)/insert(2)/replac(3), for vlan tag based only. */ uint16_t num_ifs; /*!< Number of interfaces in the array of PPA_IFINFO structures. */ PPA_CMD_IFINFO vlan_if_membership[PPA_MAX_IFS_NUM]; /*!< Pointer to array of interface info structures for each interface which is a member of this VLAN group. The number of entries is given by num_ifs. */ } PPA_CMD_VLAN_INFO; /*! \brief This is the data structure for basic VLAN filter setting in PPA ioctl interface */ typedef struct { PPA_CMD_VLAN_MATCH_FIELD match_field; /*!< vlan filter match field */ PPA_CMD_VLAN_INFO vlan_info; /*!< vlan information */ } _PPA_CMD_VLAN_FILTER_CONFIG; /*! \brief This is the data structure for VLAN filter configure in PPA ioctl interface */ typedef struct { _PPA_CMD_VLAN_FILTER_CONFIG vlan_filter_cfg; /*!< vlan filter basc information */ uint32_t flags; /*!< flag */ } PPA_CMD_VLAN_FILTER_CONFIG; /*! \brief This is the data structure for PPA VLAN configuration as passed to the PPA ioctl() API from userspace. It is currently supported only for bridging paths. */ typedef struct { PPA_CMD_COUNT_INFO count_info; /*!< Number of filters returned in pointer to array of filters. */ PPA_CMD_VLAN_FILTER_CONFIG filters[1]; /*!< it is a dummy array. Userspace should apply storage buffer for it */ } PPA_CMD_VLAN_ALL_FILTER_CONFIG; /*! \brief This is the data structure for PPA accelerated statistics for an interface. Depending on the platform and acceleration capabilities, some of the statistics may not be available. */ typedef struct { PPA_IFNAME ifname[PPA_IF_NAME_SIZE]; /*!< interface name ( provides storage buffer) */ uint8_t mac[PPA_ETH_ALEN]; /*!< MAC address of the Ethernet Interface ( provides storage buffer) */ uint32_t flags; /*!< reserved for future */ } PPA_CMD_IF_MAC_INFO; /*! \brief This is the data structure for LAN/WAN interface setting */ typedef struct { uint32_t num_ifinfos; /*!< number of interface in the list */ PPA_CMD_IFINFO ifinfo[PPA_MAX_IFS_NUM]; /*!< buffer for storing network interface list */ } PPA_CMD_IFINFOS; /*! \brief This is the data structure for Multicast group related ioctl */ typedef struct { uint8_t mac[PPA_ETH_ALEN]; /*!< mac address of the multicast group, reserved for future */ PPA_IFNAME lan_ifname[PPA_MAX_MC_IFS_NUM][PPA_IF_NAME_SIZE]; /*!< downstream interface list buffer */ PPA_IFNAME src_ifname[PPA_IF_NAME_SIZE]; /*!< source interface which receive multicast streaming packet */ uint32_t num_ifs; /*!< downstream interface number */ uint32_t bridging_flag; /*!< IGMP Proxy/snooping flag: 0 - routing mode/igmp proxy, 1 - bring mode/igmp snooping. */ uint32_t new_dscp_en; /*!< dscp editing flag: 1 -- need to edit, 0 --unmodify */ PPA_CMD_MC_ENTRY mc; /*!< multicast group information */ } PPA_CMD_MC_GROUP_INFO; /*! \brief This is the data structure for get all Multicast group via ioctl */ typedef struct { PPA_CMD_COUNT_INFO count_info; /*!< the multicast counter */ PPA_CMD_MC_GROUP_INFO mc_group_list[1]; /*!< Note, here is a dummy array, user need to malloc memory accordingly to the session number */ } PPA_CMD_MC_GROUPS_INFO; /*! \brief This is the data structure contains PPA session information. */ typedef struct { uint16_t ip_proto; /*!< IP portocol TCP,UDP. */ uint16_t ip_tos; /*!< IP ToS value */ PPA_IPADDR src_ip; /*!< source IP address */ uint16_t src_port; /*!< source port */ PPA_IPADDR dst_ip; /*!< destination IP address */ uint16_t dst_port; /*!< destination port */ PPA_IPADDR nat_ip; /*!< IP address to be replaced by NAT if NAT applies */ uint16_t nat_port; /*!< Port to be replaced by NAT if NAT applies */ uint32_t new_dscp; /*!< If DSCP remarking required */ uint16_t new_vci; /*!< new vci ( in fact, it is new inner vlan id )*/ uint32_t out_vlan_tag; /*!< Out VLAN tag */ uint16_t dslwan_qid; /*!< WAN qid */ uint16_t dest_ifid; /*!< Destination interface */ uint32_t flags; /*!< Internal flag : SESSION_IS_REPLY, SESSION_IS_TCP, \n SESSION_ADDED_IN_HW, SESSION_CAN_NOT_ACCEL \n SESSION_VALID_NAT_IP, SESSION_VALID_NAT_PORT, \n SESSION_VALID_VLAN_INS, SESSION_VALID_VLAN_RM, \n SESSION_VALID_OUT_VLAN_INS, SESSION_VALID_OUT_VLAN_RM, \n SESSION_VALID_PPPOE, SESSION_VALID_NEW_SRC_MAC, \n SESSION_VALID_MTU, SESSION_VALID_NEW_DSCP, \n SESSION_VALID_DSLWAN_QID, \n SESSION_TX_ITF_IPOA, SESSION_TX_ITF_PPPOA \n SESSION_LAN_ENTRY, SESSION_WAN_ENTRY, */ PPA_IFNAME rx_if_name[PPA_IF_NAME_SIZE]; /*!< receive interface name. Note, in struct session_list_item, rx_if and tx_if is a pointer, so here we have to make a workaround for it. */ PPA_IFNAME tx_if_name[PPA_IF_NAME_SIZE]; /*!< txansmit interface name. */ } PPA_CMD_SESSION_ENTRY; /*! \brief This is the data structure for routing session information */ typedef struct { PPA_CMD_COUNT_INFO count_info; /*!< session count */ PPA_CMD_SESSION_ENTRY session_list[1]; /*!< Note, here is a dummy array, user need to malloc memory accordingly to the session number */ } PPA_CMD_SESSIONS_INFO; /*! \brief This is the data structure for basic ppa Versions */ typedef struct { uint32_t family; /*!< ppa version hardware family */ uint32_t type; /*!< ppa version hardware type */ uint32_t itf;/*!< ppa version itf */ uint32_t mode; /*!< ppa version mode */ uint32_t major; /*!< ppa version major version number */ uint32_t mid; /*!< ppa version mid version number */ uint32_t minor; /*!< ppa version minor version number */ } PPA_VERSION; /*! \brief This is the data structure for PPA subsystem Versions, like ppa subsystem, ppe fw, ppe driver and so on */ typedef struct { PPA_VERSION ppa_api_ver; /*!< PPA API verion */ PPA_VERSION ppa_stack_al_ver; /*!< PPA stack verion */ PPA_VERSION ppe_hal_ver; /*!< PPA HAL verion */ PPA_VERSION ppe_fw_ver; /*!< PPA FW verion */ PPA_VERSION ppa_subsys_ver; /*!< PPA Subsystem verion */ } PPA_CMD_VERSION_INFO; /*! \brief This is the data structure for basic vlan range */ typedef struct { uint32_t start_vlan_range; /*!< WAN interface start vlan id */ uint32_t end_vlan_range; /*!< WAN interface end vlan id */ }PPA_VLAN_RANGE; /*! \brief This is the data structure VLAN range in mixed mode */ typedef struct { PPA_CMD_COUNT_INFO count_info; /*!< PPA Count info */ PPA_VLAN_RANGE ranges[1]; /*!< it is dummy array, need to malloc in userspace */ } PPA_CMD_VLAN_RANGES; /*! \brief This is the data structure for MAC INFO */ typedef struct { PPA_CMD_COUNT_INFO count_info; /*!< PPA Count info */ PPA_CMD_MAC_ENTRY session_list[1]; /*!< it is a dummy array, need to malloc bedore use it in userspace */ } PPA_CMD_ALL_MAC_INFO; /*! \brief This is the data structure for BRIGE MAC LEARNING ENABLE/DISABLE INFO */ typedef struct { uint32_t bridge_enable; /*!< enable/disable bridging mac address learning flag */ uint32_t flags; /*!< reserved for future */ } PPA_CMD_BRIDGE_ENABLE_INFO; #ifdef CONFIG_IFX_PPA_QOS /*! \brief This is the data structure for PPA QOS to get the maximum queue number supported for one physical port */ typedef struct { uint32_t portid; /*!< the phisical port id which support qos queue */ uint32_t queue_num; /*!< the maximum queue number is supported */ uint32_t flags; /*!< Reserved currently */ } PPA_CMD_QUEUE_NUM_INFO; /*! \brief This is the data structure for PPA QOS MIB Counter */ typedef struct { uint32_t total_rx_pkt; /*!< all packets received by this queue */ uint32_t total_rx_bytes; /*!< all bytes received by thi queue */ uint32_t total_tx_pkt; /*!< all packets trasmitted by this queue */ uint32_t total_tx_bytes; /*!< all bytes trasmitted by thi queue */ uint32_t cpu_path_small_pkt_drop_cnt; /*!< all small packets dropped in CPU path for lack of TX DMA descriptor in the queue*/ uint32_t cpu_path_total_pkt_drop_cnt; /*!< all packets dropped in CPU path for lack of TX DMA descriptor in the queue*/ uint32_t fast_path_small_pkt_drop_cnt; /*!< all small packets dropped in fast path for lack of TX DMA descriptor */ uint32_t fast_path_total_pkt_drop_cnt; /*!< all packets dropped in fast path for lack of TX DMA descriptor */ } PPA_QOS_MIB; /*! \brief This is the data structure for PPA QOS to get the maximum queue number supported for one physical port */ typedef struct { uint32_t portid; /*!< the phisical port id which support qos queue */ uint32_t queueid; /*!< the queue id for the mib */ PPA_QOS_MIB mib; /*!< the mib information for the current specified queue */ uint32_t flags; /*!< Reserved currently */ } PPA_CMD_QOS_MIB_INFO; /*! \brief This is the data structure for PPA QOS to be enabled/disabled */ typedef struct { uint32_t portid; /*!< which support qos queue. */ uint32_t enable; /*!< enable/disable flag */ uint32_t flags; /*!< Reserved currently */ } PPA_CMD_QOS_CTRL_INFO; #ifdef CONFIG_IFX_PPA_QOS_RATE_SHAPING /*! \brief This is the data structure for PPA Rate Shapping Set/Get/Reset one queue's rate limit */ typedef struct { uint32_t portid; /*!< the phisical port id which support qos queue */ uint32_t queueid; /*!< the queu id. Now it only support 0 ~ 7 */ uint32_t rate; /*!< rate limit in kbps */ uint32_t burst; /*!< rate limit in kbps */ uint32_t flags; /*!< Reserved currently */ } PPA_CMD_RATE_INFO; #endif #ifdef CONFIG_IFX_PPA_QOS_WFQ /*! \brief This is the data structure for PPA WFQ Set/Get/Reset one queue's weight */ typedef struct { uint32_t portid; /*!< the phisical port id which support qos queue */ uint32_t queueid; /*!< the queu id. Now it only support 0 ~ 7 */ uint32_t weight; /*!< WFQ weight. The value is from 0 ~ 100 */ uint32_t flags; /*!< Reserved currently */ } PPA_CMD_WFQ_INFO; #endif //end of CONFIG_IFX_PPA_QOS_WFQ #endif //end of CONFIG_IFX_PPA_QOS #if defined(CONFIG_IFX_PMCU) || defined(CONFIG_IFX_PMCU_MODULE) /*! \brief Union of ppa power transitin watermark. */ union watermark { uint32_t ppa_pwm_wm1; /*!< Watermark value for PPE transition between D0 and D1 */ uint32_t ppa_pwm_wm2; /*!< Watermark value for PPE transition between D1 and D2 */ uint32_t ppa_pwm_wm3; /*!< Watermark value for PPE transition between D2 and D3 */ }; /*! \brief This is the data structure definition for PPA PWM states water mark */ typedef struct { int16_t flag; /*!< flag indicating if watermark type. flag=1: watermark is packet count; flag=2: watermark is byte count */ int32_t time_interval; /*!< time interval of watermarks in milliseconds. */ union watermark WM; /*!< Watermark value for PPE transition */ }WM_t; /*! \brief This is the data structure for PPA Power management basic watermark configuration */ typedef struct { WM_t ppa_pwm_wm1; /*!< Watermark value for PPE transition between D0 and D1 */ WM_t ppa_pwm_wm2; /*!< Watermark value for PPE transition between D1 and D2*/ WM_t ppa_pwm_wm3; /*!< Watermark value for PPE transition between D2 and D3*/ }PPA_PWM_WM_t; /*! \brief This is the data structure for PPA Power management configuration */ typedef struct { uint8_t ppa_pwm; /*!< PPA power management mode: 0/1-OFF/ON */ PPA_PWM_WM_t ppa_pwm_wm_up; /*!< Watermark value for PPE transition for various states. */ PPA_PWM_WM_t ppa_pwm_wm_down; /*!< Watermark value for PPE transition for various states. */ PPA_PWM_STATE_t e_ppa_pwm_init_state; /*!< Initial power/performance state for PPE */ uint32_t flag; /*!< reserved.*/ }PPA_PWM_CONFIG_t; #endif //end of CONFIG_IFX_PMCU /*! \brief This is the data structure for Mutiple Field Based Classification And VLAN Assigment feature's basic auto-learning VLAN related information. */ typedef struct { PPA_IFNAME tx_ifname[PPA_IF_NAME_SIZE]; /*!< destination interface name, like eth0.3. If blank, then match all interface */ PPA_IFNAME rx_ifname[PPA_IF_NAME_SIZE]; /*!< receiving interface name, like eth1.2, If blank, then match all interface */ }PPA_MULTIFIELD_VLAN_INFO_AUTO; /*! \brief This is the data structure for Mutiple Field Based Classification And VLAN Assigment's manual-learning VLAN information based on default key selection. */ typedef struct { uint8_t tx_if_id; /*!< physical destination interface id match, like 0 for eth0, 1 for eth1. It is part of key 14 */ uint8_t rx_if_id; /*!< physical destination interface id match, like 0 for eth0, 1 for eth1. It is part of key 15 */ uint8_t is_vlan; /*!< VLAN Flag match. 1: only match single vlan, 2: match double vlan, 0: match no vlan packet. It is part of key14 */ uint8_t is_vlan_mask; /*!< VLAN Flag mask*/ uint8_t out_vlan_pri; /*!< outer vlan priority ( 3 bits only) match. Based on PPA default Key Selection, it is part of key 8/l2_off14 */ uint8_t out_vlan_pri_mask; /*!< match mask to specify the bits to match. Note, 0 means need to match and 1 means not to match*/ uint8_t out_vlan_cfi; /*!< outer vlan cfi ( 1 bits only) match. Based on PPA default Key Selection, it is part of key 8/l2_off14 */ uint8_t out_vlan_cfi_mask; /*!< match mask to specify the bits to match. Note, 0 means need to match and 1 means not to match*/ uint16_t out_vlan_vid; /*!< outer vlan id ( 1 bits only) match. Based on PPA default Key Selection, it is part of key 8 and 9/l2_off14-15 */ uint16_t out_vlan_vid_mask; /*!< match mask to specify the bits to match. Note, 0 means need to match and 1 means not to match*/ uint8_t in_vlan_pri; /*!< inner vlan priority ( 3 bits only) match. Based on PPA default Key Selection, it is part of key 12/l2_off18 */ uint8_t in_vlan_pri_mask; /*!< match mask to specify the bits to match. Note, 0 means need to match and 1 means not to match*/ uint8_t in_vlan_cfi; /*!< inner vlan cfi ( 1 bits only) match. Based on PPA default Key Selection, it is part of key 12/l2_off18 */ uint8_t in_vlan_cfi_mask; /*!< match mask to specify the bits to match. Note, 0 means need to match and 1 means not to match*/ uint16_t in_vlan_vid; /*!< inner vlan id ( 1 bits only) match. Based on PPA default Key Selection, it is part of key 12 and 13/l2_off18-19 */ uint16_t in_vlan_vid_mask; /*!< match mask to specify the bits to match. Note, 0 means need to match and 1 means not to match*/ uint8_t action_out_vlan_insert; /*!< out vlan insert action */ uint8_t action_in_vlan_insert; /* #endif #endif // __IFX_PPA_API_H__20081031_1913__