Change in osmo-mgw[master]: mgcp: switch to new osmux output APIs
Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/9216 ) Change subject: mgcp: switch to new osmux output APIs .. mgcp: switch to new osmux output APIs Older ones are being deprecated as they may generate interleaved packets. Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 11 insertions(+), 6 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index bdc285b..281595c 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -322,7 +322,6 @@ { struct msgb *msg; struct osmux_hdr *osmuxh; - struct llist_head list; struct sockaddr_in addr; struct mgcp_config *cfg = ofd->data; uint32_t rem; @@ -359,8 +358,7 @@ conn_bts->osmux.stats.chunks++; rem = msg->len; - osmux_xfrm_output(osmuxh, _bts->osmux.out, ); - osmux_tx_sched(, scheduled_tx_bts_cb, endp); + osmux_xfrm_output_sched(_bts->osmux.out, osmuxh); } out: msgb_free(msg); @@ -426,7 +424,6 @@ { struct msgb *msg; struct osmux_hdr *osmuxh; - struct llist_head list; struct sockaddr_in addr; struct mgcp_config *cfg = ofd->data; uint32_t rem; @@ -463,8 +460,7 @@ conn_net->osmux.stats.chunks++; rem = msg->len; - osmux_xfrm_output(osmuxh, _net->osmux.out, ); - osmux_tx_sched(, scheduled_tx_net_cb, endp); + osmux_xfrm_output_sched(_net->osmux.out, osmuxh); } out: msgb_free(msg); @@ -553,9 +549,13 @@ switch (endp->cfg->role) { case MGCP_BSC_NAT: conn->type = MGCP_OSMUX_BSC_NAT; + osmux_xfrm_output_set_tx_cb(>osmux.out, + scheduled_tx_net_cb, endp); break; case MGCP_BSC: conn->type = MGCP_OSMUX_BSC; + osmux_xfrm_output_set_tx_cb(>osmux.out, + scheduled_tx_bts_cb, endp); break; } @@ -576,6 +576,11 @@ LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); + + /* We are closing, we don't need pending RTP packets to be transmitted */ + osmux_xfrm_output_set_tx_cb(>osmux.out, NULL, NULL); + osmux_xfrm_output_flush(>osmux.out); + osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; conn->osmux.cid = -1; -- To view, visit https://gerrit.osmocom.org/9216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf Gerrit-Change-Number: 9216 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
Change in osmo-mgw[master]: mgcp: switch to new osmux output APIs
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/9216 ) Change subject: mgcp: switch to new osmux output APIs .. Patch Set 1: Code-Review+2 It's a forward port and it's been +1 for several days, merging. -- To view, visit https://gerrit.osmocom.org/9216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf Gerrit-Change-Number: 9216 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Sat, 19 May 2018 12:06:10 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-mgw[master]: mgcp: switch to new osmux output APIs
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/9216 ) Change subject: mgcp: switch to new osmux output APIs .. Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/9216/1/src/libosmo-mgcp/mgcp_osmux.c File src/libosmo-mgcp/mgcp_osmux.c: https://gerrit.osmocom.org/#/c/9216/1/src/libosmo-mgcp/mgcp_osmux.c@553 PS1, Line 553: scheduled_tx_net_cb, endp); > (weird indenting choice ... […] In any case, that's a forwardport from other commits already merged, so let's leave it as it is. -- To view, visit https://gerrit.osmocom.org/9216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf Gerrit-Change-Number: 9216 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Fri, 18 May 2018 10:16:39 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-mgw[master]: mgcp: switch to new osmux output APIs
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/9216 ) Change subject: mgcp: switch to new osmux output APIs .. Patch Set 1: Code-Review+1 (1 comment) I have no idea about this API https://gerrit.osmocom.org/#/c/9216/1/src/libosmo-mgcp/mgcp_osmux.c File src/libosmo-mgcp/mgcp_osmux.c: https://gerrit.osmocom.org/#/c/9216/1/src/libosmo-mgcp/mgcp_osmux.c@553 PS1, Line 553: scheduled_tx_net_cb, endp); (weird indenting choice ... we typically align with '(' or use one tab) -- To view, visit https://gerrit.osmocom.org/9216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf Gerrit-Change-Number: 9216 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Comment-Date: Thu, 17 May 2018 15:44:14 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-mgw[master]: mgcp: switch to new osmux output APIs
Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/9216 Change subject: mgcp: switch to new osmux output APIs .. mgcp: switch to new osmux output APIs Older ones are being deprecated as they may generate interleaved packets. Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf --- M src/libosmo-mgcp/mgcp_osmux.c 1 file changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/16/9216/1 diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index bdc285b..281595c 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -322,7 +322,6 @@ { struct msgb *msg; struct osmux_hdr *osmuxh; - struct llist_head list; struct sockaddr_in addr; struct mgcp_config *cfg = ofd->data; uint32_t rem; @@ -359,8 +358,7 @@ conn_bts->osmux.stats.chunks++; rem = msg->len; - osmux_xfrm_output(osmuxh, _bts->osmux.out, ); - osmux_tx_sched(, scheduled_tx_bts_cb, endp); + osmux_xfrm_output_sched(_bts->osmux.out, osmuxh); } out: msgb_free(msg); @@ -426,7 +424,6 @@ { struct msgb *msg; struct osmux_hdr *osmuxh; - struct llist_head list; struct sockaddr_in addr; struct mgcp_config *cfg = ofd->data; uint32_t rem; @@ -463,8 +460,7 @@ conn_net->osmux.stats.chunks++; rem = msg->len; - osmux_xfrm_output(osmuxh, _net->osmux.out, ); - osmux_tx_sched(, scheduled_tx_net_cb, endp); + osmux_xfrm_output_sched(_net->osmux.out, osmuxh); } out: msgb_free(msg); @@ -553,9 +549,13 @@ switch (endp->cfg->role) { case MGCP_BSC_NAT: conn->type = MGCP_OSMUX_BSC_NAT; + osmux_xfrm_output_set_tx_cb(>osmux.out, + scheduled_tx_net_cb, endp); break; case MGCP_BSC: conn->type = MGCP_OSMUX_BSC; + osmux_xfrm_output_set_tx_cb(>osmux.out, + scheduled_tx_bts_cb, endp); break; } @@ -576,6 +576,11 @@ LOGP(DLMGCP, LOGL_INFO, "Releasing connection %s using Osmux CID %u\n", conn->conn->id, conn->osmux.cid); + + /* We are closing, we don't need pending RTP packets to be transmitted */ + osmux_xfrm_output_set_tx_cb(>osmux.out, NULL, NULL); + osmux_xfrm_output_flush(>osmux.out); + osmux_xfrm_input_close_circuit(conn->osmux.in, conn->osmux.cid); conn->osmux.state = OSMUX_STATE_DISABLED; conn->osmux.cid = -1; -- To view, visit https://gerrit.osmocom.org/9216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0705aa4dc4b02eaff4d6030795243e6720f7fddf Gerrit-Change-Number: 9216 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol