[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-19 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email )

 (

3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: Indicate remote alarm bit as remote alarm inidication
..

Indicate remote alarm bit as remote alarm inidication

The flag that stores the current alarm is not cleared periodically.
Instead it is cleared when the alarm ceases.

Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
---
M src/intf_line.c
M src/mux_demux.c
2 files changed, 27 insertions(+), 4 deletions(-)

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




diff --git a/src/intf_line.c b/src/intf_line.c
index f41214e..4433e96 100644
--- a/src/intf_line.c
+++ b/src/intf_line.c
@@ -239,7 +239,7 @@
}

line->ts0.prev_errmask = line->ts0.cur_errmask;
-   line->ts0.cur_errmask = 0;
+   line->ts0.cur_errmask &= ~E1L_TS0_RX_CRC4_ERR;
osmo_timer_schedule(>ts0.timer, 1, 0);
 }

diff --git a/src/mux_demux.c b/src/mux_demux.c
index cd5c286..abe01a3 100644
--- a/src/mux_demux.c
+++ b/src/mux_demux.c
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 

 #include "e1d.h"
 #include "log.h"
@@ -380,8 +381,18 @@
/* A bit is present in each odd frame */
if (frame_nr % 2) {
if (frame[0] & 0x20) {
-   line->ts0.cur_errmask |= E1L_TS0_RX_ALARM;
-   line_ctr_add(line, LINE_CTR_RX_REMOTE_A, 1);
+   if (!(line->ts0.cur_errmask & 
E1L_TS0_RX_ALARM)) {
+   line->ts0.cur_errmask |= 
E1L_TS0_RX_ALARM;
+   line_ctr_add(line, 
LINE_CTR_RX_REMOTE_A, 1);
+   
osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_RAI_ON,
+  line->intf->id, 
line->id, 0, NULL, 0);
+   }
+   } else {
+   if ((line->ts0.cur_errmask & E1L_TS0_RX_ALARM)) 
{
+   line->ts0.cur_errmask &= 
~E1L_TS0_RX_ALARM;
+   
osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_RAI_OFF,
+  line->intf->id, 
line->id, 0, NULL, 0);
+   }
}
}

@@ -395,7 +406,7 @@
line_ctr_add(line, LINE_CTR_RX_REMOTE_E, 1);
}
}
-   /* cur_errmask is being cleared once per second via 
line->ts0.timer */
+   /* CRC error in cur_errmask is being cleared once per second 
via line->ts0.timer */
}
 }


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 5
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-MessageType: merged


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-19 Thread jolly
Attention is currently required from: jolly.

Hello Jenkins Builder, laforge, tnt,

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

https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email

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

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

The change is no longer submittable: Verified is unsatisfied now.


Change subject: Indicate remote alarm bit as remote alarm inidication
..

Indicate remote alarm bit as remote alarm inidication

The flag that stores the current alarm is not cleared periodically.
Instead it is cleared when the alarm ceases.

Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
---
M src/intf_line.c
M src/mux_demux.c
2 files changed, 27 insertions(+), 4 deletions(-)


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 5
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-MessageType: newpatchset


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-18 Thread jolly
Attention is currently required from: jolly.

Hello Jenkins Builder, laforge, tnt,

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

https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email

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

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

The change is no longer submittable: Verified is unsatisfied now.


Change subject: Indicate remote alarm bit as remote alarm inidication
..

Indicate remote alarm bit as remote alarm inidication

The flag that stores the current alarm is not cleared periodically.
Instead it is cleared when the alarm ceases.

Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
---
M src/intf_line.c
M src/mux_demux.c
2 files changed, 27 insertions(+), 4 deletions(-)


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 4
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-MessageType: newpatchset


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-18 Thread laforge
Attention is currently required from: jolly.

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

Change subject: Indicate remote alarm bit as remote alarm inidication
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Thu, 18 Jan 2024 08:56:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-15 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email )

Change subject: Indicate remote alarm bit as remote alarm inidication
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 3
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Jan 2024 07:39:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-14 Thread tnt
Attention is currently required from: jolly.

tnt has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email )

Change subject: Indicate remote alarm bit as remote alarm inidication
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Sun, 14 Jan 2024 18:34:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-14 Thread laforge
Attention is currently required from: jolly, tnt.

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

Change subject: Indicate remote alarm bit as remote alarm inidication
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: tnt 
Gerrit-Attention: jolly 
Gerrit-Attention: tnt 
Gerrit-Comment-Date: Sun, 14 Jan 2024 17:25:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-e1d[master]: Indicate remote alarm bit as remote alarm inidication

2024-01-14 Thread jolly
jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-e1d/+/35560?usp=email )


Change subject: Indicate remote alarm bit as remote alarm inidication
..

Indicate remote alarm bit as remote alarm inidication

The flag that stores the current alarm is not cleared periodically.
Instead it is cleared when the alarm ceases.

Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
---
M src/intf_line.c
M src/mux_demux.c
2 files changed, 27 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/60/35560/1

diff --git a/src/intf_line.c b/src/intf_line.c
index f41214e..4433e96 100644
--- a/src/intf_line.c
+++ b/src/intf_line.c
@@ -239,7 +239,7 @@
}

line->ts0.prev_errmask = line->ts0.cur_errmask;
-   line->ts0.cur_errmask = 0;
+   line->ts0.cur_errmask &= ~E1L_TS0_RX_CRC4_ERR;
osmo_timer_schedule(>ts0.timer, 1, 0);
 }

diff --git a/src/mux_demux.c b/src/mux_demux.c
index cd5c286..abe01a3 100644
--- a/src/mux_demux.c
+++ b/src/mux_demux.c
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 

 #include "e1d.h"
 #include "log.h"
@@ -380,8 +381,18 @@
/* A bit is present in each odd frame */
if (frame_nr % 2) {
if (frame[0] & 0x20) {
-   line->ts0.cur_errmask |= E1L_TS0_RX_ALARM;
-   line_ctr_add(line, LINE_CTR_RX_REMOTE_A, 1);
+   if (!(line->ts0.cur_errmask & 
E1L_TS0_RX_ALARM)) {
+   line->ts0.cur_errmask |= 
E1L_TS0_RX_ALARM;
+   line_ctr_add(line, 
LINE_CTR_RX_REMOTE_A, 1);
+   
osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_RAI_ON,
+  line->intf->id, 
line->id, 0, NULL, 0);
+   }
+   } else {
+   if ((line->ts0.cur_errmask & E1L_TS0_RX_ALARM)) 
{
+   line->ts0.cur_errmask &= 
~E1L_TS0_RX_ALARM;
+   
osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_RAI_OFF,
+  line->intf->id, 
line->id, 0, NULL, 0);
+   }
}
}

@@ -395,7 +406,7 @@
line_ctr_add(line, LINE_CTR_RX_REMOTE_E, 1);
}
}
-   /* cur_errmask is being cleared once per second via 
line->ts0.timer */
+   /* CRC error in cur_errmask is being cleared once per second 
via line->ts0.timer */
}
 }


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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id6cd193c71330c350c27e02b3a692d2c7e0b3fbe
Gerrit-Change-Number: 35560
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-MessageType: newchange