Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32401 )
Change subject: e1d: initialize file descriptor numbers to -1 on startup
......................................................................
Patch Set 1:
(3 comments)
File src/input/e1d.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-6192):
https://gerrit.osmocom.org/c/libosmo-abis/+/32401/comment/39de11ca_6539940b
PS1, Line 526: for (ts=1; ts<line->num_ts; ts++)
that open brace { should be on the previous line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-6192):
https://gerrit.osmocom.org/c/libosmo-abis/+/32401/comment/5dbbc2fa_29ca673c
PS1, Line 526: for (ts=1; ts<line->num_ts; ts++)
spaces required around that '=' (ctx:VxV)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-6192):
https://gerrit.osmocom.org/c/libosmo-abis/+/32401/comment/2dbd3330_cd82ee1b
PS1, Line 526: for (ts=1; ts<line->num_ts; ts++)
spaces required around that '<' (ctx:VxV)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32401
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I2de8fccad56279748ed9cc035aebf4e2d3935172
Gerrit-Change-Number: 32401
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Fri, 21 Apr 2023 10:19:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32401 )
Change subject: e1d: initialize file descriptor numbers to -1 on startup
......................................................................
e1d: initialize file descriptor numbers to -1 on startup
The file descriptor numbers (bfd->fd) are not initialized, this means
they are set to 0 in the beginning. This technically also means that
the file descriptors point to STDIN, which is wrong. Let's use the
line_create callback of driver to initialize them to -1.
Change-Id: I2de8fccad56279748ed9cc035aebf4e2d3935172
---
M src/input/e1d.c
1 file changed, 31 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/01/32401/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index 01da96d..216575e 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -519,10 +519,27 @@
return 0;
}
+static int e1d_line_create(struct e1inp_line *line)
+{
+ int ts;
+
+ for (ts=1; ts<line->num_ts; ts++)
+ {
+ unsigned int idx = ts-1;
+ struct e1inp_ts *e1i_ts = &line->ts[idx];
+ struct osmo_fd *bfd = &e1i_ts->driver.e1d.fd;
+
+ bfd->fd = -1;
+ }
+
+ return 0;
+}
+
struct e1inp_driver e1d_driver = {
.name = "e1d",
.want_write = e1d_want_write,
.line_update = e1d_line_update,
+ .line_create = e1d_line_create,
};
int e1inp_e1d_init(void)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32401
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I2de8fccad56279748ed9cc035aebf4e2d3935172
Gerrit-Change-Number: 32401
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32402 )
Change subject: e1d: fix logic to detect if a timeslot is in use
......................................................................
e1d: fix logic to detect if a timeslot is in use
When we check bfd->fd, we also treat 0 as "not in use". This is not
correct since 0 is a valid file descriptor (STDIN). Since we reliably
initialize the file descriptor numbers to -1 on startup we can fix this.
So let's treat all positive file descriptor numbers, including zero as
an open timeslot.
Change-Id: I67bc5ca25620ff96441391798f761144570c8306
---
M src/input/e1d.c
1 file changed, 22 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/02/32402/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index 216575e..7b70dfe 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -427,17 +427,17 @@
lapd_instance_free(e1i_ts->lapd);
e1i_ts->lapd = NULL;
}
- if (bfd->fd) {
+ if (bfd->fd >= 0) {
close(bfd->fd);
bfd->fd = -1;
}
continue;
case E1INP_TS_TYPE_SIGN:
- if (bfd->fd > 0 && ts_info[ts].cfg.mode != E1DP_TSMODE_HDLCFCS) {
+ if (bfd->fd >= 0 && ts_info[ts].cfg.mode != E1DP_TSMODE_HDLCFCS) {
close(bfd->fd);
bfd->fd = -1;
}
- if (bfd->fd <= 0) {
+ if (bfd->fd < 0) {
bfd->fd = osmo_e1dp_client_ts_open(g_e1d, e1d_intf, e1d_line, ts,
E1DP_TSMODE_HDLCFCS, D_BCHAN_TX_GRAN);
}
@@ -463,11 +463,11 @@
e1i_ts->lapd = NULL;
}
/* close, if old timeslot mode doesn't match new config */
- if (bfd->fd > 0 && ts_info[ts].cfg.mode != E1DP_TSMODE_HDLCFCS) {
+ if (bfd->fd >= 0 && ts_info[ts].cfg.mode != E1DP_TSMODE_HDLCFCS) {
close(bfd->fd);
bfd->fd = -1;
}
- if (bfd->fd <= 0) {
+ if (bfd->fd < 0) {
bfd->fd = osmo_e1dp_client_ts_open(g_e1d, e1d_intf, e1d_line, ts,
E1DP_TSMODE_HDLCFCS, D_BCHAN_TX_GRAN);
}
@@ -487,11 +487,11 @@
e1i_ts->lapd = NULL;
}
/* close, if old timeslot mode doesn't match new config */
- if (bfd->fd > 0 && ts_info[ts].cfg.mode != E1DP_TSMODE_RAW) {
+ if (bfd->fd >= 0 && ts_info[ts].cfg.mode != E1DP_TSMODE_RAW) {
close(bfd->fd);
bfd->fd = -1;
}
- if (bfd->fd <= 0) {
+ if (bfd->fd < 0) {
bfd->fd = osmo_e1dp_client_ts_open(g_e1d, e1d_intf, e1d_line, ts,
E1DP_TSMODE_RAW, D_BCHAN_TX_GRAN);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32402
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I67bc5ca25620ff96441391798f761144570c8306
Gerrit-Change-Number: 32402
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32400 )
Change subject: e1_input: add new driver callback function: line_create
......................................................................
e1_input: add new driver callback function: line_create
When a line is created using e1inp_line_create, then the line data
structures are initialized and the line is registered in the line list.
struct e1inp_line also contains driver specific sub structs that,
depending on the driver, might also need some initialization. At the
moment is no way to do that, so lets add a line_create callback that,
when populated by the driver, is executed on line creation.
Related: OS#5983
Change-Id: I404fa23e9b8a952be84e9716889c0dbbbc665d22
---
M include/osmocom/abis/e1_input.h
M src/e1_input.c
2 files changed, 27 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/00/32400/1
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index a66f8eb..a7d4e76 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -182,6 +182,7 @@
const char *name;
int (*want_write)(struct e1inp_ts *ts);
int (*line_update)(struct e1inp_line *line);
+ int (*line_create)(struct e1inp_line *line);
void (*close)(struct e1inp_sign_link *link);
void (*vty_show)(struct vty *vty, struct e1inp_line *line);
int default_delay;
diff --git a/src/e1_input.c b/src/e1_input.c
index e3ac67e..6e0a924 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -639,8 +639,15 @@
line->use_count.talloc_object = line;
line->use_count.use_cb = e1inp_line_use_cb;
- e1inp_line_get2(line, "ctor");
+ if (driver->line_create) {
+ if (driver->line_create(line) < 0) {
+ talloc_free(line);
+ return NULL;
+ }
+ }
+
+ e1inp_line_get2(line, "ctor");
llist_add_tail(&line->list, &e1inp_line_list);
return line;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32400
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I404fa23e9b8a952be84e9716889c0dbbbc665d22
Gerrit-Change-Number: 32400
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32332 )
Change subject: flags: add missing entries to bts_impl_flag_desc[]
......................................................................
Patch Set 1:
(1 comment)
File src/common/bts.c:
https://gerrit.osmocom.org/c/osmo-bts/+/32332/comment/b2eaf7f3_0afef552
PS1, Line 205: { BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER, "RadioCarrier MO must be Enabled before OPSTARTing" },
> "[ ...]before OPSTARTing RadioChannel". Otherwise it makes no sense.
I've changed it to "RadioCchannel MO depends on RadioCarrier MO".
It's not the right place to have long descriptions explaining all the details.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32332
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I83e5065f9f80b4f81e9767f184c8dc027883025a
Gerrit-Change-Number: 32332
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 21 Apr 2023 10:08:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/32332
to look at the new patch set (#2).
Change subject: flags: add missing entries to bts_impl_flag_desc[]
......................................................................
flags: add missing entries to bts_impl_flag_desc[]
The following output can be seen when doing 'show bts' in the VTY:
BTS model specific (internal) flags:
001 Measurement and Payload data combined
003 unknown 0x8
Fix this by adding the missing values to the value-string array.
Change-Id: I83e5065f9f80b4f81e9767f184c8dc027883025a
Fixes: 0277cddab "sysmo,oc2g,lc15: Make RadioChannel MO depend on RadioCarrier MO"
Fixes: ee5eb6169 "l1sap: check if BTS model supports interference reporting"
---
M src/common/bts.c
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/32332/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32332
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I83e5065f9f80b4f81e9767f184c8dc027883025a
Gerrit-Change-Number: 32332
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset