Skip to content

Commit 77aca10

Browse files
authored
Merge pull request #62 from fjtrujy/nagle
Disable nagle
2 parents 7fc311b + f6ecdaf commit 77aca10

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

ee/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@ EE_CFLAGS += -Werror
1717
# This is to enable the debug mode into ps2link
1818
ifeq ($(DEBUG),1)
1919
EE_CFLAGS += -DDEBUG -g
20-
else
20+
endif
2121
EE_CFLAGS += -Os
2222
EE_CFLAGS += -fdata-sections -ffunction-sections
23-
endif
2423

2524
ifeq ($(DEBUG),1)
2625
EE_LDFLAGS += -g
2726
else
2827
EE_LDFLAGS += -s
29-
EE_LDFLAGS += -Wl,--gc-sections
3028
endif
29+
EE_LDFLAGS += -Wl,--gc-sections
3130
EE_LDFLAGS += -Wl,-Map,ps2link.map
3231

3332
# This is to read the closest tag version

iop/imports.lst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ I_lwip_recvfrom
4141
I_lwip_close
4242
I_lwip_bind
4343
I_lwip_accept
44+
I_lwip_setsockopt
4445
ps2ip_IMPORTS_end
4546

4647
sifcmd_IMPORTS_start

iop/net_fio.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,13 @@ int pko_file_serv(void *argv)
752752
ret = disconnect(pko_fileio_sock);
753753
dbgprintf("close ret %d\n", ret);
754754
}
755+
756+
/* Disable Nagle on IOP side so small request packets are sent
757+
* immediately without waiting for previous data to be ACKed. */
758+
{
759+
int one = 1;
760+
setsockopt(client_sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
761+
}
755762
pko_fileio_sock = client_sock;
756763
}
757764

0 commit comments

Comments
 (0)