osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-dev/+/27451 )


Change subject: net: virtphy, osmo-bts-virtual: use loopback-dev
......................................................................

net: virtphy, osmo-bts-virtual: use loopback-dev

Use the loopback device for virtual Um traffic, so it doesn't slow down
other net devs.

Change-Id: Ibc7ff3aaaca4872f4105825167eb33b66bc23342
---
M net/templates/common_osmo_bts
M net/templates/run.sh
2 files changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/51/27451/1

diff --git a/net/templates/common_osmo_bts b/net/templates/common_osmo_bts
index 4244e34..06bd439 100644
--- a/net/templates/common_osmo_bts
+++ b/net/templates/common_osmo_bts
@@ -3,6 +3,7 @@

 phy 0
  instance 0
+ virtual-um net-device lo

 bts 0
  band ${BTS_BAND}
diff --git a/net/templates/run.sh b/net/templates/run.sh
index a5a8720..e4e8356 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -46,6 +46,18 @@
   sudo ip addr add ${TO_RAN_IU_IP}/32 dev $dev
 fi

+# Enable multicast on lo for virtual MS
+if [ "${MS_RUN_IN_OSMO_DEV}" = 1 ]; then
+  if [ -z "$(ip link show lo | grep MULTICAST)" ]; then
+    echo "Loopback device doesn't have multicast enabled! Hit enter to enable 
it"
+    read enter_to_continue
+    sudo ip link set lo multicast on
+  fi
+  if [ -z "$(ip route show dev lo | grep '224\.0\.0\.0/4')" ]; then
+    sudo ip route add 224.0.0.0/4 dev lo
+  fi
+fi
+
 logdir="current_log"
 piddir="run/pids"
 launcherdir="run/launchers"
@@ -183,7 +195,7 @@
 bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc"
 bscnat="osmo-bsc-nat"
 bts="osmo-bts-virtual"
-virtphy="virtphy"
+virtphy="virtphy -D lo"
 ms="mobile -c mobile.cfg"

 if [ "x${MSC_MNCC}" != "xinternal" ]; then

--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27451
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ibc7ff3aaaca4872f4105825167eb33b66bc23342
Gerrit-Change-Number: 27451
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-MessageType: newchange

Reply via email to