Merge branch 'dev_ck_v2.1_xls_feature#1694#' into 'dev_ck_v2.1'

update feature#1694# merge dev_ck_v2.1_xls_feature#1694# to dev_ck_v2.1

See merge request ucp/driver/ucp4008_platform_arm!54
This commit is contained in:
Weihua Li 2024-03-18 08:41:55 +00:00
commit 19d864b6dc
14 changed files with 425 additions and 264 deletions

View File

@ -1,81 +1,81 @@
// +FHDR------------------------------------------------------------ // +FHDR------------------------------------------------------------
// Copyright (c) 2022 SmartLogic. // Copyright (c) 2022 SmartLogic.
// ALL RIGHTS RESERVED // ALL RIGHTS RESERVED
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// Filename : msg_transfer_layer.h // Filename : msg_transfer_layer.h
// Author : xianfeng.du // Author : xianfeng.du
// Created On : 2022-06-29 // Created On : 2022-06-29
// Last Modified : // Last Modified :
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// Description: // Description:
// //
// //
// -FHDR------------------------------------------------------------ // -FHDR------------------------------------------------------------
#ifndef __MSG_TRANSFER_LAYER_H__ #ifndef __MSG_TRANSFER_LAYER_H__
#define __MSG_TRANSFER_LAYER_H__ #define __MSG_TRANSFER_LAYER_H__
#include "typedef.h" #include "typedef.h"
#define MAX_INSTANCE_NUM (2) #define MAX_INSTANCE_NUM (4) //(2)
#define MAX_PORT_NUM (4) #define MAX_PORT_NUM (4)
#define SUCCESS (0) #define SUCCESS (0)
#define FAILURE (-1) #define FAILURE (-1)
#define UNINITIALIZED_QUEUE (1) #define UNINITIALIZED_QUEUE (1)
#define FULLEDED_QUEUE (2) #define FULLEDED_QUEUE (2)
#define EMPTY_QUEUE (2) #define EMPTY_QUEUE (2)
#define OUT_OF_BLOCK_MEMORY (2) #define OUT_OF_BLOCK_MEMORY (2)
typedef enum e_transfer_type { typedef enum e_transfer_type {
NON_CU_SPLIT, NON_CU_SPLIT,
CU_SPLIT, CU_SPLIT,
OAM, OAM,
TRANSFER_TYPE_NUM TRANSFER_TYPE_NUM
} transfer_type_e; } transfer_type_e;
typedef enum e_cu_flag { typedef enum e_cu_flag {
C_PLANE, C_PLANE,
U_PLANE U_PLANE
} cu_flag_e; } cu_flag_e;
typedef union tHandleId { typedef union tHandleId {
uint32_t value; uint32_t value;
struct { struct {
uint8_t rsv; uint8_t rsv;
uint8_t type_id; uint8_t type_id;
uint8_t inst_id; uint8_t inst_id;
uint8_t port_id; uint8_t port_id;
}; };
} HandleId_t; } HandleId_t;
typedef uint32_t (*msg_transfer_callback)(const char* buf,uint32_t payloadSize); typedef uint32_t (*msg_transfer_callback)(const char* buf,uint32_t payloadSize);
typedef struct t_queue_info { typedef struct t_queue_info {
uint32_t tx_desc_num; uint32_t tx_desc_num;
uint32_t rx_desc_num; uint32_t rx_desc_num;
uint32_t tx_block_size; uint32_t tx_block_size;
uint32_t rx_block_size; uint32_t rx_block_size;
uint16_t tx_block_num; uint16_t tx_block_num;
uint16_t rx_block_num; uint16_t rx_block_num;
uint16_t directions; uint16_t directions;
uint16_t rsv; uint16_t rsv;
msg_transfer_callback tx_callback; msg_transfer_callback tx_callback;
msg_transfer_callback rx_callback; msg_transfer_callback rx_callback;
} queue_info_s; } queue_info_s;
typedef struct t_transfer_type_info { typedef struct t_transfer_type_info {
queue_info_s queue_cplane_info; queue_info_s queue_cplane_info;
queue_info_s queue_uplane_info; queue_info_s queue_uplane_info;
} transfer_type_info_s; } transfer_type_info_s;
int32_t msg_transfer_init(uint16_t port_index, uint16_t transfer_type, uint16_t inst_id, const transfer_type_info_s* transfer_type_info); int32_t msg_transfer_init(uint16_t port_index, uint16_t transfer_type, uint16_t inst_id, const transfer_type_info_s* transfer_type_info);
int32_t msg_transfer_send_start(int32_t handle_id, uint16_t cu_flag); int32_t msg_transfer_send_start(int32_t handle_id, uint16_t cu_flag);
int32_t msg_transfer_alloc_msg(int32_t handle_id, uint16_t cu_flag, uint32_t bufSize, char** buf, uint32_t* availableSize, uint32_t* offset); int32_t msg_transfer_alloc_msg(int32_t handle_id, uint16_t cu_flag, uint32_t bufSize, char** buf, uint32_t* availableSize, uint32_t* offset);
int32_t msg_transfer_send_msg(int32_t handle_id, uint16_t cu_flag, uint8_t* msg_ptr, uint32_t offset, uint32_t msg_len); int32_t msg_transfer_send_msg(int32_t handle_id, uint16_t cu_flag, uint8_t* msg_ptr, uint32_t offset, uint32_t msg_len);
int32_t msg_transfer_send_end(int32_t handle_id, uint16_t cu_flag); int32_t msg_transfer_send_end(int32_t handle_id, uint16_t cu_flag);
int32_t msg_transfer_receive(int32_t handle_id, uint16_t cu_flag, uint32_t offset, uint32_t len, uint8_t** msg_ptr); int32_t msg_transfer_receive(int32_t handle_id, uint16_t cu_flag, uint32_t offset, uint32_t len, uint8_t** msg_ptr);
int32_t msg_transfer_close(int32_t handle_id); int32_t msg_transfer_close(int32_t handle_id);
#endif #endif

View File

@ -1,81 +1,81 @@
// +FHDR------------------------------------------------------------ // +FHDR------------------------------------------------------------
// Copyright (c) 2022 SmartLogic. // Copyright (c) 2022 SmartLogic.
// ALL RIGHTS RESERVED // ALL RIGHTS RESERVED
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// Filename : msg_transfer_layer.h // Filename : msg_transfer_layer.h
// Author : xianfeng.du // Author : xianfeng.du
// Created On : 2022-06-29 // Created On : 2022-06-29
// Last Modified : // Last Modified :
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// Description: // Description:
// //
// //
// -FHDR------------------------------------------------------------ // -FHDR------------------------------------------------------------
#ifndef __MSG_TRANSFER_LAYER_H__ #ifndef __MSG_TRANSFER_LAYER_H__
#define __MSG_TRANSFER_LAYER_H__ #define __MSG_TRANSFER_LAYER_H__
#include "typedef.h" #include "typedef.h"
#define MAX_INSTANCE_NUM (2) #define MAX_INSTANCE_NUM (4) //(2)
#define MAX_PORT_NUM (4) #define MAX_PORT_NUM (4)
#define SUCCESS (0) #define SUCCESS (0)
#define FAILURE (-1) #define FAILURE (-1)
#define UNINITIALIZED_QUEUE (1) #define UNINITIALIZED_QUEUE (1)
#define FULLEDED_QUEUE (2) #define FULLEDED_QUEUE (2)
#define EMPTY_QUEUE (2) #define EMPTY_QUEUE (2)
#define OUT_OF_BLOCK_MEMORY (2) #define OUT_OF_BLOCK_MEMORY (2)
typedef enum e_transfer_type { typedef enum e_transfer_type {
NON_CU_SPLIT, NON_CU_SPLIT,
CU_SPLIT, CU_SPLIT,
OAM, OAM,
TRANSFER_TYPE_NUM TRANSFER_TYPE_NUM
} transfer_type_e; } transfer_type_e;
typedef enum e_cu_flag { typedef enum e_cu_flag {
C_PLANE, C_PLANE,
U_PLANE U_PLANE
} cu_flag_e; } cu_flag_e;
typedef union tHandleId { typedef union tHandleId {
uint32_t value; uint32_t value;
struct { struct {
uint8_t rsv; uint8_t rsv;
uint8_t type_id; uint8_t type_id;
uint8_t inst_id; uint8_t inst_id;
uint8_t port_id; uint8_t port_id;
}; };
} HandleId_t; } HandleId_t;
typedef uint32_t (*msg_transfer_callback)(const char* buf,uint32_t payloadSize); typedef uint32_t (*msg_transfer_callback)(const char* buf,uint32_t payloadSize);
typedef struct t_queue_info { typedef struct t_queue_info {
uint32_t tx_desc_num; uint32_t tx_desc_num;
uint32_t rx_desc_num; uint32_t rx_desc_num;
uint32_t tx_block_size; uint32_t tx_block_size;
uint32_t rx_block_size; uint32_t rx_block_size;
uint16_t tx_block_num; uint16_t tx_block_num;
uint16_t rx_block_num; uint16_t rx_block_num;
uint16_t directions; uint16_t directions;
uint16_t rsv; uint16_t rsv;
msg_transfer_callback tx_callback; msg_transfer_callback tx_callback;
msg_transfer_callback rx_callback; msg_transfer_callback rx_callback;
} queue_info_s; } queue_info_s;
typedef struct t_transfer_type_info { typedef struct t_transfer_type_info {
queue_info_s queue_cplane_info; queue_info_s queue_cplane_info;
queue_info_s queue_uplane_info; queue_info_s queue_uplane_info;
} transfer_type_info_s; } transfer_type_info_s;
int32_t msg_transfer_init(uint16_t port_index, uint16_t transfer_type, uint16_t inst_id, const transfer_type_info_s* transfer_type_info); int32_t msg_transfer_init(uint16_t port_index, uint16_t transfer_type, uint16_t inst_id, const transfer_type_info_s* transfer_type_info);
int32_t msg_transfer_send_start(int32_t handle_id, uint16_t cu_flag); int32_t msg_transfer_send_start(int32_t handle_id, uint16_t cu_flag);
int32_t msg_transfer_alloc_msg(int32_t handle_id, uint16_t cu_flag, uint32_t bufSize, char** buf, uint32_t* availableSize, uint32_t* offset); int32_t msg_transfer_alloc_msg(int32_t handle_id, uint16_t cu_flag, uint32_t bufSize, char** buf, uint32_t* availableSize, uint32_t* offset);
int32_t msg_transfer_send_msg(int32_t handle_id, uint16_t cu_flag, uint8_t* msg_ptr, uint32_t offset, uint32_t msg_len); int32_t msg_transfer_send_msg(int32_t handle_id, uint16_t cu_flag, uint8_t* msg_ptr, uint32_t offset, uint32_t msg_len);
int32_t msg_transfer_send_end(int32_t handle_id, uint16_t cu_flag); int32_t msg_transfer_send_end(int32_t handle_id, uint16_t cu_flag);
int32_t msg_transfer_receive(int32_t handle_id, uint16_t cu_flag, uint32_t offset, uint32_t len, uint8_t** msg_ptr); int32_t msg_transfer_receive(int32_t handle_id, uint16_t cu_flag, uint32_t offset, uint32_t len, uint8_t** msg_ptr);
int32_t msg_transfer_close(int32_t handle_id); int32_t msg_transfer_close(int32_t handle_id);
#endif #endif

View File

@ -111,10 +111,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -113,10 +113,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -142,10 +142,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -141,10 +141,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -141,10 +141,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -36,6 +36,12 @@ uint32_t gu32_tick_receive_ctrl = 0;
uint32_t gu32_tick_from_tx_ctrl = 0; uint32_t gu32_tick_from_tx_ctrl = 0;
uint32_t gu32_rx_callback_data_cnt = 0; uint32_t gu32_rx_callback_data_cnt = 0;
uint32_t gu32_switch = 0;
void osp_switch(uint32_t u32_switch)
{
gu32_switch = u32_switch;
}
uint32_t rx_callback_data(const char* buf,uint32_t payloadSize) uint32_t rx_callback_data(const char* buf,uint32_t payloadSize)
{ {
@ -66,7 +72,10 @@ uint32_t rx_callback_data(const char* buf,uint32_t payloadSize)
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{ {
UCP_PRINT_ERROR("[0],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); if((gu32_switch & 0x01) == 1)
{
UCP_PRINT_ERROR("[0],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
}
} }
return payloadSize; return payloadSize;
} }
@ -97,7 +106,10 @@ uint32_t rx1_callback_data(const char* buf,uint32_t payloadSize)
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{ {
UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); if((gu32_switch & 0x10) == 1)
{
UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
}
} }
return payloadSize; return payloadSize;
@ -129,7 +141,10 @@ uint32_t rx2_callback_data(const char* buf,uint32_t payloadSize)
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{ {
UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); if((gu32_switch & 0x100) == 1)
{
UCP_PRINT_ERROR("[2],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
}
} }
return payloadSize; return payloadSize;
@ -161,7 +176,10 @@ uint32_t rx3_callback_data(const char* buf,uint32_t payloadSize)
if ((diff > 1020000) || (diff < 980000)) if ((diff > 1020000) || (diff < 980000))
{ {
UCP_PRINT_ERROR("[1],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff); if((gu32_switch & 0x1000) == 1)
{
UCP_PRINT_ERROR("[3],qNO[%d],sfn[%d],slot[%d],diff[%d]",UCP4008_TRAFFIC_NR_eMBB_DATA,sfn,slot,diff);
}
} }
return payloadSize; return payloadSize;
@ -213,10 +231,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;
@ -238,7 +256,7 @@ static inline void msg_transfer_cfg(void)
transfer_type_info_s transfer_type_info; transfer_type_info_s transfer_type_info;
for (inst_id=0; inst_id<MAX_INSTANCE_NUM; inst_id++) { for (inst_id=0; inst_id<MAX_INSTANCE_NUM; inst_id++) {
//for (inst_id=0; inst_id<4; inst_id++) { // 4 cell //for (inst_id=0; inst_id<4; inst_id++) { // 4 cell
/*********************************transfer_type = CU_SPLIT**********************************/ /*********************************transfer_type = CU_SPLIT**********************************/
transfer_type = CU_SPLIT; transfer_type = CU_SPLIT;
get_msg_transfer_info(port_id,inst_id,transfer_type, &transfer_type_info); get_msg_transfer_info(port_id,inst_id,transfer_type, &transfer_type_info);
@ -273,7 +291,7 @@ static inline void msg_transfer_queue_polling(void)
uint8_t* msg_ptr; uint8_t* msg_ptr;
for (uint32_t i = 0; i < MAX_INSTANCE_NUM; i++) { for (uint32_t i = 0; i < MAX_INSTANCE_NUM; i++) {
//for (uint32_t i = 0; i < 4; i++) { //for (uint32_t i = 0; i < 4; i++) {
handler.port_id = port_id; handler.port_id = port_id;
handler.inst_id = i; handler.inst_id = i;
handler.type_id = CU_SPLIT; handler.type_id = CU_SPLIT;
@ -332,7 +350,7 @@ void cell_setup_simulation(uint8_t scs_id, uint8_t cell_id, uint32_t run_core, u
int32_t test_case(uint32_t argc, int32_t* argvp) int32_t test_case(uint32_t argc, int32_t* argvp)
{ {
UCP_PRINT_DEBUG("start running testcase 22 (8 ape 15K case)."); UCP_PRINT_DEBUG("start running testcase 24 (8 ape 15K case, 4 cells).");
osp_read_spe_cfg_file("/ramfs/cfgDat"); osp_read_spe_cfg_file("/ramfs/cfgDat");
@ -362,6 +380,7 @@ int32_t test_case(uint32_t argc, int32_t* argvp)
cell_setup_simulation(scs_id, cell_id, run_ape, frame_type); /* the first cell */ cell_setup_simulation(scs_id, cell_id, run_ape, frame_type); /* the first cell */
UCP_PRINT_DEBUG("call cell setup(1)"); UCP_PRINT_DEBUG("call cell setup(1)");
osp_insert_cmd("sw", (OSP_FUNCPTR)osp_switch, "osp_switch", 1);
while(1) while(1)
{ {
@ -401,78 +420,220 @@ int32_t test_case(uint32_t argc, int32_t* argvp)
msg_transfer_queue_polling(); msg_transfer_queue_polling();
if ((1 == slot_ind_flag) || (1 == gu32_rx1_slot_ind_flag) || (1 == gu32_rx2_slot_ind_flag) || (1 == gu32_rx3_slot_ind_flag)) if ((1 == slot_ind_flag) || (1 == gu32_rx1_slot_ind_flag) || (1 == gu32_rx2_slot_ind_flag) || (1 == gu32_rx3_slot_ind_flag))
{ {
if(1 == slot_ind_flag) if(1 == slot_ind_flag)
{ {
slot_ind_flag = 0; slot_ind_flag = 0;
handler.inst_id = 0; handler.inst_id = 0;
}
if (1 == gu32_rx1_slot_ind_flag) /************C_PLANE***************/
{ cu_flag = C_PLANE;
gu32_rx1_slot_ind_flag = 0; ret = msg_transfer_send_start(handler.value,cu_flag);
handler.inst_id = 1; ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
} if ( SUCCESS != ret) {
if (1 == gu32_rx2_slot_ind_flag) UCP_PRINT_ERROR("1,c_plane alloc error\r\n");
{ continue;
gu32_rx2_slot_ind_flag = 0; }
handler.inst_id = 2; ptr = (uint8_t *)buf;
} *(uint32_t*)(ptr + 0) = gu32_value;
if (1 == gu32_rx3_slot_ind_flag) *(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
{ *(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
gu32_rx3_slot_ind_flag = 0; *(uint32_t*)(ptr + 12) = read_stc_local_timer();
handler.inst_id = 3; ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
} if ( SUCCESS != ret) {
/************C_PLANE***************/ UCP_PRINT_ERROR("1,c_plane send error\r\n");
cu_flag = C_PLANE; }
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_send_end(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) { /************U_PLANE***************/
UCP_PRINT_ERROR("1,c_plane alloc error\r\n"); cu_flag = U_PLANE;
continue; ret = msg_transfer_send_start(handler.value,cu_flag);
}
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
ptr = (uint8_t *)buf; if ( SUCCESS != ret) {
*(uint32_t*)(ptr + 0) = gu32_value; UCP_PRINT_ERROR("1,u_plane alloc error\r\n");
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl; continue;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl; }
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ptr = (uint8_t *)buf;
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size); *(uint32_t*)(ptr + 0) = gu32_value;
if ( SUCCESS != ret) { *(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
UCP_PRINT_ERROR("1,c_plane send error\r\n"); *(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
} *(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_end(handler.value,cu_flag); ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
/************U_PLANE***************/ UCP_PRINT_ERROR("1,u_plane send error\r\n");
cu_flag = U_PLANE; }
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_send_end(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset); }
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane alloc error\r\n"); if (1 == gu32_rx1_slot_ind_flag)
continue; {
} gu32_rx1_slot_ind_flag = 0;
ptr = (uint8_t *)buf; handler.inst_id = 1;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl; /************C_PLANE***************/
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl; cu_flag = C_PLANE;
*(uint32_t*)(ptr + 12) = read_stc_local_timer(); ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size); ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) { if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane send error\r\n"); UCP_PRINT_ERROR("1,c_plane alloc error\r\n");
} continue;
}
ret = msg_transfer_send_end(handler.value,cu_flag);
} ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
/************U_PLANE***************/
cu_flag = U_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
}
if (1 == gu32_rx2_slot_ind_flag)
{
gu32_rx2_slot_ind_flag = 0;
handler.inst_id = 2;
/************C_PLANE***************/
cu_flag = C_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
/************U_PLANE***************/
cu_flag = U_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
}
if (1 == gu32_rx3_slot_ind_flag)
{
gu32_rx3_slot_ind_flag = 0;
handler.inst_id = 3;
/************C_PLANE***************/
cu_flag = C_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,c_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
/************U_PLANE***************/
cu_flag = U_PLANE;
ret = msg_transfer_send_start(handler.value,cu_flag);
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane alloc error\r\n");
continue;
}
ptr = (uint8_t *)buf;
*(uint32_t*)(ptr + 0) = gu32_value;
*(uint32_t*)(ptr + 4) = gu32_tick_from_tx_ctrl;
*(uint32_t*)(ptr + 8) = gu32_tick_receive_ctrl;
*(uint32_t*)(ptr + 12) = read_stc_local_timer();
ret = msg_transfer_send_msg(handler.value, cu_flag, (uint8_t *)buf, offset, size);
if ( SUCCESS != ret) {
UCP_PRINT_ERROR("1,u_plane send error\r\n");
}
ret = msg_transfer_send_end(handler.value,cu_flag);
}
}
} }
return 0; return 0;
} }

View File

@ -62,10 +62,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -203,11 +203,11 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam_spu; c_plane.rx_callback = rx_callback_oam_spu;
//c_plane.rx_callback = rx_callback_oam; //c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -118,10 +118,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -118,10 +118,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -118,10 +118,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;

View File

@ -111,10 +111,10 @@ static inline void get_msg_transfer_info(uint16_t port_index, uint16_t inst_id,
break; break;
case OAM: case OAM:
c_plane.rx_block_size = 0x100000; c_plane.rx_block_size = 0x100000;
c_plane.rx_block_num = 32; c_plane.rx_block_num = 16;
c_plane.rx_callback = rx_callback_oam; c_plane.rx_callback = rx_callback_oam;
c_plane.tx_block_size = 0x8000; c_plane.tx_block_size = 0x8000;
c_plane.tx_block_num = 8; c_plane.tx_block_num = 4;
c_plane.tx_callback = NULL; c_plane.tx_callback = NULL;
transfer_type_info_ptr->queue_cplane_info = c_plane; transfer_type_info_ptr->queue_cplane_info = c_plane;