diff --git a/switchapi/es2k/switch_pd_fdb.c b/switchapi/es2k/switch_pd_fdb.c index 9f9a91a..b08e224 100644 --- a/switchapi/es2k/switch_pd_fdb.c +++ b/switchapi/es2k/switch_pd_fdb.c @@ -561,10 +561,12 @@ switch_status_t switch_pd_l2_rx_forward_table_entry( LNW_L2_FWD_RX_TABLE, (unsigned int)api_l2_rx_info->rif_handle); status = tdi_action_name_to_id( - table_info_hdl, LNW_L2_FWD_RX_TABLE_ACTION_RX_L2_FWD_LAG, &action_id); + table_info_hdl, + LNW_L2_FWD_RX_TABLE_ACTION_RX_L2_FWD_LAG_AND_RECIRCULATE, &action_id); if (status != TDI_SUCCESS) { - krnlmon_log_error("Unable to get action allocator ID for: %s, error: %d", - LNW_L2_FWD_RX_TABLE_ACTION_RX_L2_FWD_LAG, status); + krnlmon_log_error( + "Unable to get action allocator ID for: %s, error: %d", + LNW_L2_FWD_RX_TABLE_ACTION_RX_L2_FWD_LAG_AND_RECIRCULATE, status); goto dealloc_resources; } diff --git a/switchapi/es2k/switch_pd_lag.c b/switchapi/es2k/switch_pd_lag.c index 70540df..c7c95b4 100644 --- a/switchapi/es2k/switch_pd_lag.c +++ b/switchapi/es2k/switch_pd_lag.c @@ -154,11 +154,11 @@ switch_status_t switch_pd_tx_lag_table_entry(switch_device_t device, } status = tdi_data_field_id_with_action_get( - table_info_hdl, LNW_ACTION_SET_EGRESS_PORT_PARAM_EGRESS_PORT, action_id, + table_info_hdl, ACTION_SET_EGRESS_PORT_PARAM_EGRESS_PORT, action_id, &data_field_id); if (status != TDI_SUCCESS) { krnlmon_log_error("Unable to get data field id param for: %s, error: %d", - LNW_ACTION_SET_EGRESS_PORT_PARAM_EGRESS_PORT, status); + LNW_ACTION_FWD_TO_VSI_PARAM_PORT, status); goto dealloc_resources; } @@ -346,10 +346,10 @@ switch_status_t switch_pd_rx_lag_table_entry(switch_device_t device, } status = tdi_action_name_to_id( - table_info_hdl, LNW_RX_LAG_TABLE_ACTION_SET_EGRESS_PORT, &action_id); + table_info_hdl, LNW_RX_LAG_TABLE_ACTION_FWD_TO_VSI, &action_id); if (status != TDI_SUCCESS) { krnlmon_log_error("Unable to get action allocator ID for: %s, error: %d", - LNW_RX_LAG_TABLE_ACTION_SET_EGRESS_PORT, status); + LNW_RX_LAG_TABLE_ACTION_FWD_TO_VSI, status); goto dealloc_resources; } @@ -362,12 +362,12 @@ switch_status_t switch_pd_rx_lag_table_entry(switch_device_t device, goto dealloc_resources; } - status = tdi_data_field_id_with_action_get( - table_info_hdl, LNW_ACTION_SET_EGRESS_PORT_PARAM_EGRESS_PORT, action_id, - &data_field_id); + status = tdi_data_field_id_with_action_get(table_info_hdl, + LNW_ACTION_FWD_TO_VSI_PARAM_PORT, + action_id, &data_field_id); if (status != TDI_SUCCESS) { krnlmon_log_error("Unable to get data field id param for: %s, error: %d", - LNW_ACTION_SET_EGRESS_PORT_PARAM_EGRESS_PORT, status); + LNW_ACTION_FWD_TO_VSI_PARAM_PORT, status); goto dealloc_resources; } diff --git a/switchapi/es2k/switch_pd_p4_name_mapping.h b/switchapi/es2k/switch_pd_p4_name_mapping.h index 6f3170e..afda9dd 100644 --- a/switchapi/es2k/switch_pd_p4_name_mapping.h +++ b/switchapi/es2k/switch_pd_p4_name_mapping.h @@ -110,8 +110,8 @@ extern "C" { #define LNW_L2_FWD_RX_TABLE_ACTION_L2_FWD "linux_networking_control.l2_fwd" #define LNW_ACTION_L2_FWD_PARAM_PORT "port" -#define LNW_L2_FWD_RX_TABLE_ACTION_RX_L2_FWD_LAG \ - "linux_networking_control.rx_l2_fwd_lag_and_recirculate" +#define LNW_L2_FWD_RX_TABLE_ACTION_RX_L2_FWD_LAG_AND_RECIRCULATE \ + "linux_networking_control.l2_fwd_lag_and_recirculate" #define LNW_ACTION_RX_L2_FWD_LAG_PARAM_LAG_ID "lag_group_id" /* RX_LAG_TABLE */ @@ -119,12 +119,9 @@ extern "C" { #define LNW_RX_LAG_TABLE_KEY_PORT_ID "vmeta.common.port_id" #define LNW_RX_LAG_TABLE_KEY_LAG_ID "user_meta.cmeta.lag_group_id" -#define LNW_RX_LAG_TABLE_ACTION_SET_EGRESS_PORT \ - "linux_networking_control.set_egress_port" -#define LNW_ACTION_SET_EGRESS_PORT_PARAM_EGRESS_PORT "egress_port" #define LNW_RX_LAG_TABLE_ACTION_FWD_TO_VSI "linux_networking_control.fwd_to_vsi" -#define LNW_ACTION_SET_EGRESS_PORT_PARAM_PORT "port" +#define LNW_ACTION_FWD_TO_VSI_PARAM_PORT "port" // NOP TODO /* L2_FWD_RX_WITH_TUNNEL_TABLE */ @@ -177,8 +174,7 @@ extern "C" { #define LNW_ECMP_HASH_TABLE_KEY_HOST_INFO_TX_EXT_FLEX \ "user_meta.cmeta.flex[15:0]" #define LNW_ECMP_HASH_TABLE_KEY_META_COMMON_HASH "vmeta.common.hash[2:0]" -#define LNW_ECMP_HASH_TABLE_KEY_USER_META_BIT32_ZEROS \ - "user_meta.cmeta.bit32_zeros[15:3]" +#define LNW_ECMP_HASH_TABLE_KEY_ZERO_PADDING "zero_padding" #define LNW_ECMP_HASH_TABLE_ACTION_SET_NEXTHOP_ID \ "linux_networking_control.set_nexthop_id" @@ -198,6 +194,8 @@ extern "C" { #define LNW_TX_LAG_TABLE_ACTION_SET_EGRESS_PORT \ "linux_networking_control.set_egress_port" +#define ACTION_SET_EGRESS_PORT_PARAM_EGRESS_PORT "egress_port" + #define LNW_LAG_HASH_SIZE 65536 /* Only 3 bits is allocated for hash size per group in LNW.p4 diff --git a/switchapi/es2k/switch_pd_routing.c b/switchapi/es2k/switch_pd_routing.c index af63273..abfdd1a 100644 --- a/switchapi/es2k/switch_pd_routing.c +++ b/switchapi/es2k/switch_pd_routing.c @@ -1613,12 +1613,12 @@ switch_status_t switch_pd_ecmp_hash_table_entry( goto dealloc_resources; } - status = tdi_key_field_id_get(table_info_hdl, - LNW_ECMP_HASH_TABLE_KEY_USER_META_BIT32_ZEROS, - &field_id_meta_bit32_zero); + status = + tdi_key_field_id_get(table_info_hdl, LNW_ECMP_HASH_TABLE_KEY_ZERO_PADDING, + &field_id_meta_bit32_zero); if (status != TDI_SUCCESS) { krnlmon_log_error("Unable to get field ID for key: %s, error: %d", - LNW_ECMP_HASH_TABLE_KEY_USER_META_BIT32_ZEROS, status); + LNW_ECMP_HASH_TABLE_KEY_ZERO_PADDING, status); goto dealloc_resources; }