Attention is currently required from: laforge, osmith, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/mncc-python/+/36318?usp=email )
Change subject: Initial port from python2 to python3
......................................................................
Patch Set 3: Code-Review-1
(2 comments)
File mncc_test.py:
https://gerrit.osmocom.org/c/mncc-python/+/36318/comment/10277a07_86000a05
PS3, Line 72: return
This is wrong, you need four more spaces. Otherwise the code below in unreachable.
File rtpsource/Makefile:
https://gerrit.osmocom.org/c/mncc-python/+/36318/comment/205ea397_4b12ed73
PS3, Line 2: lasan
this looks unrelated to the py3 migration?
--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/36318?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: Ie6ecd37353b35a6ac13c6578585c714c9ab46e06
Gerrit-Change-Number: 36318
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 17 Mar 2024 08:16:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/mncc-python/+/36322?usp=email
to look at the new patch set (#2).
Change subject: Adjust mncc_sock.py to MNCC v7 introducing sockaddr_storage
......................................................................
Adjust mncc_sock.py to MNCC v7 introducing sockaddr_storage
It seems that 4 years ago in 2020 we merged Change-Id
Iab17f09380d7cd914cf85746b794c6c04ec7de43 to add MNCCv7 support, but
never actually tested mncc_sock.py ever since, as it still tries to
unconditionally access the 'ip' and 'port' members of the message,
which no longer exist due to the introduction of sockaddr_storage.
Working with sockaddr_storage is a bit nasty as it contains
double-underscores in the __ss_padding member, which means ctypes/python
will make it a private member that we cannot access. Work around this
with a small sed-script that removes the underscores from the
clang2py-generated python source code.
Change-Id: I3aa267a866ffaa54e7d71c19231adc78d3831169
---
M mncc.py
M mncc_sock.py
M regen-mncc-py.sh
3 files changed, 55 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/22/36322/2
--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/36322?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: I3aa267a866ffaa54e7d71c19231adc78d3831169
Gerrit-Change-Number: 36322
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, osmith, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/mncc-python/+/36319?usp=email )
Change subject: port over ctypeslib2
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/36319?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: I9efd56623ebeabef4317356a05484a620a3a91cc
Gerrit-Change-Number: 36319
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 16 Mar 2024 22:11:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/mncc-python/+/36322?usp=email )
Change subject: Adjust mncc_sock.py to MNCC v7 introducing sockaddr_storage
......................................................................
Adjust mncc_sock.py to MNCC v7 introducing sockaddr_storage
It seems that 4 years ago in 2020 we merged Change-Id
Iab17f09380d7cd914cf85746b794c6c04ec7de43 to add MNCCv7 support, but
never actually tested mncc_sock.py ever since, as it still tries to
unconditionally access the 'ip' and 'port' members of the message,
which no longer exist due to the introduction of sockaddr_storage.
Working with sockaddr_storage is a bit nasty as it contains
double-underscores in the __ss_padding member, which means ctypes/python
will make it a private member that we cannot access. Work around this
with a small sed-script that removes the underscores from the
clang2py-generated python source code.
Change-Id: I3aa267a866ffaa54e7d71c19231adc78d3831169
---
M mncc.py
M mncc_sock.py
M regen-mncc-py.sh
3 files changed, 40 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/22/36322/1
diff --git a/mncc.py b/mncc.py
index f55b6c1..708b9b7 100644
--- a/mncc.py
+++ b/mncc.py
@@ -601,7 +601,7 @@
struct_sockaddr_storage._pack_ = 1 # source:False
struct_sockaddr_storage._fields_ = [
('ss_family', ctypes.c_uint16),
- ('__ss_padding', ctypes.c_char * 118),
+ ('ss_padding', ctypes.c_char * 118),
('__ss_align', ctypes.c_uint64),
]
diff --git a/mncc_sock.py b/mncc_sock.py
index 79e2346..fd326a6 100644
--- a/mncc_sock.py
+++ b/mncc_sock.py
@@ -66,6 +66,23 @@
return "(???)"
class mncc_rtp_msg(mncc.struct_gsm_mncc_rtp, mncc_msg_common):
+ @property
+ def ip(self):
+ assert self.addr.ss_family == 2
+ return int.from_bytes(self.addr.ss_padding[2:6], 'big')
+ @ip.setter
+ def ip(self, val):
+ self.addr.ss_family = 2
+ self.addr.ss_padding = self.addr.ss_padding[:2] + val.to_bytes(4, 'big') + self.addr.ss_padding[6:]
+
+ @property
+ def port(self):
+ return int.from_bytes(self.addr.ss_padding[:2], 'big')
+ @port.setter
+ def port(self, val):
+ self.addr.ss_family = 2
+ self.addr.ss_padding = val.to_bytes(2, 'big') + self.addr.ss_padding[2:]
+
def __str__(self):
return 'mncc_rtp_msg(type=0x%04x, callref=%u, ip=%x, port=%u)' % (self.msg_type, self.callref, self.ip, self.port)
def __unicode__(self):
diff --git a/regen-mncc-py.sh b/regen-mncc-py.sh
index 08a92f1..4f9e3f3 100755
--- a/regen-mncc-py.sh
+++ b/regen-mncc-py.sh
@@ -4,3 +4,4 @@
echo
clang2py -k ems -o mncc.py mncc.h
+sed -e 's/__ss_padding/ss_padding/' -i mncc.py
--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/36322?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: I3aa267a866ffaa54e7d71c19231adc78d3831169
Gerrit-Change-Number: 36322
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria, osmith, pespin.
Hello fixeria, osmith, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/mncc-python/+/36318?usp=email
to look at the new patch set (#3).
Change subject: Initial port from python2 to python3
......................................................................
Initial port from python2 to python3
This is a very crude port, including manual edits to the ctypeslib-generated
mncc.py file. There's no real clean way to do this, as ctypeslib is
ancient, abandoned and unmaintained.
Change-Id: Ie6ecd37353b35a6ac13c6578585c714c9ab46e06
---
M mncc.py
M mncc_mt_loadgen.py
M mncc_sock.py
M mncc_test.py
M rtpsource/Makefile
M smpp_test.py
6 files changed, 62 insertions(+), 47 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/18/36318/3
--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/36318?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: Ie6ecd37353b35a6ac13c6578585c714c9ab46e06
Gerrit-Change-Number: 36318
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/36317?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: osmo-bts-virtual: Port over to osmo_io
......................................................................
osmo-bts-virtual: Port over to osmo_io
osmo_io permits us to use the io_uring backend, which should
significantly speed up the many small read/writes we're doing
on virt-um.
Change-Id: Icfe42da00fd446c38090055e2baa5d5e0ae5b70c
---
M src/osmo-bts-virtual/osmo_mcast_sock.c
M src/osmo-bts-virtual/osmo_mcast_sock.h
M src/osmo-bts-virtual/scheduler_virtbts.c
M src/osmo-bts-virtual/virtual_um.c
4 files changed, 113 insertions(+), 91 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/17/36317/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/36317?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Icfe42da00fd446c38090055e2baa5d5e0ae5b70c
Gerrit-Change-Number: 36317
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/mncc-python/+/36318?usp=email )
Change subject: Initial port from python2 to python3
......................................................................
Initial port from python2 to python3
This is a very crude port, including manual edits to the ctypeslib-generated
mncc.py file. There's no real clean way to do this, as ctypeslib is
ancient, abandoned and unmaintained.
Change-Id: Ie6ecd37353b35a6ac13c6578585c714c9ab46e06
---
M mncc.py
M mncc_mt_loadgen.py
M mncc_sock.py
M mncc_test.py
M rtpsource/Makefile
M smpp_test.py
6 files changed, 60 insertions(+), 47 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/18/36318/2
--
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/36318?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: Ie6ecd37353b35a6ac13c6578585c714c9ab46e06
Gerrit-Change-Number: 36318
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset