James Tavares has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/26865 )
Change subject: firmware: bugfix: disable cardemu comms in local SIM mode
......................................................................
firmware: bugfix: disable cardemu comms in local SIM mode
This change prevents contention on the ISO7816 bus by disabling the card emulation state machine when the SIM switch is in the local mode. Without this change, the card emulation firmware can clobber ISO7816 communications and cause contention with certain (but not all) SIM cards.
Changes:
- Add 'enabled' flag to cardemu instance that is set/cleared by usb_command_sim_select() (the only place where sim switch occurs).
- Flag is initialized as false (disabled) by default, to match local SIM mode default.
- When card emulation is disabled, force SIM VCC to be "OFF", SIM RESET as "not in RESET", and drop bytes bytes received on the ISO7816 interface (but do service buffers).
Change-Id: I4010f988712eac4a6af8568ccd60062f9de62449
---
M firmware/libcommon/source/mode_cardemu.c
1 file changed, 31 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/65/26865/1
diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c
index 8e4acf9..00a062e 100644
--- a/firmware/libcommon/source/mode_cardemu.c
+++ b/firmware/libcommon/source/mode_cardemu.c
@@ -83,10 +83,21 @@
#ifdef DETECT_VCC_BY_ADC
uint32_t vcc_uv;
#endif
+
+ /*! real-time state of VCC I/O line, irrespective of enabled flag */
bool vcc_active;
+
+ /*! last VCC state we reported to the card emu state machine (conditioned by enabled flag) */
bool vcc_active_last;
+
+ /*! real-time state of RST I/O line, irrespective of enabled flag */
bool rst_active;
+
+ /*! last RST state we reported to the card emu state machine (conditioned by enabled flag) */
bool rst_active_last;
+
+ /*! flag indicating whether this instance should perform card emulation, or not */
+ bool enabled;
};
struct cardem_inst cardem_inst[] = {
@@ -505,19 +516,25 @@
#endif /* DETECT_VCC_BY_ADC */
-/* called from main loop; dispatches card I/O state changes to card_emu from main loop */
+/**
+ * called from main loop; dispatches card I/O state changes to card_emu from main loop.
+ * NOTE: conditions I/O state on the ci->enabled flag; if the instance is disabled, we assume VCC is
+ * disabled and the device is not in reset
+ */
static void process_io_statechg(struct cardem_inst *ci)
{
- if (ci->vcc_active != ci->vcc_active_last) {
- card_emu_io_statechg(ci->ch, CARD_IO_VCC, ci->vcc_active);
+ const bool vcc_active = ci->vcc_active && ci->enabled;
+ if (vcc_active != ci->vcc_active_last) {
+ card_emu_io_statechg(ci->ch, CARD_IO_VCC, vcc_active);
/* FIXME do this for real */
- card_emu_io_statechg(ci->ch, CARD_IO_CLK, ci->vcc_active);
- ci->vcc_active_last = ci->vcc_active;
+ card_emu_io_statechg(ci->ch, CARD_IO_CLK, vcc_active);
+ ci->vcc_active_last = vcc_active;
}
- if (ci->rst_active != ci->rst_active_last) {
- card_emu_io_statechg(ci->ch, CARD_IO_RST, ci->rst_active);
- ci->rst_active_last = ci->rst_active;
+ const bool rst_active = ci->rst_active && ci->enabled;
+ if (rst_active != ci->rst_active_last) {
+ card_emu_io_statechg(ci->ch, CARD_IO_RST, rst_active);
+ ci->rst_active_last = rst_active;
}
}
@@ -764,10 +781,8 @@
if (msgb_l2len(msg) < sizeof(*mss))
return -1;
- if (mss->remote_sim)
- sim_switch_use_physical(ci->num, 0);
- else
- sim_switch_use_physical(ci->num, 1);
+ ci->enabled = mss->remote_sim ? true : false;
+ sim_switch_use_physical(ci->num, !ci->enabled);
return 0;
}
@@ -911,7 +926,10 @@
}
uint8_t byte = rbuf_read(&ci->rb);
__enable_irq();
- card_emu_process_rx_byte(ci->ch, byte);
+
+ if (ci->enabled) {
+ card_emu_process_rx_byte(ci->ch, byte);
+ }
//TRACE_ERROR("%uRx%02x\r\n", i, byte);
}
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26865
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I4010f988712eac4a6af8568ccd60062f9de62449
Gerrit-Change-Number: 26865
Gerrit-PatchSet: 1
Gerrit-Owner: James Tavares <jtavares(a)kvh.com>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/26797 )
Change subject: running.adoc: explain MGW configuration
......................................................................
running.adoc: explain MGW configuration
OsmoHNBGW now requires a co-located OsmoMGW instance. Lets add add some
info on how to configure it.
Change-Id: Id47f4f365cee78ce28d1534c4e3e98a59bdb0621
Related: OS#5152
---
M doc/manuals/chapters/running.adoc
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/97/26797/1
diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc
index f40027a..5d3422e 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -117,3 +117,19 @@
local-ip 10.9.8.7
local-port 29169
----
+
+==== Configure co-located media gateway
+
+OsmoHNBGW requires a co-located OsmoMGW instace. The purpose of the co-located
+media gateway is to relay the RTP traffic between hNodeB and core network. The
+configuration is done under the hnbgw node along with iucs and iups.
+
+An example configuration for OsmoHNBGW's MGCP client:
+
+----
+hnbgw
+ mgcp
+ mgw remote-ip 127.0.0.1
+ mgw remote-port 2427
+ mgw reset-endpoint rtpbridge/*
+----
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/26797
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Id47f4f365cee78ce28d1534c4e3e98a59bdb0621
Gerrit-Change-Number: 26797
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27016 )
Change subject: Allow configuration of interfaces/lines via VTY
......................................................................
Patch Set 6: Code-Review+1
(1 comment)
File src/usb.c:
https://gerrit.osmocom.org/c/osmo-e1d/+/27016/comment/112a59ae_5803b92c
PS6, Line 565: /* try to find the matching interface config create by the vty */
created by
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27016
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77
Gerrit-Change-Number: 27016
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 31 Jan 2022 19:13:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder, tnt, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-e1d/+/27016
to look at the new patch set (#6).
Change subject: Allow configuration of interfaces/lines via VTY
......................................................................
Allow configuration of interfaces/lines via VTY
So far, osmo-e1d automatically opened all compatible icE1usb devices
and all E1 lines on those interfaces. Let's allow for 'interface' and
'line' configuration in the VTY. USB devices can be identified by
their serial number string.
If a given device (== E1 interface) has a VTY configuration, then only
those E1 lines with VTY configuration opened.
For each Line (icE1usb or vpair), the mode (channelized/superchannel)
can also be set via VTY.
Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77
Closes: OS#5400
---
M src/e1d.h
M src/intf_line.c
M src/usb.c
M src/vty.c
4 files changed, 261 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/16/27016/6
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27016
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77
Gerrit-Change-Number: 27016
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27016 )
Change subject: Allow configuration of interfaces/lines via VTY
......................................................................
Patch Set 5: Code-Review+2
(6 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-e1d/+/27016/comment/2664896b_f0f5a20e
PS3, Line 15: those E1 lines with VTY configuration opened.
> are opened / will be opened.
no, I'm using past tense here. "so far, osmo-e1d automatically opened..." but now it is changing. I could als have written "used to open".
File src/e1d.h:
https://gerrit.osmocom.org/c/osmo-e1d/+/27016/comment/f2f15123_3918d340
PS3, Line 181: e1d_find_intf_by_serial(struct e1_daemon *e1d, const char *serial_str);
> by_usb_serial?
Ack
File src/usb.c:
https://gerrit.osmocom.org/c/osmo-e1d/+/27016/comment/acb8c8ba_4226b626
PS3, Line 561: /* try to find the matching interface config in the */
> in the what?
Ack
https://gerrit.osmocom.org/c/osmo-e1d/+/27016/comment/775c58d6_6a866782
PS3, Line 564: LOGP(DE1D, LOGL_INFO, "configuration for icE1usb serial '%s' found\n", serial_str);
> start with caps
Ack
https://gerrit.osmocom.org/c/osmo-e1d/+/27016/comment/e86a9e3b_54ee9f7c
PS3, Line 567: LOGP(DE1D, LOGL_ERROR, "new device with serial '%s', but E1 interface %u busy\n",
> start with caps
Ack
https://gerrit.osmocom.org/c/osmo-e1d/+/27016/comment/e75ec9c0_6228a234
PS3, Line 576: LOGP(DE1D, LOGL_NOTICE, "no configuration for icE1usb serial '%s' found, "
> start with caps
Ack
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27016
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77
Gerrit-Change-Number: 27016
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 18:56:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-e1d/+/27015
to look at the new patch set (#3).
Change subject: e1_{intf,line}_new: Allow caller to specify the numeric identifier
......................................................................
e1_{intf,line}_new: Allow caller to specify the numeric identifier
This will be used by the upcoming VTY interface changes.
Change-Id: I9ff80831a3e3e3cb6dae178f8b438a9f3f4747df
---
M src/e1d.h
M src/intf_line.c
M src/usb.c
M src/vpair.c
4 files changed, 43 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/15/27015/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27015
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I9ff80831a3e3e3cb6dae178f8b438a9f3f4747df
Gerrit-Change-Number: 27015
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder, tnt, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-e1d/+/27016
to look at the new patch set (#5).
Change subject: Allow configuration of interfaces/lines via VTY
......................................................................
Allow configuration of interfaces/lines via VTY
So far, osmo-e1d automatically opened all compatible icE1usb devices
and all E1 lines on those interfaces. Let's allow for 'interface' and
'line' configuration in the VTY. USB devices can be identified by
their serial number string.
If a given device (== E1 interface) has a VTY configuration, then only
those E1 lines with VTY configuration opened.
For each Line (icE1usb or vpair), the mode (channelized/superchannel)
can also be set via VTY.
Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77
Closes: OS#5400
---
M src/e1d.h
M src/intf_line.c
M src/usb.c
M src/vty.c
4 files changed, 257 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/16/27016/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27016
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77
Gerrit-Change-Number: 27016
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: tnt <tnt(a)246tNt.com>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27038 )
Change subject: osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
......................................................................
osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
It seems it is insufficient to register file-descriptor call-backs
with libusb_set_pollfd_notifiers(), but we also need to call
libusb_get_pollfds() once to get the initial set of file descriptors
which may have been created already during libusb_init().
As we don't have a libusb context before libusb_init() returns,
we cannot call libusb_set_pollfd_notifiers() early enough to be
active already during libusb_init().
Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
---
M src/usb/osmo_libusb.c
1 file changed, 13 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c
index a6f194a..79a8fc3 100644
--- a/src/usb/osmo_libusb.c
+++ b/src/usb/osmo_libusb.c
@@ -735,6 +735,8 @@
int osmo_libusb_init(libusb_context **pluctx)
{
libusb_context *luctx = NULL;
+ const struct libusb_pollfd **pfds;
+
int rc;
rc = libusb_init(pluctx);
@@ -750,6 +752,17 @@
libusb_set_pollfd_notifiers(luctx, osmo_usb_added_cb, osmo_usb_removed_cb, luctx);
+ /* get the initial file descriptors which were created even before during libusb_init() */
+ pfds = libusb_get_pollfds(luctx);
+ if (pfds) {
+ const struct libusb_pollfd **pfds2 = pfds;
+ const struct libusb_pollfd *pfd;
+ /* synthesize 'add' call-backs. not sure why libusb doesn't do that by itself? */
+ for (pfd = *pfds2; pfd; pfd = *++pfds2)
+ osmo_usb_added_cb(pfd->fd, pfd->events, luctx);
+ libusb_free_pollfds(pfds);
+ }
+
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
Gerrit-Change-Number: 27038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27038 )
Change subject: osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
Gerrit-Change-Number: 27038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 18:44:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030 )
Change subject: bsc_nat_fsm: initial msc <> bsc msg forwarding
......................................................................
Patch Set 5:
(1 comment)
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030/comment/bdf30b86_32dcff07
PS5, Line 142: oph->msg = NULL;
Why are you doing this? Is msgb_free() called somewhere inside osmo_sccp_tx_unitdata_msg ? Did you check if oph pointer is actually allocated INSIDE the msg data? because then you are writing to already-freed memory. If that's the case, you should not use oph nor oph->msg anymore.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I4af398bb433341a98f818822e6c3af28b6d9dacd
Gerrit-Change-Number: 27030
Gerrit-PatchSet: 5
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 18:13:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: osmith.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030
to look at the new patch set (#5).
Change subject: bsc_nat_fsm: initial msc <> bsc msg forwarding
......................................................................
bsc_nat_fsm: initial msc <> bsc msg forwarding
Add an initial implementation of sccp_sap_up, that assumes one BSC and
one MSC, and successfully forwards RESET and RESET ACK between both.
Related: SYS#5560
Depends: libosmo-sccp I0f38b0d038b0dd8cd355e7284e5b56d438811bd9
Change-Id: I4af398bb433341a98f818822e6c3af28b6d9dacd
---
M doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg
M src/osmo-bsc-nat/bsc_nat_fsm.c
2 files changed, 112 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/30/27030/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I4af398bb433341a98f818822e6c3af28b6d9dacd
Gerrit-Change-Number: 27030
Gerrit-PatchSet: 5
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin, fixeria.
Hello Jenkins Builder, neels, laforge, pespin, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
to look at the new patch set (#11).
Change subject: Add bsc_nat fsm
......................................................................
Add bsc_nat fsm
Create the initial FSM that starts and stops two SS7 instances (one for
CN, one for RAN), and binds an sccp user to each.
Related: SYS#5560
Depends: libosmocore I81c64a7ae440304522c2179c212023a566ddced8
Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
---
M doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg
M include/osmocom/bsc_nat/Makefile.am
M include/osmocom/bsc_nat/bsc_nat.h
A include/osmocom/bsc_nat/bsc_nat_fsm.h
M src/osmo-bsc-nat/Makefile.am
M src/osmo-bsc-nat/bsc_nat.c
A src/osmo-bsc-nat/bsc_nat_fsm.c
M src/osmo-bsc-nat/main.c
M src/osmo-bsc-nat/vty.c
9 files changed, 325 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/62/26662/11
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
Gerrit-Change-Number: 26662
Gerrit-PatchSet: 11
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(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: pespin, fixeria.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662 )
Change subject: Add bsc_nat fsm
......................................................................
Patch Set 9:
(3 comments)
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662/comment/22c3cdee_67f3a3b2
PS8, Line 129: ss7_inst_free(bsc_nat->cn);
> Ack, agree with Pau.
(Fixed in patchset 9.)
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662/comment/a3fb6bfd_c7a2188c
PS9, Line 96: talloc_free
> osmo_ss7_instance_destroy() does talloc_free(inst), so no need to free() it again.
I'm running osmo_ss7_instance_destroy on "ss7", not on "inst".
File src/osmo-bsc-nat/main.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662/comment/adf588ca_33829b71
PS8, Line 148: if (g_bsc_nat->shutdown)
> Can you explain why are you changing this? […]
On second thought, the whole ->shutdown doesn't really make sense here. Removed and using osmo_select_shutdown_requested() again.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
Gerrit-Change-Number: 26662
Gerrit-PatchSet: 9
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:49:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith, neels, fixeria.
Hello Jenkins Builder, neels, laforge, pespin, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
to look at the new patch set (#10).
Change subject: Add bsc_nat fsm
......................................................................
Add bsc_nat fsm
Create the initial FSM that starts and stops two SS7 instances (one for
CN, one for RAN), and binds an sccp user to each.
Related: SYS#5560
Depends: libosmocore I81c64a7ae440304522c2179c212023a566ddced8
Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
---
M doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg
M include/osmocom/bsc_nat/Makefile.am
M include/osmocom/bsc_nat/bsc_nat.h
A include/osmocom/bsc_nat/bsc_nat_fsm.h
M src/osmo-bsc-nat/Makefile.am
M src/osmo-bsc-nat/bsc_nat.c
A src/osmo-bsc-nat/bsc_nat_fsm.c
M src/osmo-bsc-nat/main.c
M src/osmo-bsc-nat/vty.c
9 files changed, 326 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/62/26662/10
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
Gerrit-Change-Number: 26662
Gerrit-PatchSet: 10
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27038 )
Change subject: osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
Gerrit-Change-Number: 27038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:45:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith, neels, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662 )
Change subject: Add bsc_nat fsm
......................................................................
Patch Set 9:
(1 comment)
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662/comment/de5b9106_5ce43c88
PS9, Line 96: talloc_free
> osmo_ss7_instance_destroy() does talloc_free(inst), so no need to free() it again.
ss7 is a lib pointer and inst is a bsc-nat app pointer. So osmo_ss7_instance_destroy() is probably not freeing inst like you suggest.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
Gerrit-Change-Number: 26662
Gerrit-PatchSet: 9
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:42:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27038 )
Change subject: osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
......................................................................
osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
It seems it is insufficient to register file-descriptor call-backs
with libusb_set_pollfd_notifiers(), but we also need to call
libusb_get_pollfds() once to get the initial set of file descriptors
which may have been created already during libusb_init().
As we don't have a libusb context before libusb_init() returns,
we cannot call libusb_set_pollfd_notifiers() early enough to be
active already during libusb_init().
Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
---
M src/usb/osmo_libusb.c
1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/27038/1
diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c
index a6f194a..79a8fc3 100644
--- a/src/usb/osmo_libusb.c
+++ b/src/usb/osmo_libusb.c
@@ -735,6 +735,8 @@
int osmo_libusb_init(libusb_context **pluctx)
{
libusb_context *luctx = NULL;
+ const struct libusb_pollfd **pfds;
+
int rc;
rc = libusb_init(pluctx);
@@ -750,6 +752,17 @@
libusb_set_pollfd_notifiers(luctx, osmo_usb_added_cb, osmo_usb_removed_cb, luctx);
+ /* get the initial file descriptors which were created even before during libusb_init() */
+ pfds = libusb_get_pollfds(luctx);
+ if (pfds) {
+ const struct libusb_pollfd **pfds2 = pfds;
+ const struct libusb_pollfd *pfd;
+ /* synthesize 'add' call-backs. not sure why libusb doesn't do that by itself? */
+ for (pfd = *pfds2; pfd; pfd = *++pfds2)
+ osmo_usb_added_cb(pfd->fd, pfd->events, luctx);
+ libusb_free_pollfds(pfds);
+ }
+
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
Gerrit-Change-Number: 27038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030 )
Change subject: bsc_nat_fsm: initial msc <> bsc msg forwarding
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030/comment/631ce2f9_80eca6a0
PS2, Line 139: msg = msgb_copy(oph->msg, NULL);
> Why copying & freeing the msg instead of simply passing it forward?
I've tried this at first, but it didn't work - after dumping the message needed and msg I figured that everything from l2h needs to be in l3h, see the code below. Or is there a simpler way to do this?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I4af398bb433341a98f818822e6c3af28b6d9dacd
Gerrit-Change-Number: 27030
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:31:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27024 )
Change subject: log: socket.c: rather use the osmo_sockaddr_str _FMT
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27024
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Idbe7582b2b7f14540919e911dad08af6d491f68f
Gerrit-Change-Number: 27024
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:27:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment