View Change
1 comment:
File src/osmux_input.c:
Patch Set #1, Line 366: d
Ack
@laforge this calculation seems to be correct due to how unsigned subtraction and conversion to signed works. This is also how the before() and after() functions are implemented in the linux kernel.
Checked with a unit test in gdb:
448 diff = cur_seq - last_seq;
(gdb) print last_seq
$4 = 65535
(gdb) print cur_seq
$5 = 1
(gdb) n
453 if (diff <= 1)
(gdb) print diff
$6 = 2
To view, visit change 30148. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I5fd64acf7bc1e53efae0674d0c906d1255a9bbf6
Gerrit-Change-Number: 30148
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-Comment-Date: Wed, 16 Nov 2022 11:04:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge@osmocom.org>
Comment-In-Reply-To: pespin <pespin@sysmocom.de>
Gerrit-MessageType: comment