mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-14 19:03:37 +00:00
Optimise tftp.
This change attempts to optimse TFTP perfomance. It reads the next block immediately after sending a block, in order to reduce latency between receiving an ACK and sending the next block. Is also suppresses lseek() calls when reading successive blocks. This improves performance when doing transfers without windowing and when only a single transfer is in progress at one time.
This commit is contained in:
2 files changed
+111
-91
No files matched your search
+3
-3
@@ -1109,7 +1109,7 @@ struct ping_result {
|
||||
|
||||
struct tftp_file {
|
||||
int refcount, fd;
|
||||
off_t size;
|
||||
off_t size, posn;
|
||||
dev_t dev;
|
||||
ino_t inode;
|
||||
char filename[];
|
||||
@@ -1124,7 +1124,7 @@ struct tftp_transfer {
|
||||
union mysockaddr peer;
|
||||
union all_addr source;
|
||||
int if_index;
|
||||
unsigned char opt_blocksize, opt_transize, opt_windowsize, opt_timeout, netascii, carrylf, backoff;
|
||||
unsigned char opt_blocksize, opt_transize, opt_windowsize, opt_timeout, netascii, carrylf, lastcarrylf, backoff;
|
||||
struct tftp_file *file;
|
||||
struct tftp_transfer *next;
|
||||
};
|
||||
@@ -1278,7 +1278,7 @@ extern struct daemon {
|
||||
struct serverfd *sfds;
|
||||
struct irec *interfaces;
|
||||
struct listener *listeners;
|
||||
struct server *srv_save; /* Used for resend on DoD */
|
||||
void *srv_save; /* Used for resend on DoD and tftp prefetch */
|
||||
size_t packet_len; /* " " */
|
||||
int fd_save; /* " " */
|
||||
pid_t *tcp_pids;
|
||||
|
||||
Reference in new issue
Block a user