Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Update Nuvoton Ethernet project file #1989

Closed
wants to merge 2 commits into from
Closed

Conversation

qiutongs
Copy link
Contributor

@qiutongs qiutongs commented May 8, 2020

Description

Update Nuvoton Ethernet project file

Enable ipconfigUSE_TCP_WIN to fix a link error in this line: https://github.com/aws/amazon-freertos/blame/master/libraries/freertos_plus/standard/freertos_plus_tcp/source/FreeRTOS_TCP_IP.c#L1326

Without ipconfigUSE_TCP_WIN == 1, ulTCPWindowTxSack is undefined

Checklist:

  • I have tested my changes. No regression in existing tests.
  • My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@htibosch
Copy link
Contributor

Hello @qiutongs : oops, that was not the intention.
When ipconfigUSE_TCP_WIN == 0, ulTCPWindowTxSack should not be called.
Are you compiling with today's master branch?

( for those who wonder: ipconfigUSE_TCP_WIN allows TCP to use sliding windows. ulTCPWindowTxSack() has to do with SACK: Selective Acknowledgements. That is a TCP option which is only used when TCP sliding windows are being used ).

@cobusve
Copy link
Member

cobusve commented May 11, 2020

Looking in the code on the master branch it is always calling ulTCPWindowTxSack from prvSkipPastRemainingOptions, so it seems like we need some logic here to avoid this call when not using sliding windows?

Hein can you please advise what the appropriate fix would be here?

@qiutongs
Copy link
Contributor Author

Hello @qiutongs : oops, that was not the intention.
When ipconfigUSE_TCP_WIN == 0, ulTCPWindowTxSack should not be called.
Are you compiling with today's master branch?

( for those who wonder: ipconfigUSE_TCP_WIN allows TCP to use sliding windows. ulTCPWindowTxSack() has to do with SACK: Selective Acknowledgements. That is a TCP option which is only used when TCP sliding windows are being used ).

Yes, I am compiling the latest master.

When ipconfigUSE_TCP_WIN == 0, should ulTCPWindowTxSack be compiled? The answer is no in current code: https://github.com/aws/amazon-freertos/blob/master/libraries/freertos_plus/standard/freertos_plus_tcp/source/FreeRTOS_TCP_WIN.c#L1676

So I think ulTCPWindowTxSack and prvSkipPastRemainingOptions should be both compiled or both not compiled. Please share your feedback.

@@ -242,7 +242,7 @@ extern uint32_t numaker_ulRand(void);
#define ipconfigUSE_TCP ( 1 )

/* USE_WIN: Let TCP use windowing mechanism. */
#define ipconfigUSE_TCP_WIN ( 0 )
#define ipconfigUSE_TCP_WIN ( 1 )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the build pass for other boards (ST, TI, NXP ) that also do not have this macro set?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the call-sites for ulTCPWindowTxSack, and I see only a single call from prvReadSackOption that is currently protected by ipconfigUSE_TCP_WIN
Does the problem not exist anymore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that prvSkipPastRemainingOptions was removed in #2015 by @htibosch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I will rebase to the latest master and check if Nuvoton eth project can build.

@qiutongs
Copy link
Contributor Author

Temporarily closed this PR.

@qiutongs qiutongs closed this May 21, 2020
@qiutongs qiutongs mentioned this pull request May 21, 2020
2 tasks
@htibosch
Copy link
Contributor

Hello, as you are working on the Nuveton project, maybe you have any idea why PR #2029 is getting a build error when building the Nuveton project. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants