osmo-trx[master]: Resampler: Fix initialization return checking

2017-03-23 Thread Tom Tsou

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2159
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3b71b3a06b34a6fd781bf197ecf9d5cc1711d13
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Tom Tsou 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: sigProcLib.h: Fix whitespaces. No non-whitespace changes.

2017-03-23 Thread Tom Tsou

Patch Set 1:

(4 comments)

We should get the remaining EOL whitespace removals into this patch.

https://gerrit.osmocom.org/#/c/2151/1/Transceiver52M/sigProcLib.h
File Transceiver52M/sigProcLib.h:

PS1, Line 82:  
Additional whitespace fix


PS1, Line 94:  
Additional whitespace fix


PS1, Line 109:  
Additional whitespace fix


PS1, Line 110:  
Additional whitespace fix


-- 
To view, visit https://gerrit.osmocom.org/2151
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7718cca45c245c9e91250ab2877f5436d4029698
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: Yes


osmo-trx[master]: vector: Introduce shrink() function to shrink vector size wi...

2017-03-23 Thread Tom Tsou

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2157
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9c0ac2715aea1a90c9e6ebcd982522b80a547099
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: sigProcLib.h: Fix whitespaces. No non-whitespace changes.

2017-03-23 Thread Tom Tsou

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2151
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7718cca45c245c9e91250ab2877f5436d4029698
Gerrit-PatchSet: 2
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


[PATCH] osmo-trx[master]: sigProcLib.h: Fix whitespaces. No non-whitespace changes.

2017-03-23 Thread Alexander Chemeris
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/2151

to look at the new patch set (#2).

sigProcLib.h: Fix whitespaces. No non-whitespace changes.

The file seem to be using "2 spaces" indent, bt some lines are using
tabs which breaks formatting.

Change-Id: I7718cca45c245c9e91250ab2877f5436d4029698
---
M Transceiver52M/sigProcLib.h
1 file changed, 46 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/51/2151/2

diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index 0f40c1e..094a5b7 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -21,9 +21,9 @@
 #include "signalVector.h"
 
 /* Burst lengths */
-#define NORMAL_BURST_NBITS 148
-#define EDGE_BURST_NBITS   444
-#define EDGE_BURST_NSYMS   (EDGE_BURST_NBITS / 3)
+#define NORMAL_BURST_NBITS148
+#define EDGE_BURST_NBITS  444
+#define EDGE_BURST_NSYMS  (EDGE_BURST_NBITS / 3)
 
 /** Convolution type indicator */
 enum ConvType {
@@ -79,55 +79,55 @@
 /** Destroy the signal processing library */
 void sigProcLibDestroy(void);
 
-/** 
-   Convolve two vectors. 
-   @param a,b The vectors to be convolved.
-   @param c, A preallocated vector to hold the convolution result.
-   @param spanType The type/span of the convolution.
-   @return The convolution result or NULL on error.
+/**
+Convolve two vectors.
+@param a,b The vectors to be convolved.
+@param c, A preallocated vector to hold the convolution result.
+@param spanType The type/span of the convolution.
+@return The convolution result or NULL on error.
 */
 signalVector *convolve(const signalVector *a, const signalVector *b,
signalVector *c, ConvType spanType,
size_t start = 0, size_t len = 0,
size_t step = 1, int offset = 0);
 
-/** 
+/**
 Frequency shift a vector.
-   @param y The frequency shifted vector.
-   @param x The vector to-be-shifted.
-   @param freq The digital frequency shift
-   @param startPhase The starting phase of the oscillator 
-   @param finalPhase The final phase of the oscillator
-   @return The frequency shifted vector.
+@param y The frequency shifted vector.
+@param x The vector to-be-shifted.
+@param freq The digital frequency shift
+@param startPhase The starting phase of the oscillator
+@param finalPhase The final phase of the oscillator
+@return The frequency shifted vector.
 */
 signalVector* frequencyShift(signalVector *y,
-signalVector *x,
-float freq = 0.0,
-float startPhase = 0.0,
-float *finalPhase=NULL);
+ signalVector *x,
+ float freq = 0.0,
+ float startPhase = 0.0,
+ float *finalPhase=NULL);
 
-/** 
-Correlate two vectors. 
+/**
+Correlate two vectors.
 @param a,b The vectors to be correlated.
 @param c, A preallocated vector to hold the correlation result.
 @param spanType The type/span of the correlation.
 @return The correlation result.
 */
 signalVector* correlate(signalVector *a,
-   signalVector *b,
-   signalVector *c,
-   ConvType spanType,
+signalVector *b,
+signalVector *c,
+ConvType spanType,
 bool bReversedConjugated = false,
-   unsigned startIx = 0,
-   unsigned len = 0);
+unsigned startIx = 0,
+unsigned len = 0);
 
 /** Operate soft slicer on a soft-bit vector */
 bool vectorSlicer(SoftVector *x);
 
 /** GMSK modulate a GSM burst of bits */
 signalVector *modulateBurst(const BitVector ,
-   int guardPeriodLength,
-   int sps, bool emptyPulse = false);
+int guardPeriodLength,
+int sps, bool emptyPulse = false);
 
 /** 8-PSK modulate a burst of bits */
 signalVector *modulateEdgeBurst(const BitVector ,
@@ -156,7 +156,7 @@
 
 /** Add two vectors in-place */
 bool addVector(signalVector ,
-  signalVector );
+   signalVector );
 
 /** Multiply two vectors in-place*/
 bool multVector(signalVector ,
@@ -168,24 +168,24 @@
 complex mean = complex(0.0));
 
 /**
-   Given a non-integer index, interpolate a sample.
-   @param inSig The signal from which to interpolate.
-   @param ix The index.
-   @return The interpolated signal value.
+Given a non-integer index, interpolate a 

[PATCH] libosmocore[master]: select: Find the highest fd when filling the fd_sets

2017-03-23 Thread Holger Freyther
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/1986

to look at the new patch set (#3).

select: Find the highest fd when filling the fd_sets

Instead of returning maxfd, which is the highest fd ever seen, take
the highest we have seen on this iteration.

This makes a tiny difference for the osmo-sip-connector and its
event loop integration. select.c ignores the return value of this
function right now.

This was seen while debugging the eventloop integration of the
osmo-sip-connector before and after a VTY connection. The fds
being polled didn't go down.

Change-Id: I1a6d7271273ec08bb511c21b936891bc508843e4
---
M src/select.c
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/1986/3

diff --git a/src/select.c b/src/select.c
index ab0734e..8ed7f1b 100644
--- a/src/select.c
+++ b/src/select.c
@@ -117,10 +117,18 @@
llist_del(>list);
 }
 
+/*! \brief Populate the fd_sets and return the highest fd number
+ *  \param[in] _rset The readfds to populate
+ *  \param[in] _wset The wrtiefds to populate
+ *  \param[in] _eset The errorfds to populate
+ *
+ *  \returns The highest file descriptor seen or 0 on an empty list
+ */
 inline int osmo_fd_fill_fds(void *_rset, void *_wset, void *_eset)
 {
fd_set *readset = _rset, *writeset = _wset, *exceptset = _eset;
struct osmo_fd *ufd;
+   int highfd = 0;
 
llist_for_each_entry(ufd, _fds, list) {
if (ufd->when & BSC_FD_READ)
@@ -131,9 +139,12 @@
 
if (ufd->when & BSC_FD_EXCEPT)
FD_SET(ufd->fd, exceptset);
+
+   if (ufd->fd > highfd)
+   highfd = ufd->fd;
}
 
-   return maxfd;
+   return highfd;
 }
 
 inline int osmo_fd_disp_fds(void *_rset, void *_wset, void *_eset)

-- 
To view, visit https://gerrit.osmocom.org/1986
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1a6d7271273ec08bb511c21b936891bc508843e4
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


osmo-trx[master]: buildenv: Make build CPU invariant

2017-03-23 Thread Harald Welte

Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2102
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic913aa13c23c348ae62e78c9dfd6ed8b0a62798c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-trx[master]: buildenv: Split up SSE3 and SSE4.1 code

2017-03-23 Thread Max

Patch Set 1:

FYI: the latest version of autoconf-archive is 2017.03.21

-- 
To view, visit https://gerrit.osmocom.org/2134
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I846e190e92f1258cd412d1b2d79b539e204e04b3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-trx[master]: ssedetect: Add runtime CPU detection

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2100
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba74f8a6e4e921ff31e4bd9f0c7c881fe547423a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-trx[master]: sigProcLib: Add operator<< to print CorrType to a string.

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2150
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3d68cbdab8fb504d7f155029654a576d318a201e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


[MERGED] libosmocore[master]: Add support for PCU version report

2017-03-23 Thread Max
Max has submitted this change and it was merged.

Change subject: Add support for PCU version report
..


Add support for PCU version report

Expand 3GPP TS 52.021 §9.4.43 Probable Cause with Osmocom-specific value
for PCU version reporting to enable sending it via OML alarms.

Change-Id: If57459c0610f2c7b36d599b13087c8deef8bdd9e
Related: OS#1614
---
M include/osmocom/gsm/protocol/gsm_12_21.h
M src/gsm/abis_nm.c
2 files changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h 
b/include/osmocom/gsm/protocol/gsm_12_21.h
index 23392d2..c88f0b1 100644
--- a/include/osmocom/gsm/protocol/gsm_12_21.h
+++ b/include/osmocom/gsm/protocol/gsm_12_21.h
@@ -277,6 +277,7 @@
OSMO_EVT_WARN_SW_WARN   = 0x0001,
/* External causes */
OSMO_EVT_EXT_ALARM  = 0xfeed,
+   OSMO_EVT_PCU_VERS   = 0xface,
 };
 
 extern const struct value_string abis_mm_event_cause_names[];
diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c
index e1b248f..934d7ce 100644
--- a/src/gsm/abis_nm.c
+++ b/src/gsm/abis_nm.c
@@ -162,6 +162,7 @@
{ OSMO_EVT_MIN_PAG_TAB_FULL,"Paging table full" },
{ OSMO_EVT_WARN_SW_WARN,"Software warning" },
{ OSMO_EVT_EXT_ALARM,   "External alarm" },
+   { OSMO_EVT_PCU_VERS,"PCU version report" },
{ 0, NULL }
 };
 

-- 
To view, visit https://gerrit.osmocom.org/2083
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If57459c0610f2c7b36d599b13087c8deef8bdd9e
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


osmo-bts[master]: Sync protocol with OsmoPCU

2017-03-23 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2086
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I15e6cc86604947a173e8675ba4b41a3bda2d3296
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


libosmo-abis[master]: Fix RTP jitter buffer that never stop to increase.

2017-03-23 Thread Harald Welte

Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/1982
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0593d6530c097cca34125a0ae2dd1b019b4dd80d
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: jfdionne 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: jfdionne 
Gerrit-HasComments: No


osmo-bts[master]: octphy: fix usage of wrong define constant

2017-03-23 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/1966
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4de23daf79bb07ca0c0b818eefe350d18d27e4d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-sip-connector[master]: mncc/sip: Attempt to parse the media from session in progress

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: mncc/sip: Attempt to parse the media from session in progress
..


mncc/sip: Attempt to parse the media from session in progress

Parse the media from session in progress and if present in alerting
connect the call early. Sadly this sets RTP to the sendrecv mode even
if we would like to keep it as recvonly.

Change-Id: I98d173abc46c67b87666ed2f193a581d6e72344b
Related: OS#1784
---
M src/mncc.c
M src/sip.c
2 files changed, 17 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/src/mncc.c b/src/mncc.c
index 5e2a3a1..669a80c 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -1,5 +1,5 @@
 /*
- * (C) 2016 by Holger Hans Peter Freyther
+ * (C) 2016-2017 by Holger Hans Peter Freyther
  *
  * All Rights Reserved
  *
@@ -196,6 +196,7 @@
 {
struct gsm_mncc out_mncc = { 0, };
struct mncc_call_leg *leg;
+   struct call_leg *other_leg;
 
OSMO_ASSERT(_leg->type == CALL_TYPE_MNCC);
leg = (struct mncc_call_leg *) _leg;
@@ -208,6 +209,14 @@
out_mncc.progress.descr = 8; /* In-band information or appropriate 
pattern now available */
 
mncc_write(leg->conn, _mncc, leg->callref);
+
+   /*
+* If we have remote IP/port let's connect it already.
+* FIXME: We would like to keep this as recvonly...
+*/
+   other_leg = call_leg_other(>base);
+   if (other_leg && other_leg->port != 0 && other_leg->ip != 0)
+   send_rtp_connect(leg, other_leg);
 }
 
 static void mncc_call_leg_release(struct call_leg *_leg)
diff --git a/src/sip.c b/src/sip.c
index 0a642b7..4f3d034 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -1,5 +1,5 @@
 /*
- * (C) 2016 by Holger Hans Peter Freyther
+ * (C) 2016-2017 by Holger Hans Peter Freyther
  *
  * All Rights Reserved
  *
@@ -39,12 +39,16 @@
 static void sip_connect_call(struct call_leg *_leg);
 static void sip_dtmf_call(struct call_leg *_leg, int keypad);
 
-static void call_progress(struct sip_call_leg *leg, const sip_t *sip)
+static void call_progress(struct sip_call_leg *leg, const sip_t *sip, int 
status)
 {
struct call_leg *other = call_leg_other(>base);
 
if (!other)
return;
+
+   /* Extract SDP for session in progress with matching codec */
+   if (status == 183)
+   sdp_extract_sdp(leg, sip, false);
 
LOGP(DSIP, LOGL_NOTICE, "leg(%p) is now rining.\n", leg);
other->ring_call(other);
@@ -159,7 +163,7 @@
leg->state = SIP_CC_DLG_CNFD;
 
if (status == 180 || status == 183)
-   call_progress(leg, sip);
+   call_progress(leg, sip, status);
else if (status == 200)
call_connect(leg, sip);
else if (status >= 300) {

-- 
To view, visit https://gerrit.osmocom.org/2030
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I98d173abc46c67b87666ed2f193a581d6e72344b
Gerrit-PatchSet: 3
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder


osmo-sim-auth[master]: cosmetic: add/tweak log output, add vim indenting marker

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2052
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2ac1215ae948558324627f76e28c72a23dc6a68
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sim-auth
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] openbsc[master]: OM2000: Send ALTCRQ for SuperChannel after receiving IS Enab...

2017-03-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OM2000: Send ALTCRQ for SuperChannel after receiving IS Enable 
Req Ack
..


OM2000: Send ALTCRQ for SuperChannel after receiving IS Enable Req Ack

When the BTS is configured to use a SuperChannel and it is using a
unix domain socket based transport towards the L2TP daemon, then
we must instruct the L2TP daemon to instruct the SIU to change the Abis
Lower Transport Mode using the ALTCRQ / ALTCRP L2TP signalling.

Change-Id: I672bfaa09c42fbeb0c8459f24bb952de954b
---
M openbsc/include/openbsc/gsm_data_shared.h
M openbsc/src/libbsc/abis_om2000.c
M openbsc/src/libbsc/abis_om2000_vty.c
3 files changed, 32 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/include/openbsc/gsm_data_shared.h 
b/openbsc/include/openbsc/gsm_data_shared.h
index e697cb8..06fa8dd 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -729,6 +729,7 @@
struct om2k_mo om2k_mo;
struct gsm_abis_mo mo;
} tf;
+   uint32_t use_superchannel:1;
} rbs2000;
struct {
uint8_t bts_type;
diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 1fb7689..9bf0fe2 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -1654,6 +1654,7 @@
 
 static void om2k_mo_st_wait_enable_accept(struct osmo_fsm_inst *fi, uint32_t 
event, void *data)
 {
+   struct om2k_mo_fsm_priv *omfp = fi->priv;
struct om2k_decoded_msg *omd = data;
 
switch (omd->msg_type) {
@@ -1661,6 +1662,9 @@
osmo_fsm_inst_state_chg(fi, OM2K_ST_ERROR, 0, 0);
break;
case OM2K_MSGT_ENABLE_REQ_ACK:
+   if (omfp->mo->addr.class == OM2K_MO_CLS_IS &&
+   omfp->trx->bts->rbs2000.use_superchannel)
+   
e1inp_ericsson_set_altc(omfp->trx->bts->oml_link->ts->line, 1);
osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_RES,
OM2K_TIMEOUT, 0);
}
diff --git a/openbsc/src/libbsc/abis_om2000_vty.c 
b/openbsc/src/libbsc/abis_om2000_vty.c
index 060fb8b..a6bc4c7 100644
--- a/openbsc/src/libbsc/abis_om2000_vty.c
+++ b/openbsc/src/libbsc/abis_om2000_vty.c
@@ -417,6 +417,29 @@
return CMD_SUCCESS;
 }
 
+DEFUN(cfg_bts_alt_mode, cfg_bts_alt_mode_cmd,
+   "abis-lower-transport (single-timeslot|super-channel)",
+   "Configure thee Abis Lower Transport\n"
+   "Single Timeslot (classic Abis)\n"
+   "SuperChannel (Packet Abis)\n")
+{
+   struct gsm_bts *bts = vty->index;
+   struct con_group *cg;
+
+   if (bts->type != GSM_BTS_TYPE_RBS2000) {
+   vty_out(vty, "%% Command only works for RBS2000%s",
+   VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   if (!strcmp(argv[0], "super-channel"))
+   bts->rbs2000.use_superchannel = 1;
+   else
+   bts->rbs2000.use_superchannel = 0;
+
+   return CMD_SUCCESS;
+}
+
 DEFUN(cfg_bts_is_conn_list, cfg_bts_is_conn_list_cmd,
"is-connection-list (add|del) <0-2047> <0-2047> <0-255>",
"Interface Switch Connection List\n"
@@ -548,6 +571,9 @@
VTY_NEWLINE);
dump_con_group(vty, cgrp);
}
+   if (bts->rbs2000.use_superchannel)
+   vty_out(vty, "  abis-lower-transport super-channel%s",
+   VTY_NEWLINE);
 }
 
 int abis_om2k_vty_init(void)
@@ -575,6 +601,7 @@
install_element(OM2K_CON_GROUP_NODE, _om2k_con_path_conc_cmd);
 
install_element(BTS_NODE, _bts_is_conn_list_cmd);
+   install_element(BTS_NODE, _bts_alt_mode_cmd);
install_element(BTS_NODE, _om2k_con_group_cmd);
install_element(BTS_NODE, _om2k_con_group_cmd);
 

-- 
To view, visit https://gerrit.osmocom.org/2036
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I672bfaa09c42fbeb0c8459f24bb952de954b
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] openbsc[master]: abis_om2k: protect MO FSMs by NULL check

2017-03-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: abis_om2k: protect MO FSMs by NULL check
..


abis_om2k: protect MO FSMs by NULL check

Also set MO FSMs to NULL after freeing them.

Change-Id: I30df0b9ab8bc47ba9756c8388e977deed0e40200
---
M openbsc/src/libbsc/abis_om2000.c
1 file changed, 17 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 9bf0fe2..82a14b2 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -1697,7 +1697,17 @@
 
 static void om2k_mo_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t 
prev_state)
 {
+   struct om2k_mo_fsm_priv *omfp = fi->priv;
+   omfp->mo->fsm = NULL;
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL);
+}
+
+static void om2k_mo_s_error_onenter(struct osmo_fsm_inst *fi, uint32_t 
prev_state)
+{
+   struct om2k_mo_fsm_priv *omfp = fi->priv;
+
+   omfp->mo->fsm = NULL;
+   osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
 }
 
 static const struct osmo_fsm_state om2k_is_states[] = {
@@ -1794,7 +1804,7 @@
.name = "ERROR",
.in_event_mask = 0,
.out_state_mask = 0,
-   .onenter = om2k_mo_s_done_onenter,
+   .onenter = om2k_mo_s_error_onenter,
},
 
 };
@@ -2697,6 +2707,12 @@
 msgb_hexdump(msg));
return 0;
}
+   if (!mo->fsm) {
+   LOGP(DNM, LOGL_ERROR, "MO object should not generate any 
message. fsm == NULL "
+"%s: %s\n", get_value_string(om2k_msgcode_vals, msg_type),
+msgb_hexdump(msg));
+   return 0;
+   }
 
/* Dispatch message to that MO */
om2k_mo_fsm_recvmsg(bts, mo, );

-- 
To view, visit https://gerrit.osmocom.org/2037
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I30df0b9ab8bc47ba9756c8388e977deed0e40200
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] openbsc[master]: RBS2000 RSL: Support for sending RSL PAGING CMD for GPRS

2017-03-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: RBS2000 RSL: Support for sending RSL PAGING CMD for GPRS
..


RBS2000 RSL: Support for sending RSL PAGING CMD for GPRS

Change-Id: I66541f9b20e7fd67fbec329283fc3c821c970a56
---
M openbsc/include/openbsc/abis_rsl.h
M openbsc/src/libbsc/abis_rsl.c
M openbsc/src/libbsc/bsc_api.c
3 files changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/include/openbsc/abis_rsl.h 
b/openbsc/include/openbsc/abis_rsl.h
index 758c555..692b464 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -22,6 +22,7 @@
 #ifndef _RSL_H
 #define _RSL_H
 
+#include 
 #include 
 #include 
 
@@ -49,7 +50,7 @@
 int rsl_chan_mode_modify_req(struct gsm_lchan *ts);
 int rsl_encryption_cmd(struct msgb *msg);
 int rsl_paging_cmd(struct gsm_bts *bts, uint8_t paging_group, uint8_t len,
-  uint8_t *ms_ident, uint8_t chan_needed);
+  uint8_t *ms_ident, uint8_t chan_needed, bool is_gprs);
 int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val);
 
 int rsl_data_request(struct msgb *msg, uint8_t link_id);
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 26cafc2..91cbd46 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1007,7 +1007,7 @@
 }
 
 int rsl_paging_cmd(struct gsm_bts *bts, uint8_t paging_group, uint8_t len,
-  uint8_t *ms_ident, uint8_t chan_needed)
+  uint8_t *ms_ident, uint8_t chan_needed, bool is_gprs)
 {
struct abis_rsl_dchan_hdr *dh;
struct msgb *msg = rsl_msgb_alloc();
@@ -1020,6 +1020,11 @@
msgb_tlv_put(msg, RSL_IE_MS_IDENTITY, len-2, ms_ident+2);
msgb_tv_put(msg, RSL_IE_CHAN_NEEDED, chan_needed);
 
+   /* Ericsson wants to have this IE in case a paging message
+* relates to packet paging */
+   if (bts->type == GSM_BTS_TYPE_RBS2000 && is_gprs)
+   msgb_tv_put(msg, RSL_IE_ERIC_PACKET_PAG_IND, 0);
+
msg->dst = bts->c0->rsl_link;
 
return abis_rsl_sendmsg(msg);
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 54978e5..253326f 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -419,7 +419,7 @@
 int gsm0808_page(struct gsm_bts *bts, unsigned int page_group, unsigned int 
mi_len,
 uint8_t *mi, int chan_type)
 {
-   return rsl_paging_cmd(bts, page_group, mi_len, mi, chan_type);
+   return rsl_paging_cmd(bts, page_group, mi_len, mi, chan_type, false);
 }
 
 static void handle_ass_compl(struct gsm_subscriber_connection *conn,

-- 
To view, visit https://gerrit.osmocom.org/2039
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I66541f9b20e7fd67fbec329283fc3c821c970a56
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bts[master]: osmo-bts-trx/l1_if.c: use channel combination III for TCH/H

2017-03-23 Thread Ivan Kluchnikov

Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2160
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8fd4abb42c153fcd26bcfe22a2554b5c2d02d810
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[MERGED] openbsc[master]: libbsc: add rsl_ericsson_imm_assign_cmd() which reply with a...

2017-03-23 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: libbsc: add rsl_ericsson_imm_assign_cmd() which reply with a 
confirmation message
..


libbsc: add rsl_ericsson_imm_assign_cmd() which reply with a confirmation 
message

ericsson can handle a reference at the end of a imm assign command which is 
used in
the confirm response. The confirm response is only sent if the trailer is 
present.

Change-Id: I88560291b5a3a3d7a0bac4d3c089b45f1f6b297f
---
M openbsc/include/openbsc/abis_rsl.h
M openbsc/src/libbsc/abis_rsl.c
2 files changed, 27 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/include/openbsc/abis_rsl.h 
b/openbsc/include/openbsc/abis_rsl.h
index 692b464..e61d4ea 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -57,6 +57,9 @@
 int rsl_establish_request(struct gsm_lchan *lchan, uint8_t link_id);
 int rsl_relase_request(struct gsm_lchan *lchan, uint8_t link_id);
 
+/* Ericcson vendor specific RSL extensions */
+int rsl_ericsson_imm_assign_cmd(struct gsm_bts *bts, uint32_t tlli, uint8_t 
len, uint8_t *val);
+
 /* Siemens vendor-specific RSL extensions */
 int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci);
 
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 91cbd46..5ae707c 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1048,7 +1048,7 @@
 }
 
 /* Chapter 8.5.6 */
-int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val)
+struct msgb *rsl_imm_assign_cmd_common(struct gsm_bts *bts, uint8_t len, 
uint8_t *val)
 {
struct msgb *msg = rsl_msgb_alloc();
struct abis_rsl_dchan_hdr *dh;
@@ -1071,6 +1071,29 @@
}
 
msg->dst = bts->c0->rsl_link;
+   return msg;
+}
+
+/* Chapter 8.5.6 */
+int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val)
+{
+   struct msgb *msg = rsl_imm_assign_cmd_common(bts, len, val);
+   if (!msg)
+   return 1;
+   return abis_rsl_sendmsg(msg);
+}
+
+/* Chapter 8.5.6 */
+int rsl_ericsson_imm_assign_cmd(struct gsm_bts *bts, uint32_t tlli, uint8_t 
len, uint8_t *val)
+{
+   struct msgb *msg = rsl_imm_assign_cmd_common(bts, len, val);
+   if (!msg)
+   return 1;
+
+   /* ericsson can handle a reference at the end of the message which is 
used in
+* the confirm message. The confirm message is only sent if the trailer 
is present */
+   msgb_put_u8(msg, RSL_IE_ERIC_MOBILE_ID);
+   msgb_put_u32(msg, tlli);
 
return abis_rsl_sendmsg(msg);
 }

-- 
To view, visit https://gerrit.osmocom.org/2040
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I88560291b5a3a3d7a0bac4d3c089b45f1f6b297f
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


openbsc[master]: Add simple CTRL2SOAP proxy

2017-03-23 Thread Harald Welte

Patch Set 9: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/1875
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I82844ec7a302bac30d6daee9ebca2188fd48ca46
Gerrit-PatchSet: 9
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


libosmocore[master]: tests/conv: move conv.h to the global include dir

2017-03-23 Thread Vadim Yanitskiy

Patch Set 2:

> actualyl, no. Files in "include/osmocom/" should only be files that
 > are installed into the system.  "tests.h" sounds like something
 > only needed during unit tests, and it does not belong into a
 > directory containing system-wide installed header files? Am I
 > missing something?

Ok, you are right. Let me some time to find another way.

-- 
To view, visit https://gerrit.osmocom.org/2075
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I414223f3d9382642fc4f7efb3b35dc950eaaad86
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: tnt 
Gerrit-HasComments: No


[MERGED] osmo-pcap[master]: debian: Add -dbg packages for the osmo-pcap-client and osmo-...

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: debian: Add -dbg packages for the osmo-pcap-client and 
osmo-pcap-server
..


debian: Add -dbg packages for the osmo-pcap-client and osmo-pcap-server

Currently looking at a weird issue. Make it possible to install the
-dbg packages.

Change-Id: I7d6c8e491be459151c1531b86f28bb1dc2ee8bb4
---
M debian/changelog
M debian/control
M debian/rules
3 files changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index 6e4df55..13bce30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 osmo-pcap (0.0.11) UNRELEASED; urgency=medium
 
   * Add "source ip A.B.C.D" option to use specific address.
+  * Add osmo-pcap-client-dbg/osmo-pcap-server-dbg package
 
  -- Holger Hans Peter Freyther   Tue, 17 Jan 2017 
09:12:52 +0100
 
diff --git a/debian/control b/debian/control
index 3364e34..2677bc0 100644
--- a/debian/control
+++ b/debian/control
@@ -17,3 +17,13 @@
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Collect traces from other systems.
+
+Package: osmo-pcap-client-dbg
+Architecture: any
+Depends: osmo-pcap-client (= ${binary:Version})
+Description: Debug symbols of osmo-pcap-client-dbg
+
+Package: osmo-pcap-server-dbg
+Architecture: any
+Depends: osmo-pcap-server (= ${binary:Version})
+Description: Debug symbols of osmo-pcap-server-dbg
diff --git a/debian/rules b/debian/rules
index 78ddc43..872097c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,3 +39,7 @@
 
install -d -m 0755 $(CURDIR)/debian/osmo-pcap-server/etc/cron.daily/
install -m 0755 $(CURDIR)/contrib/osmo_pcap_clean_old 
$(CURDIR)/debian/osmo-pcap-server/etc/cron.daily/
+
+override_dh_strip:
+   dh_strip -posmo-pcap-client --dbg-package=osmo-pcap-client-dbg
+   dh_strip -posmo-pcap-server --dbg-package=osmo-pcap-server-dbg

-- 
To view, visit https://gerrit.osmocom.org/2000
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d6c8e491be459151c1531b86f28bb1dc2ee8bb4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


osmo-pcap[master]: debian: Add -dbg packages for the osmo-pcap-client and osmo-...

2017-03-23 Thread Holger Freyther

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2000
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d6c8e491be459151c1531b86f28bb1dc2ee8bb4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


osmo-sip-connector[master]: mncc: Enable in-band signalling for early media

2017-03-23 Thread Holger Freyther

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2029
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I80b1e1f4ca045bd63536476702a5812f27d9b36d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-sip-connector[master]: mncc: Enable in-band signalling for early media

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: mncc: Enable in-band signalling for early media
..


mncc: Enable in-band signalling for early media

Besides sending the alerting request we should inform the
MS that there is in-band information now. We do not seem
to export these flags in protocol/gsm_04_08.h so hardcode
them for now (until I come up with good names for them).

Related: OS#1784

Change-Id: I80b1e1f4ca045bd63536476702a5812f27d9b36d
---
M src/mncc.c
1 file changed, 9 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/src/mncc.c b/src/mncc.c
index 843c7e7..5e2a3a1 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -194,12 +194,20 @@
 
 static void mncc_call_leg_ring(struct call_leg *_leg)
 {
+   struct gsm_mncc out_mncc = { 0, };
struct mncc_call_leg *leg;
 
OSMO_ASSERT(_leg->type == CALL_TYPE_MNCC);
leg = (struct mncc_call_leg *) _leg;
 
-   mncc_send(leg->conn, MNCC_ALERT_REQ, leg->callref);
+   mncc_fill_header(_mncc, MNCC_ALERT_REQ, leg->callref);
+   /* GSM 04.08 10.5.4.21 */
+   out_mncc.fields |= MNCC_F_PROGRESS;
+   out_mncc.progress.coding = 3; /* Standard defined for the GSMßPLMNS */
+   out_mncc.progress.location = 1; /* Private network serving the local 
user */
+   out_mncc.progress.descr = 8; /* In-band information or appropriate 
pattern now available */
+
+   mncc_write(leg->conn, _mncc, leg->callref);
 }
 
 static void mncc_call_leg_release(struct call_leg *_leg)

-- 
To view, visit https://gerrit.osmocom.org/2029
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I80b1e1f4ca045bd63536476702a5812f27d9b36d
Gerrit-PatchSet: 3
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-sip-connector[master]: sip: Actually honor the remote port of the pbx

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: sip: Actually honor the remote port of the pbx
..


sip: Actually honor the remote port of the pbx

So far the remote_port has never been used. sofia-sip did the right
thing and put the port into the "Contact" and the rport option for
the via. But we would have never been able to connect a PBX on a
different port (as sofia-sip seems to parse the destination from the
to address).

Change-Id: Ifbd49b4aa6b01b118fe67e39dddef50b2946159c
---
M src/sip.c
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/src/sip.c b/src/sip.c
index afff393..348f478 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -293,12 +293,14 @@
 {
struct call_leg *other = leg->base.call->initial;
 
-   char *from = talloc_asprintf(leg, "sip:%s@%s",
+   char *from = talloc_asprintf(leg, "sip:%s@%s:%d",
calling_num,
-   agent->app->sip.local_addr);
-   char *to = talloc_asprintf(leg, "sip:%s@%s",
+   agent->app->sip.local_addr,
+   agent->app->sip.local_port);
+   char *to = talloc_asprintf(leg, "sip:%s@%s:%d",
called_num,
-   agent->app->sip.remote_addr);
+   agent->app->sip.remote_addr,
+   agent->app->sip.remote_port);
char *sdp = sdp_create_file(leg, other);
 
leg->state = SIP_CC_INITIAL;

-- 
To view, visit https://gerrit.osmocom.org/1990
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbd49b4aa6b01b118fe67e39dddef50b2946159c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder


libosmocore[master]: select: Find the highest fd when filling the fd_sets

2017-03-23 Thread Max

Patch Set 3: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/1986
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1a6d7271273ec08bb511c21b936891bc508843e4
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


osmo-sip-connector[master]: testpbx: Enable GSM and AMR as codecs to actually be relevant

2017-03-23 Thread Holger Freyther

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/1992
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8719c392f57e0dbed0c0c792d1381592dcd662c1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-pcap[master]: debian: Make a new release with the new feature

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: debian: Make a new release with the new feature
..


debian: Make a new release with the new feature

Change-Id: Ibe86b761b494e0fb78bbbc78e3c1982e44185750
---
M debian/changelog
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index fd4259c..6e4df55 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+osmo-pcap (0.0.11) UNRELEASED; urgency=medium
+
+  * Add "source ip A.B.C.D" option to use specific address.
+
+ -- Holger Hans Peter Freyther   Tue, 17 Jan 2017 
09:12:52 +0100
+
 osmo-pcap (0.0.10) unstable; urgency=medium
 
   * New release with new features

-- 
To view, visit https://gerrit.osmocom.org/1999
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe86b761b494e0fb78bbbc78e3c1982e44185750
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[MERGED] osmo-sip-connector[master]: testpbx: Enable GSM and AMR as codecs to actually be relevant

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: testpbx: Enable GSM and AMR as codecs to actually be relevant
..


testpbx: Enable GSM and AMR as codecs to actually be relevant

Without these codecs we will not have much joy when working with a
default GSM BTS/BSC.

Change-Id: I8719c392f57e0dbed0c0c792d1381592dcd662c1
---
M contrib/testpbx/configs/vars.xml
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/contrib/testpbx/configs/vars.xml b/contrib/testpbx/configs/vars.xml
index 1cb826d..5ef16c9 100644
--- a/contrib/testpbx/configs/vars.xml
+++ b/contrib/testpbx/configs/vars.xml
@@ -255,8 +255,8 @@
127 - BV32
 
   -->
-  
-  
+  
+  
 
   

osmo-sip-connector[master]: testpbx: Add another number that will just play a ringback

2017-03-23 Thread Holger Freyther

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2028
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4c778b1f0e7484a755716133f91767af8b1102c0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-sip-connector[master]: dtmf: Forward DTMF from MNCC to SIP

2017-03-23 Thread Holger Freyther

Patch Set 4: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/1874
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icf770fae89f7aedf6eba9a119db9b8acc7f938df
Gerrit-PatchSet: 4
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-sip-connector[master]: dtmf: Forward DTMF from MNCC to SIP

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: dtmf: Forward DTMF from MNCC to SIP
..


dtmf: Forward DTMF from MNCC to SIP

We are not using the RTP telephony-event here but the older dtmf
relay. We also only have a fixed DTMF duration for now.

Change-Id: Icf770fae89f7aedf6eba9a119db9b8acc7f938df
---
M src/call.h
M src/mncc.c
M src/sip.c
3 files changed, 29 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/src/call.h b/src/call.h
index 7cb4932..5a11f6c 100644
--- a/src/call.h
+++ b/src/call.h
@@ -67,6 +67,11 @@
 * by the application to release the call.
 */
void (*release_call)(struct call_leg *);
+
+   /**
+* A DTMF key was entered. Forward it.
+*/
+   void (*dtmf)(struct call_leg *, int keypad);
 };
 
 enum sip_cc_state {
diff --git a/src/mncc.c b/src/mncc.c
index e96eed8..843c7e7 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -632,6 +632,7 @@
struct gsm_mncc out_mncc = { 0, };
struct gsm_mncc *data;
struct mncc_call_leg *leg;
+   struct call_leg *other_leg;
 
leg = find_leg(conn, buf, rc, );
if (!leg)
@@ -639,6 +640,10 @@
 
LOGP(DMNCC, LOGL_DEBUG, "leg(%u) DTMF key=%c\n", leg->callref, 
data->keypad);
 
+   other_leg = call_leg_other(>base);
+   if (other_leg && other_leg->dtmf)
+   other_leg->dtmf(other_leg, data->keypad);
+
mncc_fill_header(_mncc, MNCC_START_DTMF_RSP, leg->callref);
out_mncc.fields |= MNCC_F_KEYPAD;
out_mncc.keypad = data->keypad;
diff --git a/src/sip.c b/src/sip.c
index 348f478..0a642b7 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -37,6 +37,7 @@
 static void sip_release_call(struct call_leg *_leg);
 static void sip_ring_call(struct call_leg *_leg);
 static void sip_connect_call(struct call_leg *_leg);
+static void sip_dtmf_call(struct call_leg *_leg, int keypad);
 
 static void call_progress(struct sip_call_leg *leg, const sip_t *sip)
 {
@@ -131,6 +132,7 @@
leg->base.release_call = sip_release_call;
leg->base.ring_call = sip_ring_call;
leg->base.connect_call = sip_connect_call;
+   leg->base.dtmf = sip_dtmf_call;
leg->agent = agent;
leg->nua_handle = nh;
nua_handle_bind(nh, leg);
@@ -288,6 +290,22 @@
talloc_free(sdp);
 }
 
+static void sip_dtmf_call(struct call_leg *_leg, int keypad)
+{
+   struct sip_call_leg *leg;
+   char *buf;
+
+   OSMO_ASSERT(_leg->type == CALL_TYPE_SIP);
+   leg = (struct sip_call_leg *) _leg;
+
+   buf = talloc_asprintf(leg, "Signal=%c\nDuration=160\n", keypad);
+   nua_info(leg->nua_handle,
+   NUTAG_MEDIA_ENABLE(0),
+   SIPTAG_CONTENT_TYPE_STR("application/dtmf-relay"),
+   SIPTAG_PAYLOAD_STR(buf), TAG_END());
+   talloc_free(buf);
+}
+
 static int send_invite(struct sip_agent *agent, struct sip_call_leg *leg,
const char *calling_num, const char *called_num)
 {
@@ -334,6 +352,7 @@
leg->base.type = CALL_TYPE_SIP;
leg->base.call = call;
leg->base.release_call = sip_release_call;
+   leg->base.dtmf = sip_dtmf_call;
leg->agent = agent;
 
leg->nua_handle = nua_handle(agent->nua, leg, TAG_END());

-- 
To view, visit https://gerrit.osmocom.org/1874
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf770fae89f7aedf6eba9a119db9b8acc7f938df
Gerrit-PatchSet: 6
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder


osmo-trx[master]: buildenv: Split up SSE3 and SSE4.1 code

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+1

> could you
 > take a brief look and decide which way to go with the 'attribute'
 > style -- are they no longer needed now, or should we rewrite this
 > patch to use those instead?

this is exactly what has happened. The implementation first used those 
attributes and now switched to separate files. Guess you have missed the 
history here.  Both dexter and I agree that the separate files makes us more 
comfortable in being certain any version of the compiler will never use the 
wrong optimziation in the wrong function.

-- 
To view, visit https://gerrit.osmocom.org/2134
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I846e190e92f1258cd412d1b2d79b539e204e04b3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


libosmocore[master]: Add support for PCU version report

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2083
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If57459c0610f2c7b36d599b13087c8deef8bdd9e
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-sip-connector[master]: dtmf: Start handling the DTMF MNCC messages and respond

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: dtmf: Start handling the DTMF MNCC messages and respond
..


dtmf: Start handling the DTMF MNCC messages and respond

Simply respond to the dtmf start/stop with a response
and move on.

Change-Id: Iffc92ea2112c9943ce89c244a9b323125c352ae5
---
M src/mncc.c
1 file changed, 59 insertions(+), 7 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/mncc.c b/src/mncc.c
index 7926f5e..e96eed8 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -102,23 +102,33 @@
return NULL;
 }
 
-static void mncc_send(struct mncc_connection *conn, uint32_t msg_type, 
uint32_t callref)
+static void mncc_fill_header(struct gsm_mncc *mncc, uint32_t msg_type, 
uint32_t callref)
+{
+   mncc->msg_type = msg_type;
+   mncc->callref = callref;
+}
+
+static void mncc_write(struct mncc_connection *conn, struct gsm_mncc *mncc, 
uint32_t callref)
 {
int rc;
-   struct gsm_mncc mncc = { 0, };
-
-   mncc.msg_type = msg_type;
-   mncc.callref = callref;
 
/*
 * TODO: we need to put cause in here for release or such? shall we 
return a
 * static struct?
 */
-   rc = write(conn->fd.fd, , sizeof(mncc));
-   if (rc != sizeof(mncc)) {
+   rc = write(conn->fd.fd, mncc, sizeof(*mncc));
+   if (rc != sizeof(*mncc)) {
LOGP(DMNCC, LOGL_ERROR, "Failed to send message call(%u)\n", 
callref);
close_connection(conn);
}
+}
+
+static void mncc_send(struct mncc_connection *conn, uint32_t msg_type, 
uint32_t callref)
+{
+   struct gsm_mncc mncc = { 0, };
+
+   mncc_fill_header(, msg_type, callref);
+   mncc_write(conn, , callref);
 }
 
 static void mncc_rtp_send(struct mncc_connection *conn, uint32_t msg_type, 
uint32_t callref)
@@ -617,6 +627,42 @@
other_leg->connect_call(other_leg);
 }
 
+static void check_dtmf_start(struct mncc_connection *conn, char *buf, int rc)
+{
+   struct gsm_mncc out_mncc = { 0, };
+   struct gsm_mncc *data;
+   struct mncc_call_leg *leg;
+
+   leg = find_leg(conn, buf, rc, );
+   if (!leg)
+   return;
+
+   LOGP(DMNCC, LOGL_DEBUG, "leg(%u) DTMF key=%c\n", leg->callref, 
data->keypad);
+
+   mncc_fill_header(_mncc, MNCC_START_DTMF_RSP, leg->callref);
+   out_mncc.fields |= MNCC_F_KEYPAD;
+   out_mncc.keypad = data->keypad;
+   mncc_write(conn, _mncc, leg->callref);
+}
+
+static void check_dtmf_stop(struct mncc_connection *conn, char *buf, int rc)
+{
+   struct gsm_mncc out_mncc = { 0, };
+   struct gsm_mncc *data;
+   struct mncc_call_leg *leg;
+
+   leg = find_leg(conn, buf, rc, );
+   if (!leg)
+   return;
+
+   LOGP(DMNCC, LOGL_DEBUG, "leg(%u) DTMF key=%c\n", leg->callref, 
data->keypad);
+
+   mncc_fill_header(_mncc, MNCC_STOP_DTMF_RSP, leg->callref);
+   out_mncc.fields |= MNCC_F_KEYPAD;
+   out_mncc.keypad = data->keypad;
+   mncc_write(conn, _mncc, leg->callref);
+}
+
 static void check_hello(struct mncc_connection *conn, char *buf, int rc)
 {
struct gsm_mncc_hello *hello;
@@ -778,6 +824,12 @@
case MNCC_HOLD_IND:
check_hold_ind(conn, buf, rc);
break;
+   case MNCC_START_DTMF_IND:
+   check_dtmf_start(conn, buf, rc);
+   break;
+   case MNCC_STOP_DTMF_IND:
+   check_dtmf_stop(conn, buf, rc);
+   break;
default:
LOGP(DMNCC, LOGL_ERROR, "Unhandled message type %d/0x%x\n",
msg_type, msg_type);

-- 
To view, visit https://gerrit.osmocom.org/1873
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffc92ea2112c9943ce89c244a9b323125c352ae5
Gerrit-PatchSet: 5
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder


osmo-sip-connector[master]: sip: Actually honor the remote port of the pbx

2017-03-23 Thread Holger Freyther

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/1990
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbd49b4aa6b01b118fe67e39dddef50b2946159c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-sip-connector[master]: testpbx: Add another number that will just play a ringback

2017-03-23 Thread Holger Freyther
Holger Freyther has submitted this change and it was merged.

Change subject: testpbx: Add another number that will just play a ringback
..


testpbx: Add another number that will just play a ringback

This will enable early media to play a ringback to the phone.

Change-Id: I4c778b1f0e7484a755716133f91767af8b1102c0
---
M contrib/testpbx/configs/public.xml
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/contrib/testpbx/configs/public.xml 
b/contrib/testpbx/configs/public.xml
index d9b1d17..e5d2bcc 100644
--- a/contrib/testpbx/configs/public.xml
+++ b/contrib/testpbx/configs/public.xml
@@ -59,6 +59,16 @@
 
 
 -->
+
+  
+
+
+
+
+
+
+  
+
 
   


-- 
To view, visit https://gerrit.osmocom.org/2028
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c778b1f0e7484a755716133f91767af8b1102c0
Gerrit-PatchSet: 2
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder


osmo-bts[master]: osmo-bts-trx/l1_if.c: use channel combination III for TCH/H

2017-03-23 Thread Max

Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2160
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8fd4abb42c153fcd26bcfe22a2554b5c2d02d810
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-trx[master]: buildenv: Split up SSE3 and SSE4.1 code

2017-03-23 Thread Harald Welte

Patch Set 1:

> AX_EXT is macro from autoconf-archive package - I think it's avery
 > bad idea to supply our own modified copy: this means we'll have to
 > track all upstream fixes manually. I think we should either move
 > this code directly to configure.ac or add our own macro wrapping
 > ax_ext. If neither possible we should at the very least explicitly
 > mention from which version of autoconf-archive this was
 > copy-pasted.

I guess simply rename it or merge into configure.ac is fine.  I don't thin we 
need or want to track any upstream changes, as what we are doing now is quite 
different from upstream.

-- 
To view, visit https://gerrit.osmocom.org/2134
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I846e190e92f1258cd412d1b2d79b539e204e04b3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


openbsc[master]: libbsc: add rsl_ericsson_imm_assign_cmd() which reply with a...

2017-03-23 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2040
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I88560291b5a3a3d7a0bac4d3c089b45f1f6b297f
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-trx[master]: vector: Introduce shrink() function to shrink vector size wi...

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2157
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9c0ac2715aea1a90c9e6ebcd982522b80a547099
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-bts[master]: Handle TXT indication from OsmoPCU

2017-03-23 Thread Harald Welte

Patch Set 1:

I think rather than the printing of the version via the log, it should also be 
stored soemwhere in the 'gsm_bts_trx' associated with the PCU for this TRX, so 
the user can show it in 'show trx'.

The same should be done with OsmoBTS version. At any time, the sysadmin should 
be able to see the versions and capabilities of the BTS+PCU attached to the BSC.

-- 
To view, visit https://gerrit.osmocom.org/2087
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I16e73198501487a5b1076bf83390b85538d5af73
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-trx[master]: sigProcLib: constify signalVector arguments for detectBurst(...

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2153
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic033371a387353eb12b1827a0eb16c00c07da88a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: vector: Introduce segmentMove() method to move data inside o...

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2156
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2f3f4267b4137a0bc031f27e0f896fba9b9f3433
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: signalVector: Implement segment().

2017-03-23 Thread Harald Welte

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/2155
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6fe3aae53fb2fa5bb7637e976de6059eabe08202
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: signalVector: Implement segment().

2017-03-23 Thread Tom Tsou

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2155
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6fe3aae53fb2fa5bb7637e976de6059eabe08202
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: sigProcLib: rename signalError type to SignalError.

2017-03-23 Thread Tom Tsou

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2147
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1a5ae6e87d4c69945053fdefec185d0fb1a26399
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: vector: Introduce segmentMove() method to move data inside o...

2017-03-23 Thread Tom Tsou

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/2156/1/CommonLibs/Vector.h
File CommonLibs/Vector.h:

PS1, Line 231: const
This method modifies protected member data block and I do not believe should 
declared const.

Yes, the class compiles and is strictly valid because the data, start, and end 
member pointers are not modified. But, it's hard to say that the Vector object 
is unchanged after segmentMove() is called, which is what const implies.


-- 
To view, visit https://gerrit.osmocom.org/2156
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2f3f4267b4137a0bc031f27e0f896fba9b9f3433
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: Yes


osmo-trx[master]: sigProcLib: Constify demodulation functions burst argument.

2017-03-23 Thread Tom Tsou

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2154
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic45f71b634e48808356d68925bb9f5783e0bf0d3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


osmo-trx[master]: sigProcLib: constify signalVector arguments for detectBurst(...

2017-03-23 Thread Tom Tsou

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2153
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic033371a387353eb12b1827a0eb16c00c07da88a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 
Gerrit-HasComments: No


[PATCH] osmo-bts[master]: vty: reduce code duplication

2017-03-23 Thread Max

Review at  https://gerrit.osmocom.org/2162

vty: reduce code duplication

Use libosmocore's osmo_str2lower() instead of local equivalent.

Change-Id: I7faced2eaf0f6f87f06081235eea9d4c3ba71a7e
---
M src/common/vty.c
1 file changed, 6 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/2162/1

diff --git a/src/common/vty.c b/src/common/vty.c
index 646ac87..3f736c9 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -35,7 +35,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 
 
@@ -234,37 +234,11 @@
return CMD_SUCCESS;
 }
 
-/* FIXME: move to libosmocore ? */
-static char buf_casecnvt[256];
-char *osmo_str_tolower(const char *in)
-{
-   int len, i;
-
-   if (!in)
-   return NULL;
-
-   len = strlen(in);
-   if (len > sizeof(buf_casecnvt))
-   len = sizeof(buf_casecnvt);
-
-   for (i = 0; i < len; i++) {
-   buf_casecnvt[i] = tolower(in[i]);
-   if (in[i] == '\0')
-   break;
-   }
-   if (i < sizeof(buf_casecnvt))
-   buf_casecnvt[i] = '\0';
-
-   /* just to make sure we're always zero-terminated */
-   buf_casecnvt[sizeof(buf_casecnvt)-1] = '\0';
-
-   return buf_casecnvt;
-}
-
 static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
 {
struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
struct gsm_bts_trx *trx;
+   char buf_casecnvt[256];
int i;
 
vty_out(vty, "bts %u%s", bts->nr, VTY_NEWLINE);
@@ -294,13 +268,13 @@
 
for (i = 0; i < 32; i++) {
if (gsmtap_sapi_mask & (1 << i)) {
-   const char *name = get_value_string(gsmtap_sapi_names, 
i);
-   vty_out(vty, " gsmtap-sapi %s%s", 
osmo_str_tolower(name), VTY_NEWLINE);
+   osmo_str2lower(buf_casecnvt, 
get_value_string(gsmtap_sapi_names, i));
+   vty_out(vty, " gsmtap-sapi %s%s", buf_casecnvt, 
VTY_NEWLINE);
}
}
if (gsmtap_sapi_acch) {
-   const char *name = get_value_string(gsmtap_sapi_names, 
GSMTAP_CHANNEL_ACCH);
-   vty_out(vty, " gsmtap-sapi %s%s", osmo_str_tolower(name), 
VTY_NEWLINE);
+   osmo_str2lower(buf_casecnvt, 
get_value_string(gsmtap_sapi_names, GSMTAP_CHANNEL_ACCH));
+   vty_out(vty, " gsmtap-sapi %s%s", buf_casecnvt, VTY_NEWLINE);
}
vty_out(vty, " min-qual-rach %.0f%s", btsb->min_qual_rach * 10.0f,
VTY_NEWLINE);

-- 
To view, visit https://gerrit.osmocom.org/2162
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7faced2eaf0f6f87f06081235eea9d4c3ba71a7e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 


openbsc[master]: gsm_bts: add version details

2017-03-23 Thread Neels Hofmeyr

Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.osmocom.org/#/c/2161/1//COMMIT_MSG
Commit Message:

Line 7: gsm_bts: add version details
'and variant'


Line 12:   hw vendor of OsmoBTS
could you explain to the uninformed reader why this is useful and who will use 
it? thx!


https://gerrit.osmocom.org/#/c/2161/1/openbsc/include/openbsc/gsm_data_shared.h
File openbsc/include/openbsc/gsm_data_shared.h:

Line 502:   BTS_UNKNOWN,
It looks to me like this is semantically the same as enum gsm_bts_type just 
above?

Rather not have a mix of BTS_ / OSMO_BTS_ prefixes.
The OSMO_ prefix is reserved basically for libosmocore (we agreed on it a few 
months back).


-- 
To view, visit https://gerrit.osmocom.org/2161
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6710d53115f34634a7b70969cc05fd5c72ff8ab2
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] osmo-trx[master]: buildenv: Split up SSE3 and SSE4.1 code

2017-03-23 Thread dexter
Hello Max, Neels Hofmeyr, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/2134

to look at the new patch set (#3).

buildenv: Split up SSE3 and SSE4.1 code

Currently we find SSE3 and SSE4.1 code mixed togehter along with
generic code in one file. This introduces the risk that the
compiler exidantly mixes SSE4.1 instructions into an SSE3, or
even worse into a generic code path.

This commit splits the SSE3 and SSE4.1 code into separate files
and compiles them with the matching target options.

Change-Id: I846e190e92f1258cd412d1b2d79b539e204e04b3
---
M Transceiver52M/x86/Makefile.am
M Transceiver52M/x86/convert.c
A Transceiver52M/x86/convert_sse_3.c
A Transceiver52M/x86/convert_sse_3.h
A Transceiver52M/x86/convert_sse_4_1.c
A Transceiver52M/x86/convert_sse_4_1.h
M Transceiver52M/x86/convolve.c
A Transceiver52M/x86/convolve_sse_3.c
A Transceiver52M/x86/convolve_sse_3.h
R config/ax_sse.m4
M configure.ac
M utils/convolvetest/Makefile
12 files changed, 893 insertions(+), 661 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/34/2134/3

diff --git a/Transceiver52M/x86/Makefile.am b/Transceiver52M/x86/Makefile.am
index 7a0b75f..70b7064 100644
--- a/Transceiver52M/x86/Makefile.am
+++ b/Transceiver52M/x86/Makefile.am
@@ -1,7 +1,28 @@
 if !ARCH_ARM
-AM_CFLAGS = -Wall -std=gnu99 $(SIMD_FLAGS) -I${srcdir}/../common
+AM_CFLAGS = -Wall -std=gnu99 -I${srcdir}/../common
 
 noinst_LTLIBRARIES = libarch.la
+noinst_LTLIBRARIES += libarch_sse_3.la
+noinst_LTLIBRARIES += libarch_sse_4_1.la
+
+libarch_la_LIBADD =
+
+# SSE 3 specific code
+if HAVE_SSE3
+libarch_sse_3_la_SOURCES = \
+   convert_sse_3.c \
+   convolve_sse_3.c
+libarch_sse_3_la_CFLAGS = -msse3
+libarch_la_LIBADD += libarch_sse_3.la
+endif
+
+# SSE 4.1 specific code
+if HAVE_SSE4_1
+libarch_sse_4_1_la_SOURCES = \
+   convert_sse_4_1.c
+libarch_sse_4_1_la_CFLAGS = -msse4.1
+libarch_la_LIBADD += libarch_sse_4_1.la
+endif
 
 libarch_la_SOURCES = \
../common/convolve_base.c \
diff --git a/Transceiver52M/x86/convert.c b/Transceiver52M/x86/convert.c
index 3f76b65..db98050 100644
--- a/Transceiver52M/x86/convert.c
+++ b/Transceiver52M/x86/convert.c
@@ -20,6 +20,8 @@
 #include 
 #include 
 #include "convert.h"
+#include "convert_sse_3.h"
+#include "convert_sse_4_1.h"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -35,140 +37,6 @@
 };
 
 static struct convert_cpu_context c;
-
-#ifdef HAVE_SSE3
-#include 
-#include 
-
-#ifdef HAVE_SSE4_1
-#include 
-
-/* 16*N 16-bit signed integer converted to single precision floats */
-static void _sse_convert_si16_ps_16n(float *restrict out,
-const short *restrict in,
-int len)
-{
-   __m128i m0, m1, m2, m3, m4, m5;
-   __m128 m6, m7, m8, m9;
-
-   for (int i = 0; i < len / 16; i++) {
-   /* Load (unaligned) packed floats */
-   m0 = _mm_loadu_si128((__m128i *) [16 * i + 0]);
-   m1 = _mm_loadu_si128((__m128i *) [16 * i + 8]);
-
-   /* Unpack */
-   m2 = _mm_cvtepi16_epi32(m0);
-   m4 = _mm_cvtepi16_epi32(m1);
-   m0 = _mm_shuffle_epi32(m0, _MM_SHUFFLE(1, 0, 3, 2));
-   m1 = _mm_shuffle_epi32(m1, _MM_SHUFFLE(1, 0, 3, 2));
-   m3 = _mm_cvtepi16_epi32(m0);
-   m5 = _mm_cvtepi16_epi32(m1);
-
-   /* Convert */
-   m6 = _mm_cvtepi32_ps(m2);
-   m7 = _mm_cvtepi32_ps(m3);
-   m8 = _mm_cvtepi32_ps(m4);
-   m9 = _mm_cvtepi32_ps(m5);
-
-   /* Store */
-   _mm_storeu_ps([16 * i + 0], m6);
-   _mm_storeu_ps([16 * i + 4], m7);
-   _mm_storeu_ps([16 * i + 8], m8);
-   _mm_storeu_ps([16 * i + 12], m9);
-   }
-}
-
-/* 16*N 16-bit signed integer conversion with remainder */
-static void _sse_convert_si16_ps(float *restrict out,
-const short *restrict in,
-int len)
-{
-   int start = len / 16 * 16;
-
-   _sse_convert_si16_ps_16n(out, in, len);
-
-   for (int i = 0; i < len % 16; i++)
-   out[start + i] = in[start + i];
-}
-#endif /* HAVE_SSE4_1 */
-
-/* 8*N single precision floats scaled and converted to 16-bit signed integer */
-static void _sse_convert_scale_ps_si16_8n(short *restrict out,
- const float *restrict in,
- float scale, int len)
-{
-   __m128 m0, m1, m2;
-   __m128i m4, m5;
-
-   for (int i = 0; i < len / 8; i++) {
-   /* Load (unaligned) packed floats */
-   m0 = _mm_loadu_ps([8 * i + 0]);
-   m1 = _mm_loadu_ps([8 * i + 4]);
-   m2 = _mm_load1_ps();
-
-   /* Scale */
-   m0 = _mm_mul_ps(m0, m2);
-   m1 = _mm_mul_ps(m1, m2);
-
-   /* 

[PATCH] osmo-trx[master]: buildenv: Turn off native architecture builds

2017-03-23 Thread dexter
Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/2098

to look at the new patch set (#3).

buildenv: Turn off native architecture builds

The compiler option -march=native instructs the compiler to auto-optimize
the code for the current build architecture. This is fine for building
and using locally, but contraproductive when generating binary packages.

This commit replaces -march=native with $(SIMD_FLAGS), which contains a
collection of supported SIMD options, so we won't loose the SSE support.

Change-Id: I3df4b8db9692016115edbe2247beeec090715687
---
M Transceiver52M/x86/Makefile.am
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/98/2098/3

diff --git a/Transceiver52M/x86/Makefile.am b/Transceiver52M/x86/Makefile.am
index eda1a17..699faad 100644
--- a/Transceiver52M/x86/Makefile.am
+++ b/Transceiver52M/x86/Makefile.am
@@ -1,5 +1,5 @@
 if !ARCH_ARM
-AM_CFLAGS = -Wall -std=gnu99 -march=native -I${srcdir}/../common
+AM_CFLAGS = -Wall -std=gnu99 $(SIMD_FLAGS) -I${srcdir}/../common
 
 noinst_LTLIBRARIES = libarch.la
 

-- 
To view, visit https://gerrit.osmocom.org/2098
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3df4b8db9692016115edbe2247beeec090715687
Gerrit-PatchSet: 3
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder