Skip to content

Commit 4a2296a

Browse files
authored
Merge pull request #115 from rgrr/feature/misc5
playing around with network parameters and other unimportant things
2 parents 13dd5d1 + 96348cf commit 4a2296a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

include/lwipopts.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@
6969
#define TCP_MSS (1500 - 20 - 20) // MTU minus header sizes (best value til now)
7070
#define TCP_SND_BUF (8 * TCP_MSS) // good tuning
7171

72-
//#define TCP_WND TCP_SND_BUF // til now no good value found
72+
#define TCP_WND (4 * TCP_MSS) // til now no good value found
7373
#define TCP_SND_QUEUELEN 16
7474
#define TCP_SNDQUEUELOWAT (TCP_SND_QUEUELEN / 2)
7575
#define MEMP_NUM_TCP_SEG 32
7676

77+
#define PBUF_POOL_SIZE 4
78+
7779
//--------------------------------------
7880
// memory
7981
#define MEM_SIZE 20000

src/net/tinyusb/ncm.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@
2929
#define _TUSB_NCM_H_
3030

3131
#include "common/tusb_common.h"
32+
#include "lwipopts.h"
3233

3334

3435
#ifndef CFG_TUD_NCM_IN_NTB_MAX_SIZE
3536
/// must be >> MTU
36-
#define CFG_TUD_NCM_IN_NTB_MAX_SIZE 3200
37+
#define CFG_TUD_NCM_IN_NTB_MAX_SIZE (2 * TCP_MSS + 100) // can be set to 2048 without impact
3738
#endif
3839
#ifndef CFG_TUD_NCM_OUT_NTB_MAX_SIZE
3940
/// must be >> MTU
40-
#define CFG_TUD_NCM_OUT_NTB_MAX_SIZE 3200
41+
#define CFG_TUD_NCM_OUT_NTB_MAX_SIZE (2 * TCP_MSS + 100) // can be set to smaller values if .wNtbOutMaxDatagrams==1
4142
#endif
4243

4344
#ifndef CFG_TUD_NCM_OUT_NTB_N

0 commit comments

Comments
 (0)