diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-02-02 14:34:14 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-02-03 08:59:46 +0100 |
commit | b58bffa85df81a32a6bdf3d732dc8987834ba83f (patch) | |
tree | 65cf0e253c651233fee2430cde1a5cf88fc9e6cc | |
parent | 094f26c6f4848d141325a80a933dfef4e63adcf9 (diff) | |
download | barebox-b58bffa85df81a32a6bdf3d732dc8987834ba83f.tar.gz barebox-b58bffa85df81a32a6bdf3d732dc8987834ba83f.tar.xz |
fs: tftp: print message when stack can't keep us with TFTP windowsize
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@pengutronix.de>
Link: https://lore.barebox.org/20230202133415.319020-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | fs/tftp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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. |