Commit 70a2c4ca authored by Lionel Gauthier's avatar Lionel Gauthier

Removed logs for better RT behaviour

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6131 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 3117dcd1
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#define GTP_DUMP_SOCKET 0 #undef GTP_DUMP_SOCKET
extern boolean_t extern boolean_t
pdcp_data_req( pdcp_data_req(
...@@ -158,7 +158,7 @@ void * ...@@ -158,7 +158,7 @@ void *
static gtpv1u_data_t gtpv1u_data_g; static gtpv1u_data_t gtpv1u_data_g;
#if defined(GTP_DUMP_SOCKET) #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
#include <linux/if.h> #include <linux/if.h>
static int gtpv1u_dump_socket_g; static int gtpv1u_dump_socket_g;
...@@ -200,7 +200,7 @@ static void gtpv1u_eNB_write_dump_socket(uint8_t *buffer_pP, uint32_t buffer_len ...@@ -200,7 +200,7 @@ static void gtpv1u_eNB_write_dump_socket(uint8_t *buffer_pP, uint32_t buffer_len
sin.sin_addr.s_addr = INADDR_LOOPBACK; sin.sin_addr.s_addr = INADDR_LOOPBACK;
if (sendto(gtpv1u_dump_socket_g, buffer_pP, (size_t)buffer_lengthP, 0, (struct sockaddr *)&sin, sizeof(struct sockaddr)) < 0) { if (sendto(gtpv1u_dump_socket_g, buffer_pP, (size_t)buffer_lengthP, 0, (struct sockaddr *)&sin, sizeof(struct sockaddr)) < 0) {
LOG_E(GTPU, "%s:%s:%d setsockopt SO_BINDTODEVICE %d:%s\n", LOG_E(GTPU, "%s:%s:%d sendto %d:%s\n",
__FILE__, __FUNCTION__, __LINE__, errno, strerror(errno)); __FILE__, __FUNCTION__, __LINE__, errno, strerror(errno));
} }
} }
...@@ -256,7 +256,9 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg( ...@@ -256,7 +256,9 @@ NwGtpv1uRcT gtpv1u_eNB_send_udp_msg(
message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_DATA_REQ); message_p = itti_alloc_new_message(TASK_GTPV1_U, UDP_DATA_REQ);
if (message_p) { if (message_p) {
#if defined(LOG_GTPU) && LOG_GTPU > 0
LOG_D(GTPU, "Sending UDP_DATA_REQ length %u offset %u", buffer_len, buffer_offset); LOG_D(GTPU, "Sending UDP_DATA_REQ length %u offset %u", buffer_len, buffer_offset);
#endif
udp_data_req_p = &message_p->ittiMsg.udp_data_req; udp_data_req_p = &message_p->ittiMsg.udp_data_req;
udp_data_req_p->peer_address = peerIpAddr; udp_data_req_p->peer_address = peerIpAddr;
udp_data_req_p->peer_port = peerPort; udp_data_req_p->peer_port = peerPort;
...@@ -298,7 +300,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -298,7 +300,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
LOG_E(GTPU, "Error while retrieving T-PDU"); LOG_E(GTPU, "Error while retrieving T-PDU");
} }
itti_free(TASK_UDP, ((NwGtpv1uMsgT*)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBuf); itti_free(TASK_UDP, ((NwGtpv1uMsgT*)pUlpApi->apiInfo.recvMsgInfo.hMsg)->msgBuf);
#if defined(GTP_DUMP_SOCKET) #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
gtpv1u_eNB_write_dump_socket(buffer,buffer_len); gtpv1u_eNB_write_dump_socket(buffer,buffer_len);
#endif #endif
...@@ -307,12 +309,14 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -307,12 +309,14 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
//----------------------- //-----------------------
hash_rc = hashtable_get(gtpv1u_data_g.teid_mapping, teid, (void**)&gtpv1u_teid_data_p); hash_rc = hashtable_get(gtpv1u_data_g.teid_mapping, teid, (void**)&gtpv1u_teid_data_p);
if (hash_rc == HASH_TABLE_OK) { if (hash_rc == HASH_TABLE_OK) {
#if defined(LOG_GTPU) && LOG_GTPU > 0
LOG_D(GTPU, "Received T-PDU from gtpv1u stack teid %u size %d -> enb module id %u ue module id %u rab id %u\n", LOG_D(GTPU, "Received T-PDU from gtpv1u stack teid %u size %d -> enb module id %u ue module id %u rab id %u\n",
teid, teid,
buffer_len, buffer_len,
gtpv1u_teid_data_p->enb_id, gtpv1u_teid_data_p->enb_id,
gtpv1u_teid_data_p->ue_id, gtpv1u_teid_data_p->ue_id,
gtpv1u_teid_data_p->eps_bearer_id); gtpv1u_teid_data_p->eps_bearer_id);
#endif
#warning "LG eps bearer mapping to DRB id to do (offset -4)" #warning "LG eps bearer mapping to DRB id to do (offset -4)"
...@@ -887,7 +891,7 @@ static int gtpv1u_eNB_init(void) ...@@ -887,7 +891,7 @@ static int gtpv1u_eNB_init(void)
return -1; return -1;
} }
#if defined(GTP_DUMP_SOCKET) #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
if ((ret = gtpv1u_eNB_create_dump_socket()) < 0) { if ((ret = gtpv1u_eNB_create_dump_socket()) < 0) {
return -1; return -1;
} }
...@@ -957,7 +961,7 @@ void *gtpv1u_eNB_task(void *args) ...@@ -957,7 +961,7 @@ void *gtpv1u_eNB_task(void *args)
data_req_p = &GTPV1U_ENB_TUNNEL_DATA_REQ(received_message_p); data_req_p = &GTPV1U_ENB_TUNNEL_DATA_REQ(received_message_p);
//ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length); //ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
#if defined(GTP_DUMP_SOCKET) #if defined(GTP_DUMP_SOCKET) && GTP_DUMP_SOCKET > 0
gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length); gtpv1u_eNB_write_dump_socket(&data_req_p->buffer[data_req_p->offset],data_req_p->length);
#endif #endif
memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT)); memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
......
...@@ -196,7 +196,9 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, ...@@ -196,7 +196,9 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
NW_ASSERT(thiz); NW_ASSERT(thiz);
NW_ASSERT(pMsg); NW_ASSERT(pMsg);
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
msgHdr = &pMsg->msgBuf[pMsg->msgBufOffset]; msgHdr = &pMsg->msgBuf[pMsg->msgBufOffset];
NW_ASSERT(msgHdr != NULL); NW_ASSERT(msgHdr != NULL);
...@@ -213,10 +215,12 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort, ...@@ -213,10 +215,12 @@ nwGtpv1uCreateAndSendMsg( NwGtpv1uStackT *thiz, NwU32T peerIp, NwU16T peerPort,
*((NwU32T *) msgHdr) = htonl(pMsg->teid); *((NwU32T *) msgHdr) = htonl(pMsg->teid);
msgHdr += 4; msgHdr += 4;
#if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d offset %d\n", GTPU_DEBUG("nwGtpv1uCreateAndSendMsg to teid %u length %d offset %d\n",
pMsg->teid, pMsg->teid,
pMsg->msgLen, pMsg->msgLen,
pMsg->msgBufOffset); pMsg->msgBufOffset);
#endif
if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) { if(pMsg->seqNumFlag || pMsg->extHdrFlag || pMsg->npduNumFlag) {
*((NwU16T *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000); *((NwU16T *) msgHdr) = (pMsg->seqNumFlag ? htons(pMsg->seqNum) : 0x0000);
...@@ -260,7 +264,9 @@ nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz, ...@@ -260,7 +264,9 @@ nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz,
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwGtpv1uUlpApiT ulpApi; NwGtpv1uUlpApiT ulpApi;
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
ulpApi.apiType = apiType; ulpApi.apiType = apiType;
ulpApi.apiInfo.recvMsgInfo.msgType = msgType; ulpApi.apiInfo.recvMsgInfo.msgType = msgType;
...@@ -277,7 +283,9 @@ nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz, ...@@ -277,7 +283,9 @@ nwGtpv1uSendUlpMessageIndication( NW_IN NwGtpv1uStackT *thiz,
rc = thiz->ulp.ulpReqCallback(thiz->ulp.hUlp, &ulpApi); rc = thiz->ulp.ulpReqCallback(thiz->ulp.hUlp, &ulpApi);
NW_ASSERT(rc == NW_GTPV1U_OK); NW_ASSERT(rc == NW_GTPV1U_OK);
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return rc; return rc;
} }
...@@ -332,8 +340,9 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz, ...@@ -332,8 +340,9 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz,
NwGtpv1uTunnelEndPointT *pTunnelEndPoint; NwGtpv1uTunnelEndPointT *pTunnelEndPoint;
NwGtpv1uTunnelEndPointT *pCollision; NwGtpv1uTunnelEndPointT *pCollision;
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
pTunnelEndPoint = nwGtpTunnelEndPointNew(thiz); pTunnelEndPoint = nwGtpTunnelEndPointNew(thiz);
if(pTunnelEndPoint) { if(pTunnelEndPoint) {
...@@ -367,7 +376,9 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz, ...@@ -367,7 +376,9 @@ NwGtpv1uCreateTunnelEndPoint( NW_IN NwGtpv1uStackT *thiz,
rc = NW_GTPV1U_FAILURE; rc = NW_GTPV1U_FAILURE;
} }
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return rc; return rc;
} }
...@@ -421,8 +432,9 @@ nwGtpv1uInitialReq( NW_IN NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq) ...@@ -421,8 +432,9 @@ nwGtpv1uInitialReq( NW_IN NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq)
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NwGtpv1uTrxnT *pTrxn; NwGtpv1uTrxnT *pTrxn;
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
/* Create New Transaction */ /* Create New Transaction */
rc = nwGtpv1uTrxnNew(thiz, &pTrxn); rc = nwGtpv1uTrxnNew(thiz, &pTrxn);
...@@ -443,8 +455,9 @@ nwGtpv1uInitialReq( NW_IN NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq) ...@@ -443,8 +455,9 @@ nwGtpv1uInitialReq( NW_IN NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq)
} }
} }
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return rc; return rc;
} }
...@@ -462,7 +475,9 @@ nwGtpv1uSendto( NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq) ...@@ -462,7 +475,9 @@ nwGtpv1uSendto( NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq)
NwGtpv1uRcT rc = NW_GTPV1U_FAILURE; NwGtpv1uRcT rc = NW_GTPV1U_FAILURE;
NW_ASSERT(thiz); NW_ASSERT(thiz);
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
(void) nwGtpv1uMsgSetTeid(pUlpReq->apiInfo.sendtoInfo.hMsg, (void) nwGtpv1uMsgSetTeid(pUlpReq->apiInfo.sendtoInfo.hMsg,
pUlpReq->apiInfo.sendtoInfo.teid); pUlpReq->apiInfo.sendtoInfo.teid);
...@@ -472,7 +487,9 @@ nwGtpv1uSendto( NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq) ...@@ -472,7 +487,9 @@ nwGtpv1uSendto( NwGtpv1uStackT *thiz, NW_IN NwGtpv1uUlpApiT *pUlpReq)
2152, 2152,
(NwGtpv1uMsgT *) (NwGtpv1uMsgT *) pUlpReq->apiInfo.sendtoInfo.hMsg); (NwGtpv1uMsgT *) (NwGtpv1uMsgT *) pUlpReq->apiInfo.sendtoInfo.hMsg);
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return rc; return rc;
} }
...@@ -497,7 +514,9 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz, ...@@ -497,7 +514,9 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
NwGtpv1uTunnelEndPointT tunnelEndPointKey; NwGtpv1uTunnelEndPointT tunnelEndPointKey;
NwU16T hdr_len = 0; NwU16T hdr_len = 0;
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
// no buffer offset // no buffer offset
msgHdr = (NwGtpv1uMsgHeaderT *) gpdu; msgHdr = (NwGtpv1uMsgHeaderT *) gpdu;
...@@ -521,17 +540,19 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz, ...@@ -521,17 +540,19 @@ nwGtpv1uProcessGpdu( NwGtpv1uStackT *thiz,
*/ */
if(NW_GTPV1U_OK == rc) { if(NW_GTPV1U_OK == rc) {
NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg; NwGtpv1uMsgT *pMsg = (NwGtpv1uMsgT *) hMsg;
#if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_DEBUG("Received T-PDU over tunnel end-point '%x' of size %u (%u) (decapsulated %u)from "NW_IPV4_ADDR"\n", GTPU_DEBUG("Received T-PDU over tunnel end-point '%x' of size %u (%u) (decapsulated %u)from "NW_IPV4_ADDR"\n",
ntohl(msgHdr->teid), gpduLen, pMsg->msgLen, pMsg->msgBufLen, NW_IPV4_ADDR_FORMAT((peerIp))); ntohl(msgHdr->teid), gpduLen, pMsg->msgLen, pMsg->msgBufLen, NW_IPV4_ADDR_FORMAT((peerIp)));
#endif
rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg); rc = nwGtpSessionSendMsgApiToUlpEntity(pTunnelEndPoint, pMsg);
} }
} else { } else {
GTPU_ERROR("Received T-PDU over non-existent tunnel end-point '%x' from "NW_IPV4_ADDR"\n", GTPU_ERROR("Received T-PDU over non-existent tunnel end-point '%x' from "NW_IPV4_ADDR"\n",
ntohl(msgHdr->teid), NW_IPV4_ADDR_FORMAT((peerIp))); ntohl(msgHdr->teid), NW_IPV4_ADDR_FORMAT((peerIp)));
} }
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return rc; return rc;
} }
...@@ -577,11 +598,12 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz, ...@@ -577,11 +598,12 @@ nwGtpv1uHandleEchoReq(NW_IN NwGtpv1uStackT *thiz,
*/ */
rc = nwGtpv1uMsgAddIeTV1(hMsg, NW_GTPV1U_IE_RECOVERY, 0x00); rc = nwGtpv1uMsgAddIeTV1(hMsg, NW_GTPV1U_IE_RECOVERY, 0x00);
#if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_INFO("Sending NW_GTP_ECHO_RSP message to %x:%x with seq %u\n", GTPU_INFO("Sending NW_GTP_ECHO_RSP message to %x:%x with seq %u\n",
peerIp, peerIp,
peerPort, peerPort,
seqNum); seqNum);
#endif
rc = nwGtpv1uCreateAndSendMsg( rc = nwGtpv1uCreateAndSendMsg(
thiz, thiz,
peerIp, peerIp,
...@@ -798,7 +820,9 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -798,7 +820,9 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
break; break;
case NW_GTP_GPDU: case NW_GTP_GPDU:
#if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_DEBUG("NW_GTP_GPDU: DATA COMING FROM UDP\n"); GTPU_DEBUG("NW_GTP_GPDU: DATA COMING FROM UDP\n");
#endif
ret = nwGtpv1uProcessGpdu(thiz, udpData, udpDataLen, peerIp); ret = nwGtpv1uProcessGpdu(thiz, udpData, udpDataLen, peerIp);
break; break;
...@@ -808,7 +832,9 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -808,7 +832,9 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
break; break;
} }
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return ret; return ret;
} }
...@@ -827,7 +853,9 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -827,7 +853,9 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
NW_ASSERT(thiz); NW_ASSERT(thiz);
NW_ASSERT(pUlpReq != NULL); NW_ASSERT(pUlpReq != NULL);
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
switch(pUlpReq->apiType) { switch(pUlpReq->apiType) {
case NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT: { case NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT: {
...@@ -852,7 +880,9 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -852,7 +880,9 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
break; break;
case NW_GTPV1U_ULP_API_SEND_TPDU: { case NW_GTPV1U_ULP_API_SEND_TPDU: {
#if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_DEBUG("Received send tpdu req from ulp\n"); GTPU_DEBUG("Received send tpdu req from ulp\n");
#endif
rc = nwGtpv1uSendto(thiz, pUlpReq); rc = nwGtpv1uSendto(thiz, pUlpReq);
} }
break; break;
...@@ -863,8 +893,9 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -863,8 +893,9 @@ nwGtpv1uProcessUlpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
break; break;
} }
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return rc; return rc;
} }
...@@ -884,14 +915,17 @@ nwGtpv1uProcessTimeout(void *timeoutInfo) ...@@ -884,14 +915,17 @@ nwGtpv1uProcessTimeout(void *timeoutInfo)
NW_ASSERT(thiz != NULL); NW_ASSERT(thiz != NULL);
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_ENTER(thiz); NW_ENTER(thiz);
#endif
GTPU_DEBUG("Received timeout event from ULP with timeoutInfo %x!\n", GTPU_DEBUG("Received timeout event from ULP with timeoutInfo %x!\n",
(unsigned int)timeoutInfo); (unsigned int)timeoutInfo);
rc = (((NwGtpv1uTimeoutInfoT *) timeoutInfo)->timeoutCallbackFunc) (timeoutInfo); rc = (((NwGtpv1uTimeoutInfoT *) timeoutInfo)->timeoutCallbackFunc) (timeoutInfo);
#if defined(LOG_GTPU) && LOG_GTPU > 0
NW_LEAVE(thiz); NW_LEAVE(thiz);
#endif
return rc; return rc;
} }
......
...@@ -143,9 +143,11 @@ nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -143,9 +143,11 @@ nwGtpv1uGpduMsgNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
pMsg->msgBuf = tpdu; pMsg->msgBuf = tpdu;
pMsg->msgBufLen = tpduLength + msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE; pMsg->msgBufLen = tpduLength + msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE;
pMsg->msgBufOffset = tpduOffset - (msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE); pMsg->msgBufOffset = tpduOffset - (msgExtraLen + NW_GTPV1U_EPC_MIN_HEADER_SIZE);
#if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_DEBUG("MSG length %u, offset %u -> length %u offset %u\n", GTPU_DEBUG("MSG length %u, offset %u -> length %u offset %u\n",
tpduLength, tpduOffset, tpduLength, tpduOffset,
pMsg->msgBufLen, pMsg->msgBufOffset); pMsg->msgBufLen, pMsg->msgBufOffset);
#endif
// Version field: This field is used to determine the version of the GTP-U protocol. // Version field: This field is used to determine the version of the GTP-U protocol.
// The version number shall be set to '1'. // The version number shall be set to '1'.
...@@ -271,8 +273,10 @@ nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle, ...@@ -271,8 +273,10 @@ nwGtpv1uMsgFromBufferNew( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
pMsg->msgBufOffset = (NwU32T)(pBuf - pMsg->msgBuf); pMsg->msgBufOffset = (NwU32T)(pBuf - pMsg->msgBuf);
pMsg->msgBufLen = bufLen - pMsg->msgBufOffset; pMsg->msgBufLen = bufLen - pMsg->msgBufOffset;
pMsg->msgLen = bufLen; pMsg->msgLen = bufLen;
#if defined(LOG_GTPU) && LOG_GTPU > 0
GTPU_DEBUG("nwGtpv1uMsgFromBufferNew() msgLen %u msgBufLen %u msgBufOffset %u ", GTPU_DEBUG("nwGtpv1uMsgFromBufferNew() msgLen %u msgBufLen %u msgBufOffset %u ",
pMsg->msgLen, pMsg->msgBufLen, pMsg->msgBufOffset); pMsg->msgLen, pMsg->msgBufLen, pMsg->msgBufOffset);
#endif
*phMsg = (NwGtpv1uMsgHandleT) pMsg; *phMsg = (NwGtpv1uMsgHandleT) pMsg;
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
......
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