Merge branch 'ci-improve-l2-sim' of https://gitlab.eurecom.fr/oai/openairinterface5g into ci-improve-l2-sim
This commit is contained in:
@@ -1921,7 +1921,7 @@ int RCconfig_S1(
|
|||||||
|
|
||||||
default: {
|
default: {
|
||||||
LOG_E(S1AP, "Default I-DRX value in conf file is invalid (%i). Should be 32, 64, 128 or 256. \
|
LOG_E(S1AP, "Default I-DRX value in conf file is invalid (%i). Should be 32, 64, 128 or 256. \
|
||||||
Default DRX set to 32 in MME configuration\n",
|
Default DRX set to 32 in MME configuration\n",
|
||||||
ccparams_lte.pcch_defaultPagingCycle);
|
ccparams_lte.pcch_defaultPagingCycle);
|
||||||
S1AP_REGISTER_ENB_REQ(msg_p).default_drx = 0;
|
S1AP_REGISTER_ENB_REQ(msg_p).default_drx = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,13 +51,12 @@
|
|||||||
struct net_device *ue_ip_dev[UE_IP_NB_INSTANCES_MAX];
|
struct net_device *ue_ip_dev[UE_IP_NB_INSTANCES_MAX];
|
||||||
|
|
||||||
#ifdef OAI_NW_DRIVER_USE_NETLINK
|
#ifdef OAI_NW_DRIVER_USE_NETLINK
|
||||||
extern void ue_ip_netlink_release(void);
|
extern void ue_ip_netlink_release(void);
|
||||||
extern int ue_ip_netlink_init(void);
|
extern int ue_ip_netlink_init(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int ue_ip_find_inst(struct net_device *dev_pP)
|
int ue_ip_find_inst(struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -72,15 +71,12 @@ int ue_ip_find_inst(struct net_device *dev_pP)
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef OAI_NW_DRIVER_USE_NETLINK
|
#ifndef OAI_NW_DRIVER_USE_NETLINK
|
||||||
void *ue_ip_interrupt(void)
|
void *ue_ip_interrupt(void) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
uint8_t cxi;
|
uint8_t cxi;
|
||||||
|
|
||||||
// ue_ip_priv_t *priv_p=netdev_priv(dev_id);
|
// ue_ip_priv_t *priv_p=netdev_priv(dev_id);
|
||||||
// unsigned int flags;
|
// unsigned int flags;
|
||||||
// priv_p->lock = SPIN_LOCK_UNLOCKED;
|
// priv_p->lock = SPIN_LOCK_UNLOCKED;
|
||||||
|
|
||||||
#ifdef OAI_DRV_DEBUG_INTERRUPT
|
#ifdef OAI_DRV_DEBUG_INTERRUPT
|
||||||
printk("INTERRUPT - begin\n");
|
printk("INTERRUPT - begin\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -100,9 +96,9 @@ void *ue_ip_interrupt(void)
|
|||||||
#endif //NETLINK
|
#endif //NETLINK
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||||
void ue_ip_timer(struct timer_list *t)
|
void ue_ip_timer(struct timer_list *t)
|
||||||
#else
|
#else
|
||||||
void ue_ip_timer(unsigned long dataP)
|
void ue_ip_timer(unsigned long dataP)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -111,7 +107,6 @@ void ue_ip_timer(unsigned long dataP)
|
|||||||
#else
|
#else
|
||||||
ue_ip_priv_t *priv_p = (ue_ip_priv_t *)dataP;
|
ue_ip_priv_t *priv_p = (ue_ip_priv_t *)dataP;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spin_lock(&priv_p->lock);
|
spin_lock(&priv_p->lock);
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
|
||||||
mod_timer(&priv_p->timer, jiffies + UE_IP_TIMER_TICK);
|
mod_timer(&priv_p->timer, jiffies + UE_IP_TIMER_TICK);
|
||||||
@@ -121,7 +116,6 @@ void ue_ip_timer(unsigned long dataP)
|
|||||||
(priv_p->timer).data = dataP;
|
(priv_p->timer).data = dataP;
|
||||||
add_timer(&priv_p->timer);
|
add_timer(&priv_p->timer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spin_unlock(&priv_p->lock);
|
spin_unlock(&priv_p->lock);
|
||||||
return;
|
return;
|
||||||
// add_timer(&gpriv->timer);
|
// add_timer(&gpriv->timer);
|
||||||
@@ -130,11 +124,9 @@ void ue_ip_timer(unsigned long dataP)
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Called by ifconfig when the device is activated by ifconfig
|
// Called by ifconfig when the device is activated by ifconfig
|
||||||
int ue_ip_open(struct net_device *dev_pP)
|
int ue_ip_open(struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
ue_ip_priv_t *priv_p=netdev_priv(dev_pP);
|
ue_ip_priv_t *priv_p=netdev_priv(dev_pP);
|
||||||
|
|
||||||
// Address has already been set at init
|
// Address has already been set at init
|
||||||
#ifndef OAI_NW_DRIVER_USE_NETLINK
|
#ifndef OAI_NW_DRIVER_USE_NETLINK
|
||||||
|
|
||||||
@@ -161,18 +153,15 @@ int ue_ip_open(struct net_device *dev_pP)
|
|||||||
(priv_p->timer).function = ue_ip_timer;
|
(priv_p->timer).function = ue_ip_timer;
|
||||||
#endif
|
#endif
|
||||||
//add_timer(&priv_p->timer);
|
//add_timer(&priv_p->timer);
|
||||||
|
|
||||||
printk("[UE_IP_DRV][%s] name = %s\n", __FUNCTION__, dev_pP->name);
|
printk("[UE_IP_DRV][%s] name = %s\n", __FUNCTION__, dev_pP->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Called by ifconfig when the device is desactivated
|
// Called by ifconfig when the device is desactivated
|
||||||
int ue_ip_stop(struct net_device *dev_pP)
|
int ue_ip_stop(struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
ue_ip_priv_t *priv_p = netdev_priv(dev_pP);
|
ue_ip_priv_t *priv_p = netdev_priv(dev_pP);
|
||||||
|
|
||||||
printk("[UE_IP_DRV][%s] Begin\n", __FUNCTION__);
|
printk("[UE_IP_DRV][%s] Begin\n", __FUNCTION__);
|
||||||
del_timer(&(priv_p->timer));
|
del_timer(&(priv_p->timer));
|
||||||
netif_stop_queue(dev_pP);
|
netif_stop_queue(dev_pP);
|
||||||
@@ -182,12 +171,10 @@ int ue_ip_stop(struct net_device *dev_pP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void ue_ip_teardown(struct net_device *dev_pP)
|
void ue_ip_teardown(struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
ue_ip_priv_t *priv_p;
|
ue_ip_priv_t *priv_p;
|
||||||
int inst;
|
int inst;
|
||||||
|
|
||||||
printk("[UE_IP_DRV][%s] Begin\n", __FUNCTION__);
|
printk("[UE_IP_DRV][%s] Begin\n", __FUNCTION__);
|
||||||
|
|
||||||
if (dev_pP) {
|
if (dev_pP) {
|
||||||
@@ -199,7 +186,6 @@ void ue_ip_teardown(struct net_device *dev_pP)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
printk("[UE_IP_DRV][%s] End\n", __FUNCTION__);
|
printk("[UE_IP_DRV][%s] End\n", __FUNCTION__);
|
||||||
} // check dev_pP
|
} // check dev_pP
|
||||||
else {
|
else {
|
||||||
@@ -207,8 +193,7 @@ void ue_ip_teardown(struct net_device *dev_pP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int ue_ip_set_config(struct net_device *dev_pP, struct ifmap *map_pP)
|
int ue_ip_set_config(struct net_device *dev_pP, struct ifmap *map_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
printk("[UE_IP_DRV][%s] Begin\n", __FUNCTION__);
|
printk("[UE_IP_DRV][%s] Begin\n", __FUNCTION__);
|
||||||
|
|
||||||
@@ -231,8 +216,7 @@ int ue_ip_set_config(struct net_device *dev_pP, struct ifmap *map_pP)
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
|
int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int inst;
|
int inst;
|
||||||
|
|
||||||
@@ -284,15 +268,13 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
struct net_device_stats *ue_ip_get_stats(struct net_device *dev_pP)
|
struct net_device_stats *ue_ip_get_stats(struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
ue_ip_priv_t *priv_p = netdev_priv(dev_pP);
|
ue_ip_priv_t *priv_p = netdev_priv(dev_pP);
|
||||||
return &priv_p->stats;
|
return &priv_p->stats;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int ue_ip_set_mac_address(struct net_device *dev_pP, void *mac_pP)
|
int ue_ip_set_mac_address(struct net_device *dev_pP, void *mac_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//struct sockaddr *addr = mac_pP;
|
//struct sockaddr *addr = mac_pP;
|
||||||
printk("[UE_IP_DRV][%s] CHANGE MAC ADDRESS UNSUPPORTED\n", __FUNCTION__);
|
printk("[UE_IP_DRV][%s] CHANGE MAC ADDRESS UNSUPPORTED\n", __FUNCTION__);
|
||||||
@@ -300,8 +282,7 @@ int ue_ip_set_mac_address(struct net_device *dev_pP, void *mac_pP)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int ue_ip_change_mtu(struct net_device *dev_pP, int mtuP)
|
int ue_ip_change_mtu(struct net_device *dev_pP, int mtuP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
printk("[UE_IP_DRV][%s] CHANGE MTU %d bytes\n", __FUNCTION__, mtuP);
|
printk("[UE_IP_DRV][%s] CHANGE MTU %d bytes\n", __FUNCTION__, mtuP);
|
||||||
|
|
||||||
@@ -313,8 +294,7 @@ int ue_ip_change_mtu(struct net_device *dev_pP, int mtuP)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void ue_ip_change_rx_flags(struct net_device *dev_pP, int flagsP)
|
void ue_ip_change_rx_flags(struct net_device *dev_pP, int flagsP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
ue_ip_priv_t *priv_p = netdev_priv(dev_pP);
|
ue_ip_priv_t *priv_p = netdev_priv(dev_pP);
|
||||||
printk("[UE_IP_DRV][%s] CHANGE RX FLAGS %08X\n", __FUNCTION__, flagsP);
|
printk("[UE_IP_DRV][%s] CHANGE RX FLAGS %08X\n", __FUNCTION__, flagsP);
|
||||||
@@ -322,12 +302,10 @@ void ue_ip_change_rx_flags(struct net_device *dev_pP, int flagsP)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void ue_ip_tx_timeout(struct net_device *dev_pP)
|
void ue_ip_tx_timeout(struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Transmitter timeout, serious problems.
|
// Transmitter timeout, serious problems.
|
||||||
ue_ip_priv_t *priv_p = netdev_priv(dev_pP);
|
ue_ip_priv_t *priv_p = netdev_priv(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++;
|
||||||
@@ -361,8 +339,7 @@ static const struct net_device_ops ue_ip_netdev_ops = {
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Initialisation of the network device
|
// Initialisation of the network device
|
||||||
void ue_ip_init(struct net_device *dev_pP)
|
void ue_ip_init(struct net_device *dev_pP) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
ue_ip_priv_t *priv_p = NULL;
|
ue_ip_priv_t *priv_p = NULL;
|
||||||
|
|
||||||
@@ -382,13 +359,10 @@ void ue_ip_init(struct net_device *dev_pP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int init_module (void)
|
int init_module (void) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int err,inst;
|
int err,inst;
|
||||||
char devicename[100];
|
char devicename[100];
|
||||||
|
|
||||||
|
|
||||||
// Initialize parameters shared with RRC
|
// Initialize parameters shared with RRC
|
||||||
printk("[UE_IP_DRV][%s] Starting OAI IP driver", __FUNCTION__);
|
printk("[UE_IP_DRV][%s] Starting OAI IP driver", __FUNCTION__);
|
||||||
|
|
||||||
@@ -423,15 +397,12 @@ int init_module (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void cleanup_module(void)
|
void cleanup_module(void) {
|
||||||
{
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int inst;
|
int inst;
|
||||||
|
|
||||||
printk("[UE_IP_DRV][CLEANUP] begin\n");
|
printk("[UE_IP_DRV][CLEANUP] begin\n");
|
||||||
|
|
||||||
for (inst=0; inst<UE_IP_NB_INSTANCES_MAX; inst++) {
|
for (inst=0; inst<UE_IP_NB_INSTANCES_MAX; inst++) {
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ int setInterfaceParameter(char *interfaceName, char *settingAddress, int operati
|
|||||||
}
|
}
|
||||||
|
|
||||||
close(sock_fd);
|
close(sock_fd);
|
||||||
// printf("Set OK!\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +224,9 @@ int NAS_config(char *interfaceName, char *ipAddress, char *networkMask, char *br
|
|||||||
|
|
||||||
// if(!returnValue)
|
// if(!returnValue)
|
||||||
// returnValue=set_gateway(interfaceName, broadcastAddress);
|
// returnValue=set_gateway(interfaceName, broadcastAddress);
|
||||||
bringInterfaceUp(interfaceName, 1);
|
if(!returnValue)
|
||||||
|
returnValue = bringInterfaceUp(interfaceName, 1);
|
||||||
|
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +253,16 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname)
|
|||||||
if(!returnValue)
|
if(!returnValue)
|
||||||
returnValue= setInterfaceParameter(interfaceName, broadcastAddress,SIOCSIFBRDADDR);
|
returnValue= setInterfaceParameter(interfaceName, broadcastAddress,SIOCSIFBRDADDR);
|
||||||
|
|
||||||
bringInterfaceUp(interfaceName, 1);
|
if(!returnValue)
|
||||||
|
bringInterfaceUp(interfaceName, 1);
|
||||||
|
|
||||||
|
if(!returnValue)
|
||||||
|
LOG_I(OIP,"Interface %s successfuly configured, ip address %s, mask %s broadcast address %s\n",
|
||||||
|
interfaceName, ipAddress, netMask, broadcastAddress);
|
||||||
|
else
|
||||||
|
LOG_E(OIP,"Interface %s couldn't be configured (ip address %s, mask %s broadcast address %s)\n",
|
||||||
|
interfaceName, ipAddress, netMask, broadcastAddress);
|
||||||
|
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user