Merge pull request #101 from adamgreen/netFixLargeSegmentIssues

net: Fix a couple of large TCP segment issues
pull/105/head
Emilio Monti 2013-11-04 00:46:49 -08:00
commit 8222bde1af
2 changed files with 4 additions and 1 deletions

View File

@ -86,7 +86,7 @@ extern "C"
/** \brief Defines the number of descriptors used for TX. Must
* be a minimum value of 2.
*/
#define LPC_NUM_BUFF_TXDESCS 3
#define LPC_NUM_BUFF_TXDESCS (TCP_SND_QUEUELEN + 1)
/** \brief Set this define to 1 to enable bounce buffers for transmit pbufs
* that cannot be sent via the zero-copy method. Some chained pbufs

View File

@ -646,6 +646,9 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
last_unsent->len += concat_p->tot_len;
#if TCP_CHECKSUM_ON_COPY
if (concat_chksummed) {
if (concat_chksum_swapped) {
concat_chksum = SWAP_BYTES_IN_WORD(concat_chksum);
}
tcp_seg_add_chksum(concat_chksum, concat_chksummed, &last_unsent->chksum,
&last_unsent->chksum_swapped);
last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED;