lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

November 2022

  • 2 participants
  • 2503 discussions
Change in osmo-ccid-firmware[master]: fix compilation with gcc-11
by laforge 18 Nov '22

18 Nov '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/30231 ) Change subject: fix compilation with gcc-11 ...................................................................... fix compilation with gcc-11 /usr/lib/gcc/arm-none-eabi/11.3.1/../../../arm-none-eabi/bin/ld: cuart_driver_asf4_usart_async.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: multiple definition of `dma_m2m_complete_flag'; atmel_start.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: first defined here /usr/lib/gcc/arm-none-eabi/11.3.1/../../../arm-none-eabi/bin/ld: command.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: multiple definition of `dma_m2m_complete_flag'; atmel_start.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: first defined here /usr/lib/gcc/arm-none-eabi/11.3.1/../../../arm-none-eabi/bin/ld: main.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: multiple definition of `dma_m2m_complete_flag'; atmel_start.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: first defined here /usr/lib/gcc/arm-none-eabi/11.3.1/../../../arm-none-eabi/bin/ld: stdio_start.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: multiple definition of `dma_m2m_complete_flag'; atmel_start.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: first defined here /usr/lib/gcc/arm-none-eabi/11.3.1/../../../arm-none-eabi/bin/ld: usb_start.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: multiple definition of `dma_m2m_complete_flag'; atmel_start.o:/space/home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM/gcc/../atmel_start.h:15: first defined here Change-Id: I9a72dc0101de84ce39530c1503b32620b4777b4a --- M sysmoOCTSIM/atmel_start.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/31/30231/1 diff --git a/sysmoOCTSIM/atmel_start.h b/sysmoOCTSIM/atmel_start.h index 4892cbd..fb1e18f 100644 --- a/sysmoOCTSIM/atmel_start.h +++ b/sysmoOCTSIM/atmel_start.h @@ -12,7 +12,7 @@ #include "stdio_start.h" /** flag set when the memory to memory DMA is complete */ -volatile bool dma_m2m_complete_flag; +extern volatile bool dma_m2m_complete_flag; /** * Initializes MCU, drivers and middleware in the project -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/30231 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I9a72dc0101de84ce39530c1503b32620b4777b4a Gerrit-Change-Number: 30231 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-upf[master]: VTY: rename 'nft' to 'tunmap'
by laforge 18 Nov '22

18 Nov '22
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30230 ) Change subject: VTY: rename 'nft' to 'tunmap' ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ia3c5224dd3b5f5c9437bbdec997d02176818cc97 Gerrit-Change-Number: 30230 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Nov 2022 19:23:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-upf[master]: VTY: rename 'gtp' to 'tunend'
by laforge 18 Nov '22

18 Nov '22
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30229 ) Change subject: VTY: rename 'gtp' to 'tunend' ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I49ac7b1f8b5b74f586edfed1dfb29f9af55a521b Gerrit-Change-Number: 30229 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Nov 2022 19:23:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-upf[master]: tests/upf.vty: add some missing nodes to the test
by laforge 18 Nov '22

18 Nov '22
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30228 ) Change subject: tests/upf.vty: add some missing nodes to the test ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I93c49dce23efaf9c533619112fb7a8114e258fa0 Gerrit-Change-Number: 30228 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Nov 2022 19:22:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-upf[master]: VTY: rename 'nft' to 'tunmap'
by neels 18 Nov '22

18 Nov '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30230 ) Change subject: VTY: rename 'nft' to 'tunmap' ...................................................................... VTY: rename 'nft' to 'tunmap' So far the config nodes were named after the implementation: "GTP kernel module" = "gtp" and "netfilter" = "nft" We found that this is confusing, since both are related to handling GTP. Rename "nft" to "tunmap"; a previous patch already renamed "gtp" to "tunend". Keep a hidden "nft" VTY cmd as backwards compat alias. Related: SYS#6192 Change-Id: Ia3c5224dd3b5f5c9437bbdec997d02176818cc97 --- M doc/examples/osmo-upf/osmo-upf-mockup.cfg M src/osmo-upf/up_gtp_action.c M src/osmo-upf/upf_nft.c M src/osmo-upf/upf_vty.c M tests/upf.vty 5 files changed, 39 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/30/30230/1 diff --git a/doc/examples/osmo-upf/osmo-upf-mockup.cfg b/doc/examples/osmo-upf/osmo-upf-mockup.cfg index 36682a0..1150c34 100644 --- a/doc/examples/osmo-upf/osmo-upf-mockup.cfg +++ b/doc/examples/osmo-upf/osmo-upf-mockup.cfg @@ -13,5 +13,5 @@ local-addr 127.0.0.1 tunend mockup -nft +tunmap mockup diff --git a/src/osmo-upf/up_gtp_action.c b/src/osmo-upf/up_gtp_action.c index 8143cbf..0a86b2e 100644 --- a/src/osmo-upf/up_gtp_action.c +++ b/src/osmo-upf/up_gtp_action.c @@ -112,7 +112,7 @@ case UP_GTP_U_TUNMAP: if (g_upf->nft.mockup) { - LOG_UP_GTP_ACTION(a, LOGL_NOTICE, "nft/mockup active, skipping nftables ruleset %s\n", + LOG_UP_GTP_ACTION(a, LOGL_NOTICE, "tunmap/mockup active, skipping nftables ruleset %s\n", enable ? "enable" : "disable"); return 0; } diff --git a/src/osmo-upf/upf_nft.c b/src/osmo-upf/upf_nft.c index bcb6a70..4a2ca23 100644 --- a/src/osmo-upf/upf_nft.c +++ b/src/osmo-upf/upf_nft.c @@ -40,7 +40,7 @@ int rc; if (g_upf->nft.mockup) { - LOGP(DNFT, LOGL_NOTICE, "nft/mockup active: not running nft ruleset: '%s'\n", ruleset); + LOGP(DNFT, LOGL_NOTICE, "tunmap/mockup active: not running nft ruleset: '%s'\n", ruleset); return 0; } @@ -64,7 +64,7 @@ int rc; if (g_upf->nft.mockup) { LOGP(DNFT, LOGL_NOTICE, - "nft/mockup active: not allocating libnftables nft_ctx. FOR TESTING PURPOSES ONLY.\n"); + "tunmap/mockup active: not allocating libnftables nft_ctx. FOR TESTING PURPOSES ONLY.\n"); return 0; } diff --git a/src/osmo-upf/upf_vty.c b/src/osmo-upf/upf_vty.c index c43b382..f92ab05 100644 --- a/src/osmo-upf/upf_vty.c +++ b/src/osmo-upf/upf_vty.c @@ -41,7 +41,7 @@ enum upf_vty_node { PFCP_NODE = _LAST_OSMOVTY_NODE + 1, TUNEND_NODE, - NFT_NODE, + TUNMAP_NODE, }; static struct cmd_node cfg_pfcp_node = { @@ -194,23 +194,26 @@ return CMD_SUCCESS; } -static struct cmd_node cfg_nft_node = { - NFT_NODE, - "%s(config-nft)# ", +static struct cmd_node cfg_tunmap_node = { + TUNMAP_NODE, + "%s(config-tunmap)# ", 1, }; -DEFUN(cfg_nft, cfg_nft_cmd, - "nft", - "Enter the 'nft' node to configure nftables usage\n") +#define TUNMAP_NODE_STR "Enter the 'tunmap' node to configure nftables usage\n" + +DEFUN(cfg_tunmap, cfg_tunmap_cmd, "tunmap", TUNMAP_NODE_STR) { - vty->node = NFT_NODE; + vty->node = TUNMAP_NODE; return CMD_SUCCESS; } -static int config_write_nft(struct vty *vty) +/* legacy compat: "tunmap" was originally named "nft" */ +DEFUN_CMD_ELEMENT(cfg_tunmap, cfg_nft_cmd, "nft", TUNMAP_NODE_STR, CMD_ATTR_HIDDEN, 0); + +static int config_write_tunmap(struct vty *vty) { - vty_out(vty, "nft%s", VTY_NEWLINE); + vty_out(vty, "tunmap%s", VTY_NEWLINE); if (g_upf->nft.mockup) vty_out(vty, " mockup%s", VTY_NEWLINE); @@ -220,7 +223,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_nft_mockup, cfg_nft_mockup_cmd, +DEFUN(cfg_tunmap_mockup, cfg_tunmap_mockup_cmd, "mockup", "don't actually send rulesets to nftables, just return success\n") { @@ -228,7 +231,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_nft_no_mockup, cfg_nft_no_mockup_cmd, +DEFUN(cfg_tunmap_no_mockup, cfg_tunmap_no_mockup_cmd, "no mockup", NO_STR "operate nftables rulesets normally\n") @@ -237,7 +240,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_nft_table_name, cfg_nft_table_name_cmd, +DEFUN(cfg_tunmap_table_name, cfg_tunmap_table_name_cmd, "table-name TABLE_NAME", "Set the nft inet table name to create and place GTP tunnel forwarding chains in" " (as in 'nft add table inet foo'). If multiple instances of osmo-upf are running on the same system, each" @@ -366,10 +369,11 @@ install_element(TUNEND_NODE, &cfg_tunend_dev_use_cmd); install_element(TUNEND_NODE, &cfg_tunend_dev_del_cmd); - install_node(&cfg_nft_node, config_write_nft); + install_node(&cfg_tunmap_node, config_write_tunmap); + install_element(CONFIG_NODE, &cfg_tunmap_cmd); install_element(CONFIG_NODE, &cfg_nft_cmd); - install_element(NFT_NODE, &cfg_nft_mockup_cmd); - install_element(NFT_NODE, &cfg_nft_no_mockup_cmd); - install_element(NFT_NODE, &cfg_nft_table_name_cmd); + install_element(TUNMAP_NODE, &cfg_tunmap_mockup_cmd); + install_element(TUNMAP_NODE, &cfg_tunmap_no_mockup_cmd); + install_element(TUNMAP_NODE, &cfg_tunmap_table_name_cmd); } diff --git a/tests/upf.vty b/tests/upf.vty index 427209c..5100b17 100644 --- a/tests/upf.vty +++ b/tests/upf.vty @@ -45,19 +45,28 @@ DEVNAME device name, e.g. 'apn0' OsmoUPF(config-tunend)# exit +OsmoUPF(config)# # ensure its old name "nft" enters the tunmap node OsmoUPF(config)# nft -OsmoUPF(config-nft)# list +OsmoUPF(config-tunmap)# list +... + mockup + no mockup + table-name TABLE_NAME +OsmoUPF(config-tunmap)# exit + +OsmoUPF(config)# tunmap +OsmoUPF(config-tunmap)# list ... mockup no mockup table-name TABLE_NAME -OsmoUPF(config-nft)# mockup? +OsmoUPF(config-tunmap)# mockup? mockup don't actually send rulesets to nftables, just return success -OsmoUPF(config-nft)# no ? +OsmoUPF(config-tunmap)# no ? mockup operate nftables rulesets normally -OsmoUPF(config-nft)# table-name? +OsmoUPF(config-tunmap)# table-name? table-name Set the nft inet table name to create and place GTP tunnel forwarding chains in (as in 'nft add table inet foo'). If multiple instances of osmo-upf are running on the same system, each osmo-upf must have its own table name. Otherwise the names of created forwarding chains will collide. The default table name is "osmo-upf". -OsmoUPF(config-nft)# table-name ? +OsmoUPF(config-tunmap)# table-name ? TABLE_NAME nft inet table name -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ia3c5224dd3b5f5c9437bbdec997d02176818cc97 Gerrit-Change-Number: 30230 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-upf[master]: tests/upf.vty: add some missing nodes to the test
by neels 18 Nov '22

18 Nov '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30228 ) Change subject: tests/upf.vty: add some missing nodes to the test ...................................................................... tests/upf.vty: add some missing nodes to the test Change-Id: I93c49dce23efaf9c533619112fb7a8114e258fa0 --- M tests/upf.vty 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/28/30228/1 diff --git a/tests/upf.vty b/tests/upf.vty index d1cebe5..6d40841 100644 --- a/tests/upf.vty +++ b/tests/upf.vty @@ -16,10 +16,17 @@ OsmoUPF(config)# gtp OsmoUPF(config-gtp)# list ... + mockup + no mockup dev create DEVNAME [LISTEN_ADDR] dev use DEVNAME dev delete DEVNAME +OsmoUPF(config-gtp)# mockup? + mockup don't actually send commands to the GTP kernel module, just return success +OsmoUPF(config-gtp)# no ? + mockup operate GTP kernel module normally + OsmoUPF(config-gtp)# dev? dev Configure the GTP device to use for encaps/decaps. OsmoUPF(config-gtp)# dev ? @@ -33,3 +40,20 @@ OsmoUPF(config-gtp)# dev delete ? DEVNAME device name, e.g. 'apn0' OsmoUPF(config-gtp)# exit + +OsmoUPF(config)# nft +OsmoUPF(config-nft)# list +... + mockup + no mockup + table-name TABLE_NAME + +OsmoUPF(config-nft)# mockup? + mockup don't actually send rulesets to nftables, just return success +OsmoUPF(config-nft)# no ? + mockup operate nftables rulesets normally + +OsmoUPF(config-nft)# table-name? + table-name Set the nft inet table name to create and place GTP tunnel forwarding chains in (as in 'nft add table inet foo'). If multiple instances of osmo-upf are running on the same system, each osmo-upf must have its own table name. Otherwise the names of created forwarding chains will collide. The default table name is "osmo-upf". +OsmoUPF(config-nft)# table-name ? + TABLE_NAME nft inet table name -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I93c49dce23efaf9c533619112fb7a8114e258fa0 Gerrit-Change-Number: 30228 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-upf[master]: VTY: rename 'gtp' to 'tunend'
by neels 18 Nov '22

18 Nov '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30229 ) Change subject: VTY: rename 'gtp' to 'tunend' ...................................................................... VTY: rename 'gtp' to 'tunend' So far the config nodes were named after the implementation: "GTP kernel module" = "gtp" and "netfilter" = "nft" We found that this is confusing, since both are related to handling GTP. Rename "gtp" to "tunend"; a subsequent patch will rename "nft" to "tunmap". Keep a hidden "gtp" VTY cmd as backwards compat alias. Related: SYS#6192 Change-Id: I49ac7b1f8b5b74f586edfed1dfb29f9af55a521b --- M doc/examples/osmo-upf/osmo-upf-create-dev.cfg M doc/examples/osmo-upf/osmo-upf-mockup.cfg M include/osmocom/upf/upf.h M src/osmo-upf/up_gtp_action.c M src/osmo-upf/upf.c M src/osmo-upf/upf_gtp.c M src/osmo-upf/upf_vty.c M tests/upf.vty 8 files changed, 62 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/29/30229/1 diff --git a/doc/examples/osmo-upf/osmo-upf-create-dev.cfg b/doc/examples/osmo-upf/osmo-upf-create-dev.cfg index e4e25f9..e69f49c 100644 --- a/doc/examples/osmo-upf/osmo-upf-create-dev.cfg +++ b/doc/examples/osmo-upf/osmo-upf-create-dev.cfg @@ -11,5 +11,5 @@ timer pfcp x24 5000 pfcp local-addr 127.0.0.1 -gtp +tunend dev create apn23 diff --git a/doc/examples/osmo-upf/osmo-upf-mockup.cfg b/doc/examples/osmo-upf/osmo-upf-mockup.cfg index f1aafa9..36682a0 100644 --- a/doc/examples/osmo-upf/osmo-upf-mockup.cfg +++ b/doc/examples/osmo-upf/osmo-upf-mockup.cfg @@ -11,7 +11,7 @@ timer pfcp x24 5000 pfcp local-addr 127.0.0.1 -gtp +tunend mockup nft mockup diff --git a/include/osmocom/upf/upf.h b/include/osmocom/upf/upf.h index 1f8355d..1597e2c 100644 --- a/include/osmocom/upf/upf.h +++ b/include/osmocom/upf/upf.h @@ -44,7 +44,7 @@ uint16_t local_port; }; -struct gtp_vty_cfg_dev { +struct tunend_vty_cfg_dev { struct llist_head entry; /* If true, osmo-upf creates the GTP device on startup. If false, the GTP device was created by the user, and we @@ -60,8 +60,8 @@ char *local_addr; }; -struct gtp_vty_cfg { - /* list of struct gtp_vty_cfg_dev, GTP devices as in the config file. The actual GTP devices in use are in +struct tunend_vty_cfg { + /* list of struct tunend_vty_cfg_dev, GTP devices as in the config file. The actual GTP devices in use are in * g_upf->gtp.devs. */ struct llist_head devs; }; @@ -80,7 +80,7 @@ bool mockup; /* GTP devices as in osmo-upf.cfg */ - struct gtp_vty_cfg vty_cfg; + struct tunend_vty_cfg vty_cfg; /* GTP devices actually in use, list of struct upf_gtp_dev. */ struct llist_head devs; diff --git a/src/osmo-upf/up_gtp_action.c b/src/osmo-upf/up_gtp_action.c index 9b8d528..8143cbf 100644 --- a/src/osmo-upf/up_gtp_action.c +++ b/src/osmo-upf/up_gtp_action.c @@ -84,7 +84,7 @@ switch (a->kind) { case UP_GTP_U_ENDECAPS: if (g_upf->gtp.mockup) { - LOG_UP_GTP_ACTION(a, LOGL_NOTICE, "gtp/mockup active, skipping GTP action %s\n", + LOG_UP_GTP_ACTION(a, LOGL_NOTICE, "tunend/mockup active, skipping GTP action %s\n", enable ? "enable" : "disable"); return 0; } diff --git a/src/osmo-upf/upf.c b/src/osmo-upf/upf.c index db699c7..3b8bfeb 100644 --- a/src/osmo-upf/upf.c +++ b/src/osmo-upf/upf.c @@ -87,8 +87,8 @@ int upf_gtp_devs_open() { - struct gtp_vty_cfg *c = &g_upf->gtp.vty_cfg; - struct gtp_vty_cfg_dev *d; + struct tunend_vty_cfg *c = &g_upf->gtp.vty_cfg; + struct tunend_vty_cfg_dev *d; llist_for_each_entry(d, &c->devs, entry) { if (upf_gtp_dev_open(d->dev_name, d->create, d->local_addr, false, false)) diff --git a/src/osmo-upf/upf_gtp.c b/src/osmo-upf/upf_gtp.c index d75e8d7..880e587 100644 --- a/src/osmo-upf/upf_gtp.c +++ b/src/osmo-upf/upf_gtp.c @@ -173,7 +173,7 @@ struct upf_gtp_dev *dev; if (g_upf->gtp.mockup) { - LOGP(DGTP, LOGL_NOTICE, "gtp/mockup active: not opening GTP device '%s'\n", name); + LOGP(DGTP, LOGL_NOTICE, "tunend/mockup active: not opening GTP device '%s'\n", name); return 0; } diff --git a/src/osmo-upf/upf_vty.c b/src/osmo-upf/upf_vty.c index cfc65ea..c43b382 100644 --- a/src/osmo-upf/upf_vty.c +++ b/src/osmo-upf/upf_vty.c @@ -40,7 +40,7 @@ enum upf_vty_node { PFCP_NODE = _LAST_OSMOVTY_NODE + 1, - GTP_NODE, + TUNEND_NODE, NFT_NODE, }; @@ -51,7 +51,7 @@ }; #define pfcp_vty (g_upf->pfcp.vty_cfg) -#define gtp_vty (g_upf->gtp.vty_cfg) +#define tunend_vty (g_upf->gtp.vty_cfg) DEFUN(cfg_pfcp, cfg_pfcp_cmd, "pfcp", @@ -78,29 +78,32 @@ return CMD_SUCCESS; } -static struct cmd_node cfg_gtp_node = { - GTP_NODE, - "%s(config-gtp)# ", +static struct cmd_node cfg_tunend_node = { + TUNEND_NODE, + "%s(config-tunend)# ", 1, }; -DEFUN(cfg_gtp, cfg_gtp_cmd, - "gtp", - "Enter the 'gtp' node to configure Linux GTP kernel module usage\n") +#define TUNEND_NODE_STR "Enter the 'tunend' node to configure Linux GTP kernel module usage\n" + +DEFUN(cfg_tunend, cfg_tunend_cmd, "tunend", TUNEND_NODE_STR) { - vty->node = GTP_NODE; + vty->node = TUNEND_NODE; return CMD_SUCCESS; } -static int config_write_gtp(struct vty *vty) +/* legacy compat: "tunend" was originally named "gtp" */ +DEFUN_CMD_ELEMENT(cfg_tunend, cfg_gtp_cmd, "gtp", TUNEND_NODE_STR, CMD_ATTR_HIDDEN, 0); + +static int config_write_tunend(struct vty *vty) { - struct gtp_vty_cfg_dev *d; - vty_out(vty, "gtp%s", VTY_NEWLINE); + struct tunend_vty_cfg_dev *d; + vty_out(vty, "tunend%s", VTY_NEWLINE); if (g_upf->gtp.mockup) vty_out(vty, " mockup%s", VTY_NEWLINE); - llist_for_each_entry(d, &gtp_vty.devs, entry) { + llist_for_each_entry(d, &tunend_vty.devs, entry) { if (d->create) { vty_out(vty, " dev create %s", d->dev_name); if (d->local_addr) @@ -115,7 +118,7 @@ #define DEV_STR "Configure the GTP device to use for encaps/decaps.\n" -DEFUN(cfg_gtp_mockup, cfg_gtp_mockup_cmd, +DEFUN(cfg_tunend_mockup, cfg_tunend_mockup_cmd, "mockup", "don't actually send commands to the GTP kernel module, just return success\n") { @@ -123,7 +126,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_gtp_no_mockup, cfg_gtp_no_mockup_cmd, +DEFUN(cfg_tunend_no_mockup, cfg_tunend_no_mockup_cmd, "no mockup", NO_STR "operate GTP kernel module normally\n") @@ -132,7 +135,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_gtp_dev_create, cfg_gtp_dev_create_cmd, +DEFUN(cfg_tunend_dev_create, cfg_tunend_dev_create_cmd, "dev create DEVNAME [LISTEN_ADDR]", DEV_STR "Add GTP device, creating a new Linux kernel GTP device. Will listen on GTPv1 port " @@ -142,42 +145,42 @@ "device name, e.g. 'apn0'\n" "IPv4 or IPv6 address to listen on, omit for ANY\n") { - struct gtp_vty_cfg_dev *d = talloc_zero(g_upf, struct gtp_vty_cfg_dev); + struct tunend_vty_cfg_dev *d = talloc_zero(g_upf, struct tunend_vty_cfg_dev); d->create = true; d->dev_name = talloc_strdup(d, argv[0]); if (argc > 1) d->local_addr = talloc_strdup(d, argv[1]); - llist_add(&d->entry, &gtp_vty.devs); + llist_add(&d->entry, &tunend_vty.devs); vty_out(vty, "Added GTP device %s (create new)%s", d->dev_name, VTY_NEWLINE); return CMD_SUCCESS; } -DEFUN(cfg_gtp_dev_use, cfg_gtp_dev_use_cmd, +DEFUN(cfg_tunend_dev_use, cfg_tunend_dev_use_cmd, "dev use DEVNAME", DEV_STR "Add GTP device, using an existing Linux kernel GTP device, e.g. created by 'gtp-link'\n" "device name, e.g. 'apn0'\n") { - struct gtp_vty_cfg_dev *d = talloc_zero(g_upf, struct gtp_vty_cfg_dev); + struct tunend_vty_cfg_dev *d = talloc_zero(g_upf, struct tunend_vty_cfg_dev); d->create = false; d->dev_name = talloc_strdup(d, argv[0]); - llist_add(&d->entry, &gtp_vty.devs); + llist_add(&d->entry, &tunend_vty.devs); vty_out(vty, "Added GTP device %s (use existing)%s", d->dev_name, VTY_NEWLINE); return CMD_SUCCESS; } -DEFUN(cfg_gtp_dev_del, cfg_gtp_dev_del_cmd, +DEFUN(cfg_tunend_dev_del, cfg_tunend_dev_del_cmd, "dev delete DEVNAME", DEV_STR "Remove a GTP device from the configuration, and delete the Linux kernel GTP device if it was created here.\n" "device name, e.g. 'apn0'\n") { const char *dev_name = argv[0]; - struct gtp_vty_cfg_dev *d; + struct tunend_vty_cfg_dev *d; struct upf_gtp_dev *dev; /* remove from VTY cfg */ - llist_for_each_entry(d, &gtp_vty.devs, entry) { + llist_for_each_entry(d, &tunend_vty.devs, entry) { if (strcmp(d->dev_name, dev_name)) continue; llist_del(&d->entry); @@ -280,8 +283,8 @@ return CMD_SUCCESS; } -DEFUN(show_gtp, show_gtp_cmd, - "show gtp", +DEFUN(show_tunend, show_tunend_cmd, + "show tunend", SHOW_STR "Active GTP tunnels and forwardings\n") { @@ -345,7 +348,7 @@ OSMO_ASSERT(g_upf != NULL); install_element_ve(&show_pdr_cmd); - install_element_ve(&show_gtp_cmd); + install_element_ve(&show_tunend_cmd); install_element_ve(&show_session_cmd); install_node(&cfg_pfcp_node, config_write_pfcp); @@ -353,14 +356,15 @@ install_element(PFCP_NODE, &cfg_pfcp_local_addr_cmd); - install_node(&cfg_gtp_node, config_write_gtp); + install_node(&cfg_tunend_node, config_write_tunend); + install_element(CONFIG_NODE, &cfg_tunend_cmd); install_element(CONFIG_NODE, &cfg_gtp_cmd); - install_element(GTP_NODE, &cfg_gtp_mockup_cmd); - install_element(GTP_NODE, &cfg_gtp_no_mockup_cmd); - install_element(GTP_NODE, &cfg_gtp_dev_create_cmd); - install_element(GTP_NODE, &cfg_gtp_dev_use_cmd); - install_element(GTP_NODE, &cfg_gtp_dev_del_cmd); + install_element(TUNEND_NODE, &cfg_tunend_mockup_cmd); + install_element(TUNEND_NODE, &cfg_tunend_no_mockup_cmd); + install_element(TUNEND_NODE, &cfg_tunend_dev_create_cmd); + install_element(TUNEND_NODE, &cfg_tunend_dev_use_cmd); + install_element(TUNEND_NODE, &cfg_tunend_dev_del_cmd); install_node(&cfg_nft_node, config_write_nft); install_element(CONFIG_NODE, &cfg_nft_cmd); diff --git a/tests/upf.vty b/tests/upf.vty index 6d40841..427209c 100644 --- a/tests/upf.vty +++ b/tests/upf.vty @@ -13,8 +13,9 @@ IP_ADDR IP address OsmoUPF(config-pfcp)# exit +OsmoUPF(config)# # ensure its old name "gtp" enters the tunend node OsmoUPF(config)# gtp -OsmoUPF(config-gtp)# list +OsmoUPF(config-tunend)# list ... mockup no mockup @@ -22,24 +23,27 @@ dev use DEVNAME dev delete DEVNAME -OsmoUPF(config-gtp)# mockup? - mockup don't actually send commands to the GTP kernel module, just return success -OsmoUPF(config-gtp)# no ? - mockup operate GTP kernel module normally +OsmoUPF(config-tunend)# exit +OsmoUPF(config)# tunend +OsmoUPF(config-tunend)# list +... + dev create DEVNAME [LISTEN_ADDR] + dev use DEVNAME + dev delete DEVNAME -OsmoUPF(config-gtp)# dev? +OsmoUPF(config-tunend)# dev? dev Configure the GTP device to use for encaps/decaps. -OsmoUPF(config-gtp)# dev ? +OsmoUPF(config-tunend)# dev ? create Add GTP device, creating a new Linux kernel GTP device. Will listen on GTPv1 port 2152 and GTPv0 port 3386 on the specified interface, or on ANY if LISTEN_ADDR is omitted. use Add GTP device, using an existing Linux kernel GTP device, e.g. created by 'gtp-link' delete Remove a GTP device from the configuration, and delete the Linux kernel GTP device if it was created here. -OsmoUPF(config-gtp)# dev create ? +OsmoUPF(config-tunend)# dev create ? DEVNAME device name, e.g. 'apn0' -OsmoUPF(config-gtp)# dev create foo ? +OsmoUPF(config-tunend)# dev create foo ? [LISTEN_ADDR] IPv4 or IPv6 address to listen on, omit for ANY -OsmoUPF(config-gtp)# dev delete ? +OsmoUPF(config-tunend)# dev delete ? DEVNAME device name, e.g. 'apn0' -OsmoUPF(config-gtp)# exit +OsmoUPF(config-tunend)# exit OsmoUPF(config)# nft OsmoUPF(config-nft)# list -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I49ac7b1f8b5b74f586edfed1dfb29f9af55a521b Gerrit-Change-Number: 30229 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-netif[master]: Add explicit link check to osmo_stream_srv_create()
by msuraev 18 Nov '22

18 Nov '22
Attention is currently required from: msuraev. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30226 ) Change subject: Add explicit link check to osmo_stream_srv_create() ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/30226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: If494eac5dcce6c5ae30e928b92e57067d5681a42 Gerrit-Change-Number: 30226 Gerrit-PatchSet: 5 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Nov 2022 18:45:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx
by pespin 18 Nov '22

18 Nov '22
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30216 ) Change subject: tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx ...................................................................... Patch Set 2: (1 comment) File src/tbf.h: https://gerrit.osmocom.org/c/osmo-pcu/+/30216/comment/fefd7001_00819862 PS1, Line 260: state_fi > Maybe move those internals to the private/protected part and only expose the *fi pointers? The priv/protected stuff will disappear eventually when we move code to C. In any case, the mainly used field is state_fsm.state_flags which I really need to know into cleaning because it's from old code and I may end up rewriting that. > Anyways, not gonna block your patchset. Yes, it's really bikeshed, whether we want to call it "main", "general" or "state" or whatever. There's more interesting stuff to clean up in there. Also all this needs to be done iteratively with lots of steps, and I tend to spread burst of changes over time. It's quite usual that in osmo-pcu I started doing 1 change and I end up having 10 patches cleaning up /refactoring stuff before being able to actually touch the thing I want to touch in first place. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I03e691ccf6a94431caa55653349158f5b85db017 Gerrit-Change-Number: 30216 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Nov 2022 18:16:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx
by fixeria 18 Nov '22

18 Nov '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30216 ) Change subject: tbf_fsm: Move osmo_fsm_inst fi out of struct tbf_fsm_ctx ...................................................................... Patch Set 2: (1 comment) File src/tbf.h: https://gerrit.osmocom.org/c/osmo-pcu/+/30216/comment/48202655_394a8f06 PS1, Line 260: state_fi > It's not the "main" tbf, it's the "state" tbf as its name indicates. FSMs are all about states, so "state FSM/FI" sounds like "butter oil" to me :P What I meant is that the tbf_fsm exists during the whole lifetime of a TBF (so we can call it 'main'), while both ul_ass_fsm and dl_ass_fsm serve their purpose during the assignment period and remain no-op once the assignment is completed. In theory both ul_ass_fsm and dl_ass_fsm can be children FSMs of the tbf_fsm, but of course you would still need to expose their *fi pointers in order to send events to them. > Why allocating the context dynamically if it can be allocated as part of the tbf struct? there's no need for that. Because this way you're exposing the internal data of the FSMs, which should not be directly accessible by anything else than the FSMs themselves. I have to admit that we do a similar trick with the bitvec's internal data array, so this is not super critical. But still a bit weird. Maybe move those internals to the private/protected part and only expose the *fi pointers? Anyways, not gonna block your patchset. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I03e691ccf6a94431caa55653349158f5b85db017 Gerrit-Change-Number: 30216 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Nov 2022 17:08:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.