Attention is currently required from: neels, pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/27529
to look at the new patch set (#5).
Change subject: libosmo-tlv: add TLIV capability
......................................................................
libosmo-tlv: add TLIV capability
During code review, it was indicated that some TLV protocols that we
will likely deal with in the near future also employ an I, and instance
value of a tag. Add TLIV support.
A usage example for a manually implemented TLIV structure is found in
tests/libosmo-tlv/tlv_test.c.
A usage example for a generated TLIV protocol is found in
tests/libosmo-tlv/test_tliv/.
Related: SYS#5599
Change-Id: I0a076e54dfba6038cc779cb7c8f3967d212226aa
---
M configure.ac
M include/osmocom/tlv/tlv.h
M include/osmocom/tlv/tlv_dec_enc.h
M include/osmocom/tlv/tlv_gen.h
M src/libosmo-tlv/tlv.c
M src/libosmo-tlv/tlv_dec_enc.c
M src/libosmo-tlv/tlv_gen.c
M tests/libosmo-tlv/Makefile.am
A tests/libosmo-tlv/test_tliv/Makefile.am
A tests/libosmo-tlv/test_tliv/gen__myproto_ies_auto.c
A tests/libosmo-tlv/test_tliv/myproto_ies_custom.c
A tests/libosmo-tlv/test_tliv/myproto_ies_custom.h
A tests/libosmo-tlv/test_tliv/tliv_test.c
A tests/libosmo-tlv/test_tliv/tliv_test.ok
M tests/libosmo-tlv/tlv_dec_enc_test.c
M tests/libosmo-tlv/tlv_test.c
M tests/libosmo-tlv/tlv_test.ok
M tests/testsuite.at
18 files changed, 938 insertions(+), 172 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/29/27529/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27529
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I0a076e54dfba6038cc779cb7c8f3967d212226aa
Gerrit-Change-Number: 27529
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/27222 )
Change subject: libosmo-pfcp: implement/generate TLV and IE value coding
......................................................................
Patch Set 5:
(1 comment)
File include/osmocom/pfcp/Makefile.am:
https://gerrit.osmocom.org/c/osmo-upf/+/27222/comment/823d1c37_8d7307a5
PS3, Line 17: pfcp_ies_auto.h: $(top_srcdir)/src/libosmo-pfcp/gen__pfcp_ies_auto.c \
> see the "$(MAKE) -C ..." below. […]
I'm not a Makefile guru so no idea, I just noticed that you use it in "$(MAKE) -C $(top_builddir)/src/libosmo-tlv" below, so that buildir must already be created before using it, otherwise it may race.
I'm saying exactly because I saw the <<"$(MAKE) -C ..." below.>>. That's not a dependency but the action to be done.
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27222
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I3069045b2d42dac88d955c636230adc64a7a4aa7
Gerrit-Change-Number: 27222
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 17 Mar 2022 18:24:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/27222 )
Change subject: libosmo-pfcp: implement/generate TLV and IE value coding
......................................................................
Patch Set 5:
(1 comment)
File include/osmocom/pfcp/Makefile.am:
https://gerrit.osmocom.org/c/osmo-upf/+/27222/comment/570e053f_7d17c136
PS3, Line 17: pfcp_ies_auto.h: $(top_srcdir)/src/libosmo-pfcp/gen__pfcp_ies_auto.c \
> Don't you need to depend on $(top_builddir)/src/libosmo-tlv and $(top_builddir)/src/libosmo-pfcp bei […]
see the "$(MAKE) -C ..." below.
If you know a better way to express cross-directory deps in automake do let me know. That's the major weak point of automake, i wonder why no-one ever solved that properly.
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27222
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I3069045b2d42dac88d955c636230adc64a7a4aa7
Gerrit-Change-Number: 27222
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 17 Mar 2022 18:20:17 +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: neels.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/27218
to look at the new patch set (#7).
Change subject: libosmo-tlv: add auto dec/enc to/from structs
......................................................................
libosmo-tlv: add auto dec/enc to/from structs
Add osmo_tlv_coding: describe the value part of a TLV (decode and
encode), describe a struct with its members, and get/put readily decoded
structs from/to a raw PDU, directly.
With osmo_tlv_coding defined for a protocol's tags, we only deal with
encoded PDUs or fully decoded C structs, no TLV related
re-implementations clutter up the message handling code.
A usage example is given in tlv_dec_enc_test. The first real use will be
the PFCP protocol in osmo-upf.git.
With osmo_tlv_coding, there still is a lot of monkey work involved in
describing the decoded structs. A subsequent patch adds a generator for
osmo_tlv_coding and message structs from tag value lists.
Related: SYS#5599
Change-Id: I65de793105882a452124ee58adb0e58469e6e796
---
M include/osmocom/tlv/Makefile.am
A include/osmocom/tlv/tlv_dec_enc.h
M src/libosmo-tlv/Makefile.am
A src/libosmo-tlv/tlv_dec_enc.c
M tests/libosmo-tlv/Makefile.am
A tests/libosmo-tlv/tlv_dec_enc_test.c
A tests/libosmo-tlv/tlv_dec_enc_test.ok
M tests/testsuite.at
8 files changed, 1,288 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/18/27218/7
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27218
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I65de793105882a452124ee58adb0e58469e6e796
Gerrit-Change-Number: 27218
Gerrit-PatchSet: 7
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/27219
to look at the new patch set (#5).
Change subject: libosmo-tlv: add C code generator for IE structs and arrays
......................................................................
libosmo-tlv: add C code generator for IE structs and arrays
Defining a protocol of message types with lists of IEs bears a lot of
repetitive, copy-paste-error-prone writing out of data structures.
Add a third layer to libosmo-tlv, which allows helpful code generation.
By non-repetitive data structures that briefly describe the protocol's
messages and IEs, generate possibly repetitive IE list arrays and
decoded-struct definitions automatically, avoiding grunt work errors.
I tried C macros for this at first, but it became too convoluted.
Generating C code that can be read and grepped makes things easier.
A usage example is found in tests/libosmo-tlv/test_tlv_gen/.
Related: SYS#5599
Change-Id: Ifb3ea54d2797ce060b95834aa117725ec2d6c4cf
---
M configure.ac
M include/osmocom/tlv/Makefile.am
A include/osmocom/tlv/tlv_gen.h
M src/libosmo-tlv/Makefile.am
A src/libosmo-tlv/tlv_gen.c
M tests/libosmo-tlv/Makefile.am
A tests/libosmo-tlv/test_tlv_gen/Makefile.am
A tests/libosmo-tlv/test_tlv_gen/gen__myproto_ies_auto.c
A tests/libosmo-tlv/test_tlv_gen/myproto_ies_custom.c
A tests/libosmo-tlv/test_tlv_gen/myproto_ies_custom.h
A tests/libosmo-tlv/test_tlv_gen/tlv_gen_test.c
A tests/libosmo-tlv/test_tlv_gen/tlv_gen_test.ok
M tests/testsuite.at
13 files changed, 1,442 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/19/27219/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27219
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ifb3ea54d2797ce060b95834aa117725ec2d6c4cf
Gerrit-Change-Number: 27219
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/27529
to look at the new patch set (#4).
Change subject: libosmo-tlv: add TLIV capability
......................................................................
libosmo-tlv: add TLIV capability
During code review, it was indicated that some TLV protocols that we
will likely deal with in the near future also employ an I, and instance
value of a tag. Add TLIV support.
A usage example for a manually implemented TLIV structure is found in
tests/libosmo-tlv/tlv_test.c.
A usage example for a generated TLIV protocol is found in
tests/libosmo-tlv/test_tliv/.
Related: SYS#5599
Change-Id: I0a076e54dfba6038cc779cb7c8f3967d212226aa
---
M configure.ac
M include/osmocom/tlv/tlv.h
M include/osmocom/tlv/tlv_dec_enc.h
M include/osmocom/tlv/tlv_gen.h
M src/libosmo-tlv/tlv.c
M src/libosmo-tlv/tlv_dec_enc.c
M src/libosmo-tlv/tlv_gen.c
M tests/libosmo-tlv/Makefile.am
A tests/libosmo-tlv/test_tliv/Makefile.am
A tests/libosmo-tlv/test_tliv/gen__myproto_ies_auto.c
A tests/libosmo-tlv/test_tliv/myproto_ies_custom.c
A tests/libosmo-tlv/test_tliv/myproto_ies_custom.h
A tests/libosmo-tlv/test_tliv/tliv_test.c
A tests/libosmo-tlv/test_tliv/tliv_test.ok
M tests/libosmo-tlv/tlv_dec_enc_test.c
M tests/libosmo-tlv/tlv_test.c
M tests/libosmo-tlv/tlv_test.ok
M tests/testsuite.at
18 files changed, 938 insertions(+), 172 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/29/27529/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27529
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I0a076e54dfba6038cc779cb7c8f3967d212226aa
Gerrit-Change-Number: 27529
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/27221
to look at the new patch set (#5).
Change subject: libosmo-pfcp: add pfcp_proto.h pfcp_strs.h
......................................................................
libosmo-pfcp: add pfcp_proto.h pfcp_strs.h
Related: SYS#5599
Change-Id: I568b821e89007ed52eeefcdbcb6edd8052a8b5be
---
M configure.ac
M include/osmocom/Makefile.am
A include/osmocom/pfcp/Makefile.am
A include/osmocom/pfcp/pfcp_proto.h
A include/osmocom/pfcp/pfcp_strs.h
M src/Makefile.am
A src/libosmo-pfcp/Makefile.am
A src/libosmo-pfcp/pfcp_strs.c
8 files changed, 1,152 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/21/27221/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27221
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I568b821e89007ed52eeefcdbcb6edd8052a8b5be
Gerrit-Change-Number: 27221
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-upf/+/27222
to look at the new patch set (#5).
Change subject: libosmo-pfcp: implement/generate TLV and IE value coding
......................................................................
libosmo-pfcp: implement/generate TLV and IE value coding
Related: SYS#5599
Change-Id: I3069045b2d42dac88d955c636230adc64a7a4aa7
---
M include/osmocom/pfcp/Makefile.am
A include/osmocom/pfcp/pfcp_ies_custom.h
M src/libosmo-pfcp/Makefile.am
A src/libosmo-pfcp/gen__pfcp_ies_auto.c
A src/libosmo-pfcp/pfcp_ies_custom.c
5 files changed, 1,544 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/22/27222/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27222
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I3069045b2d42dac88d955c636230adc64a7a4aa7
Gerrit-Change-Number: 27222
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/27529 )
Change subject: libosmo-tlv: add TLIV capability
......................................................................
Patch Set 3:
(2 comments)
File include/osmocom/tlv/tlv.h:
https://gerrit.osmocom.org/c/osmo-upf/+/27529/comment/18a653ab_85e7877a
PS2, Line 56: struct osmo_tlv_cfg {
> why not storing here "instance_present = true/false", then you don't need to specify for each and ev […]
struct osmo_tlv_tag_inst is there because "t" and "i" are different params. Both tag and inst are needed to find the destination of a decoded value; i first started out to add the 'instance' arg all over the place, and code dup/bloat spawned in various places. That got annoying, hence this struct to pass and cmp both at the same time.
It does not matter whether all tags of a protocol are TLIV or only some,
what size the instance value is or which tags have one does not need to be part of the cfg. That is up to the functions loading and storing the TL / TLI headers.
The tlv code merely needs to provide storage and match for the instance value.
You may be right that we don't need the instance_present flag.
The only thing this flag allows is to have the same tag once with and once without instance within the same protocol, that also uses 0 as an instance index ... rather obscure. I added it out of a feeling of not wanting to taint the instance index value. guess i can drop it
File src/libosmo-tlv/tlv_gen.c:
https://gerrit.osmocom.org/c/osmo-upf/+/27529/comment/283c50e3_2df5b54d
PS2, Line 320: printi("{}\n");
> not related to this commit?
loosely related, because now that the struct starts with a sub-struct (ti), "{0}" causes a failure ("missing braces around initializer").
Which btw does after all reaffirm me in my original preference for writing "{}". Here we'd have to write "{{0}}", so it turns out "{0}" doesn't always work, but "{}" always works.
Anyway, can go to prev commit, yes
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/27529
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I0a076e54dfba6038cc779cb7c8f3967d212226aa
Gerrit-Change-Number: 27529
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 17 Mar 2022 18:10:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment