mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #101 from adamgreen/netFixLargeSegmentIssues
net: Fix a couple of large TCP segment issuespull/105/head
commit
8222bde1af
|
@ -86,7 +86,7 @@ extern "C"
|
||||||
/** \brief Defines the number of descriptors used for TX. Must
|
/** \brief Defines the number of descriptors used for TX. Must
|
||||||
* be a minimum value of 2.
|
* 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
|
/** \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
|
* that cannot be sent via the zero-copy method. Some chained pbufs
|
||||||
|
|
|
@ -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;
|
last_unsent->len += concat_p->tot_len;
|
||||||
#if TCP_CHECKSUM_ON_COPY
|
#if TCP_CHECKSUM_ON_COPY
|
||||||
if (concat_chksummed) {
|
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,
|
tcp_seg_add_chksum(concat_chksum, concat_chksummed, &last_unsent->chksum,
|
||||||
&last_unsent->chksum_swapped);
|
&last_unsent->chksum_swapped);
|
||||||
last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED;
|
last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED;
|
||||||
|
|
Loading…
Reference in New Issue