Commit 719762cc authored by oai's avatar oai

fix basic_simulator compilation failure

parent bfecc011
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
/* T message IDs */ /* T message IDs */
#include "T_IDs.h" #include "T_IDs.h"
#define T_ACTIVE_STDOUT 2
/* known type - this is where you add new types */ /* known type - this is where you add new types */
#define T_INT(x) int, (x) #define T_INT(x) int, (x)
...@@ -99,7 +100,7 @@ struct T_header; ...@@ -99,7 +100,7 @@ struct T_header;
20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)(__VA_ARGS__) 20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0)(__VA_ARGS__)
#define TN_N(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,\ #define TN_N(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,\
n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n,...) T##n n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n,...) T##n
#define T(...) TN(__VA_ARGS__) #define T(...) if(T_stdout == 0) {TN(__VA_ARGS__);}
/* type used to send arbitrary buffer data */ /* type used to send arbitrary buffer data */
typedef struct { typedef struct {
...@@ -564,10 +565,30 @@ extern T_cache_t *T_cache; ...@@ -564,10 +565,30 @@ extern T_cache_t *T_cache;
} \ } \
} while (0) } while (0)
extern int *T_active;
void T_init(int remote_port, int wait_for_tracer, int dont_fork); #define CONFIG_HLP_TPORT "tracer port\n"
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
#define CONFIG_HLP_STDOUT "print log messges on console\n"
#define TTRACER_CONFIG_PREFIX "TTracer"
/*------------------------------------------------------------------------------------------------------------------------------------------*/
/* configuration parameters for TTRACE utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_TTRACEPARAMS_DESC { \
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:2021, TYPE_INT, 0}, \
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0}, \
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:0, TYPE_INT, 0}, \
{"T_stdout", CONFIG_HLP_STDOUT, PARAMFLAG_BOOL, iptr:&T_stdout, defintval:1, TYPE_INT, 0}, \
}
extern int *T_active;
extern int T_stdout; /* log on stdout */
void T_init(int remote_port, int wait_for_tracer, int dont_fork);
void T_Config_Init(void);
#else /* T_TRACER */ #else /* T_TRACER */
/* if T_TRACER is not defined or is 0, the T is deactivated */ /* if T_TRACER is not defined or is 0, the T is deactivated */
......
...@@ -1769,12 +1769,13 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq, ...@@ -1769,12 +1769,13 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq,
{ {
int subframe_tx = (subframe+6)%10; int subframe_tx = (subframe+6)%10;
int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame; int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame;
if (ulsch_harq->o_ACK[i] != 1) if (ulsch_harq->o_ACK[i] != 1) {
T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe), T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe),
T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
else } else {
T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe), T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe),
T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); T_INT(rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
}
} }
#endif #endif
} }
...@@ -1871,12 +1872,13 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB, ...@@ -1871,12 +1872,13 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
{ {
int subframe_tx = (subframe+6)%10; int subframe_tx = (subframe+6)%10;
int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame; int frame_tx = subframe_tx >= 6 ? (frame+1023)%1024 : frame;
if (harq_ack[0] != 1) if (harq_ack[0] != 1) {
T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe), T(T_ENB_PHY_DLSCH_UE_NACK, T_INT(0), T_INT(frame), T_INT(subframe),
T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
else } else {
T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe), T(T_ENB_PHY_DLSCH_UE_ACK, T_INT(0), T_INT(frame), T_INT(subframe),
T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx])); T_INT(uci->rnti), T_INT(eNB->dlsch[UE_id][0]->harq_ids[frame_tx%2][subframe_tx]));
}
} }
#endif #endif
} }
......
...@@ -236,7 +236,7 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP) ...@@ -236,7 +236,7 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
// End debug information // End debug information
netif_stop_queue(dev_pP); netif_stop_queue(dev_pP);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || RHEL_RELEASE_CODE >= 1796 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796)
netif_trans_update(dev_pP); netif_trans_update(dev_pP);
#else #else
dev_pP->trans_start = jiffies; dev_pP->trans_start = jiffies;
...@@ -312,7 +312,7 @@ void ue_ip_tx_timeout(struct net_device *dev_pP) ...@@ -312,7 +312,7 @@ void ue_ip_tx_timeout(struct net_device *dev_pP)
printk("[UE_IP_DRV][%s] begin\n", __FUNCTION__); printk("[UE_IP_DRV][%s] begin\n", __FUNCTION__);
// (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++; // (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++;
(priv_p->stats).tx_errors++; (priv_p->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || RHEL_RELEASE_CODE >= 1796 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) || (defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796)
netif_trans_update(dev_pP); netif_trans_update(dev_pP);
#else #else
dev_pP->trans_start = jiffies; dev_pP->trans_start = jiffies;
......
...@@ -209,21 +209,6 @@ ...@@ -209,21 +209,6 @@
#define CMDLINE_STARTTELN_IDX 3 #define CMDLINE_STARTTELN_IDX 3
extern int T_port;
extern int T_nowait;
extern int T_dont_fork;
/*------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters for TTRACE utility */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_TTRACEPARAMS_DESC { \
{"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:0, TYPE_INT, 0}, \
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0}, \
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:1, TYPE_INT, 0}, \
}
/***************************************************************************************************************************************/ /***************************************************************************************************************************************/
/* */ /* */
extern pthread_cond_t sync_cond; extern pthread_cond_t sync_cond;
......
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