[PATCH v2 2/3] fs: tftp: print message when stack can't keep us with TFTP windowsize
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Feb 2 05:34:14 PST 2023
When the NIC driver doesn't configure enough buffers to keep up
with a big TFTP windowsize, error reporting is less than optimal,
e.g. on AX88x72A
T BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBT T BBBBBBBBBBBBT
BBBBBBBBBBBBBBBBBBBBBBBBBT
or on older DWMAC1000 (non-EQOS):
WARNING: eth0: Rx error status (8800)
T BBBBBBWARNING: eth0: Rx error status (8800)
While we probably want to:
- decrease rate limit in __net_poll()
- increase ring buffer depth for affected drivers
For now, at least print a helpful warning.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
v1 -> v2:
- reword commit and warning message to point finger at
network stack (Michael)
---
fs/tftp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/tftp.c b/fs/tftp.c
index 0b0b86a1a07e..a63b133caa25 100644
--- a/fs/tftp.c
+++ b/fs/tftp.c
@@ -477,6 +477,8 @@ static void tftp_handle_data(struct file_priv *priv, uint16_t block,
/* completely unexpected and unrelated to actual window;
ignore the packet. */
printf("B");
+ if (g_tftp_window_size > 1)
+ pr_warn_once("Unexpected packet. global.tftp.windowsize set too high?\n");
} else {
/* The 'rc < 0' below happens e.g. when datagrams in the first
part of the transfer window are dropped.
--
2.30.2
More information about the barebox
mailing list