lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2022

  • 2 participants
  • 1860 discussions
Change in osmo-bsc-nat[master]: [do not merge]: linter tests
by Jenkins Builder 12 Sep '22

12 Sep '22
Attention is currently required from: osmith. Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/29294 ) Change subject: [do not merge]: linter tests ...................................................................... Patch Set 1: (2 comments) File test: Robot Comment from checkpatch (run ID jenkins-gerrit-osmo-bsc-nat-lint-141): https://gerrit.osmocom.org/c/osmo-bsc-nat/+/29294/comment/4c1fa32f_71007340 PS1, Line 2: this line has a trailing white space trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-osmo-bsc-nat-lint-141): https://gerrit.osmocom.org/c/osmo-bsc-nat/+/29294/comment/33dbe573_ccd58bcf PS1, Line 4: this line has a speling error 'speling' may be misspelled - perhaps 'spelling'? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/29294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc-nat Gerrit-Branch: master Gerrit-Change-Id: I76c99d7779818b9b1e77c546b76b95db914c621b Gerrit-Change-Number: 29294 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 12 Sep 2022 09:49:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: lint: annotate lines in gerrit
by osmith 12 Sep '22

12 Sep '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/26393 ) Change subject: lint: annotate lines in gerrit ...................................................................... lint: annotate lines in gerrit Use robot comments to add line based comments for the lint output. Add checkpatch_json from coreboot 9cae17d0 to parse the checkpatch output and convert it into a gerrit parsable format. Example: https://gerrit.osmocom.org/c/osmo-bsc-nat/+/29294 Co-Authored-By: Oliver Smith <osmith(a)sysmocom.de> Change-Id: I1a48ddb976e0f53bfc0552d0be11e42ba68d9e49 --- A lint/checkpatch/checkpatch_json.py M lint/lint_diff.sh 2 files changed, 88 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/lint/checkpatch/checkpatch_json.py b/lint/checkpatch/checkpatch_json.py new file mode 100755 index 0000000..81946ca --- /dev/null +++ b/lint/checkpatch/checkpatch_json.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-only + +""" +This utilty generate json output to post comment in gerrit. + +INPUT: output of checkpatch.pl. +OUTPUT: json format output that can be used to post comment in gerrit +""" +import os +import sys +import json + +data = {} +data['comments'] = [] +list_temp = {} + +def update_struct( file_path, msg_output, line_number): + if file_path not in list_temp: + list_temp[file_path] = [] + list_temp[file_path].append({ + "robot_id" : "checkpatch", + "robot_run_id" : sys.argv[3], + "url" : sys.argv[4], + "line" : line_number, + "message" : msg_output,} + ) + +def parse_file(input_file): + fp = open (input_file, "r") + for line in fp: + if line.startswith("ERROR:"): + msg_output = line.split("ERROR:")[1].strip() + elif line.startswith("WARNING:"): + msg_output = line.split("WARNING:")[1].strip() + elif ": FILE:" in line: + temp = line.split("FILE:") + file_path = temp[1].split(":")[0] + line_number = temp[1].split(":")[1] + update_struct( file_path.strip(), msg_output, str(line_number) ) + else: + continue + fp.close() + +def main(): + if (len(sys.argv) < 5) or (sys.argv[1] == "-h"): + print("HELP:") + print(sys.argv[0] + " <input file> <output file in json> <job-id> <job-url>") + sys.exit() + + print(sys.argv[1]) + parse_file(sys.argv[1]) + data['robot_comments'] = list_temp + print(json.dumps(data)) + out_file = open( sys.argv[2] , "w") + json.dump(data, out_file, sort_keys=True, indent=4) + out_file.close() + +if __name__ == "__main__": + main() diff --git a/lint/lint_diff.sh b/lint/lint_diff.sh index 0762f6b..7ae186f 100755 --- a/lint/lint_diff.sh +++ b/lint/lint_diff.sh @@ -45,5 +45,33 @@ echo "Please fix the linting errors above. More information:" echo "https://osmocom.org/projects/cellular-infrastructure/wiki/Linting" echo + + if [ -n "$JENKINS_HOME" ]; then + echo "Leaving review comments in gerrit..." + set -x + + # Run again, but in the proper format for checkpatch_json.py + # and store the output in a file + git diff -U0 "$COMMIT" | "$SCRIPT_DIR/checkpatch/checkpatch_osmo.sh" \ + > ../checkpatch_output || true + cd .. + # Convert to gerrit review format + "$SCRIPT_DIR/checkpatch/checkpatch_json.py" \ + checkpatch_output \ + gerrit_report.json \ + "$BUILD_TAG" \ + "$BUILD_URL" + # Apply as review in gerrit + ssh \ + -p "$GERRIT_PORT" \ + -l jenkins \ + "$GERRIT_HOST" \ + gerrit \ + review \ + "$GERRIT_PATCHSET_REVISION" \ + --json \ + < gerrit_report.json + fi + exit 1 fi -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/26393 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1a48ddb976e0f53bfc0552d0be11e42ba68d9e49 Gerrit-Change-Number: 26393 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: jobs/gerrit-lint: add ssh credentials
by osmith 12 Sep '22

12 Sep '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29297 ) Change subject: jobs/gerrit-lint: add ssh credentials ...................................................................... jobs/gerrit-lint: add ssh credentials Prepare for having jenkins post gerrit review comments. Change-Id: I27477c6c448a4b06ea49b020b6cfa534445cf31c --- M jobs/gerrit-lint.yml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/jobs/gerrit-lint.yml b/jobs/gerrit-lint.yml index 6883f1e..7b43e7e 100644 --- a/jobs/gerrit-lint.yml +++ b/jobs/gerrit-lint.yml @@ -165,5 +165,9 @@ wrappers: - ansicolor: colormap: xterm + wrappers: + - ssh-agent-credentials: + users: + - d5eda5e9-b59d-44ba-88d2-43473cb6e42d # vim: expandtab tabstop=2 shiftwidth=2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I27477c6c448a4b06ea49b020b6cfa534445cf31c Gerrit-Change-Number: 29297 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: jobs/gerrit-lint: hardcode shell command
by osmith 12 Sep '22

12 Sep '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29295 ) Change subject: jobs/gerrit-lint: hardcode shell command ...................................................................... jobs/gerrit-lint: hardcode shell command Don't allow overriding cmd per repository anymore. This was used in the gerrit-osmo-ci-lint job to run the linter from the checked out osmo-ci.git repository (the one with the untrusted code submitted to gerrit). This would become problematic with a future patch that will attach the ssh agent to the lint jobs (so jenkins can leave review comments over at gerrit). Change-Id: Iad23da08898205fafd1ae36256c8f7b6d7506d40 --- M jobs/gerrit-lint.yml 1 file changed, 2 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/jobs/gerrit-lint.yml b/jobs/gerrit-lint.yml index 9a1c1c5..f1fa389 100644 --- a/jobs/gerrit-lint.yml +++ b/jobs/gerrit-lint.yml @@ -5,7 +5,6 @@ name: gerrit-lint # following default values can be overridden by each repo disabled: false - cmd: '~/osmo-ci/lint/lint_diff.sh HEAD~1' gerrit_url: 'ssh://jenkins@gerrit.osmocom.org:29418' repos_url: '{gerrit_url}/{repos}' gerrit_project: '{repos}' @@ -34,10 +33,7 @@ - osmo-hnodeb - osmo-hnbgw - osmo-upf - - - osmo-ci: - # Run the lint script from the checked out branch - cmd: 'lint/lint_diff.sh HEAD~1' + - osmo-ci - osmo_dia2gsup: repos_url: '{gerrit_url}/erlang/{repos}' @@ -149,7 +145,7 @@ server-name: gerrit.osmocom.org builders: - - shell: '{obj:cmd}' + - shell: '~/osmo-ci/lint/lint_diff.sh HEAD~1' wrappers: - ansicolor: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iad23da08898205fafd1ae36256c8f7b6d7506d40 Gerrit-Change-Number: 29295 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: jobs/gerrit-lint: add osmo-ci branch parameter
by osmith 12 Sep '22

12 Sep '22
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29296 ) Change subject: jobs/gerrit-lint: add osmo-ci branch parameter ...................................................................... jobs/gerrit-lint: add osmo-ci branch parameter Extend the jobs to clone the trusted osmo-ci.git repository from which we execute the linter next to the untrusted code from gerrit, and add a parameter for the osmo-ci branch. Change-Id: Ic4134e6755014b3e5fbf6d3225e49c0ca5b27f9b --- M jobs/gerrit-lint.yml 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/jobs/gerrit-lint.yml b/jobs/gerrit-lint.yml index f1fa389..6883f1e 100644 --- a/jobs/gerrit-lint.yml +++ b/jobs/gerrit-lint.yml @@ -107,8 +107,16 @@ </br></br> Related issue: <a href="https://osmocom.org/issues/5087">OS#5087</a> + parameters: + - string: + name: BRANCH_CI + description: | + osmo-ci.git branch + default: 'master' + scm: - git: + basedir: 'code-from-gerrit' url: '{obj:repos_url}' credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d branches: @@ -120,6 +128,13 @@ skip-tag: true submodule: recursive: false + - git: + basedir: 'osmo-ci' + url: '{gerrit_url}/osmo-ci' + credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d + branches: + - '$BRANCH_CI' + wipe-workspace: true triggers: - gerrit: @@ -145,7 +160,7 @@ server-name: gerrit.osmocom.org builders: - - shell: '~/osmo-ci/lint/lint_diff.sh HEAD~1' + - shell: 'cd code-from-gerrit && ../osmo-ci/lint/lint_diff.sh HEAD~1' wrappers: - ansicolor: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic4134e6755014b3e5fbf6d3225e49c0ca5b27f9b Gerrit-Change-Number: 29296 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: lint: annotate lines in gerrit
by osmith 12 Sep '22

12 Sep '22
Attention is currently required from: pespin, lynxis lazus. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/26393 ) Change subject: lint: annotate lines in gerrit ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/26393 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1a48ddb976e0f53bfc0552d0be11e42ba68d9e49 Gerrit-Change-Number: 26393 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Mon, 12 Sep 2022 09:40:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: osmux: Use better name for function which may allocate a new struct
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29307 ) Change subject: osmux: Use better name for function which may allocate a new struct ...................................................................... osmux: Use better name for function which may allocate a new struct Change-Id: I867e3f74775d97749a78c2f198452b1f2916492f --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 980dbf0..287fa7c 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -155,7 +155,7 @@ /* Lookup existing handle for a specified address, if the handle can not be * found, the function will automatically allocate one */ static struct osmux_in_handle * -osmux_handle_lookup(struct mgcp_conn_rtp *conn, struct osmo_sockaddr *addr, int rem_port) +osmux_handle_find_or_create(struct mgcp_conn_rtp *conn, struct osmo_sockaddr *addr, int rem_port) { struct osmux_handle *h; @@ -481,7 +481,7 @@ return -1; } - conn->osmux.in = osmux_handle_lookup(conn, addr, port); + conn->osmux.in = osmux_handle_find_or_create(conn, addr, port); if (!conn->osmux.in) { LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Cannot allocate input osmux handle for conn:%s\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I867e3f74775d97749a78c2f198452b1f2916492f Gerrit-Change-Number: 29307 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: Add Osmux log category
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29304 ) Change subject: Add Osmux log category ...................................................................... Add Osmux log category Change-Id: Ia75de7965c39f3f84164a25584d901dbdd43f10f --- M include/osmocom/mgcp/debug.h M src/libosmo-mgcp/mgcp_osmux.c M src/osmo-mgw/mgw_main.c 3 files changed, 41 insertions(+), 33 deletions(-) Approvals: pespin: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/mgcp/debug.h b/include/osmocom/mgcp/debug.h index 7044c1e..f7d47d6 100644 --- a/include/osmocom/mgcp/debug.h +++ b/include/osmocom/mgcp/debug.h @@ -30,6 +30,7 @@ enum { DRTP, DE1, + DOSMUX, Debug_LastEntry, }; diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 0b84ad3..980dbf0 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -22,6 +22,7 @@ #include <osmocom/netif/rtp.h> #include <osmocom/netif/amr.h> +#include <osmocom/mgcp/debug.h> #include <osmocom/mgcp/mgcp.h> #include <osmocom/mgcp/mgcp_protocol.h> #include <osmocom/mgcp/osmux.h> @@ -71,7 +72,7 @@ llist_for_each_entry(h, &osmux_handle_list, head) { if (memcmp(&h->rem_addr, addr, sizeof(struct in_addr)) == 0 && h->rem_port == rem_port) { - LOGP(DLMGCP, LOGL_DEBUG, "using existing OSMUX handle " + LOGP(DOSMUX, LOGL_DEBUG, "using existing OSMUX handle " "for addr=%s:%d\n", inet_ntoa(*addr), ntohs(rem_port)); h->refcnt++; @@ -90,11 +91,11 @@ llist_for_each_entry(h, &osmux_handle_list, head) { if (h->in == in) { if (--h->refcnt == 0) { - LOGP(DLMGCP, LOGL_INFO, + LOGP(DOSMUX, LOGL_INFO, "Releasing unused osmux handle for %s:%d\n", inet_ntoa(h->rem_addr), ntohs(h->rem_port)); - LOGP(DLMGCP, LOGL_INFO, "Stats: " + LOGP(DOSMUX, LOGL_INFO, "Stats: " "input RTP msgs: %u bytes: %"PRIu64" " "output osmux msgs: %u bytes: %"PRIu64"\n", in->stats.input_rtp_msgs, @@ -108,7 +109,7 @@ return; } } - LOGP(DLMGCP, LOGL_ERROR, "cannot find Osmux input handle %p\n", in); + LOGP(DOSMUX, LOGL_ERROR, "cannot find Osmux input handle %p\n", in); } /* Allocate free OSMUX handle */ @@ -145,7 +146,7 @@ llist_add(&h->head, &osmux_handle_list); - LOGP(DLMGCP, LOGL_DEBUG, "created new OSMUX handle for addr=%s:%d\n", + LOGP(DOSMUX, LOGL_DEBUG, "created new OSMUX handle for addr=%s:%d\n", inet_ntoa(*addr), ntohs(rem_port)); return h; @@ -159,7 +160,7 @@ struct osmux_handle *h; if (addr->u.sa.sa_family != AF_INET) { - LOGP(DLMGCP, LOGL_DEBUG, "IPv6 not supported in osmux yet!\n"); + LOGP(DOSMUX, LOGL_DEBUG, "IPv6 not supported in osmux yet!\n"); return NULL; } @@ -192,7 +193,7 @@ msgb_put(msg, buf_len); if (conn->osmux.state != OSMUX_STATE_ENABLED) { - LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "forwarding RTP to Osmux conn not yet enabled, dropping (cid=%d)\n", conn->osmux.cid); return -1; } @@ -232,7 +233,7 @@ } } - LOGP(DLMGCP, LOGL_ERROR, "Cannot find osmux conn with cid=%d\n", cid); + LOGP(DOSMUX, LOGL_ERROR, "Cannot find osmux conn with cid=%d\n", cid); return NULL; } @@ -267,14 +268,14 @@ msg = msgb_alloc(4096, "OSMUX"); if (!msg) { - LOGP(DLMGCP, LOGL_ERROR, "cannot allocate message\n"); + LOGP(DOSMUX, LOGL_ERROR, "cannot allocate message\n"); return NULL; } ret = recvfrom(ofd->fd, msg->data, msg->data_len, 0, (struct sockaddr *)addr, &slen); if (ret <= 0) { msgb_free(msg); - LOGP(DLMGCP, LOGL_ERROR, "cannot receive message\n"); + LOGP(DOSMUX, LOGL_ERROR, "cannot receive message\n"); return NULL; } msgb_put(msg, ret); @@ -291,13 +292,13 @@ switch(conn->osmux.state) { case OSMUX_STATE_ACTIVATING: if (osmux_enable_conn(endp, conn, &conn->end.addr, conn->end.rtp_port) < 0) { - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Could not enable osmux for conn on %s: %s\n", sending ? "sent" : "received", mgcp_conn_dump(conn->conn)); return -1; } - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Osmux %s CID %u towards %s:%u is now enabled\n", sending ? "sent" : "received", conn->osmux.cid, @@ -307,7 +308,7 @@ case OSMUX_STATE_ENABLED: return 0; default: - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Osmux %s in conn %s without full negotiation, state %d\n", sending ? "sent" : "received", mgcp_conn_dump(conn->conn), conn->osmux.state); @@ -319,7 +320,7 @@ uint8_t *osmux_cid) { if (msg->len < 1 + sizeof(*osmux_cid)) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DOSMUX, LOGL_ERROR, "Discarding truncated Osmux dummy load: %s\n", osmo_hexdump(msg->data, msg->len)); return -1; } @@ -341,7 +342,7 @@ conn = osmux_conn_lookup(cfg, osmux_cid, &addr->sin_addr); if (!conn) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DOSMUX, LOGL_ERROR, "Cannot find conn for Osmux CID %d\n", osmux_cid); goto out; } @@ -369,7 +370,7 @@ return -1; if (!cfg->osmux) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DOSMUX, LOGL_ERROR, "bsc-nat wants to use Osmux but bsc did not request it\n"); goto out; } @@ -384,7 +385,7 @@ conn_src = osmux_conn_lookup(cfg, osmuxh->circuit_id, &addr.sin_addr); if (!conn_src) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DOSMUX, LOGL_ERROR, "Cannot find a src conn for circuit_id=%d\n", osmuxh->circuit_id); goto out; @@ -394,7 +395,7 @@ /*conn_dst = mgcp_find_dst_conn(conn_src->conn); if (!conn_dst) { - LOGP(DLMGCP, LOGL_ERROR, + LOGP(DOSMUX, LOGL_ERROR, "Cannot find a dst conn for circuit_id=%d\n", osmuxh->circuit_id); goto out; @@ -421,20 +422,20 @@ ret = mgcp_create_bind(cfg->osmux_addr, &osmux_fd, cfg->osmux_port, cfg->endp_dscp, cfg->endp_priority); if (ret < 0) { - LOGP(DLMGCP, LOGL_ERROR, "cannot bind OSMUX socket to %s:%u\n", + LOGP(DOSMUX, LOGL_ERROR, "cannot bind OSMUX socket to %s:%u\n", cfg->osmux_addr, cfg->osmux_port); return ret; } ret = osmo_fd_register(&osmux_fd); if (ret < 0) { - LOGP(DLMGCP, LOGL_ERROR, "cannot register OSMUX socket %s\n", + LOGP(DOSMUX, LOGL_ERROR, "cannot register OSMUX socket %s\n", osmo_sock_get_name2(osmux_fd.fd)); return ret; } cfg->osmux_init = 1; - LOGP(DLMGCP, LOGL_INFO, "OSMUX socket listening on %s\n", + LOGP(DOSMUX, LOGL_INFO, "OSMUX socket listening on %s\n", osmo_sock_get_name2(osmux_fd.fd)); return 0; @@ -464,7 +465,7 @@ /* Check if osmux is enabled for the specified connection */ if (conn->osmux.state != OSMUX_STATE_ACTIVATING) { - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "conn:%s didn't negotiate Osmux, state %d\n", mgcp_conn_dump(conn->conn), conn->osmux.state); return -1; @@ -475,20 +476,20 @@ conn->end.addr.u.sa.sa_family == AF_INET6 ? sizeof(struct in6_addr) : sizeof(struct in_addr)) == 0) { - LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "Osmux remote address/port still unknown\n"); return -1; } conn->osmux.in = osmux_handle_lookup(conn, addr, port); if (!conn->osmux.in) { - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Cannot allocate input osmux handle for conn:%s\n", mgcp_conn_dump(conn->conn)); return -1; } if (osmux_xfrm_input_open_circuit(conn->osmux.in, conn->osmux.cid, osmux_dummy) < 0) { - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, + LOGPCONN(conn->conn, DOSMUX, LOGL_ERROR, "Cannot open osmux circuit %u for conn:%s\n", conn->osmux.cid, mgcp_conn_dump(conn->conn)); return -1; @@ -514,7 +515,7 @@ OSMO_ASSERT(conn->osmux.state != OSMUX_STATE_DISABLED); - LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "Releasing connection using Osmux CID %u\n", conn->osmux.cid); if (conn->osmux.state == OSMUX_STATE_ENABLED) { @@ -547,7 +548,7 @@ int conn_osmux_allocate_cid(struct mgcp_conn_rtp *conn, int osmux_cid) { if (osmux_cid != -1 && osmux_cid_pool_allocated((uint8_t) osmux_cid)) { - LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "Osmux CID %d already allocated!\n", osmux_cid); return -1; @@ -556,7 +557,7 @@ if (osmux_cid == -1) { osmux_cid = osmux_cid_pool_get_next(); if (osmux_cid == -1) { - LOGPCONN(conn->conn, DLMGCP, LOGL_INFO, + LOGPCONN(conn->conn, DOSMUX, LOGL_INFO, "no available Osmux CID to allocate!\n"); return -1; } @@ -603,7 +604,7 @@ osmuxh->amr_ft = AMR_FT_0; osmuxh->circuit_id = conn->osmux.cid; - LOGPCONN(conn->conn, DLMGCP, LOGL_DEBUG, + LOGPCONN(conn->conn, DOSMUX, LOGL_DEBUG, "sending OSMUX dummy load to %s:%u CID %u\n", osmo_sockaddr_ntop(&conn->end.addr.u.sa, ipbuf), ntohs(conn->end.rtp_port), conn->osmux.cid); @@ -643,13 +644,13 @@ continue; osmux_cid_bitmap[i] |= (1 << j); - LOGP(DLMGCP, LOGL_DEBUG, + LOGP(DOSMUX, LOGL_DEBUG, "Allocating Osmux CID %u from pool\n", (i * 8) + j); return (i * 8) + j; } } - LOGP(DLMGCP, LOGL_ERROR, "All Osmux circuits are in use!\n"); + LOGP(DOSMUX, LOGL_ERROR, "All Osmux circuits are in use!\n"); return -1; } @@ -657,7 +658,7 @@ * \param[in] osmux_cid OSMUX cid */ void osmux_cid_pool_get(uint8_t osmux_cid) { - LOGP(DLMGCP, LOGL_DEBUG, "Allocating Osmux CID %u from pool\n", osmux_cid); + LOGP(DOSMUX, LOGL_DEBUG, "Allocating Osmux CID %u from pool\n", osmux_cid); osmux_cid_bitmap[osmux_cid / 8] |= (1 << (osmux_cid % 8)); } @@ -665,7 +666,7 @@ * \param[in] osmux_cid OSMUX cid */ void osmux_cid_pool_put(uint8_t osmux_cid) { - LOGP(DLMGCP, LOGL_DEBUG, "Osmux CID %u is back to the pool\n", osmux_cid); + LOGP(DOSMUX, LOGL_DEBUG, "Osmux CID %u is back to the pool\n", osmux_cid); osmux_cid_bitmap[osmux_cid / 8] &= ~(1 << (osmux_cid % 8)); } diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index d12011c..247dfd3 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -303,6 +303,12 @@ .color = "\033[1;31m", .enabled = 1,.loglevel = LOGL_NOTICE, }, + [DOSMUX] = { + .name = "DOSMUX", + .description = "Osmux (Osmocom RTP multiplexing)", + .color = "\033[1;32m", + .enabled = 1,.loglevel = LOGL_NOTICE, + }, }; const struct log_info log_info = { -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29304 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ia75de7965c39f3f84164a25584d901dbdd43f10f Gerrit-Change-Number: 29304 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: cosmetic: main: Properly format log_info_cat
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29305 ) Change subject: cosmetic: main: Properly format log_info_cat ...................................................................... cosmetic: main: Properly format log_info_cat Change-Id: If130d1debc1977b7f8d82f515861df2c513d55bb --- M src/osmo-mgw/mgw_main.c 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index 247dfd3..71b1f1e 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -295,19 +295,22 @@ .name = "DRTP", .description = "RTP stream handling", .color = "\033[1;30m", - .enabled = 1,.loglevel = LOGL_NOTICE, + .enabled = 1, + .loglevel = LOGL_NOTICE, }, [DE1] = { .name = "DE1", .description = "E1 line handling", .color = "\033[1;31m", - .enabled = 1,.loglevel = LOGL_NOTICE, + .enabled = 1, + .loglevel = LOGL_NOTICE, }, [DOSMUX] = { .name = "DOSMUX", .description = "Osmux (Osmocom RTP multiplexing)", .color = "\033[1;32m", - .enabled = 1,.loglevel = LOGL_NOTICE, + .enabled = 1, + .loglevel = LOGL_NOTICE, }, }; -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If130d1debc1977b7f8d82f515861df2c513d55bb Gerrit-Change-Number: 29305 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-mgw[master]: mgw: Use X-Osmux string define
by pespin 12 Sep '22

12 Sep '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29293 ) Change subject: mgw: Use X-Osmux string define ...................................................................... mgw: Use X-Osmux string define Change-Id: Ib437c0a6b414f1d8f08fdb90e88a61e9aed2780d --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index b5a0c58..a9e8818 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -301,7 +301,7 @@ /* Attach optional OSMUX parameters */ if (mgcp_conn_rtp_is_osmux(conn)) { - rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid); + rc = msgb_printf(sdp, MGCP_X_OSMO_OSMUX_HEADER " %u\r\n", conn->osmux.cid); if (rc < 0) goto error; } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ib437c0a6b414f1d8f08fdb90e88a61e9aed2780d Gerrit-Change-Number: 29293 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • ...
  • 186
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.