[S] Change in libosmo-abis[rel-1.4.2]: input/ipaccess: Make sure to say "TCP keepalive"
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email ) Change subject: input/ipaccess: Make sure to say "TCP keepalive" .. input/ipaccess: Make sure to say "TCP keepalive" We have TCP and IPA keepalive. Reading a message like "input/ipaccess.c:612 Keepalive is set: 0" is misleading, as one might assume it relates to IPA. Be explicit. Related: SYS#6801, OS#6375 Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 (cherry picked from commit 715653778c33e31980452de86029720735cdcf4a) --- M src/input/ipaccess.c 1 file changed, 32 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 4f6353b..aac79f2 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -606,10 +606,10 @@ val = 1; ret = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, , sizeof(val)); if (ret < 0) - LOGP(DLINP, LOGL_ERROR, "Failed to set keepalive: %s\n", + LOGP(DLINP, LOGL_ERROR, "Failed to enable TCP keepalive: %s\n", strerror(errno)); else - LOGP(DLINP, LOGL_NOTICE, "Keepalive is set: %i\n", ret); + LOGP(DLINP, LOGL_NOTICE, "TCP Keepalive is enabled\n"); /* The following options are not portable! */ val = line->keepalive_idle_timeout > 0 ? @@ -617,37 +617,41 @@ DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT; ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, , sizeof(val)); - if (ret < 0) + if (ret < 0) { LOGP(DLINP, LOGL_ERROR, -"Failed to set keepalive idle time: %s\n", +"Failed to set TCP keepalive idle time: %s\n", strerror(errno)); + } val = line->keepalive_probe_interval > -1 ? line->keepalive_probe_interval : DEFAULT_TCP_KEEPALIVE_INTERVAL; ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, , sizeof(val)); - if (ret < 0) + if (ret < 0) { LOGP(DLINP, LOGL_ERROR, -"Failed to set keepalive interval: %s\n", +"Failed to set TCP keepalive interval: %s\n", strerror(errno)); + } val = line->keepalive_num_probes > 0 ? line->keepalive_num_probes : DEFAULT_TCP_KEEPALIVE_RETRY_COUNT; ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, , sizeof(val)); - if (ret < 0) + if (ret < 0) { LOGP(DLINP, LOGL_ERROR, -"Failed to set keepalive count: %s\n", +"Failed to set TCP keepalive count: %s\n", strerror(errno)); + } val = 1000 * line->keepalive_num_probes * line->keepalive_probe_interval + line->keepalive_idle_timeout; ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, , sizeof(val)); - if (ret < 0) + if (ret < 0) { LOGP(DLINP, LOGL_ERROR, -"Failed to set user timoeut: %s\n", +"Failed to set TCP user timeout: %s\n", strerror(errno)); + } } val = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: rel-1.4.2 Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 Gerrit-Change-Number: 36277 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in libosmo-abis[rel-1.4.2]: input/ipaccess: Make sure to say "TCP keepalive"
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email ) Change subject: input/ipaccess: Make sure to say "TCP keepalive" .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: rel-1.4.2 Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 Gerrit-Change-Number: 36277 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 14 Mar 2024 22:18:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmo-abis[rel-1.4.2]: input/ipaccess: Make sure to say "TCP keepalive"
Attention is currently required from: fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: input/ipaccess: Make sure to say "TCP keepalive" .. input/ipaccess: Make sure to say "TCP keepalive" We have TCP and IPA keepalive. Reading a message like "input/ipaccess.c:612 Keepalive is set: 0" is misleading, as one might assume it relates to IPA. Be explicit. Related: SYS#6801, OS#6375 Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 (cherry picked from commit 715653778c33e31980452de86029720735cdcf4a) --- M src/input/ipaccess.c 1 file changed, 32 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/77/36277/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: rel-1.4.2 Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 Gerrit-Change-Number: 36277 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: fixeria Gerrit-MessageType: newpatchset
[S] Change in libosmo-abis[rel-1.4.2]: input/ipaccess: Make sure to say "TCP keepalive"
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email ) Change subject: input/ipaccess: Make sure to say "TCP keepalive" .. Patch Set 1: (4 comments) File src/input/ipaccess.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15104): https://gerrit.osmocom.org/c/libosmo-abis/+/36277/comment/9c068a5a_74423f2f PS1, Line 650: if (ret < 0) { code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15104): https://gerrit.osmocom.org/c/libosmo-abis/+/36277/comment/cbd9e4b6_ccbcb37f PS1, Line 650: if (ret < 0) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15104): https://gerrit.osmocom.org/c/libosmo-abis/+/36277/comment/18633243_14cdac52 PS1, Line 652: "Failed to set TCP user timoeut: %s\n", code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15104): https://gerrit.osmocom.org/c/libosmo-abis/+/36277/comment/8ce2f52b_c29a6a15 PS1, Line 652: "Failed to set TCP user timoeut: %s\n", please, no spaces at the start of a line -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: rel-1.4.2 Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 Gerrit-Change-Number: 36277 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-CC: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 14 Mar 2024 17:14:52 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[S] Change in libosmo-abis[rel-1.4.2]: input/ipaccess: Make sure to say "TCP keepalive"
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email ) Change subject: input/ipaccess: Make sure to say "TCP keepalive" .. input/ipaccess: Make sure to say "TCP keepalive" We have TCP and IPA keepalive. Reading a message like "input/ipaccess.c:612 Keepalive is set: 0" is misleading, as one might assume it relates to IPA. Be explicit. Related: SYS#6801, OS#6375 Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 (cherry picked from commit 715653778c33e31980452de86029720735cdcf4a) --- M src/input/ipaccess.c 1 file changed, 32 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/77/36277/1 diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 418606e..2383265 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -606,10 +606,10 @@ val = 1; ret = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, , sizeof(val)); if (ret < 0) - LOGP(DLINP, LOGL_ERROR, "Failed to set keepalive: %s\n", + LOGP(DLINP, LOGL_ERROR, "Failed to enable TCP keepalive: %s\n", strerror(errno)); else - LOGP(DLINP, LOGL_NOTICE, "Keepalive is set: %i\n", ret); + LOGP(DLINP, LOGL_NOTICE, "TCP Keepalive is enabled\n"); /* The following options are not portable! */ val = line->keepalive_idle_timeout > 0 ? @@ -617,37 +617,41 @@ DEFAULT_TCP_KEEPALIVE_IDLE_TIMEOUT; ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, , sizeof(val)); - if (ret < 0) + if (ret < 0) { LOGP(DLINP, LOGL_ERROR, -"Failed to set keepalive idle time: %s\n", +"Failed to set TCP keepalive idle time: %s\n", strerror(errno)); + } val = line->keepalive_probe_interval > -1 ? line->keepalive_probe_interval : DEFAULT_TCP_KEEPALIVE_INTERVAL; ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, , sizeof(val)); - if (ret < 0) + if (ret < 0) { LOGP(DLINP, LOGL_ERROR, -"Failed to set keepalive interval: %s\n", +"Failed to set TCP keepalive interval: %s\n", strerror(errno)); + } val = line->keepalive_num_probes > 0 ? line->keepalive_num_probes : DEFAULT_TCP_KEEPALIVE_RETRY_COUNT; ret = setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, , sizeof(val)); - if (ret < 0) + if (ret < 0) { LOGP(DLINP, LOGL_ERROR, -"Failed to set keepalive count: %s\n", +"Failed to set TCP keepalive count: %s\n", strerror(errno)); + } val = 1000 * line->keepalive_num_probes * line->keepalive_probe_interval + line->keepalive_idle_timeout; ret = setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, , sizeof(val)); -if (ret < 0) +if (ret < 0) { LOGP(DLINP, LOGL_ERROR, - "Failed to set user timoeut: %s\n", + "Failed to set TCP user timoeut: %s\n", strerror(errno)); + } } val = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36277?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: rel-1.4.2 Gerrit-Change-Id: I01cbda27eb7826eb11f44e034d746b7c39b399a4 Gerrit-Change-Number: 36277 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-CC: laforge Gerrit-MessageType: newchange