Change in osmo-ci[master]: docker: only one apt/pip cmd for installing deps
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/15761 ) Change subject: docker: only one apt/pip cmd for installing deps .. docker: only one apt/pip cmd for installing deps Make the retry logic in rebuild_osmocom_jenkins_image.sh obsolete by merging all apt commands for installing dependencies into one. This makes development easier, because the docker image will not get rebuilt again when any error happens (whether that error was related to the apt cache or not, during development it is mostly not related to the apt cache). This also makes it easier to read through the list of dependencies, and removes duplicate (or even conflicting, pkg-config vs pkgconf) entries. While at it, also merge the pip commands into one. Change-Id: I190e62dd39533b284c93107607dac24ece6d7be6 --- M docker/Dockerfile_osmocom_jenkins.amd64 M docker/rebuild_osmocom_jenkins_image.sh 2 files changed, 110 insertions(+), 55 deletions(-) Approvals: osmith: Looks good to me, approved; Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve diff --git a/docker/Dockerfile_osmocom_jenkins.amd64 b/docker/Dockerfile_osmocom_jenkins.amd64 index 6b43911..1ff2d0b 100644 --- a/docker/Dockerfile_osmocom_jenkins.amd64 +++ b/docker/Dockerfile_osmocom_jenkins.amd64 @@ -5,15 +5,115 @@ # https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact ARG DEBIAN_VERSION +# Install apt dependencies (keep in alphabetic order) RUN \ -dpkg --add-architecture i386 && \ -DEBIAN_FRONTEND=noninteractive apt-get update && \ -DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ -DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends wget make + dpkg --add-architecture i386 && \ + DEBIAN_FRONTEND=noninteractive apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + asciidoc \ + asciidoc-dblatex \ + autoconf \ + autoconf-archive \ + automake \ + bc \ + bison \ + bzip2 \ + coccinelle \ + cppcheck \ + dblatex \ + dbus \ + debhelper \ + devscripts \ + dh-autoreconf \ + dh-systemd \ + docbook5-xml \ + doxygen \ + flex \ + g++ \ + gawk \ + gcc \ + gcc-arm-none-eabi \ + git \ + git-buildpackage \ + graphviz \ + htop \ + lcov \ + libaio-dev \ + libasound2-dev \ + libboost-all-dev \ + libc-ares-dev \ + libcsv-dev \ + libdbd-sqlite3 \ + libdbi-dev \ + libffi-dev \ + libfftw3-dev \ + libgmp-dev \ + libgnutls28-dev \ + libgps-dev \ + libgsm1-dev \ + liblua5.3-dev \ + libmnl-dev \ + libncurses5-dev \ + libnewlib-arm-none-eabi \ + liboping-dev \ + libortp-dev \ + libpcap-dev \ + libpcsclite-dev \ + libreadline-dev \ + libsctp-dev \ + libsigsegv-dev \ + libsnmp-dev \ + libsofia-sip-ua-glib-dev \ + libsqlite3-dev \ + libssl-dev \ + libtalloc-dev \ + libtool \ + libusb-1.0-0-dev \ + libusb-dev \ + libxml2-utils \ + libzmq3-dev \ + locales \ + lua-socket \ + make \ + mscgen \ + ofono \ + openssh-client \ + osc \ + patchelf \ + pkg-config \ + python \ + python3 \ + python3-gi \ + python3-mako \ + python3-pip \ + python3-pyflakes \ + python3-setuptools \ + python3-usb \ + python3-yaml \ + python-minimal \ + python-nwdiag \ + python-pip \ + python-pychart \ + python-setuptools \ + rsync \ + sdcc \ + sqlite3 \ + stow \ + sudo \ + systemd \ + tcpdump \ + texinfo \ + unzip \ + wget \ + xsltproc -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gcc g++ make git -RUN
Change in osmo-ci[master]: gerrit, master builds: default to concurrent: true
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/15585 ) Change subject: gerrit, master builds: default to concurrent: true .. gerrit, master builds: default to concurrent: true Now that almost everything runs in docker, we don't need to worry about problems with running VTY/CTRL tests in parallel for these projects. Related: OS#3726 Change-Id: I5fdf759faf47ec7e4f9cb2657bd004585a667add --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 12 insertions(+), 24 deletions(-) Approvals: osmith: Looks good to me, approved; Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 83c7169..5f4385a 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -5,7 +5,7 @@ name: gerrit # following default values can be overridden by each repo disabled: false -concurrent: false +concurrent: true node: osmocom-gerrit-debian8 # axes related defaults slave_axis: !!python/tuple [osmocom-gerrit-debian9] @@ -46,10 +46,7 @@ # in alphabetical order repos: - asn1c - - - cellmgr-ng: - concurrent: true - + - cellmgr-ng - libasn1c - libgtpnl - libosmo-abis @@ -73,7 +70,6 @@ a2: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] a3_name: IU a3: !!python/tuple [--disable-iu] - concurrent: true cmd: | {docker_run} \ -e IU="$IU" \ @@ -84,10 +80,10 @@ - openggsn: a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] + concurrent: false cmd: ./contrib/jenkins.sh - - osmo-bsc: - concurrent: true + - osmo-bsc - osmo-bts: a1_name: FIRMWARE_VERSION @@ -107,6 +103,7 @@ (FIRMWARE_VERSION == "litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || (FIRMWARE_VERSION == "oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") || (FIRMWARE_VERSION == "oc2g-next" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") + concurrent: false cmd: 'ASCIIDOC_WARNINGS_CHECK="1" ./contrib/jenkins_bts_model.sh "$BTS_MODEL"' - osmo-ggsn: @@ -126,16 +123,13 @@ - osmo-gsm-manuals - osmo-hlr - osmo-iuh - - - osmo-mgw: - concurrent: true + - osmo-mgw - osmo-msc: a1_name: IU a1: !!python/tuple [--enable-iu, --disable-iu] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] - concurrent: true combination_filter: > (IU == "--enable-iu" && WITH_MANUALS == "0") || (IU == "--disable-iu" && WITH_MANUALS == "1") @@ -156,7 +150,6 @@ a3: !!python/tuple [sysmo, lc15, oc2g, none] a4_name: WITH_MANUALS a4: !!python/tuple ["1", "0"] - concurrent: true combination_filter: > (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") || (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") || @@ -181,7 +174,6 @@ a1: !!python/tuple [--enable-iu, --disable-iu] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] - concurrent: true combination_filter: > (IU == "--enable-iu" && WITH_MANUALS == "0") || (IU == "--disable-iu" && WITH_MANUALS == "1") @@ -200,7 +192,6 @@ a1: !!python/tuple [--with-sse] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] - concurrent: true combination_filter: > (INSTR == "--with-sse" && WITH_MANUALS == "1") cmd: 'ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' @@ -217,11 +208,13 @@ - pysim: slave_axis: !!python/tuple [simtester] + concurrent: false cmd: './contrib/jenkins.sh' - osmo-ttcn3-hacks: repos_url: 'https://gerrit.osmocom.org/{repos}' slave_axis: !!python/tuple [ttcn3] + concurrent: false cmd: | set -e make deps; make clean; make compile diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 138807e..beebf31 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -4,7 +4,7 @@ name: master_build # following default values can be overridden by each repo disabled: false -concurrent: false +concurrent: true node: 'osmocom-master-debian8' # axes related defaults slave_axis: !!python/tuple [osmocom-master-debian9] @@ -165,7 +165,6 @@ a2: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding] a3_name: IU a3: !!python/tuple [--disable-iu] -
Change in osmo-ci[master]: gerrit, master builds: default to concurrent: true
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/15585 ) Change subject: gerrit, master builds: default to concurrent: true .. Patch Set 8: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/15585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I5fdf759faf47ec7e4f9cb2657bd004585a667add Gerrit-Change-Number: 15585 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 08:45:09 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ci[master]: docker: only one apt/pip cmd for installing deps
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/15761 ) Change subject: docker: only one apt/pip cmd for installing deps .. Patch Set 3: Verified+1 Code-Review+2 1+1=2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/15761 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I190e62dd39533b284c93107607dac24ece6d7be6 Gerrit-Change-Number: 15761 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 08:46:01 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-netif[master]: stream: osmo_stream_srv_link: Support setting multiple addr
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/15782 ) Change subject: stream: osmo_stream_srv_link: Support setting multiple addr .. stream: osmo_stream_srv_link: Support setting multiple addr This API will be later used to set multiple addresses for SCTP sockets. Depends: libosmocore.git Ic8681d9e093216c99c6bca4be81c31ef83688ed1 Related: OS#3608 Change-Id: I0fe62f518e195db4e34f3b0ad1762bb57ba9d92a --- M TODO-RELEASE M include/osmocom/netif/stream.h M src/stream.c 3 files changed, 39 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..b7cb070 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library whatdescription / commit summary line +libosmo-netif stream osmo_sock_init2_multiaddr() is used, requires libosmocore > 1.2.0 (to be released) diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 3427df5..8fe2578 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -22,6 +22,7 @@ void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool nodelay); void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr); +int osmo_stream_srv_link_set_addrs(struct osmo_stream_srv_link *link, const char **addr, size_t addrcnt); void osmo_stream_srv_link_set_port(struct osmo_stream_srv_link *link, uint16_t port); void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, uint16_t proto); void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int (*accept_cb)(struct osmo_stream_srv_link *link, int fd)); diff --git a/src/stream.c b/src/stream.c index 9c4afec..0027537 100644 --- a/src/stream.c +++ b/src/stream.c @@ -647,7 +647,8 @@ struct osmo_stream_srv_link { struct osmo_fd ofd; -char*addr; +char*addr[OSMO_SOCK_MAX_ADDRS]; +uint8_t addrcnt; uint16_tport; uint16_tproto; int (*accept_cb)(struct osmo_stream_srv_link *srv, int fd); @@ -745,8 +746,32 @@ void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr) { - osmo_talloc_replace_string(link, >addr, addr); + osmo_stream_srv_link_set_addrs(link, , 1); +} + +/*! \brief Set the local address set to which we bind. + * Useful for protocols allowing bind on more than one address (such as SCTP) + * \param[in] link Stream Server Link to modify + * \param[in] addr Local IP address + * \return negative on error, 0 on success + */ +int osmo_stream_srv_link_set_addrs(struct osmo_stream_srv_link *link, const char **addr, size_t addrcnt) +{ + int i = 0; + + if (addrcnt > OSMO_SOCK_MAX_ADDRS) + return -EINVAL; + + for (; i < addrcnt; i++) + osmo_talloc_replace_string(link, >addr[i], addr[i]); + for (; i < link->addrcnt; i++) { + talloc_free(link->addr[i]); + link->addr[i] = NULL; + } + + link->addrcnt = addrcnt; link->flags |= OSMO_STREAM_SRV_F_RECONF; + return 0; } /*! \brief Set the local port number to which we bind @@ -853,8 +878,16 @@ link->flags &= ~OSMO_STREAM_SRV_F_RECONF; - ret = osmo_sock_init(AF_INET, SOCK_STREAM, link->proto, -link->addr, link->port, OSMO_SOCK_F_BIND); + switch (link->proto) { + case IPPROTO_SCTP: + ret = osmo_sock_init2_multiaddr(AF_INET, SOCK_STREAM, link->proto, + (const char **)link->addr, link->addrcnt, link->port, + NULL, 0, 0, OSMO_SOCK_F_BIND); + break; + default: + ret = osmo_sock_init(AF_INET, SOCK_STREAM, link->proto, + link->addr[0], link->port, OSMO_SOCK_F_BIND); + } if (ret < 0) return ret; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/15782 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0fe62f518e195db4e34f3b0ad1762bb57ba9d92a Gerrit-Change-Number: 15782 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmo-netif[master]: stream: osmo_stream_cli: Support setting multiple addr
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/15783 ) Change subject: stream: osmo_stream_cli: Support setting multiple addr .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/15783 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I09f0d989f2309abdeb304fe570355abed2cd107b Gerrit-Change-Number: 15783 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 09:23:12 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-netif[master]: stream: osmo_stream_cli: Support setting multiple addr
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/15783 ) Change subject: stream: osmo_stream_cli: Support setting multiple addr .. stream: osmo_stream_cli: Support setting multiple addr This API will be later used to set multiple addresses for SCTP sockets. Depends: libosmocore.git Ic8681d9e093216c99c6bca4be81c31ef83688ed1 Related: OS#3608 Change-Id: I09f0d989f2309abdeb304fe570355abed2cd107b --- M include/osmocom/netif/stream.h M src/stream.c 2 files changed, 85 insertions(+), 12 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 8fe2578..331dec1 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -55,9 +55,11 @@ void osmo_stream_cli_set_nodelay(struct osmo_stream_cli *cli, bool nodelay); void osmo_stream_cli_set_addr(struct osmo_stream_cli *cli, const char *addr); +int osmo_stream_cli_set_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt); void osmo_stream_cli_set_port(struct osmo_stream_cli *cli, uint16_t port); void osmo_stream_cli_set_proto(struct osmo_stream_cli *cli, uint16_t proto); void osmo_stream_cli_set_local_addr(struct osmo_stream_cli *cli, const char *addr); +int osmo_stream_cli_set_local_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt); void osmo_stream_cli_set_local_port(struct osmo_stream_cli *cli, uint16_t port); void osmo_stream_cli_set_data(struct osmo_stream_cli *cli, void *data); void osmo_stream_cli_set_reconnect_timeout(struct osmo_stream_cli *cli, int timeout); diff --git a/src/stream.c b/src/stream.c index 0027537..b7e5c3c 100644 --- a/src/stream.c +++ b/src/stream.c @@ -148,9 +148,11 @@ struct llist_head tx_queue; struct osmo_timer_list timer; enum osmo_stream_cli_state state; - char*addr; + char*addr[OSMO_SOCK_MAX_ADDRS]; + uint8_t addrcnt; uint16_tport; - char*local_addr; + char*local_addr[OSMO_SOCK_MAX_ADDRS]; + uint8_t local_addrcnt; uint16_tlocal_port; uint16_tproto; int (*connect_cb)(struct osmo_stream_cli *srv); @@ -354,8 +356,32 @@ void osmo_stream_cli_set_addr(struct osmo_stream_cli *cli, const char *addr) { - osmo_talloc_replace_string(cli, >addr, addr); + osmo_stream_cli_set_addrs(cli, , 1); +} + +/*! \brief Set the remote address set to which we connect. + * Useful for protocols allowing connecting to more than one address (such as SCTP) + * \param[in] cli Stream Client to modify + * \param[in] addr Remote IP address set + * \return negative on error, 0 on success + */ +int osmo_stream_cli_set_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt) +{ + int i = 0; + + if (addrcnt > OSMO_SOCK_MAX_ADDRS) + return -EINVAL; + + for (; i < addrcnt; i++) + osmo_talloc_replace_string(cli, >addr[i], addr[i]); + for (; i < cli->addrcnt; i++) { + talloc_free(cli->addr[i]); + cli->addr[i] = NULL; + } + + cli->addrcnt = addrcnt; cli->flags |= OSMO_STREAM_CLI_F_RECONF; + return 0; } /*! \brief Set the remote port number to which we connect @@ -387,8 +413,32 @@ void osmo_stream_cli_set_local_addr(struct osmo_stream_cli *cli, const char *addr) { - osmo_talloc_replace_string(cli, >local_addr, addr); + osmo_stream_cli_set_local_addrs(cli, , 1); +} + +/*! \brief Set the local address set to which we connect. + * Useful for protocols allowing bind to more than one address (such as SCTP) + * \param[in] cli Stream Client to modify + * \param[in] addr Local IP address set + * \return negative on error, 0 on success + */ +int osmo_stream_cli_set_local_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt) +{ + int i = 0; + + if (addrcnt > OSMO_SOCK_MAX_ADDRS) + return -EINVAL; + + for (; i < addrcnt; i++) + osmo_talloc_replace_string(cli, >local_addr[i], addr[i]); + for (; i < cli->local_addrcnt; i++) { + talloc_free(cli->local_addr[i]); + cli->local_addr[i] = NULL; + } + + cli->local_addrcnt = addrcnt; cli->flags |= OSMO_STREAM_CLI_F_RECONF; + return 0; } /*! \brief Set the protocol for the stream client socket @@ -503,10 +553,20 @@ cli->flags &= ~OSMO_STREAM_CLI_F_RECONF; - ret = osmo_sock_init2(AF_INET, SOCK_STREAM, cli->proto, - cli->local_addr, cli->local_port, -
Change in libosmo-sccp[master]: ss7: Support multiple addresses in SCTP connections
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15785 ) Change subject: ss7: Support multiple addresses in SCTP connections .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15785 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ibd15de7a4e00dbec78ff2e2dd6a686b0f3af22de Gerrit-Change-Number: 15785 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 09:25:47 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: vty.c: avoid coverity BAD_SHIFT issues
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/15806 ) Change subject: vty.c: avoid coverity BAD_SHIFT issues .. vty.c: avoid coverity BAD_SHIFT issues Make it obvious for compilers and for coverity, that the sapi value used to shift a bit for the sapi_mask is always <= 31. The sapi value is an index of the value string l1sap_common_sapi_names, which has 24 entries. Fixes: CID#205067, CID#205068 Change-Id: Id8be0ab67479b1f76a4f624bd3a5242e4fe59f4b --- M src/common/vty.c 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/06/15806/1 diff --git a/src/common/vty.c b/src/common/vty.c index 7c043e1..a202507 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1615,7 +1615,10 @@ if (!*sapi_mask) *sapi_mask = talloc(tgt, uint16_t); - **sapi_mask |= (1 << sapi); + if (sapi <= 31) + **sapi_mask |= (1 << sapi); + else + LOGP(DL1P, LOGL_ERROR, "failed to set logging filter for L1 SAPI, can't shift by %i\n", sapi); tgt->filter_map |= (1 << LOG_FLT_L1_SAPI); return CMD_SUCCESS; @@ -1633,7 +1636,8 @@ return CMD_SUCCESS; sapi_mask = (uint16_t *)tgt->filter_data[LOG_FLT_L1_SAPI]; - *sapi_mask &= ~(1 << sapi); + if (sapi <= 31) /* avoid coverity BAD_SHIFT */ + *sapi_mask &= ~(1 << sapi); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15806 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id8be0ab67479b1f76a4f624bd3a5242e4fe59f4b Gerrit-Change-Number: 15806 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
Change in osmo-bts[master]: vty.c: remove assert for always true condition
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/15805 ) Change subject: vty.c: remove assert for always true condition .. vty.c: remove assert for always true condition Remove OSMO_ASSERT(sapi != -EINVAL) statements, because sapi is an uint8_t and therefore can never be less than zero. Fixes: CID#205066, CID#205069 Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0 --- M src/common/vty.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/15805/1 diff --git a/src/common/vty.c b/src/common/vty.c index 865c236..7c043e1 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -1607,7 +1607,6 @@ struct log_target *tgt = osmo_log_vty2tgt(vty); uint16_t **sapi_mask; - OSMO_ASSERT(sapi != -EINVAL); if (!tgt) return CMD_WARNING; @@ -1628,7 +1627,6 @@ struct log_target *tgt = osmo_log_vty2tgt(vty); uint16_t *sapi_mask; - OSMO_ASSERT(sapi != -EINVAL); if (!tgt) return CMD_WARNING; if (!tgt->filter_data[LOG_FLT_L1_SAPI]) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15805 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0 Gerrit-Change-Number: 15805 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
Change in libosmocore[master]: socket: Introduce API osmo_sock_init2_multiaddr()
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15781 ) Change subject: socket: Introduce API osmo_sock_init2_multiaddr() .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15781 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic8681d9e093216c99c6bca4be81c31ef83688ed1 Gerrit-Change-Number: 15781 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 09:21:47 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: socket: Introduce API osmo_sock_init2_multiaddr()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15781 ) Change subject: socket: Introduce API osmo_sock_init2_multiaddr() .. socket: Introduce API osmo_sock_init2_multiaddr() This API will be used by libosmo-netif's osmo_stream for SCTP sockets, which in turn will be used by libosmo-sccp to support multi-homed connections. Related: OS#3608 Change-Id: Ic8681d9e093216c99c6bca4be81c31ef83688ed1 --- M configure.ac M debian/control M include/osmocom/core/socket.h M src/Makefile.am M src/socket.c 5 files changed, 307 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 39d232b..2f12d86 100644 --- a/configure.ac +++ b/configure.ac @@ -100,6 +100,17 @@ AC_CHECK_FUNCS(clock_gettime localtime_r) +old_LIBS=$LIBS +AC_SEARCH_LIBS([sctp_bindx], [sctp], [ + AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support]) + AC_SUBST(HAVE_LIBSCTP, [1]) + if test -n "$ac_lib"; then + AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib]) + fi + ], [ + AC_MSG_WARN([sctp_bindx not found in searched libs])]) +LIBS=$old_LIBS + AC_DEFUN([CHECK_TM_INCLUDES_TM_GMTOFF], [ AC_CACHE_CHECK( [whether struct tm has tm_gmtoff member], diff --git a/debian/control b/debian/control index 07163da..6c9cfae 100644 --- a/debian/control +++ b/debian/control @@ -15,6 +15,7 @@ libpcsclite-dev, pkg-config, libtalloc-dev, + libsctp-dev, python (>= 2.7.6) Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/libosmocore.git diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 37b1eae..e26ca0d 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -36,6 +36,9 @@ /*! use SO_REUSEADDR on UDP ports (required for multicast) */ #define OSMO_SOCK_F_UDP_REUSEADDR (1 << 5) +/*! maximum number of local or remote addresses supported by an osmo_sock instance */ +#define OSMO_SOCK_MAX_ADDRS 32 + int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto, const char *host, uint16_t port, unsigned int flags); @@ -43,6 +46,10 @@ const char *local_host, uint16_t local_port, const char *remote_host, uint16_t remote_port, unsigned int flags); +int osmo_sock_init2_multiaddr(uint16_t family, uint16_t type, uint8_t proto, + const char **local_hosts, size_t local_hosts_cnt, uint16_t local_port, + const char **remote_hosts, size_t remote_hosts_cnt, uint16_t remote_port, unsigned int flags); + int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto, const char *host, uint16_t port, unsigned int flags); diff --git a/src/Makefile.am b/src/Makefile.am index 5f5f017..9943281 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ LIBVERSION=14:0:2 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS) +AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS) $(LIBSCTP_CFLAGS) if ENABLE_PSEUDOTALLOC AM_CPPFLAGS += -I$(top_srcdir)/src/pseudotalloc @@ -12,7 +12,7 @@ lib_LTLIBRARIES = libosmocore.la -libosmocore_la_LIBADD = $(BACKTRACE_LIB) $(TALLOC_LIBS) $(LIBRARY_RT) $(PTHREAD_LIBS) +libosmocore_la_LIBADD = $(BACKTRACE_LIB) $(TALLOC_LIBS) $(LIBRARY_RT) $(PTHREAD_LIBS) $(LIBSCTP_LIBS) libosmocore_la_SOURCES = context.c timer.c timer_gettimeofday.c timer_clockgettime.c \ select.c signal.c msgb.c bits.c \ bitvec.c bitcomp.c counter.c fsm.c \ diff --git a/src/socket.c b/src/socket.c index ef3bb58..542c76e 100644 --- a/src/socket.c +++ b/src/socket.c @@ -53,6 +53,10 @@ #include #include +#ifdef HAVE_LIBSCTP +#include +#endif + static struct addrinfo *addrinfo_helper(uint16_t family, uint16_t type, uint8_t proto, const char *host, uint16_t port, bool passive) { @@ -96,6 +100,34 @@ return result; } +/*! Retrieve an array of addrinfo with specified hints, one for each host in the hosts array. + * \param[out] addrinfo array of addrinfo pointers, will be filled by the function on success. + * Its size must be at least the one of hosts. + * \param[in] family Socket family like AF_INET, AF_INET6. + * \param[in] type Socket type like SOCK_DGRAM, SOCK_STREAM. + * \param[in] proto Protocol like IPPROTO_TCP, IPPROTO_UDP. + * \param[in] hosts array of char pointers (strings) containing the addresses to query. + * \param[in] host_cnt length of the hosts array (in items). + * \param[in] port port number in host byte order. + * \param[in] passive whether to include the AI_PASSIVE flag in getaddrinfo() hints. + * \returns 0 is returned on success together
Change in libosmocore[master]: tdef: Return correct snprintf value for osmo_tdef_range_str_buf()
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15779 ) Change subject: tdef: Return correct snprintf value for osmo_tdef_range_str_buf() .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15779 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icafe559e19a92e2ae72fdd0dd2d9a394b1eda878 Gerrit-Change-Number: 15779 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 18 Oct 2019 09:20:57 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: tdef: Return correct snprintf value for osmo_tdef_range_str_buf()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15779 ) Change subject: tdef: Return correct snprintf value for osmo_tdef_range_str_buf() .. tdef: Return correct snprintf value for osmo_tdef_range_str_buf() len provides extra information in the case the buffer was too small, because it tells the caller "the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available" (man snprintf). Change-Id: Icafe559e19a92e2ae72fdd0dd2d9a394b1eda878 --- M src/tdef.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tdef.c b/src/tdef.c index 94d987f..71a3315 100644 --- a/src/tdef.c +++ b/src/tdef.c @@ -256,7 +256,9 @@ * \param[in] buf The buffer where the string representation is stored. * \param[in] buf_len Length of buffer in bytes. * \param[in] tdef Timer entry from a timer definition table. - * \return The number of characters printed on success, negative on error. See snprintf(). + * \return The number of characters printed on success (or number of characters + * which would have been written to the final string if enough space + * had been available), negative on error. See snprintf(). */ int osmo_tdef_range_str_buf(char *buf, size_t buf_len, struct osmo_tdef *t) { @@ -275,7 +277,7 @@ if (ret < 0) return ret; OSMO_SNPRINTF_RET(ret, rem, offset, len); - return ret; + return len; } /*! Using osmo_tdef for osmo_fsm_inst: find a given state's osmo_tdef_state_timeout entry. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15779 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icafe559e19a92e2ae72fdd0dd2d9a394b1eda878 Gerrit-Change-Number: 15779 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in libosmo-netif[master]: stream: osmo_stream_srv_link: Support setting multiple addr
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/15782 ) Change subject: stream: osmo_stream_srv_link: Support setting multiple addr .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/15782 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0fe62f518e195db4e34f3b0ad1762bb57ba9d92a Gerrit-Change-Number: 15782 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 09:23:24 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-sgsn[master]: sgsn_libgtp.c: Drop use of deprecated libgtp APIs gtp_retrans*()
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15579 ) Change subject: sgsn_libgtp.c: Drop use of deprecated libgtp APIs gtp_retrans*() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15579 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ia9a93d4a6ed63cd0c736f9a99d81d730b958d82e Gerrit-Change-Number: 15579 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 18 Oct 2019 09:19:40 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-dev[master]: ttcn3: run ttcn3 testsuites from osmo-dev
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/15778 ) Change subject: ttcn3: run ttcn3 testsuites from osmo-dev .. Patch Set 3: Updated, everything is in the new ttcn3 subdir now. -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/15778 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I6b4bf2743adeec1a950d5f090a690182b991cf49 Gerrit-Change-Number: 15778 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 18 Oct 2019 09:35:30 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in libosmo-netif[master]: tests: osmux_test: Hardcode h_output values set by random()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/15798 ) Change subject: tests: osmux_test: Hardcode h_output values set by random() .. tests: osmux_test: Hardcode h_output values set by random() osmux implementation randomizes those values. It seems build in OBS sometimes provide different values than the ones expected in the test result. Let's hardcode them to make sure we always have the same values regarless of the random() implementation. Values chosen are the one matching the current expected test output so it doesn't need any change. Change-Id: Icc553c83ddff41900ae3d5990a655c29c9073e01 --- M tests/osmux/osmux_test.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index 7fa9af7..b6a43fe 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -299,6 +299,9 @@ osmux_xfrm_output_init2(_output, 0x700, 98); osmux_xfrm_output_set_tx_cb(_output, tx_cb, NULL); + /* These fields are set using random() */ + h_output.rtp_seq = 9158; + h_output.rtp_timestamp = 1681692777; /* If the test takes longer than 10 seconds, abort it */ alarm(10); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/15798 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Icc553c83ddff41900ae3d5990a655c29c9073e01 Gerrit-Change-Number: 15798 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in libosmo-sccp[master]: ss7: Support multiple addresses in SCTP connections
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/15785 ) Change subject: ss7: Support multiple addresses in SCTP connections .. Patch Set 3: -Code-Review (1 comment) https://gerrit.osmocom.org/c/libosmo-sccp/+/15785/3/src/osmo_ss7.c File src/osmo_ss7.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/15785/3/src/osmo_ss7.c@1973 PS3, Line 1973: (; indeed, the compiler error is correct: i=0 missing here? -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/15785 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ibd15de7a4e00dbec78ff2e2dd6a686b0f3af22de Gerrit-Change-Number: 15785 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 09:29:08 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-netif[master]: tests: osmux_test: Hardcode h_output values set by random()
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/15798 ) Change subject: tests: osmux_test: Hardcode h_output values set by random() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/15798 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Icc553c83ddff41900ae3d5990a655c29c9073e01 Gerrit-Change-Number: 15798 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 18 Oct 2019 09:27:47 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-dev[master]: ttcn3: run ttcn3 testsuites from osmo-dev
Hello neels, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-dev/+/15778 to look at the new patch set (#3). Change subject: ttcn3: run ttcn3 testsuites from osmo-dev .. ttcn3: run ttcn3 testsuites from osmo-dev Build testsuite, SUT and dependencies and run everything with one command. Example usage: $ ./ttcn3/ttcn3.sh msc So far, it works at least with: hlr, mgw, msc, pcu, pcu-sns, sgsn Change-Id: I6b4bf2743adeec1a950d5f090a690182b991cf49 --- M .gitignore M README A ttcn3/ttcn3.opts A ttcn3/ttcn3.sh A ttcn3/wrappers/fake_trx.sh A ttcn3/wrappers/osmo-bts-trx-respawn.sh A ttcn3/wrappers/osmo-pcu-respawn.sh 7 files changed, 428 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/78/15778/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/15778 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: I6b4bf2743adeec1a950d5f090a690182b991cf49 Gerrit-Change-Number: 15778 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-MessageType: newpatchset
Change in osmo-ci[master]: gerrit, master builds: build almost all in docker
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/15584 ) Change subject: gerrit, master builds: build almost all in docker .. gerrit, master builds: build almost all in docker Instead of building some projects in docker, and some directly on the build slave, build almost all of them in docker with few exceptions, and make building in docker the default. This has several advantages: * build environment of master builds and gerrit verifications is the same, therefore the same build won't pass in gerrit and then fail in master * all build environments are volatile * no more conflicts while running VTY/CTRL tests * fix osmo-python-tests gerrit review versions being installed to /usr/local of build slave (see previous commit message) Projects that still do not get built in docker: * openggsn: depends on libgtpnl, but does not build it in jenkins.sh * osmo-bts: l1headers, various SDKs not installed in the docker image * osmo-trx: LimeSuite is not in the docker image (and just installing the debian package does not work) * osmo-ttcn3-hacks: TTCN-3 not installed in docker image * pysim: needs to access real sim cards attached to the host * sysmo-usim-tool: needs to access real sim cards attached to the host Related: OS#3726, OS#3598 Change-Id: If4b7d2f9ffbc7e92699732d97a8f5829a88c5b35 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 34 insertions(+), 42 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve osmith: Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 693d3c3..83c7169 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -39,7 +39,7 @@ -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ -v "$ARTIFACT_STORE:/artifact_store" \ docker_img: 'osmocom:deb9_amd64' -cmd: ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh +cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh' repos_url: 'ssh://jenk...@gerrit.osmocom.org:29418/{repos}' gerrit_project: '{repos}' @@ -49,20 +49,18 @@ - cellmgr-ng: concurrent: true - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh' - libasn1c - libgtpnl - libosmo-abis - libosmo-netif - - libosmo-sccp: - cmd: WITH_MANUALS=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh + - libosmo-sccp - libosmocore: a1_name: arch a1: !!python/tuple [arm-none-eabi, amd64] combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' - cmd: './contrib/jenkins_arch.sh "$arch"' + cmd: '{docker_run} {docker_img} /build/contrib/jenkins_arch.sh "$arch"' - libsmpp34 - libtelnet @@ -90,7 +88,6 @@ - osmo-bsc: concurrent: true - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh' - osmo-bts: a1_name: FIRMWARE_VERSION @@ -120,19 +117,18 @@ combination_filter: > (GTP == "--enable-gtp-linux" && WITH_MANUALS == "0") || (GTP == "--disable-gtp-linux" && WITH_MANUALS == "1") - cmd: ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh + cmd: | +{docker_run} \ + -e GTP="$GTP" \ + -e WITH_MANUALS="$WITH_MANUALS" \ + {docker_img} /build/contrib/jenkins.sh - osmo-gsm-manuals - - - osmo-hlr: - cmd: WITH_MANUALS=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh - - - osmo-iuh: - cmd: WITH_MANUALS=1 ./contrib/jenkins.sh + - osmo-hlr + - osmo-iuh - osmo-mgw: concurrent: true - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh' - osmo-msc: a1_name: IU @@ -195,8 +191,7 @@ -e WITH_MANUALS="$WITH_MANUALS" \ {docker_img} /build/contrib/jenkins.sh - - osmo-sip-connector: - cmd: WITH_MANUALS=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh + - osmo-sip-connector - osmo-trx: a1_name: INSTR @@ -208,9 +203,9 @@ concurrent: true combination_filter: > (INSTR == "--with-sse" && WITH_MANUALS == "1") + cmd: 'ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' - - osmocom-bb: - cmd: WITH_MANUALS=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh + - osmocom-bb - osmo-tetra - osmo-sysmon - osmo-remsim @@ -222,6 +217,7 @@ - pysim: slave_axis: !!python/tuple [simtester] + cmd: './contrib/jenkins.sh' - osmo-ttcn3-hacks: repos_url: 'https://gerrit.osmocom.org/{repos}' diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 854b991..138807e 100644 --- a/jobs/master-builds.yml +++
Change in osmo-ci[master]: gerrit, master builds: default to concurrent: true
Hello pespin, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/15585 to look at the new patch set (#8). Change subject: gerrit, master builds: default to concurrent: true .. gerrit, master builds: default to concurrent: true Now that almost everything runs in docker, we don't need to worry about problems with running VTY/CTRL tests in parallel for these projects. Related: OS#3726 Change-Id: I5fdf759faf47ec7e4f9cb2657bd004585a667add --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 12 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/85/15585/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/15585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I5fdf759faf47ec7e4f9cb2657bd004585a667add Gerrit-Change-Number: 15585 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-ci[master]: gerrit, master builds: default to concurrent: true
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/15585 ) Change subject: gerrit, master builds: default to concurrent: true .. Patch Set 8: Code-Review+2 Rebased on master to fix merge conflict, re-applying +2. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/15585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I5fdf759faf47ec7e4f9cb2657bd004585a667add Gerrit-Change-Number: 15585 Gerrit-PatchSet: 8 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 18 Oct 2019 08:45:01 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: vty.c: remove assert for always true condition
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15805 ) Change subject: vty.c: remove assert for always true condition .. Patch Set 1: (1 comment) I would rather use a variable of a signed type and keep the checks. https://gerrit.osmocom.org/c/osmo-bts/+/15805/1/src/common/vty.c File src/common/vty.c: https://gerrit.osmocom.org/c/osmo-bts/+/15805/1/src/common/vty.c@a1606 PS1, Line 1606: get_string_value Well, theoretically this function can return a negative number. This could be even possible with an older version of libosmocore (see I5f4e2d16c62a2d22717989c6acc77450957168cb and preceding changes). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15805 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0 Gerrit-Change-Number: 15805 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 18 Oct 2019 12:01:55 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-bts[master]: vty.c: avoid coverity BAD_SHIFT issues
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/15806 to look at the new patch set (#2). Change subject: vty.c: avoid coverity BAD_SHIFT issues .. vty.c: avoid coverity BAD_SHIFT issues Make it obvious for compilers and for coverity, that the sapi value used to shift a bit for the sapi_mask is always <= 31. The sapi value is an index of the value string l1sap_common_sapi_names, which has 24 entries. Fixes: CID#205067, CID#205068 Change-Id: Id8be0ab67479b1f76a4f624bd3a5242e4fe59f4b --- M src/common/vty.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/06/15806/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15806 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id8be0ab67479b1f76a4f624bd3a5242e4fe59f4b Gerrit-Change-Number: 15806 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-MessageType: newpatchset
Change in osmo-bts[master]: vty.c: don't ignore get_string_value() errors
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/15805 to look at the new patch set (#2). Change subject: vty.c: don't ignore get_string_value() errors .. vty.c: don't ignore get_string_value() errors Change uint8_t sapi to int8_t, so we can properly assert on errors from get_string_value(). Fixes: CID#205066, CID#205069 Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0 --- M src/common/vty.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/15805/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15805 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0 Gerrit-Change-Number: 15805 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-MessageType: newpatchset
Change in osmo-bts[master]: vty.c: don't ignore get_string_value() errors
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15805 ) Change subject: vty.c: don't ignore get_string_value() errors .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/15805/1/src/common/vty.c File src/common/vty.c: https://gerrit.osmocom.org/c/osmo-bts/+/15805/1/src/common/vty.c@a1606 PS1, Line 1606: get_string_value > Well, theoretically this function can return a negative number. […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15805 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4d30afacfab93051868ae8f462cee9ad3dbc7fd0 Gerrit-Change-Number: 15805 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 18 Oct 2019 12:30:10 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in osmo-bts[master]: vty.c: avoid coverity BAD_SHIFT issues
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15806 ) Change subject: vty.c: avoid coverity BAD_SHIFT issues .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/15806/1/src/common/vty.c File src/common/vty.c: https://gerrit.osmocom.org/c/osmo-bts/+/15806/1/src/common/vty.c@1618 PS1, Line 1618: (sapi <= 31) > Why can't we just assert() this? I'm not so familiar with how coverity works, but if that is enough to make the error go away, then sure. Updated. (It would be nice if one could test a piece of code against coverity, to see if the issues go away or not.) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15806 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id8be0ab67479b1f76a4f624bd3a5242e4fe59f4b Gerrit-Change-Number: 15806 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 18 Oct 2019 12:29:55 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in osmo-pcu[master]: Fix assertion hit upon CCCH Paging Request
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/15799 ) Change subject: Fix assertion hit upon CCCH Paging Request .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15799 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I84c5dfd4d5580e9d4c00ed21887cb51bd9abbd2e Gerrit-Change-Number: 15799 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith Gerrit-Comment-Date: Fri, 18 Oct 2019 09:50:11 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: vty.c: avoid coverity BAD_SHIFT issues
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15806 ) Change subject: vty.c: avoid coverity BAD_SHIFT issues .. Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/15806/1/src/common/vty.c File src/common/vty.c: https://gerrit.osmocom.org/c/osmo-bts/+/15806/1/src/common/vty.c@1618 PS1, Line 1618: (sapi <= 31) Why can't we just assert() this? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15806 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id8be0ab67479b1f76a4f624bd3a5242e4fe59f4b Gerrit-Change-Number: 15806 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 18 Oct 2019 12:03:26 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-trx[master]: vty: Simplify filler burst settings and improve help and readability.
ipse has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/15793 ) Change subject: vty: Simplify filler burst settings and improve help and readability. .. Patch Set 3: ping -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15793 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I752eb2c1162d084e8769181f2fcd6c0877663448 Gerrit-Change-Number: 15793 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 18 Oct 2019 20:38:55 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-bts[master]: osmo-bts-trx/scheduler: refactor Uplink measurement processing
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/15807 ) Change subject: osmo-bts-trx/scheduler: refactor Uplink measurement processing .. osmo-bts-trx/scheduler: refactor Uplink measurement processing So far we used to store the sums of ToA, RSSI, and C/I measurements in the logical channel state, and after decoding of a block, we did calculate the average. This approach works fine for xCCH and PDTCH, but when it comes to block-diagonal interleaving (which is used on TCH/F and TCH/H channels), the results are incorrect. Instead of calculating the sum of measurements on the fly, let's push them onto a stack (the measurement history), and optionally keep the last N measurements in there after decoding of a block. The proposed approach will allow us to reduce the code duplication and get much more accurate Uplink measurement reports. However, there is a spoon of tar: records of the measurement history are getting allocated on heap every time we receive an Uplink burst. These frequent allocations may introduce a negative impact on the overall performance level, but we can use a talloc pool to reduce possible delays and potential fragmentation. Change-Id: I6bc511223069f66b49109d3267bee7bd89585713 --- M include/osmo-bts/scheduler.h M src/osmo-bts-trx/scheduler_trx.c 2 files changed, 145 insertions(+), 78 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/07/15807/1 diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index 3100a1d..e6ec37d 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -69,6 +69,15 @@ TRX_BURST_8PSK, }; +/* A set of measurements attached to a burst */ +struct l1sched_meas_set { + struct llist_head list; /* Link to the measurement history */ + + int16_t toa256; /* Timing of Arrival (1/256 of a symbol) */ + int16_t ci_cb; /* Carrier-to-Interference (cB) */ + float rssi; /* RSSI (dBm) */ +}; + /* States each channel on a multiframe */ struct l1sched_chan_state { /* scheduler */ @@ -79,14 +88,6 @@ uint32_tul_first_fn;/* fn of first burst */ uint8_t ul_mask;/* mask of received bursts */ - /* measurements */ - uint8_t rssi_num; /* number of RSSI values */ - float rssi_sum; /* sum of RSSI values */ - uint8_t toa_num;/* number of TOA values */ - int32_t toa256_sum; /* sum of TOA values (1/256 symbol) */ - uint8_t ci_cb_num; /* number of C/I values */ - int32_t ci_cb_sum; /* sum of C/I values (in centiBels) */ - /* loss detection */ uint8_t lost_frames;/* how many L2 frames were lost */ uint32_tlast_tdma_fn; /* last processed TDMA frame number */ @@ -121,6 +122,10 @@ /* measurements */ struct { + struct llist_head hist; /* History of measurements (see l1sched_meas_set) */ + unsigned int num; /* Number of measurements in history */ + + /* FIXME: keep all measurements in the history (see above) */ uint8_t clock; /* cyclic clock counter */ int8_t rssi[32]; /* last RSSI values */ int rssi_count; /* received RSSI values */ diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 8662a14..d37dd51 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -887,6 +887,77 @@ return 0; } +/* Add a set of measurements to the head of the history. */ +static void l1sched_meas_push(struct l1sched_chan_state *chan_state, + const struct trx_ul_burst_ind *bi) +{ + struct l1sched_meas_set *set; + + /* TODO: unfortunately, we cannot use chan_state as the context :/ +* TODO: should we use a talloc pool for such allocations? */ + set = talloc(tall_bts_ctx, struct l1sched_meas_set); + OSMO_ASSERT(set != NULL); + + set->toa256 = bi->toa256; + set->rssi = bi->rssi; + + /* Optional fields */ + set->ci_cb = (bi->flags & TRX_BI_F_CI_CB) ? bi->ci_cb : 0; + + llist_add(>list, _state->meas.hist); + chan_state->meas.num++; +} + +/* Average a given number of measurements from the history, + * store the results in a caller-allocated set. */ +static void l1sched_meas_average(const struct l1sched_chan_state *chan_state, +struct l1sched_meas_set *result, +unsigned int num) +{ + struct l1sched_meas_set
Change in osmo-bts[master]: osmo-bts-trx/scheduler: refactor Uplink measurement processing
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/15807 ) Change subject: osmo-bts-trx/scheduler: refactor Uplink measurement processing .. Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/15807 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6bc511223069f66b49109d3267bee7bd89585713 Gerrit-Change-Number: 15807 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 18 Oct 2019 21:59:06 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment