osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/17972 )


Change subject: src/input/ipaccess.c: set TCP_NODELAY
......................................................................

src/input/ipaccess.c: set TCP_NODELAY

Set TCP_NODELAY for all RSL/OML sockets.

Related: SYS#4906
Change-Id: Ia3d4c41bf0659e682f0b7ae5f3d58ed0f28edb58
---
M src/input/ipaccess.c
1 file changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/72/17972/1

diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index e1936af..4d21416 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -271,6 +271,7 @@
                        struct e1inp_ts *ts;
                        struct osmo_fd *newbfd;
                        struct e1inp_line *new_line;
+                       int on = 1;

                        sign_link =
                                line->ops->sign_link_up(&unit_data, line,
@@ -309,6 +310,13 @@
                                     "could not register FD\n");
                                goto err;
                        }
+
+                       /* set TCP_NODELAY (FIXME: just call 
update_fd_settings() here instead?) */
+                       ret = setsockopt(newbfd->fd, IPPROTO_TCP, TCP_NODELAY, 
&on, sizeof(on));
+                       if (ret < 0)
+                               LOGP(DLINP, LOGL_ERROR, "Failed to set 
TCP_NODELAY: %s\n", strerror(errno));
+
+
                        /* now we can release the dummy RSL line. */
                        e1inp_line_put(line);

@@ -587,6 +595,11 @@
 #endif
 #endif
        }
+
+       val = 1;
+       ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
+       if (ret < 0)
+               LOGP(DLINP, LOGL_ERROR, "Failed to set TCP_NODELAY: %s\n", 
strerror(errno));
 }

 /* callback of the OML listening filedescriptor */

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/17972
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ia3d4c41bf0659e682f0b7ae5f3d58ed0f28edb58
Gerrit-Change-Number: 17972
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to