[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-11-21 Thread dexter
dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..

pcu_l1_if: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU and store this information in
struct gprs_rlcmac_bts

Related: OS#6191
Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
---
M include/osmocom/pcu/pcuif_proto.h
M src/bts.h
M src/pcu_l1_if.cpp
3 files changed, 47 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved




diff --git a/include/osmocom/pcu/pcuif_proto.h 
b/include/osmocom/pcu/pcuif_proto.h
index 1133ca6..33036c3 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -8,7 +8,7 @@

 #define PCU_SOCK_DEFAULT   "/tmp/pcu_bts"

-#define PCU_IF_VERSION 0x0b
+#define PCU_IF_VERSION 0x0c
 #define TXT_MAX_LEN128

 /* msg_type */
@@ -63,6 +63,17 @@
 #define PCU_IF_ADDR_TYPE_IPV4  0x04/* IPv4 address */
 #define PCU_IF_ADDR_TYPE_IPV6  0x29/* IPv6 address */

+/* BTS model */
+enum gsm_pcuif_bts_model {
+   PCU_IF_BTS_MODEL_UNSPEC,
+   PCU_IF_BTS_MODEL_LC15,
+   PCU_IF_BTS_MODEL_OC2G,
+   PCU_IF_BTS_MODEL_OCTPHY,
+   PCU_IF_BTS_MODEL_SYSMO,
+   PCU_IF_BTS_MODEL_TRX,
+   PCU_IF_BTS_MODEL_RBS,
+};
+
 #define PCU_IF_NUM_NSVC 2
 #define PCU_IF_NUM_TRX 8

@@ -176,6 +187,7 @@
struct in_addr v4;
struct in6_addr v6;
} remote_ip[PCU_IF_NUM_NSVC];
+   uint8_t bts_model; /* enum gsm_pcuif_bts_model */
 } __attribute__ ((packed));

 /* E1 CCU connection parameters */
diff --git a/src/bts.h b/src/bts.h
index 3fe4503..1d88cb5 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -275,6 +275,9 @@
struct llist_head pch_timer;

struct osmo_time_cc all_allocated_pdch;
+
+   /* BTS hardware model, see pcuif_proto.h */
+   uint8_t bts_model;
 };

 struct paging_req_cs {
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 9557f66..e391829 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -724,6 +724,17 @@
return gprs_ns_update_config(bts, info_ind->nsei, local, remote, nsvci, 
valid);
 }

+const struct value_string gsm_pcuif_bts_model_names[] = {
+   { PCU_IF_BTS_MODEL_UNSPEC,  "(unspecified)" },
+   { PCU_IF_BTS_MODEL_LC15,"osmo-bts-lc15" },
+   { PCU_IF_BTS_MODEL_OC2G,"osmo-bts-oc2g" },
+   { PCU_IF_BTS_MODEL_OCTPHY,  "osmo-bts-octphy" },
+   { PCU_IF_BTS_MODEL_SYSMO,   "osmo-bts-sysmo" },
+   { PCU_IF_BTS_MODEL_TRX, "osmo-bts-trx" },
+   { PCU_IF_BTS_MODEL_RBS, "ericsson-rbs" },
+   { 0, NULL }
+};
+
 static int pcu_rx_info_ind(struct gprs_rlcmac_bts *bts, const struct 
gsm_pcu_if_info_ind *info_ind)
 {
struct gprs_bssgp_pcu *pcu;
@@ -933,6 +944,9 @@
}
}

+   LOGP(DL1IF, LOGL_INFO, "BTS model: %s\n", 
get_value_string(gsm_pcuif_bts_model_names, info_ind->bts_model));
+   bts->bts_model = info_ind->bts_model;
+
bts->active = true;
return rc;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 7
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-11-03 Thread laforge
Attention is currently required from: dexter, fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 6: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 6
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Fri, 03 Nov 2023 19:41:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-24 Thread laforge
Attention is currently required from: dexter, fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 5
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Tue, 24 Oct 2023 19:23:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-23 Thread pespin
Attention is currently required from: dexter, fixeria, laforge.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 5
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Mon, 23 Oct 2023 10:21:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-23 Thread dexter
Attention is currently required from: fixeria, laforge, pespin.

Hello Jenkins Builder, fixeria, pespin,

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

https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email

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

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: pcu_l1_if: signal BTS model via PCUIF
..

pcu_l1_if: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU and store this information in
struct gprs_rlcmac_bts

Related: OS#6191
Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
---
M include/osmocom/pcu/pcuif_proto.h
M src/bts.h
M src/pcu_l1_if.cpp
3 files changed, 47 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/34647/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 5
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-23 Thread dexter
Attention is currently required from: fixeria, laforge, pespin.

dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 5:

(1 comment)

File src/pcu_l1_if.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/6d618392_05bc6a3d
PS4, Line 806:  { PCU_IF_BTS_MODEL_TRX, "osmo-trx" },
> I'd vote for osmo-bts-trx
I think that makes sense. I think we should rename the others too.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 5
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 23 Oct 2023 10:13:49 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-19 Thread laforge
Attention is currently required from: dexter, fixeria, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 4:

(1 comment)

File src/pcu_l1_if.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/38196b77_3113ee7e
PS4, Line 806:  { PCU_IF_BTS_MODEL_TRX, "osmo-trx" },
> Or rather "trx" if you follow the logic above.
I'd vote for osmo-bts-trx



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 19 Oct 2023 07:35:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-18 Thread pespin
Attention is currently required from: dexter, fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 4:

(1 comment)

File src/pcu_l1_if.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/f0915804_6915643e
PS4, Line 806:  { PCU_IF_BTS_MODEL_TRX, "osmo-trx" },
> This one should actually be osmo-bts-trx. There are other TRX implementations 
> than osmo-trx too.
Or rather "trx" if you follow the logic above.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 18 Oct 2023 10:21:42 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-18 Thread pespin
Attention is currently required from: dexter, fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 4:

(1 comment)

File src/pcu_l1_if.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/99246412_974dd8d8
PS4, Line 806:  { PCU_IF_BTS_MODEL_TRX, "osmo-trx" },
This one should actually be osmo-bts-trx. There are other TRX implementations 
than osmo-trx too.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 18 Oct 2023 10:20:26 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-18 Thread dexter
Attention is currently required from: fixeria, pespin.

Hello Jenkins Builder, fixeria, pespin,

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

https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email

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

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: pcu_l1_if: signal BTS model via PCUIF
..

pcu_l1_if: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU and store this information in
struct gprs_rlcmac_bts

Related: OS#6191
Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
---
M include/osmocom/pcu/pcuif_proto.h
M src/bts.h
M src/pcu_l1_if.cpp
3 files changed, 47 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/34647/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-18 Thread dexter
Attention is currently required from: fixeria, pespin.

dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 4:

(1 comment)

File src/pcu_l1_if.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/444d2eb3_9ef12cf2
PS3, Line 805:  { PCU_IF_BTS_MODEL_SYSMO,   "sysmo-bts" },
> first time I see "sysmo-bts" instead of "sysmobts". […]
I have now cleaned up the list. The parenthesis mean that the BTS is not a real 
BTS model.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 18 Oct 2023 08:12:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-17 Thread dexter
Attention is currently required from: fixeria, pespin.

dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 2:

(3 comments)

File include/osmocom/pcu/pcuif_proto.h:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/9793fb22_add9ce4b
PS1, Line 70: #define PCU_IF_BTS_MODEL_UNSPEC   0x00
> I definetly want an enum here. The field in the struct can remain a uint of 
> known size.
Done


https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/07bbd891_48eb8b60
PS1, Line 193:  uint8_t bts_model;
> comment referencing the enum type above.
Done


File src/pcu_l1_if.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/ead06207_58fcb40a
PS1, Line 1016: LOGP(DL1IF, LOGL_INFO, "BTS model: %02x\n", 
info_ind->bts_model);
> value_string.
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 17 Oct 2023 15:11:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-17 Thread dexter
Attention is currently required from: fixeria, pespin.

Hello Jenkins Builder, fixeria, pespin,

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

https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email

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

The following approvals got outdated and were removed:
Code-Review-1 by fixeria, Code-Review-1 by pespin, Verified+1 by Jenkins Builder


Change subject: pcu_l1_if: signal BTS model via PCUIF
..

pcu_l1_if: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU and store this information in
struct gprs_rlcmac_bts

Related: OS#6191
Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
---
M include/osmocom/pcu/pcuif_proto.h
M src/bts.h
M src/pcu_l1_if.cpp
3 files changed, 36 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/34647/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-10 Thread pespin
Attention is currently required from: dexter, fixeria.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 1:

(1 comment)

File include/osmocom/pcu/pcuif_proto.h:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/558bfaf8_4e38ec73
PS1, Line 70: #define PCU_IF_BTS_MODEL_UNSPEC   0x00
> I have opted against an enum since the other fields also do not use enums 
> (see the defines above). […]
I definetly want an enum here. The field in the struct can remain a uint of 
known size.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Tue, 10 Oct 2023 11:36:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-10 Thread dexter
Attention is currently required from: fixeria, pespin.

dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 1:

(2 comments)

Patchset:

PS1:
> This is something that needs to be done carefully: you're adding a new field, 
> but the PCUIF version  […]
I have had a look at this. I think CHECK_IF_MSG_SIZE may tolerate this. It 
checks if the length of the date it received is smaller than the indication. In 
case more data is received, the check won't be set off.

This would mean newer osmo-bts/osmo-bsc would definetly work with older 
osmo-pcu versions, but the other way around there may be problems (I didn't 
count out the bytes)

So yes, I also think this means that we must increment the PCUIF version again. 
But before we do this we should drop the backward compatibility clutter in 
osmo-pcu and the TTCN3 tests to have a clean path.


File include/osmocom/pcu/pcuif_proto.h:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/3233b29d_d9bd2d85
PS1, Line 70: #define PCU_IF_BTS_MODEL_UNSPEC   0x00
> can we please have an enum?
I have opted against an enum since the other fields also do not use enums (see 
the defines above). I think an enum will look a bit out of place there.

What do you think? Shall I still migrate this to an enum?



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 10 Oct 2023 11:17:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-05 Thread fixeria
Attention is currently required from: dexter.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 1: Code-Review-1

(1 comment)

Patchset:

PS1:
This is something that needs to be done carefully: you're adding a new field, 
but the PCUIF version remains unchanged. Old osmo-{bts,bsc} speaking the same 
PCUIF version will not include this field, so the INFO.ind message will get 
dropped in `pcu_rx()`, see `CHECK_IF_MSG_SIZE`. I know PCUIF sucks when it 
comes to adding new fields, I wish at least the INFO.ind would employ TLV 
encoding rather than static structure...



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 05 Oct 2023 13:48:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-05 Thread pespin
Attention is currently required from: dexter.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )

Change subject: pcu_l1_if: signal BTS model via PCUIF
..


Patch Set 1: Code-Review-1

(3 comments)

File include/osmocom/pcu/pcuif_proto.h:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/ccd38157_004a5f34
PS1, Line 70: #define PCU_IF_BTS_MODEL_UNSPEC   0x00
can we please have an enum?


https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/a337e48e_b423ac1f
PS1, Line 193:  uint8_t bts_model;
comment referencing the enum type above.


File src/pcu_l1_if.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/34647/comment/70e5095d_369c9f34
PS1, Line 1016: LOGP(DL1IF, LOGL_INFO, "BTS model: %02x\n", 
info_ind->bts_model);
value_string.



--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 05 Oct 2023 11:41:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-pcu[master]: pcu_l1_if: signal BTS model via PCUIF

2023-10-05 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email )


Change subject: pcu_l1_if: signal BTS model via PCUIF
..

pcu_l1_if: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU and store this information in
struct gprs_rlcmac_bts

Related: OS#6191
Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
---
M include/osmocom/pcu/pcuif_proto.h
M src/bts.h
M src/pcu_l1_if.cpp
3 files changed, 35 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/34647/1

diff --git a/include/osmocom/pcu/pcuif_proto.h 
b/include/osmocom/pcu/pcuif_proto.h
index 9df85d9..066ef47 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -66,6 +66,17 @@
 #define PCU_IF_ADDR_TYPE_IPV4  0x04/* IPv4 address */
 #define PCU_IF_ADDR_TYPE_IPV6  0x29/* IPv6 address */

+/* BTS model */
+#define PCU_IF_BTS_MODEL_UNSPEC0x00
+#define PCU_IF_BTS_MODEL_LC15  0x01
+#define PCU_IF_BTS_MODEL_OC2G  0x02
+#define PCU_IF_BTS_MODEL_OCTPHY0x03
+#define PCU_IF_BTS_MODEL_SYSMO 0x04
+#define PCU_IF_BTS_MODEL_TRX   0x05
+#define PCU_IF_BTS_MODEL_VIRTUAL   0x06
+#define PCU_IF_BTS_MODEL_OMLDUMMY  0x07
+#define PCU_IF_BTS_MODEL_RBS   0x08
+
 #define PCU_IF_NUM_NSVC 2
 #define PCU_IF_NUM_TRX 8

@@ -179,6 +190,7 @@
struct in_addr v4;
struct in6_addr v6;
} remote_ip[PCU_IF_NUM_NSVC];
+   uint8_t bts_model;
 } __attribute__ ((packed));

 /* E1 CCU connection parameters */
diff --git a/src/bts.h b/src/bts.h
index 3fe4503..1d88cb5 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -275,6 +275,9 @@
struct llist_head pch_timer;

struct osmo_time_cc all_allocated_pdch;
+
+   /* BTS hardware model, see pcuif_proto.h */
+   uint8_t bts_model;
 };

 struct paging_req_cs {
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 4fcec31..ef11105 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -1013,6 +1013,9 @@
}
}

+   LOGP(DL1IF, LOGL_INFO, "BTS model: %02x\n", info_ind->bts_model);
+   bts->bts_model = info_ind->bts_model;
+
bts->active = true;
return rc;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34647?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Gerrit-Change-Number: 34647
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-MessageType: newchange