Skip to content

Commit 8222bde

Browse files
committed
Merge pull request #101 from adamgreen/netFixLargeSegmentIssues
net: Fix a couple of large TCP segment issues
2 parents 5aad98a + 64620e2 commit 8222bde

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libraries/net/eth/lwip-eth/arch/lpc_emac_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ extern "C"
8686
/** \brief Defines the number of descriptors used for TX. Must
8787
* be a minimum value of 2.
8888
*/
89-
#define LPC_NUM_BUFF_TXDESCS 3
89+
#define LPC_NUM_BUFF_TXDESCS (TCP_SND_QUEUELEN + 1)
9090

9191
/** \brief Set this define to 1 to enable bounce buffers for transmit pbufs
9292
* that cannot be sent via the zero-copy method. Some chained pbufs

libraries/net/lwip/lwip/core/tcp_out.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,9 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
646646
last_unsent->len += concat_p->tot_len;
647647
#if TCP_CHECKSUM_ON_COPY
648648
if (concat_chksummed) {
649+
if (concat_chksum_swapped) {
650+
concat_chksum = SWAP_BYTES_IN_WORD(concat_chksum);
651+
}
649652
tcp_seg_add_chksum(concat_chksum, concat_chksummed, &last_unsent->chksum,
650653
&last_unsent->chksum_swapped);
651654
last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED;

0 commit comments

Comments
 (0)