net/qede/base: add LLDP support
authorRasesh Mody <rasesh.mody@cavium.com>
Sat, 7 Oct 2017 06:30:59 +0000 (23:30 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 12 Oct 2017 00:36:58 +0000 (01:36 +0100)
This patch adds base driver LLDP protocol support and handle LLDP
received TLV update events.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/bcm_osal.h
drivers/net/qede/base/ecore_dcbx.c
drivers/net/qede/base/ecore_dcbx.h
drivers/net/qede/base/ecore_dcbx_api.h
drivers/net/qede/base/ecore_mcp.c
drivers/net/qede/base/mcp_public.h

index 6368030..47290f4 100644 (file)
@@ -441,4 +441,6 @@ u32 qede_crc32(u32 crc, u8 *ptr, u32 length);
 #define OSAL_MFW_TLV_REQ(p_hwfn) nothing
 #define OSAL_MFW_FILL_TLV_DATA(type, buf, data) (0)
 #define OSAL_PF_VALIDATE_MODIFY_TUNN_CONFIG(p_hwfn, mask, b_update, tunn) 0
+#define OSAL_LLDP_RX_TLVS(p_hwfn, tlv_buf, tlv_size) nothing
+
 #endif /* __BCM_OSAL_H */
index 637d5bb..97fd484 100644 (file)
@@ -376,6 +376,12 @@ ecore_dcbx_copy_mib(struct ecore_hwfn *p_hwfn,
                                          p_data->addr, p_data->size);
                        prefix_seq_num = p_data->lldp_remote->prefix_seq_num;
                        suffix_seq_num = p_data->lldp_remote->suffix_seq_num;
+               } else if (type == ECORE_DCBX_LLDP_TLVS) {
+                       ecore_memcpy_from(p_hwfn, p_ptt, p_data->lldp_tlvs,
+                                         p_data->addr, p_data->size);
+                       prefix_seq_num = p_data->lldp_tlvs->prefix_seq_num;
+                       suffix_seq_num = p_data->lldp_tlvs->suffix_seq_num;
+
                } else {
                        ecore_memcpy_from(p_hwfn, p_ptt, p_data->mib,
                                          p_data->addr, p_data->size);
@@ -1304,3 +1310,230 @@ enum _ecore_status_t ecore_dcbx_get_config_params(struct ecore_hwfn *p_hwfn,
 
        return ECORE_SUCCESS;
 }
+
+enum _ecore_status_t ecore_lldp_register_tlv(struct ecore_hwfn *p_hwfn,
+                                            struct ecore_ptt *p_ptt,
+                                            enum ecore_lldp_agent agent,
+                                            u8 tlv_type)
+{
+       u32 mb_param = 0, mcp_resp = 0, mcp_param = 0, val = 0;
+       enum _ecore_status_t rc = ECORE_SUCCESS;
+
+       switch (agent) {
+       case ECORE_LLDP_NEAREST_BRIDGE:
+               val = LLDP_NEAREST_BRIDGE;
+               break;
+       case ECORE_LLDP_NEAREST_NON_TPMR_BRIDGE:
+               val = LLDP_NEAREST_NON_TPMR_BRIDGE;
+               break;
+       case ECORE_LLDP_NEAREST_CUSTOMER_BRIDGE:
+               val = LLDP_NEAREST_CUSTOMER_BRIDGE;
+               break;
+       default:
+               DP_ERR(p_hwfn, "Invalid agent type %d\n", agent);
+               return ECORE_INVAL;
+       }
+
+       SET_MFW_FIELD(mb_param, DRV_MB_PARAM_LLDP_AGENT, val);
+       SET_MFW_FIELD(mb_param, DRV_MB_PARAM_LLDP_TLV_RX_TYPE, tlv_type);
+
+       rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_REGISTER_LLDP_TLVS_RX,
+                          mb_param, &mcp_resp, &mcp_param);
+       if (rc != ECORE_SUCCESS)
+               DP_NOTICE(p_hwfn, false, "Failed to register TLV\n");
+
+       return rc;
+}
+
+enum _ecore_status_t
+ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
+{
+       struct ecore_dcbx_mib_meta_data data;
+       enum _ecore_status_t rc = ECORE_SUCCESS;
+       struct lldp_received_tlvs_s tlvs;
+       int i;
+
+       for (i = 0; i < LLDP_MAX_LLDP_AGENTS; i++) {
+               OSAL_MEM_ZERO(&data, sizeof(data));
+               data.addr = p_hwfn->mcp_info->port_addr +
+                           offsetof(struct public_port, lldp_received_tlvs[i]);
+               data.lldp_tlvs = &tlvs;
+               data.size = sizeof(tlvs);
+               rc = ecore_dcbx_copy_mib(p_hwfn, p_ptt, &data,
+                                        ECORE_DCBX_LLDP_TLVS);
+               if (rc != ECORE_SUCCESS) {
+                       DP_NOTICE(p_hwfn, false, "Failed to read lldp TLVs\n");
+                       return rc;
+               }
+
+               if (!tlvs.length)
+                       continue;
+
+               for (i = 0; i < MAX_TLV_BUFFER; i++)
+                       tlvs.tlvs_buffer[i] =
+                               OSAL_CPU_TO_BE32(tlvs.tlvs_buffer[i]);
+
+               OSAL_LLDP_RX_TLVS(p_hwfn, tlvs.tlvs_buffer, tlvs.length);
+       }
+
+       return rc;
+}
+
+enum _ecore_status_t
+ecore_lldp_get_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
+                     struct ecore_lldp_config_params *p_params)
+{
+       struct lldp_config_params_s lldp_params;
+       u32 addr, val;
+       int i;
+
+       switch (p_params->agent) {
+       case ECORE_LLDP_NEAREST_BRIDGE:
+               val = LLDP_NEAREST_BRIDGE;
+               break;
+       case ECORE_LLDP_NEAREST_NON_TPMR_BRIDGE:
+               val = LLDP_NEAREST_NON_TPMR_BRIDGE;
+               break;
+       case ECORE_LLDP_NEAREST_CUSTOMER_BRIDGE:
+               val = LLDP_NEAREST_CUSTOMER_BRIDGE;
+               break;
+       default:
+               DP_ERR(p_hwfn, "Invalid agent type %d\n", p_params->agent);
+               return ECORE_INVAL;
+       }
+
+       addr = p_hwfn->mcp_info->port_addr +
+                       offsetof(struct public_port, lldp_config_params[val]);
+
+       ecore_memcpy_from(p_hwfn, p_ptt, &lldp_params, addr,
+                         sizeof(lldp_params));
+
+       p_params->tx_interval = GET_MFW_FIELD(lldp_params.config,
+                                             LLDP_CONFIG_TX_INTERVAL);
+       p_params->tx_hold = GET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_HOLD);
+       p_params->tx_credit = GET_MFW_FIELD(lldp_params.config,
+                                           LLDP_CONFIG_MAX_CREDIT);
+       p_params->rx_enable = GET_MFW_FIELD(lldp_params.config,
+                                           LLDP_CONFIG_ENABLE_RX);
+       p_params->tx_enable = GET_MFW_FIELD(lldp_params.config,
+                                           LLDP_CONFIG_ENABLE_TX);
+
+       OSAL_MEMCPY(p_params->chassis_id_tlv, lldp_params.local_chassis_id,
+                   sizeof(p_params->chassis_id_tlv));
+       for (i = 0; i < ECORE_LLDP_CHASSIS_ID_STAT_LEN; i++)
+               p_params->chassis_id_tlv[i] =
+                               OSAL_BE32_TO_CPU(p_params->chassis_id_tlv[i]);
+
+       OSAL_MEMCPY(p_params->port_id_tlv, lldp_params.local_port_id,
+                   sizeof(p_params->port_id_tlv));
+       for (i = 0; i < ECORE_LLDP_PORT_ID_STAT_LEN; i++)
+               p_params->port_id_tlv[i] =
+                               OSAL_BE32_TO_CPU(p_params->port_id_tlv[i]);
+
+       return ECORE_SUCCESS;
+}
+
+enum _ecore_status_t
+ecore_lldp_set_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
+                     struct ecore_lldp_config_params *p_params)
+{
+       u32 mb_param = 0, mcp_resp = 0, mcp_param = 0;
+       struct lldp_config_params_s lldp_params;
+       enum _ecore_status_t rc = ECORE_SUCCESS;
+       u32 addr, val;
+       int i;
+
+       switch (p_params->agent) {
+       case ECORE_LLDP_NEAREST_BRIDGE:
+               val = LLDP_NEAREST_BRIDGE;
+               break;
+       case ECORE_LLDP_NEAREST_NON_TPMR_BRIDGE:
+               val = LLDP_NEAREST_NON_TPMR_BRIDGE;
+               break;
+       case ECORE_LLDP_NEAREST_CUSTOMER_BRIDGE:
+               val = LLDP_NEAREST_CUSTOMER_BRIDGE;
+               break;
+       default:
+               DP_ERR(p_hwfn, "Invalid agent type %d\n", p_params->agent);
+               return ECORE_INVAL;
+       }
+
+       SET_MFW_FIELD(mb_param, DRV_MB_PARAM_LLDP_AGENT, val);
+       addr = p_hwfn->mcp_info->port_addr +
+                       offsetof(struct public_port, lldp_config_params[val]);
+
+       OSAL_MEMSET(&lldp_params, 0, sizeof(lldp_params));
+       SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_TX_INTERVAL,
+                     p_params->tx_interval);
+       SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_HOLD, p_params->tx_hold);
+       SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_MAX_CREDIT,
+                     p_params->tx_credit);
+       SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_ENABLE_RX,
+                     !!p_params->rx_enable);
+       SET_MFW_FIELD(lldp_params.config, LLDP_CONFIG_ENABLE_TX,
+                     !!p_params->tx_enable);
+
+       for (i = 0; i < ECORE_LLDP_CHASSIS_ID_STAT_LEN; i++)
+               p_params->chassis_id_tlv[i] =
+                               OSAL_CPU_TO_BE32(p_params->chassis_id_tlv[i]);
+       OSAL_MEMCPY(lldp_params.local_chassis_id, p_params->chassis_id_tlv,
+                   sizeof(lldp_params.local_chassis_id));
+
+       for (i = 0; i < ECORE_LLDP_PORT_ID_STAT_LEN; i++)
+               p_params->port_id_tlv[i] =
+                               OSAL_CPU_TO_BE32(p_params->port_id_tlv[i]);
+       OSAL_MEMCPY(lldp_params.local_port_id, p_params->port_id_tlv,
+                   sizeof(lldp_params.local_port_id));
+
+       ecore_memcpy_to(p_hwfn, p_ptt, addr, &lldp_params, sizeof(lldp_params));
+
+       rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_LLDP,
+                          mb_param, &mcp_resp, &mcp_param);
+       if (rc != ECORE_SUCCESS)
+               DP_NOTICE(p_hwfn, false, "SET_LLDP failed, error = %d\n", rc);
+
+       return rc;
+}
+
+enum _ecore_status_t
+ecore_lldp_set_system_tlvs(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
+                          struct ecore_lldp_sys_tlvs *p_params)
+{
+       u32 mb_param = 0, mcp_resp = 0, mcp_param = 0;
+       enum _ecore_status_t rc = ECORE_SUCCESS;
+       struct lldp_system_tlvs_buffer_s lld_tlv_buf;
+       u32 addr, *p_val;
+       u8 len;
+       int i;
+
+       p_val = (u32 *)p_params->buf;
+       for (i = 0; i < ECORE_LLDP_SYS_TLV_SIZE / 4; i++)
+               p_val[i] = OSAL_CPU_TO_BE32(p_val[i]);
+
+       OSAL_MEMSET(&lld_tlv_buf, 0, sizeof(lld_tlv_buf));
+       SET_MFW_FIELD(lld_tlv_buf.flags, LLDP_SYSTEM_TLV_VALID, 1);
+       SET_MFW_FIELD(lld_tlv_buf.flags, LLDP_SYSTEM_TLV_MANDATORY,
+                     !!p_params->discard_mandatory_tlv);
+       SET_MFW_FIELD(lld_tlv_buf.flags, LLDP_SYSTEM_TLV_LENGTH,
+                     p_params->buf_size);
+       len = ECORE_LLDP_SYS_TLV_SIZE / 2;
+       OSAL_MEMCPY(lld_tlv_buf.data, p_params->buf, len);
+
+       addr = p_hwfn->mcp_info->port_addr +
+               offsetof(struct public_port, system_lldp_tlvs_buf);
+       ecore_memcpy_to(p_hwfn, p_ptt, addr, &lld_tlv_buf, sizeof(lld_tlv_buf));
+
+       if  (p_params->buf_size > len) {
+               addr = p_hwfn->mcp_info->port_addr +
+                       offsetof(struct public_port, system_lldp_tlvs_buf2);
+               ecore_memcpy_to(p_hwfn, p_ptt, addr, &p_params->buf[len],
+                               ECORE_LLDP_SYS_TLV_SIZE / 2);
+       }
+
+       rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_LLDP,
+                          mb_param, &mcp_resp, &mcp_param);
+       if (rc != ECORE_SUCCESS)
+               DP_NOTICE(p_hwfn, false, "SET_LLDP failed, error = %d\n", rc);
+
+       return rc;
+}
index bc1a2f9..469e42d 100644 (file)
@@ -37,6 +37,7 @@ struct ecore_dcbx_info {
 struct ecore_dcbx_mib_meta_data {
        struct lldp_config_params_s *lldp_local;
        struct lldp_status_params_s *lldp_remote;
+       struct lldp_received_tlvs_s *lldp_tlvs;
        struct dcbx_local_params *local_admin;
        struct dcb_dscp_map *dscp_map;
        struct dcbx_mib *mib;
@@ -57,4 +58,7 @@ void ecore_dcbx_set_pf_update_params(struct ecore_dcbx_results *p_src,
 /* Returns TOS value for a given priority */
 u8 ecore_dcbx_get_dscp_value(struct ecore_hwfn *p_hwfn, u8 pri);
 
+enum _ecore_status_t
+ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
+
 #endif /* __ECORE_DCBX_H__ */
index 2dc7679..249fb53 100644 (file)
@@ -18,7 +18,8 @@ enum ecore_mib_read_type {
        ECORE_DCBX_REMOTE_MIB,
        ECORE_DCBX_LOCAL_MIB,
        ECORE_DCBX_REMOTE_LLDP_MIB,
-       ECORE_DCBX_LOCAL_LLDP_MIB
+       ECORE_DCBX_LOCAL_LLDP_MIB,
+       ECORE_DCBX_LLDP_TLVS
 };
 
 struct ecore_dcbx_app_data {
@@ -175,6 +176,31 @@ struct ecore_dcbx_app_metadata {
        enum ecore_pci_personality personality;
 };
 
+enum ecore_lldp_agent {
+       ECORE_LLDP_NEAREST_BRIDGE = 0,
+       ECORE_LLDP_NEAREST_NON_TPMR_BRIDGE,
+       ECORE_LLDP_NEAREST_CUSTOMER_BRIDGE,
+       ECORE_LLDP_MAX_AGENTS
+};
+
+struct ecore_lldp_config_params {
+       enum ecore_lldp_agent agent;
+       u8 tx_interval;
+       u8 tx_hold;
+       u8 tx_credit;
+       bool rx_enable;
+       bool tx_enable;
+       u32 chassis_id_tlv[ECORE_LLDP_CHASSIS_ID_STAT_LEN];
+       u32 port_id_tlv[ECORE_LLDP_PORT_ID_STAT_LEN];
+};
+
+#define ECORE_LLDP_SYS_TLV_SIZE 256
+struct ecore_lldp_sys_tlvs {
+       bool discard_mandatory_tlv;
+       u8 buf[ECORE_LLDP_SYS_TLV_SIZE];
+       u16 buf_size;
+};
+
 enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *,
                                             struct ecore_dcbx_get *,
                                             enum ecore_mib_read_type);
@@ -187,6 +213,23 @@ enum _ecore_status_t ecore_dcbx_config_params(struct ecore_hwfn *,
                                              struct ecore_dcbx_set *,
                                              bool);
 
+enum _ecore_status_t ecore_lldp_register_tlv(struct ecore_hwfn *p_hwfn,
+                                            struct ecore_ptt *p_ptt,
+                                            enum ecore_lldp_agent agent,
+                                            u8 tlv_type);
+
+enum _ecore_status_t
+ecore_lldp_get_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
+                     struct ecore_lldp_config_params *p_params);
+
+enum _ecore_status_t
+ecore_lldp_set_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
+                     struct ecore_lldp_config_params *p_params);
+
+enum _ecore_status_t
+ecore_lldp_set_system_tlvs(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
+                          struct ecore_lldp_sys_tlvs *p_params);
+
 static const struct ecore_dcbx_app_metadata ecore_dcbx_app_update[] = {
        {DCBX_PROTOCOL_ISCSI, "ISCSI", ECORE_PCI_ISCSI},
        {DCBX_PROTOCOL_FCOE, "FCOE", ECORE_PCI_FCOE},
index 3df8fce..f370fb6 100644 (file)
@@ -1988,6 +1988,9 @@ enum _ecore_status_t ecore_mcp_handle_events(struct ecore_hwfn *p_hwfn,
                        OSAL_MEMSET(&p_hwfn->p_dcbx_info->set, 0,
                                    sizeof(struct ecore_dcbx_set));
                        break;
+               case MFW_DRV_MSG_LLDP_RECEIVED_TLVS_UPDATED:
+                       ecore_lldp_mib_update_event(p_hwfn, p_ptt);
+                       break;
                case MFW_DRV_MSG_OEM_CFG_UPDATE:
                        ecore_mcp_handle_ufp_event(p_hwfn, p_ptt);
                        break;
index 023ae5b..81ca663 100644 (file)
@@ -264,11 +264,11 @@ struct couple_mode_teaming {
 /**************************************
  *     LLDP and DCBX HSI structures
  **************************************/
-#define LLDP_CHASSIS_ID_STAT_LEN 4
-#define LLDP_PORT_ID_STAT_LEN 4
+#define LLDP_CHASSIS_ID_STAT_LEN       4
+#define LLDP_PORT_ID_STAT_LEN          4
 #define DCBX_MAX_APP_PROTOCOL          32
-#define MAX_SYSTEM_LLDP_TLV_DATA    32
-
+#define MAX_SYSTEM_LLDP_TLV_DATA       32  /* In dwords. 128 in bytes*/
+#define MAX_TLV_BUFFER                 128 /* In dwords. 512 in bytes*/
 typedef enum _lldp_agent_e {
        LLDP_NEAREST_BRIDGE = 0,
        LLDP_NEAREST_NON_TPMR_BRIDGE,
@@ -440,6 +440,8 @@ struct dcbx_local_params {
 #define DCBX_CONFIG_VERSION_DISABLED        0
 #define DCBX_CONFIG_VERSION_IEEE            1
 #define DCBX_CONFIG_VERSION_CEE             2
+#define DCBX_CONFIG_VERSION_DYNAMIC         \
+       (DCBX_CONFIG_VERSION_IEEE | DCBX_CONFIG_VERSION_CEE)
 #define DCBX_CONFIG_VERSION_STATIC          4
 
        u32 flags;
@@ -462,11 +464,29 @@ struct dcbx_mib {
 };
 
 struct lldp_system_tlvs_buffer_s {
-       u16 valid;
-       u16 length;
+       u32 flags;
+#define LLDP_SYSTEM_TLV_VALID_MASK             0x1
+#define LLDP_SYSTEM_TLV_VALID_OFFSET           0
+/* This bit defines if system TLVs are instead of mandatory TLVS or in
+ * addition to them. Set 1 for replacing mandatory TLVs
+ */
+#define LLDP_SYSTEM_TLV_MANDATORY_MASK         0x2
+#define LLDP_SYSTEM_TLV_MANDATORY_OFFSET       1
+#define LLDP_SYSTEM_TLV_LENGTH_MASK            0xffff0000
+#define LLDP_SYSTEM_TLV_LENGTH_OFFSET          16
        u32 data[MAX_SYSTEM_LLDP_TLV_DATA];
 };
 
+/* Since this struct is written by MFW and read by driver need to add
+ * sequence guards (as in case of DCBX MIB)
+ */
+struct lldp_received_tlvs_s {
+       u32 prefix_seq_num;
+       u32 length;
+       u32 tlvs_buffer[MAX_TLV_BUFFER];
+       u32 suffix_seq_num;
+};
+
 struct dcb_dscp_map {
        u32 flags;
 #define DCB_DSCP_ENABLE_MASK                   0x1
@@ -838,6 +858,9 @@ struct public_port {
 #define OEM_CFG_SCHED_TYPE_OFFSET                      2
 #define OEM_CFG_SCHED_TYPE_ETS                         0x1
 #define OEM_CFG_SCHED_TYPE_VNIC_BW                     0x2
+
+       struct lldp_received_tlvs_s lldp_received_tlvs[LLDP_MAX_LLDP_AGENTS];
+       u32 system_lldp_tlvs_buf2[MAX_SYSTEM_LLDP_TLV_DATA];
 };
 
 /**************************************/
@@ -1219,8 +1242,8 @@ struct public_drv_mb {
        /*        - DONT_CARE - Don't flap the link if up */
 #define DRV_MSG_CODE_LINK_RESET                        0x23000000
 
-       /* Vitaly: LLDP commands */
 #define DRV_MSG_CODE_SET_LLDP                   0x24000000
+#define DRV_MSG_CODE_REGISTER_LLDP_TLVS_RX      0x24100000
 #define DRV_MSG_CODE_SET_DCBX                   0x25000000
        /* OneView feature driver HSI*/
 #define DRV_MSG_CODE_OV_UPDATE_CURR_CFG                0x26000000
@@ -1463,10 +1486,18 @@ struct public_drv_mb {
 #define DRV_MB_PARAM_INIT_PHY_DONT_CARE                0x00000002
 
        /* LLDP / DCBX params*/
+       /* To be used with SET_LLDP command */
 #define DRV_MB_PARAM_LLDP_SEND_MASK            0x00000001
 #define DRV_MB_PARAM_LLDP_SEND_OFFSET          0
+       /* To be used with SET_LLDP and REGISTER_LLDP_TLVS_RX commands */
 #define DRV_MB_PARAM_LLDP_AGENT_MASK           0x00000006
 #define DRV_MB_PARAM_LLDP_AGENT_OFFSET         1
+       /* To be used with REGISTER_LLDP_TLVS_RX command */
+#define DRV_MB_PARAM_LLDP_TLV_RX_VALID_MASK    0x00000001
+#define DRV_MB_PARAM_LLDP_TLV_RX_VALID_OFFSET  0
+#define DRV_MB_PARAM_LLDP_TLV_RX_TYPE_MASK     0x000007f0
+#define DRV_MB_PARAM_LLDP_TLV_RX_TYPE_OFFSET   4
+       /* To be used with SET_DCBX command */
 #define DRV_MB_PARAM_DCBX_NOTIFY_MASK          0x00000008
 #define DRV_MB_PARAM_DCBX_NOTIFY_OFFSET                3
 
@@ -1634,6 +1665,7 @@ struct public_drv_mb {
 #define FW_MSG_CODE_LINK_RESET_DONE            0x23000000
 #define FW_MSG_CODE_SET_LLDP_DONE               0x24000000
 #define FW_MSG_CODE_SET_LLDP_UNSUPPORTED_AGENT  0x24010000
+#define FW_MSG_CODE_REGISTER_LLDP_TLVS_RX_DONE  0x24100000
 #define FW_MSG_CODE_SET_DCBX_DONE               0x25000000
 #define FW_MSG_CODE_UPDATE_CURR_CFG_DONE        0x26000000
 #define FW_MSG_CODE_UPDATE_BUS_NUM_DONE         0x27000000
@@ -1815,6 +1847,7 @@ enum MFW_DRV_MSG_TYPE {
        MFW_DRV_MSG_EEE_NEGOTIATION_COMPLETE,
        MFW_DRV_MSG_GET_TLV_REQ,
        MFW_DRV_MSG_OEM_CFG_UPDATE,
+       MFW_DRV_MSG_LLDP_RECEIVED_TLVS_UPDATED,
        MFW_DRV_MSG_MAX
 };