diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2022-08-30 09:38:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-08-31 08:31:21 +0200 |
commit | 9821f7f47a1fd2b5e250c2b4ed39a5364a00eb07 (patch) | |
tree | 772be30a9651e7ece914095890cd93caa6a3b843 | |
parent | 503b04c4966bcba88b7a1c3babb8584c1101170b (diff) | |
download | barebox-9821f7f47a1fd2b5e250c2b4ed39a5364a00eb07.tar.gz barebox-9821f7f47a1fd2b5e250c2b4ed39a5364a00eb07.tar.xz |
tftp: reduce block size on lookup requests
Save some bytes on network traffic by reducing the server response for
lookup requests.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Link: https://lore.barebox.org/20220830073816.2694734-14-enrico.scholz@sigma-chemnitz.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | fs/tftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -151,7 +151,9 @@ static int tftp_send(struct file_priv *priv) '\0', /* "timeout" */ TIMEOUT, '\0', '\0', /* "blksize" */ - TFTP_MTU_SIZE); + /* use only a minimal blksize for getattr + operations, */ + priv->is_getattr ? TFTP_BLOCK_SIZE : TFTP_MTU_SIZE); pkt++; if (!priv->push) |