[PATCH] osmo-bts[master]: Use L1P instead of L1C for TCH logging and allocation

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Jul 3 09:41:35 UTC 2017


Hello Jenkins Builder,

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

    https://gerrit.osmocom.org/3093

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

Use L1P instead of L1C for TCH logging and allocation

L1C is for L1-Control primitives, while TCH channels are L1 Data
channels.

Change-Id: I07ea3a7326bfcb62271d58deb0743311f6d97c8b
---
M src/osmo-bts-litecell15/tch.c
M src/osmo-bts-octphy/l1_tch.c
M src/osmo-bts-sysmo/tch.c
3 files changed, 34 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/93/3093/2

diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c
index 8bed695..c82d6f8 100644
--- a/src/osmo-bts-litecell15/tch.c
+++ b/src/osmo-bts-litecell15/tch.c
@@ -61,7 +61,7 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -95,7 +95,7 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -126,12 +126,12 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
 	if (payload_len != GSM_HR_BYTES) {
-		LOGP(DL1C, LOGL_ERROR, "L1 HR frame length %u != expected %u\n",
+		LOGP(DL1P, LOGL_ERROR, "L1 HR frame length %u != expected %u\n",
 			payload_len, GSM_HR_BYTES);
 		return NULL;
 	}
@@ -155,7 +155,7 @@
 {
 
 	if (payload_len != GSM_HR_BYTES) {
-		LOGP(DL1C, LOGL_ERROR, "RTP HR frame length %u != expected %u\n",
+		LOGP(DL1P, LOGL_ERROR, "RTP HR frame length %u != expected %u\n",
 			payload_len, GSM_HR_BYTES);
 		return 0;
 	}
@@ -172,7 +172,7 @@
 	uint8_t amr_if2_len = payload_len - 2;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -405,31 +405,31 @@
 	case GsmL1_TchPlType_Amr_SidFirstP1:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_FIRST_P1 from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_FIRST_P1 from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	case GsmL1_TchPlType_Amr_SidFirstP2:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_FIRST_P2 from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_FIRST_P2 from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	case GsmL1_TchPlType_Amr_SidFirstInH:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
 		lchan->rtp_tx_marker = true;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_FIRST_INH from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_FIRST_INH from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	case GsmL1_TchPlType_Amr_SidUpdateInH:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
 		lchan->rtp_tx_marker = true;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_UPDATE_INH from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_UPDATE_INH from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	default:
-		LOGP(DL1C, LOGL_NOTICE, "%s Rx Payload Type %s is unsupported\n",
+		LOGP(DL1P, LOGL_NOTICE, "%s Rx Payload Type %s is unsupported\n",
 			gsm_lchan_name(lchan),
 			get_value_string(lc15bts_tch_pl_names, payload_type));
 		break;
@@ -465,7 +465,7 @@
 	return 0;
 
 err_payload_match:
-	LOGP(DL1C, LOGL_ERROR, "%s Rx Payload Type %s incompatible with lchan\n",
+	LOGP(DL1P, LOGL_ERROR, "%s Rx Payload Type %s incompatible with lchan\n",
 		gsm_lchan_name(lchan),
 		get_value_string(lc15bts_tch_pl_names, payload_type));
 	return -EINVAL;
diff --git a/src/osmo-bts-octphy/l1_tch.c b/src/osmo-bts-octphy/l1_tch.c
index 5693313..79bf245 100644
--- a/src/osmo-bts-octphy/l1_tch.c
+++ b/src/osmo-bts-octphy/l1_tch.c
@@ -43,7 +43,7 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -93,7 +93,7 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -132,12 +132,12 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
 	if (payload_len != GSM_HR_BYTES) {
-		LOGP(DL1C, LOGL_ERROR, "L1 HR frame length %u != expected %u\n",
+		LOGP(DL1P, LOGL_ERROR, "L1 HR frame length %u != expected %u\n",
 			payload_len, GSM_HR_BYTES);
 		return NULL;
 	}
@@ -164,7 +164,7 @@
 {
 
 	if (payload_len != GSM_HR_BYTES) {
-		LOGP(DL1C, LOGL_ERROR, "RTP HR frame length %u != expected %u\n",
+		LOGP(DL1P, LOGL_ERROR, "RTP HR frame length %u != expected %u\n",
 			payload_len, GSM_HR_BYTES);
 		return 0;
 	}
@@ -217,13 +217,13 @@
 			goto err_payload_match;
 		break;
 	default:
-		LOGP(DL1C, LOGL_NOTICE,
+		LOGP(DL1P, LOGL_NOTICE,
 		     "%s Rx Payload Type %d is unsupported\n",
 		     gsm_lchan_name(lchan), payload_type);
 		break;
 	}
 
-	LOGP(DL1C, LOGL_DEBUG, "%s Rx codec frame (%u): %s\n",
+	LOGP(DL1P, LOGL_DEBUG, "%s Rx codec frame (%u): %s\n",
 	     gsm_lchan_name(lchan), payload_len, osmo_hexdump(payload,
 							      payload_len));
 
@@ -247,7 +247,7 @@
 		rmsg = l1_to_rtppayload_amr(payload, payload_len,
 				&lchan->tch.amr_mr);
 #else
-		LOGP(DL1C, LOGL_ERROR, "OctPHY only supports FR!\n");
+		LOGP(DL1P, LOGL_ERROR, "OctPHY only supports FR!\n");
 		return -1;
 #endif
 		break;
@@ -260,7 +260,7 @@
 	return 0;
 
 err_payload_match:
-	LOGP(DL1C, LOGL_ERROR,
+	LOGP(DL1P, LOGL_ERROR,
 	     "%s Rx Payload Type %d incompatible with lchan\n",
 	     gsm_lchan_name(lchan), payload_type);
 	return -EINVAL;
diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c
index a12b1a7..6333d19 100644
--- a/src/osmo-bts-sysmo/tch.c
+++ b/src/osmo-bts-sysmo/tch.c
@@ -58,7 +58,7 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -113,7 +113,7 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -200,12 +200,12 @@
 	struct msgb *msg;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
 	if (payload_len != GSM_HR_BYTES) {
-		LOGP(DL1C, LOGL_ERROR, "L1 HR frame length %u != expected %u\n",
+		LOGP(DL1P, LOGL_ERROR, "L1 HR frame length %u != expected %u\n",
 			payload_len, GSM_HR_BYTES);
 		return NULL;
 	}
@@ -239,7 +239,7 @@
 {
 
 	if (payload_len != GSM_HR_BYTES) {
-		LOGP(DL1C, LOGL_ERROR, "RTP HR frame length %u != expected %u\n",
+		LOGP(DL1P, LOGL_ERROR, "RTP HR frame length %u != expected %u\n",
 			payload_len, GSM_HR_BYTES);
 		return 0;
 	}
@@ -269,7 +269,7 @@
 	uint8_t amr_if2_len = payload_len - 2;
 	uint8_t *cur;
 
-	msg = msgb_alloc_headroom(1024, 128, "L1C-to-RTP");
+	msg = msgb_alloc_headroom(1024, 128, "L1P-to-RTP");
 	if (!msg)
 		return NULL;
 
@@ -296,7 +296,7 @@
 	else if (cmr_idx >= amr_mrc->num_modes ||
 		 cmr_idx > GsmL1_AmrCodecMode_Unset) {
 		/* Make sure the CMR of the phone is in the active codec set */
-		LOGP(DL1C, LOGL_NOTICE, "L1->RTP: overriding CMR IDX %u\n", cmr_idx);
+		LOGP(DL1P, LOGL_NOTICE, "L1->RTP: overriding CMR IDX %u\n", cmr_idx);
 		cmr = AMR_CMR_NONE;
 	} else {
 		cmr = amr_mrc->bts_mode[cmr_idx].mode;
@@ -552,31 +552,31 @@
 	case GsmL1_TchPlType_Amr_SidFirstP1:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_FIRST_P1 from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_FIRST_P1 from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	case GsmL1_TchPlType_Amr_SidFirstP2:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_FIRST_P2 from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_FIRST_P2 from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	case GsmL1_TchPlType_Amr_SidFirstInH:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
 		lchan->rtp_tx_marker = true;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_FIRST_INH from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_FIRST_INH from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	case GsmL1_TchPlType_Amr_SidUpdateInH:
 		if (lchan->type != GSM_LCHAN_TCH_H)
 			goto err_payload_match;
 		lchan->rtp_tx_marker = true;
-		LOGP(DL1C, LOGL_DEBUG, "DTX: received SID_UPDATE_INH from L1 "
+		LOGP(DL1P, LOGL_DEBUG, "DTX: received SID_UPDATE_INH from L1 "
 		     "(%d bytes)\n", payload_len);
 		break;
 	default:
-		LOGP(DL1C, LOGL_NOTICE, "%s Rx Payload Type %s is unsupported\n",
+		LOGP(DL1P, LOGL_NOTICE, "%s Rx Payload Type %s is unsupported\n",
 			gsm_lchan_name(lchan),
 			get_value_string(femtobts_tch_pl_names, payload_type));
 		break;
@@ -614,7 +614,7 @@
 	return 0;
 
 err_payload_match:
-	LOGP(DL1C, LOGL_ERROR, "%s Rx Payload Type %s incompatible with lchan\n",
+	LOGP(DL1P, LOGL_ERROR, "%s Rx Payload Type %s incompatible with lchan\n",
 		gsm_lchan_name(lchan),
 		get_value_string(femtobts_tch_pl_names, payload_type));
 	return -EINVAL;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I07ea3a7326bfcb62271d58deb0743311f6d97c8b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list