openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

bfd_sdk_msg.h (7207B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      6  * *
      7  * File:    bfd_sdk_msg.h
      8  */
      9 
     10 #ifndef BFD_SDK_MSG_H_
     11 #define BFD_SDK_MSG_H_
     12 
     13 #include <soc/shared/bfd_msg.h>
     14 
     15 
     16 
     17 /*
     18  * BFD Initialization control message
     19  */
     20 typedef struct bfd_sdk_msg_ctrl_init_s {
     21     uint32  num_sessions;        /* Max number of BFD sessions */
     22     uint32  encap_size;          /* Total encapsulation table size */
     23     uint32  num_auth_sha1_keys;  /* Max number of sha1 auth keys */
     24     uint32  num_auth_sp_keys;    /* Max number of simple pwd auth keys */
     25     uint32  rx_channel;          /* Local RX DMA channel (0..3) */
     26     uint32  config_flags;        /* Flags representing various config
     27                                     properties on SDK side */
     28     uint32  num_punt_buffers;    /* Number of punt buffers */
     29     /* Protection Packet Feature */
     30     uint32 protection_packet_enable; /* BFD IPV6 Protection packet feature enable */
     31     uint32 protection_pkt_event_fifo_size; /* Indicates internal event FIFO threshold size */
     32     uint32 protection_pkt_event_fifo_timer; /* Indicates maximum wait timer to read internal event FIFO */
     33 
     34 } bfd_sdk_msg_ctrl_init_t;
     35 
     36 /*
     37  * BFD Session Set control message
     38  */
     39 typedef struct bfd_sdk_msg_ctrl_sess_set_s {
     40     uint32  sess_id;
     41     uint32  flags;
     42     uint8   passive;
     43     uint8   local_demand;
     44     uint8   local_diag;
     45     uint8   local_detect_mult;
     46     uint32  local_discriminator;
     47     uint32  remote_discriminator;
     48     uint32  local_min_tx;
     49     uint32  local_min_rx;
     50     uint32  local_min_echo_rx;
     51     uint8   auth_type;
     52     uint32  auth_key;
     53     uint32  xmt_auth_seq;
     54     uint8   encap_type;    /* Raw, UDP-IPv4/IPv6, used for UDP checksum */
     55     uint32  encap_length;  /* BFD encapsulation length */
     56     uint8   encap_data[SHR_BFD_MAX_ENCAP_LENGTH];  /* Encapsulation data */
     57     uint16  lkey_etype;    /* Lookup key Ether Type */
     58     uint16  lkey_offset;   /* Lookup key offset */
     59     uint16  lkey_length;   /* Lookup key length */
     60     uint32  mep_id_length; /* MPLS-TP CV Source MEP-ID TLV length */
     61     uint8   mep_id[_SHR_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CV
     62                                                             Source MEP-ID */
     63     uint8   mpls_label[SHR_BFD_MPLS_LABEL_LENGTH]; /* Incoming inner MPLS
     64                                                       label packet format */
     65     uint32  tx_port;
     66     uint32  tx_cos;
     67     uint32  tx_pri;
     68     uint32  tx_qnum;
     69     uint8   local_echo;
     70 #ifdef SDK_45223_DISABLED
     71     uint32  remote_mep_id_length;
     72     uint8   remote_mep_id[_SHR_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CV
     73                                                                  Remote MEP-ID */
     74 #endif
     75     uint8   sampling_ratio;  /* 0 - No packets sampled to the CPU.
     76                                1-N - Count of packets (with events)
     77                                that need to arrive before one is
     78                                sampled to the CPU. */
     79     uint32   actual_tx_interval; /* SSO update : Actual tx_interval */
     80     uint8    remote_detect_mult;
     81 } bfd_sdk_msg_ctrl_sess_set_t;
     82 
     83 /*
     84  * BFD Session Get control message
     85  */
     86 typedef struct bfd_sdk_msg_ctrl_sess_get_s {
     87     uint32   sess_id;
     88     uint8    enable;
     89     uint8    passive;
     90     uint8    poll;
     91     uint8    local_demand;
     92     uint8    remote_demand;
     93     uint8    local_diag;
     94     uint8    remote_diag;
     95     uint8    local_sess_state;
     96     uint8    remote_sess_state;
     97     uint8    local_detect_mult;
     98     uint8    remote_detect_mult;
     99     uint32   local_discriminator;
    100     uint32   remote_discriminator;
    101     uint32   local_min_tx;
    102     uint32   remote_min_tx;
    103     uint32   local_min_rx;
    104     uint32   remote_min_rx;
    105     uint32   local_min_echo_rx;
    106     uint32   remote_min_echo_rx;
    107     uint8    auth_type;
    108     uint32   auth_key;
    109     uint32   xmt_auth_seq;
    110     uint32   rcv_auth_seq;
    111     uint8    encap_type;    /* Raw, UDP-IPv4/IPv6, used for UDP checksum */
    112     uint32   encap_length;  /* BFD encapsulation length */
    113     uint8    encap_data[SHR_BFD_MAX_ENCAP_LENGTH];  /* Encapsulation data */
    114     uint16   lkey_etype;    /* Lookup key Ether Type */
    115     uint16   lkey_offset;   /* Lookup key offset */
    116     uint16   lkey_length;   /* Lookup key length */
    117     uint32   mep_id_length; /* MPLS-TP CV Source MEP-ID TLV length */
    118     uint8    mep_id[_SHR_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CV
    119                                                              Source MEP-ID */
    120     uint8    mpls_label[SHR_BFD_MPLS_LABEL_LENGTH]; /* Incoming inner MPLS
    121                                                        label packet format */
    122     uint32   tx_port;
    123     uint32   tx_cos;
    124     uint32   tx_pri;
    125     uint32   tx_qnum;
    126     uint8   local_echo;
    127 #ifdef SDK_45223_DISABLED
    128     uint32   remote_mep_id_length;
    129     uint8    remote_mep_id[_SHR_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CV
    130                                                                  Remote MEP-ID */
    131     uint32   mis_conn_mep_id_length;
    132     uint8    mis_conn_mep_id[_SHR_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CV
    133                                                        Mis connectivity MEP-ID */
    134 #endif
    135     uint8   sampling_ratio;  /* 0 - No packets sampled to the CPU.
    136                                1-N - Count of packets (with events)
    137                                that need to arrive before one is
    138                                sampled to the CPU. */
    139     uint32  actual_tx_interval;          /* Actual_tx_inteval : SSO update */
    140 } bfd_sdk_msg_ctrl_sess_get_t;
    141 
    142 typedef struct bfd_sdk_msg_ctrl_trace_log_enable_s {
    143     uint32 addr_hi;
    144     uint32 addr_lo;
    145 } bfd_sdk_msg_ctrl_trace_log_enable_t;
    146 
    147 typedef struct bfd_sdk_msg_ctrl_stat_reply_s {
    148     uint32  sess_id;           /* BFD session (endpoint) id */
    149     uint32  packets_in;        /* Total packets in */
    150     uint32  packets_out;       /* Total packets out */
    151     uint32  packets_drop;      /* Total packets drop */
    152     uint32  packets_auth_drop; /* Packets drop due to authentication failure */
    153     uint32  packets_echo_reply; /*Total number of echo reply packets processed*/
    154     uint32  packets_echo_reply_hi;
    155 } bfd_sdk_msg_ctrl_stat_reply_t;
    156 
    157 /*
    158  * BFD discard stat get control message
    159  */
    160 typedef struct bfd_sdk_msg_ctrl_discard_stat_get_s {
    161     uint32 bfd_ver_err;
    162     uint32 bfd_len_err;
    163     uint32 bfd_detect_mult;
    164     uint32 bfd_my_disc;
    165     uint32 bfd_p_f_bit;
    166     uint32 bfd_m_bit;
    167     uint32 bfd_auth_type_mismatch;
    168     uint32 bfd_auth_simple_err;
    169     uint32 bfd_auth_m_sha1_err;
    170     uint32 bfd_sess_mismatch;
    171 } bfd_sdk_msg_ctrl_discard_stat_get_t;
    172 
    173 /*
    174  * BFD control messages
    175  */
    176 typedef union shr_bfd_msg_ctrl_s {
    177     bfd_sdk_msg_ctrl_init_t         init;
    178     bfd_sdk_msg_ctrl_sess_set_t     sess_set;
    179     bfd_sdk_msg_ctrl_sess_get_t     sess_get;
    180     shr_bfd_msg_ctrl_auth_sp_t      auth_sp;
    181     shr_bfd_msg_ctrl_auth_sha1_t    auth_sha1;
    182     shr_bfd_msg_ctrl_stat_req_t     stat_req;
    183     bfd_sdk_msg_ctrl_stat_reply_t   stat_reply;
    184     bfd_sdk_msg_ctrl_trace_log_enable_t trace_enable;
    185     bfd_sdk_msg_ctrl_discard_stat_get_t pkt_discard_stat;
    186 } bfd_sdk_msg_ctrl_t;
    187 
    188 #endif /* BFD_SDK_MSG_H_ */
    189 
    190