Commit a897eada authored by Lionel Gauthier's avatar Lionel Gauthier

typos and log

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5350 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 5836d2c3
...@@ -57,37 +57,47 @@ Address : EURECOM, ...@@ -57,37 +57,47 @@ Address : EURECOM,
#include "COMMON/platform_constants.h" #include "COMMON/platform_constants.h"
extern boolean_t pdcp_data_req( extern boolean_t
pdcp_data_req(
module_id_t enb_idP, module_id_t enb_idP,
module_id_t UE_id, module_id_t UE_id,
frame_t frame, frame_t frame,
eNB_flag_t eNB_flag, eNB_flag_t eNB_flag,
rb_id_t rb_id, rb_id_t rb_id,
mui_t muiP, mui_t muiP,
confirm_t confirmP, \ confirm_t confirmP,
sdu_size_t sdu_buffer_size, sdu_size_t sdu_buffer_size,
unsigned char* sdu_buffer, unsigned char* sdu_buffer,
pdcp_transmission_mode_t mode); pdcp_transmission_mode_t mode);
static int gtpv1u_eNB_send_init_udp( static int
gtpv1u_eNB_send_init_udp(
uint16_t port_number); uint16_t port_number);
NwGtpv1uRcT gtpv1u_eNB_log_request(
NwGtpv1uRcT
gtpv1u_eNB_log_request(
NwGtpv1uLogMgrHandleT hLogMgr, NwGtpv1uLogMgrHandleT hLogMgr,
NwU32T logLevel, NwU32T logLevel,
NwCharT *file, NwCharT *file,
NwU32T line, NwU32T line,
NwCharT *logStr); NwCharT *logStr);
NwGtpv1uRcT gtpv1u_eNB_send_udp_msg(
NwGtpv1uRcT
gtpv1u_eNB_send_udp_msg(
NwGtpv1uUdpHandleT udpHandle, NwGtpv1uUdpHandleT udpHandle,
NwU8T *buffer, NwU8T *buffer,
NwU32T buffer_len, NwU32T buffer_len,
NwU32T peerIpAddr, NwU32T peerIpAddr,
NwU16T peerPort); NwU16T peerPort);
NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
NwGtpv1uRcT
gtpv1u_eNB_process_stack_req(
NwGtpv1uUlpHandleT hUlp, NwGtpv1uUlpHandleT hUlp,
NwGtpv1uUlpApiT *pUlpApi); NwGtpv1uUlpApiT *pUlpApi);
int data_recv_callback(
int
data_recv_callback(
uint16_t portP, uint16_t portP,
uint32_t address, uint32_t address,
uint8_t *buffer, uint8_t *buffer,
...@@ -100,22 +110,27 @@ int data_recv_callback( ...@@ -100,22 +110,27 @@ int data_recv_callback(
// uint8_t rab_idP, // uint8_t rab_idP,
// char *sgw_ip_addr_pP, // char *sgw_ip_addr_pP,
// uint16_t portP); // uint16_t portP);
static NwGtpv1uRcT gtpv1u_start_timer_wrapper( static NwGtpv1uRcT
gtpv1u_start_timer_wrapper(
NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NwU32T timeoutSec, NwU32T timeoutSec,
NwU32T timeoutUsec, NwU32T timeoutUsec,
NwU32T tmrType, NwU32T tmrType,
void *timeoutArg, void *timeoutArg,
NwGtpv1uTimerHandleT *hTmr); NwGtpv1uTimerHandleT *hTmr);
static NwGtpv1uRcT gtpv1u_stop_timer_wrapper(
static NwGtpv1uRcT
gtpv1u_stop_timer_wrapper(
NwGtpv1uTimerMgrHandleT tmrMgrHandle, NwGtpv1uTimerMgrHandleT tmrMgrHandle,
NwGtpv1uTimerHandleT hTmr); NwGtpv1uTimerHandleT hTmr);
int int
gtpv1u_initial_req( gtpv1u_initial_req(
gtpv1u_data_t *gtpv1u_data_pP, gtpv1u_data_t *gtpv1u_data_pP,
teid_t teidP, teid_t teidP,
tcp_udp_port_t portP, tcp_udp_port_t portP,
uint32_t address); uint32_t address);
int int
gtpv1u_new_data_req( gtpv1u_new_data_req(
uint8_t enb_idP, uint8_t enb_idP,
...@@ -123,12 +138,20 @@ gtpv1u_new_data_req( ...@@ -123,12 +138,20 @@ gtpv1u_new_data_req(
uint8_t rab_idP, uint8_t rab_idP,
uint8_t *buffer_pP, uint8_t *buffer_pP,
uint32_t buf_lenP); uint32_t buf_lenP);
static int static int
gtpv1u_create_s1u_tunnel( gtpv1u_create_s1u_tunnel(
gtpv1u_enb_create_tunnel_req_t *create_tunnel_req_pP); gtpv1u_enb_create_tunnel_req_t *create_tunnel_req_pP);
static int gtpv1u_delete_s1u_tunnel(gtpv1u_enb_delete_tunnel_req_t *req_pP);
static int gtpv1u_eNB_init(void); static int
void *gtpv1u_eNB_task(void *args); gtpv1u_delete_s1u_tunnel(gtpv1u_enb_delete_tunnel_req_t *req_pP);
static int
gtpv1u_eNB_init(void);
void *
gtpv1u_eNB_task(void *args);
static gtpv1u_data_t gtpv1u_data_g; static gtpv1u_data_t gtpv1u_data_g;
static int gtpv1u_eNB_send_init_udp(uint16_t port_number) static int gtpv1u_eNB_send_init_udp(uint16_t port_number)
...@@ -238,7 +261,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -238,7 +261,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
PDCP_TRANSMISSION_MODE_DATA); PDCP_TRANSMISSION_MODE_DATA);
AssertError (result == TRUE, return NW_GTPV1U_FAILURE ,"PDCP data request failed!\n"); AssertError (result == TRUE, return NW_GTPV1U_FAILURE ,"PDCP data request failed!\n");
} else { } else {
GTPU_ERROR("Received T-PDU from gtpv1u stack teid %u unknown", teid, buffer_len); GTPU_ERROR("Received T-PDU from gtpv1u stack teid %u unknown size %u", teid, buffer_len);
} }
} }
break; break;
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
#include "NwGtpv1uIe.h" #include "NwGtpv1uIe.h"
#include "NwGtpv1uLog.h" #include "NwGtpv1uLog.h"
#include "UTIL/LOG/log.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
...@@ -274,7 +276,7 @@ nwGtpv1uPeerRspTimeout(void *arg) ...@@ -274,7 +276,7 @@ nwGtpv1uPeerRspTimeout(void *arg)
NwGtpv1uTrxnT *thiz; NwGtpv1uTrxnT *thiz;
NwGtpv1uTimeoutInfoT *timeoutInfo = arg; NwGtpv1uTimeoutInfoT *timeoutInfo = arg;
printf("Retransmission timer expired\n"); LOG_W(GTPU, "Retransmission timer expired\n");
thiz = ((NwGtpv1uTrxnT *)timeoutInfo->timeoutArg); thiz = ((NwGtpv1uTrxnT *)timeoutInfo->timeoutArg);
rc = thiz->pStack->udp.udpDataReqCallback(thiz->pStack->udp.hUdp, rc = thiz->pStack->udp.udpDataReqCallback(thiz->pStack->udp.hUdp,
...@@ -330,7 +332,7 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz, ...@@ -330,7 +332,7 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz,
pTunnelEndPoint); pTunnelEndPoint);
if(pCollision) { if(pCollision) {
NW_LOG(thiz, NW_LOG_LEVEL_ERRO, LOG_E(GTPU,
"Tunnel end-point cannot be created for teid 0x%x. " "Tunnel end-point cannot be created for teid 0x%x. "
"Tunnel already exists", teid); "Tunnel already exists", teid);
rc = nwGtpTunnelEndPointDestroy(thiz, pTunnelEndPoint); rc = nwGtpTunnelEndPointDestroy(thiz, pTunnelEndPoint);
...@@ -343,7 +345,7 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz, ...@@ -343,7 +345,7 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz,
pTunnelEndPoint = RB_FIND(NwGtpv1uTunnelEndPointIdentifierMap, pTunnelEndPoint = RB_FIND(NwGtpv1uTunnelEndPointIdentifierMap,
&(thiz->teidMap), pTunnelEndPoint); &(thiz->teidMap), pTunnelEndPoint);
NW_ASSERT(pTunnelEndPoint); NW_ASSERT(pTunnelEndPoint);
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, LOG_D(GTPU,
"Tunnel end-point 0x%x creation successful for teid 0x%x %u(dec)", "Tunnel end-point 0x%x creation successful for teid 0x%x %u(dec)",
(unsigned int)pTunnelEndPoint, teid, teid); (unsigned int)pTunnelEndPoint, teid, teid);
} }
...@@ -373,7 +375,7 @@ nwGtpv1uDestroyTunnelEndPoint( NwGtpv1uStackT *thiz, ...@@ -373,7 +375,7 @@ nwGtpv1uDestroyTunnelEndPoint( NwGtpv1uStackT *thiz,
NwGtpv1uTunnelEndPointT *pRemovedTeid; NwGtpv1uTunnelEndPointT *pRemovedTeid;
if(pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle) { if(pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle) {
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Destroying Tunnel end-point '%x'", LOG_D(GTPU, "Destroying Tunnel end-point '%x'",
pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle); pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
pRemovedTeid = RB_REMOVE(NwGtpv1uTunnelEndPointIdentifierMap, &(thiz->teidMap), pRemovedTeid = RB_REMOVE(NwGtpv1uTunnelEndPointIdentifierMap, &(thiz->teidMap),
(NwGtpv1uTunnelEndPointT *)( (NwGtpv1uTunnelEndPointT *)(
...@@ -386,7 +388,7 @@ nwGtpv1uDestroyTunnelEndPoint( NwGtpv1uStackT *thiz, ...@@ -386,7 +388,7 @@ nwGtpv1uDestroyTunnelEndPoint( NwGtpv1uStackT *thiz,
(NwGtpv1uTunnelEndPointT *) (NwGtpv1uTunnelEndPointT *)
pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle); pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
} else { } else {
NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Non-existent Tunnel end-point handle '%x'", LOG_W(GTPU, "Non-existent Tunnel end-point handle '%x'",
pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle); pUlpReq->apiInfo.destroyTunnelEndPointInfo.hStackSessionHandle);
} }
...@@ -500,13 +502,13 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz, ...@@ -500,13 +502,13 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
if(NW_GTPV1U_OK == rc) { if(NW_GTPV1U_OK == rc) {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, LOG_D(GTPU,
"Received T-PDU over tunnel end-point '%x' of size %u from "NW_IPV4_ADDR, "Received T-PDU over tunnel end-point '%x' of size %u from "NW_IPV4_ADDR,
ntohl(msgHdr->teid), pMsg->msgLen, NW_IPV4_ADDR_FORMAT((peerIp))); ntohl(msgHdr->teid), pMsg->msgLen, NW_IPV4_ADDR_FORMAT((peerIp)));
rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg); rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg);
} }
} else { } else {
NW_LOG(thiz, NW_LOG_LEVEL_ERRO, LOG_E(GTPU,
"Received T-PDU over non-existent tunnel end-point '%x' from "NW_IPV4_ADDR, "Received T-PDU over non-existent tunnel end-point '%x' from "NW_IPV4_ADDR,
ntohl(msgHdr->teid), NW_IPV4_ADDR_FORMAT((peerIp))); ntohl(msgHdr->teid), NW_IPV4_ADDR_FORMAT((peerIp)));
} }
...@@ -557,7 +559,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, ...@@ -557,7 +559,7 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
*/ */
rc = nwGtpv1uMsgAddIeTV1(hMsg, NW_GTPV1U_IE_RECOVERY, 0x00); rc = nwGtpv1uMsgAddIeTV1(hMsg, NW_GTPV1U_IE_RECOVERY, 0x00);
NW_LOG(thiz, NW_LOG_LEVEL_INFO, LOG_I(GTPU,
"Sending NW_GTP_ECHO_RSP message to %x:%x with seq %u", peerIp, peerPort, "Sending NW_GTP_ECHO_RSP message to %x:%x with seq %u", peerIp, peerPort,
seqNum); seqNum);
...@@ -752,13 +754,12 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -752,13 +754,12 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
switch(msgType) { switch(msgType) {
case NW_GTP_ECHO_REQ: case NW_GTP_ECHO_REQ:
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "NW_GTP_ECHO_REQ"); LOG_D(GTPU, "NW_GTP_ECHO_REQ");
ret = nwGtpv1uHandleEchoReq( thiz, udpData, udpDataLen, peerPort, peerIp); ret = nwGtpv1uHandleEchoReq( thiz, udpData, udpDataLen, peerPort, peerIp);
break; break;
case NW_GTP_ERROR_INDICATION: case NW_GTP_ERROR_INDICATION:
LOG_D(GTPU, "NW_GTP_ERROR_INDICATION");
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "NW_GTP_ERROR_INDICATION");
ret = nwGtpv1uSendUlpMessageIndication( thiz, ret = nwGtpv1uSendUlpMessageIndication( thiz,
0, 0,
NW_GTPV1U_ULP_API_RECV_MSG, NW_GTPV1U_ULP_API_RECV_MSG,
...@@ -769,16 +770,15 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -769,16 +770,15 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
udpDataLen); udpDataLen);
NW_ASSERT(ret == NW_GTPV1U_OK); NW_ASSERT(ret == NW_GTPV1U_OK);
break; break;
case NW_GTP_ECHO_RSP: case NW_GTP_ECHO_RSP:
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "NW_GTP_ECHO_RSP"); LOG_D(GTPU, "NW_GTP_ECHO_RSP");
ret = NW_GTPV1U_OK; ret = NW_GTPV1U_OK;
break; break;
case NW_GTP_GPDU: case NW_GTP_GPDU:
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "NW_GTP_GPDU"); LOG_D(GTPU, "NW_GTP_GPDU");
ret = nwGtpv1uProcessGpdu(thiz, udpData, udpDataLen, peerIp); ret = nwGtpv1uProcessGpdu(thiz, udpData, udpDataLen, peerIp);
break; break;
...@@ -811,7 +811,7 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -811,7 +811,7 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
switch(pUlpReq->apiType) { switch(pUlpReq->apiType) {
case NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT: { case NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT: {
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT from ulp"); LOG_D(GTPU, "Received NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT from ulp");
rc = NwGtpv1uCreateTunnelEndPoint(thiz, rc = NwGtpv1uCreateTunnelEndPoint(thiz,
pUlpReq->apiInfo.createTunnelEndPointInfo.teid, pUlpReq->apiInfo.createTunnelEndPointInfo.teid,
pUlpReq->apiInfo.createTunnelEndPointInfo.hUlpSession, pUlpReq->apiInfo.createTunnelEndPointInfo.hUlpSession,
...@@ -820,25 +820,25 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -820,25 +820,25 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
break; break;
case NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT: { case NW_GTPV1U_ULP_API_DESTROY_TUNNEL_ENDPOINT: {
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received destroy session req from ulp"); LOG_D(GTPU, "Received destroy session req from ulp");
rc = nwGtpv1uDestroyTunnelEndPoint(thiz, pUlpReq); rc = nwGtpv1uDestroyTunnelEndPoint(thiz, pUlpReq);
} }
break; break;
case NW_GTPV1U_ULP_API_INITIAL_REQ: { case NW_GTPV1U_ULP_API_INITIAL_REQ: {
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received initial req from ulp"); LOG_D(GTPU, "Received initial req from ulp");
rc = nwGtpv1uInitialReq(thiz, pUlpReq); rc = nwGtpv1uInitialReq(thiz, pUlpReq);
} }
break; break;
case NW_GTPV1U_ULP_API_SEND_TPDU: { case NW_GTPV1U_ULP_API_SEND_TPDU: {
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received send tpdu req from ulp"); LOG_D(GTPU, "Received send tpdu req from ulp");
rc = nwGtpv1uSendto(thiz, pUlpReq); rc = nwGtpv1uSendto(thiz, pUlpReq);
} }
break; break;
default: default:
NW_LOG(thiz, NW_LOG_LEVEL_ERRO, "Unsupported API received from ulp"); LOG_D(GTPU, "Unsupported API received from ulp");
rc = NW_GTPV1U_FAILURE; rc = NW_GTPV1U_FAILURE;
break; break;
} }
...@@ -865,7 +865,7 @@ nwGtpv1uProcessTimeout(void *timeoutInfo) ...@@ -865,7 +865,7 @@ nwGtpv1uProcessTimeout(void *timeoutInfo)
NW_ASSERT(thiz != NULL); NW_ASSERT(thiz != NULL);
NW_ENTER(thiz); NW_ENTER(thiz);
NW_LOG(thiz, NW_LOG_LEVEL_DEBG, LOG_D(GTPU,
"Received timeout event from ULP with timeoutInfo %x!", "Received timeout event from ULP with timeoutInfo %x!",
(unsigned int)timeoutInfo); (unsigned int)timeoutInfo);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment