-
Notifications
You must be signed in to change notification settings - Fork 208
ListIntegrationbytes of TCP IP / Option for Copy ClientSocket #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hello @fireblade156, Thank you for finding and reporting this issue with the the uninitialized list item to us. We are looking into this and will get back to you soon. Thanks again |
AniruddhaKanhere
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @fireblade156, I have a couple of questions for you. Would you mind clarifying them?
Thanks,
Aniruddha
FreeRTOS_TCP_WIN.c
Outdated
| * nulled already. Set the owner to a segment descriptor. */ | ||
|
|
||
| /* | ||
| * Without call of the vListInitialiseItem, the list aata integrity check bytes aren't set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The integrity check bytes are meant for debugging while the code is still in development - I am unsure if someone would need this in the "production" code. The verbiage in the History.txt of FreeRTOS-Kernel is: "Introduced configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES which, when set, will include known values in both list and list item structures. The values are intended to assist debugging. If the values get overwritten then it is likely application code has written over RAM used by the kernel."
If that is the case, you are free to make changes in the source as you please for testing. But in the production code - once you are sure that the application is free from bugs which might overwrite kernel RAM - the macro should be defined back to 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On one side, you have right. When the code is released, this configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES should be 0 and isn't used. But I whould help, for debugging and searching problems, when then Inegrity check bytes are always correct set, if the configuare is active. So, many people need not so long search, where the problems commes
FreeRTOS_TCP_IP.c
Outdated
| { | ||
|
|
||
| #if ( ipconfigDONOT_COPY_SOCKETSET_TO_CHIELD_SOCKET == 1 ) | ||
| pxNewSocket->pxSocketSet = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are adding a different socket set to the child sockets then this would anyways get overwritten. Did I understand that correctly: In our a Application, we doesn't need the copy of the SocketSet to the ChildSockets. then ChildSockets works with different socketset then the Parents Sockent.?
If that is the case, then would you mind explaining how assigning the parent's socket set would matter?
If that is not the case - can you help me understand what you mean?
Thank you,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use FreeRTOS in a Software, which runs on Embedded with FreeRTOS and on Windows. In Windows, the Accept doesn't copy the SocketSet to the child socket.
Generall it's works in this way:
- Select with SocketSet, Accept
- ChildSocket goes in a other Task, where Select, with recived and Send is done.
I would prefere, that this case runs more, like the Socket of Windows and Linux
htibosch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fireblade156, thank you very much for this PR. Before approving it, I have 3 suggestions for chance.
Thanks,
FreeRTOS_TCP_IP.c
Outdated
|
|
||
| #if ( ipconfigDONOT_COPY_SOCKETSET_TO_CHIELD_SOCKET == 1 ) | ||
| pxNewSocket->pxSocketSet = NULL; | ||
| pxNewSocket->xSelectBits = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to clear socket fields explicitly, so I would propose:
- pxNewSocket->pxSocketSet = NULL;
- pxNewSocket->xSelectBits = 0;When a socket is created, the space is cleared with a memset() here.
FreeRTOS_TCP_WIN.c
Outdated
| */ | ||
| vListInitialiseItem( &( xTCPSegments[ xIndex ].xSegmentItem )); | ||
| listSET_LIST_ITEM_OWNER( &( xTCPSegments[ xIndex ].xSegmentItem ), ( void * ) &( xTCPSegments[ xIndex ] ) ); | ||
| vListInitialiseItem( &( xTCPSegments[ xIndex ].xQueueItem )); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside setting the debug fields, vListInitialiseItem() will set pxContainer to NULL. The latter is not really necessary because the socket space has been cleared by calling memset().
Like @AniruddhaKanhere, I would also be happy if the call will depend on mention macro:
#if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
vListInitialiseItem( &( xTCPSegments[ xIndex ].xSegmentItem ));
vListInitialiseItem( &( xTCPSegments[ xIndex ].xQueueItem ));
#endifThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote too for this soultions. And in this case it's done in many other possition from FreeRTPS. For Excample in FreeRTOS_Socket.c in the functons:
FreeRTOS_socket
vListInitialiseItem( &( pxSocket->xBoundSocketListItem ) );
listSET_LIST_ITEM_OWNER( &( pxSocket->xBoundSocketListItem ), ipPOINTER_CAST( void *, pxSocket ) );
But there are many other possition, where the before listSET_LIST_ITEM_OWNER the Integruty bytes aren't intialisated. This is realy not helpfull for debuging, if you need to search a bug
include/FreeRTOSIPConfigDefaults.h
Outdated
| #endif | ||
|
|
||
| #ifnef ipconfigDONOT_COPY_SOCKETSET_TO_CHIELD_SOCKET | ||
| #define ipconfigDONOT_COPY_SOCKETSET_TO_CHIELD_SOCKET 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that the macro contains a typo? CHIELD should be CHILD?
Or maybe the macro can be rephrased as CHILD_SOCKETS_INHERIT_SOCKET_SET, by default defined as 1?
( positive statements are easier to understand than macros containing "NOT" or "DONT" ).
About inheriting: sockets that are obtained by calling accept() already exists for a short while. It is possible that the socket already has received data, and recv() may be called. It also means that the socket has created a reception stream buffer. The size of the buffer is also inherited from the parent socket.
Now when a socket receives data, I want to have the socket set triggered. That is the reason why it is copied from the parent.
But as @AniruddhaKanhere suggests, you can also attach the socket to a different socket set right after obtaining it with FreeRTOS_accept():
Socket_t xSocket = FreeRTOS_accept( xServerSocket, &( xAddress ), &( xAddressLength ) );
if( xSocketValid( xSocket ) )
{
FreeRTOS_FD_SET( xSocket,
xSocketSet,
eSELECT_EXCEPT | eSELECT_READ );
}|
Hey @fireblade156 and @AniruddhaKanhere, what shall we do here? I still vote for this approach: #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
vListInitialiseItem( &( xTCPSegments[ xIndex ].xSegmentItem ));
vListInitialiseItem( &( xTCPSegments[ xIndex ].xQueueItem ));
#endifIt will only add extra code when it is needed. |
|
Hello @fireblade156, would you mind making the changes the @htibosch suggested? If you'd like, I can make the changes and we can get the PR merged |
|
@fireblade156, apologies - I updated the PR with the suggested changes right now. I think we should get this merged as soon as possible and thus my haste. |
htibosch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve this change. It supports debugging of the List_t objects.
| /* Could call vListInitialiseItem here but all data has been | ||
| * nulled already. Set the owner to a segment descriptor. */ | ||
|
|
||
| #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instances of list-items are properly initialised, like in BufferAllocation_1, in BufferAllocation_2, and in FreeRTOS_Sockets.c
This PR will add initialisation in FreeRTOS_TCP_WIN.c.
One more change is needed, in FreeRTOS_DNS.c, around line 390:
pxCallback->uxRemaningTime = uxTimeout;
vTaskSetTimeOutState( &pxCallback->uxTimeoutState );
+ vListInitialiseItem( &( pxCallback->xListItem ) );
listSET_LIST_ITEM_OWNER( &( pxCallback->xListItem ), ( void * ) pxCallback );
@AniruddhaKanhere , can you take care of that?
Also I think that in FreeRTOS_TCP_WIN.c, we can call vListInitialiseItem() unconditionally:
- #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
- {
vListInitialiseItem( &( xTCPSegments[ xIndex ].xSegmentItem ) );
vListInitialiseItem( &( xTCPSegments[ xIndex ].xQueueItem ) );
- }
- #endifIt will not slow-down the application because this is only called at start-up time. And I noticed that in other instances vListInitialiseItem() is called unconditionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add that in a separate PR. Thanks @htibosch.
…OS#333) * without the clal of vListInitialiseItem, aren't the list integrity byte set * We need a option, that the Socketset isn't copyed to the client socket * Uncrustify again * Update with suggestions and uncrustify Co-authored-by: Maurus MH. Hilber <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]>
…OS#333) * without the clal of vListInitialiseItem, aren't the list integrity byte set * We need a option, that the Socketset isn't copyed to the client socket * Uncrustify again * Update with suggestions and uncrustify Co-authored-by: Maurus MH. Hilber <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]>
* ListIntegrationbytes of TCP IP / Option for Copy ClientSocket (#333) * without the clal of vListInitialiseItem, aren't the list integrity byte set * We need a option, that the Socketset isn't copyed to the client socket * Uncrustify again * Update with suggestions and uncrustify Co-authored-by: Maurus MH. Hilber <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * IPv4/single: TCP minimum time for retransmissions (#387) * IPv4/multi: TCP minimum time for retransmissions * Corrected typo in a comment Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Advance litani submodule for CBMC proofs (#389) Co-authored-by: Mark R. Tuttle <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update ARP cache only when necessary and use ARP cache to translate IP to MAC (#366) * Update ARP cache only when required * Uncrustified and added a declaration * Add ; in declaration * Update after @htibosch's comments * Fix unit-tests * Remove unused variable and add compound block * Update version number/Manifest/History and Kernel pointer for release (#383) * Update version/manifest/Kernel pointer * Always prepare source tree for cbmc proofs (#395) Co-authored-by: Mark R. Tuttle <[email protected]> * Fix constant comparison warnings (#398) * Remove constant comparision warnings * Fix formatting and add terminating #endif * Add Comment triggered uncrustify script (#400) * Add automated uncrustify * Un-uncrustify * Uncrustify - manually * Remove unused comment * Update user to be github action * Remove catch_assert from uncrustify * Minor changes to the GH action uncrustify (#401) * Fix compiler warnings when the TCP Window is not used (#124) * Fix warnings when TCP window is not used * Uncrustify * parent be9fe45d8ec440f7750de0f4870b28de39b10a3b author Hein Tibosch <[email protected]> 1609879469 +0800 committer Aniruddha Kanhere <[email protected]> 1619029134 -0700 Move local variables to inner loop in prvNetworkInterfaceInput() (#144) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Update litani submodule (#147) Co-authored-by: Mark R. Tuttle <[email protected]> Fix doxygen check (#149) * Update doxygen version * update the config file TCP_WIN: fix compile warning on x86_64 (#148) * TCP_WIN: fix compile warning on x86_64 Fix the following warning when building for 64 bit: warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow] uint32_t ulReturn = ~0UL; ^ * Update FreeRTOS_TCP_WIN.c Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> fix deprecated volatile compound assignment (#152) * fixed deprecated volatile compound assignment C++20 deprecates some undefined or unclear use cases of 'volatile' like compound assignments and compliant compilers warn about those deprecated operations. In vStreamBufferMoveMid the deprecated compound assignment and other direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a local variable stored back when done. * Uncrustify Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> FreeRTOS_ARP.c : store local addresses only (#120) * FreeRTOS_ARP.c : store local addresses only * Added the function xARPWaitResolution() * Added an entry to lexicon.txt. * Ran Uncrustify * Update unit test file * Update * Declared xARPWaitResolution() in FreeRTOS_IP.h * Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0 Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Remove unnecessary #ifndef (#186) * Add entropy * remove warning * Remove unnecessary ifndef * Remove unwanted changes Don't Fragment Flags patch. (#179) * Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols Adds definitions for the IP fragmentation flags Modifies the fragmentation check for incoming frames to drop both the first and later fragments. Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP ) Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments. * Uncrustified * Uncrustify * Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 ) Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere * Adds the 'U' qualifier as requested by hs2gh fixes a typo in FreeRTOSIPConfigDefaults.h * Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion. * Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT * same as last commit, simply forgot to save this before pushing. Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> fix IP buffer padding check on 64bit (#146) * fix IP buffer padding check on 64bit On 64 bit systems, FreeRTOS_IPInit() would assert ipconfigBUFFER_PADDING was equal to 14 to "make sure there is enough space in pucEthernetBuffer to store a pointer." This prevents the driver from requesting additional padding, so make the assert greater than or equal to 14. Also use the final ipBUFFER_PADDING value instead of ipconfigBUFFER_PADDING, which is probably what was intended? * Update after comments Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Update readme.md (#189) Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage. I had a tough time reading that table until I looked at the md source. You could also just put code fences around it: ~~~ /** * RAM area H747 H743 H742 Location * ------------------------------------------------ * DTCM 128k 128k 128k 0x20000000 * AXI-SRAM 511k 511k 384k 0x24000000 * * SRAM1 128k 128k 32k 0x30000000 * SRAM2 128k 128k 16k 0x30020000 * SRAM3 32k 32k - 0x30040000 * SRAM4 64k 64k 64k 0x38000000 * Backup SRAM 4k 4k 4k 0x38800000 */ ~~~ Co-authored-by: Aniruddha Kanhere <[email protected]> Update files referencing aws_application_version.h to use iot_application_version.h (#188) * Update files referencing aws_application_version.h to use iot_application_version.h * Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository. Remove function defs from header files (#190) * Add entropy * remove warning * Remove function defs from headers * Some corrections * More fixes and uncrustify * Remove the BaseType min function * Doxygen * Fix one CBMC proof * More cbmc proof fixes * More cbmc fixes * Some doxygen additions * Update last CBMC proof * Doxygen comments * Doxygen updates * Doxygen and spell check * Spell check and unit-test * Unit test fix * Update after comments * Update 2 after comments * Move function around * Uncrustify * Update after comments Co-authored-by: Gary Wicker <[email protected]> Do not release a network buffer if it equals to NULL (#191) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Circumvent Qemu MPS2 networking bug (#142) * Add support for MPS2 networking with lan9118/lan9220 * Fix uncrustify errors * Enable network interrupt handling * Add network interrupt support to Qemu MPS2 AN385 * Fix function comment * Fix Uncrustify errors * Fix Uncrustify errors * Fix Uncrustify Errors * Fix typo * Cirumvent Qemu MPS2 network bug * Remove commented code, add doxygen comment Add a project for static analysis (#195) * Add entropy * remove warning * Remove unwanted changes * Update tcp_mem_stats.c * Add Coverity * Remove unused files * Add some features * clean up * More clean up * Unwanted additions removal * Clean up * Add 32-bit compile option * Update after comments * Uncrustify Fix compiler warnings when the TCP Window is not used (#124) * Fix warnings when TCP window is not used * Uncrustify Move local variables to inner loop in prvNetworkInterfaceInput() (#144) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Update litani submodule (#147) Co-authored-by: Mark R. Tuttle <[email protected]> Fix doxygen check (#149) * Update doxygen version * update the config file TCP_WIN: fix compile warning on x86_64 (#148) * TCP_WIN: fix compile warning on x86_64 Fix the following warning when building for 64 bit: warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow] uint32_t ulReturn = ~0UL; ^ * Update FreeRTOS_TCP_WIN.c Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Remove unnecessary #ifndef (#186) * Add entropy * remove warning * Remove unnecessary ifndef * Remove unwanted changes Don't Fragment Flags patch. (#179) * Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols Adds definitions for the IP fragmentation flags Modifies the fragmentation check for incoming frames to drop both the first and later fragments. Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP ) Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments. * Uncrustified * Uncrustify * Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 ) Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere * Adds the 'U' qualifier as requested by hs2gh fixes a typo in FreeRTOSIPConfigDefaults.h * Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion. * Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT * same as last commit, simply forgot to save this before pushing. Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> fix IP buffer padding check on 64bit (#146) * fix IP buffer padding check on 64bit On 64 bit systems, FreeRTOS_IPInit() would assert ipconfigBUFFER_PADDING was equal to 14 to "make sure there is enough space in pucEthernetBuffer to store a pointer." This prevents the driver from requesting additional padding, so make the assert greater than or equal to 14. Also use the final ipBUFFER_PADDING value instead of ipconfigBUFFER_PADDING, which is probably what was intended? * Update after comments Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Update readme.md (#189) Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage. I had a tough time reading that table until I looked at the md source. You could also just put code fences around it: ~~~ /** * RAM area H747 H743 H742 Location * ------------------------------------------------ * DTCM 128k 128k 128k 0x20000000 * AXI-SRAM 511k 511k 384k 0x24000000 * * SRAM1 128k 128k 32k 0x30000000 * SRAM2 128k 128k 16k 0x30020000 * SRAM3 32k 32k - 0x30040000 * SRAM4 64k 64k 64k 0x38000000 * Backup SRAM 4k 4k 4k 0x38800000 */ ~~~ Co-authored-by: Aniruddha Kanhere <[email protected]> Update files referencing aws_application_version.h to use iot_application_version.h (#188) * Update files referencing aws_application_version.h to use iot_application_version.h * Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository. Remove function defs from header files (#190) * Add entropy * remove warning * Remove function defs from headers * Some corrections * More fixes and uncrustify * Remove the BaseType min function * Doxygen * Fix one CBMC proof * More cbmc proof fixes * More cbmc fixes * Some doxygen additions * Update last CBMC proof * Doxygen comments * Doxygen updates * Doxygen and spell check * Spell check and unit-test * Unit test fix * Update after comments * Update 2 after comments * Move function around * Uncrustify * Update after comments Co-authored-by: Gary Wicker <[email protected]> Do not release a network buffer if it equals to NULL (#191) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Circumvent Qemu MPS2 networking bug (#142) * Add support for MPS2 networking with lan9118/lan9220 * Fix uncrustify errors * Enable network interrupt handling * Add network interrupt support to Qemu MPS2 AN385 * Fix function comment * Fix Uncrustify errors * Fix Uncrustify errors * Fix Uncrustify Errors * Fix typo * Cirumvent Qemu MPS2 network bug * Remove commented code, add doxygen comment Add a project for static analysis (#195) * Add entropy * remove warning * Remove unwanted changes * Update tcp_mem_stats.c * Add Coverity * Remove unused files * Add some features * clean up * More clean up * Unwanted additions removal * Clean up * Add 32-bit compile option * Update after comments * Uncrustify Create uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml Update uncrustify.yml * Remove unused file Include ICMP while calculating IP header checksum (#198) * Fix compiler warnings when the TCP Window is not used (#124) * Fix warnings when TCP window is not used * Uncrustify * Move local variables to inner loop in prvNetworkInterfaceInput() (#144) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update litani submodule (#147) Co-authored-by: Mark R. Tuttle <[email protected]> * Fix doxygen check (#149) * Update doxygen version * update the config file * TCP_WIN: fix compile warning on x86_64 (#148) * TCP_WIN: fix compile warning on x86_64 Fix the following warning when building for 64 bit: warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow] uint32_t ulReturn = ~0UL; ^ * Update FreeRTOS_TCP_WIN.c Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix deprecated volatile compound assignment (#152) * fixed deprecated volatile compound assignment C++20 deprecates some undefined or unclear use cases of 'volatile' like compound assignments and compliant compilers warn about those deprecated operations. In vStreamBufferMoveMid the deprecated compound assignment and other direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a local variable stored back when done. * Uncrustify Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * FreeRTOS_ARP.c : store local addresses only (#120) * FreeRTOS_ARP.c : store local addresses only * Added the function xARPWaitResolution() * Added an entry to lexicon.txt. * Ran Uncrustify * Update unit test file * Update * Declared xARPWaitResolution() in FreeRTOS_IP.h * Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0 Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Remove unnecessary #ifndef (#186) * Add entropy * remove warning * Remove unnecessary ifndef * Remove unwanted changes * Don't Fragment Flags patch. (#179) * Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols Adds definitions for the IP fragmentation flags Modifies the fragmentation check for incoming frames to drop both the first and later fragments. Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP ) Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments. * Uncrustified * Uncrustify * Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 ) Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere * Adds the 'U' qualifier as requested by hs2gh fixes a typo in FreeRTOSIPConfigDefaults.h * Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion. * Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT * same as last commit, simply forgot to save this before pushing. Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix IP buffer padding check on 64bit (#146) * fix IP buffer padding check on 64bit On 64 bit systems, FreeRTOS_IPInit() would assert ipconfigBUFFER_PADDING was equal to 14 to "make sure there is enough space in pucEthernetBuffer to store a pointer." This prevents the driver from requesting additional padding, so make the assert greater than or equal to 14. Also use the final ipBUFFER_PADDING value instead of ipconfigBUFFER_PADDING, which is probably what was intended? * Update after comments Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update readme.md (#189) Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage. I had a tough time reading that table until I looked at the md source. You could also just put code fences around it: ~~~ /** * RAM area H747 H743 H742 Location * ------------------------------------------------ * DTCM 128k 128k 128k 0x20000000 * AXI-SRAM 511k 511k 384k 0x24000000 * * SRAM1 128k 128k 32k 0x30000000 * SRAM2 128k 128k 16k 0x30020000 * SRAM3 32k 32k - 0x30040000 * SRAM4 64k 64k 64k 0x38000000 * Backup SRAM 4k 4k 4k 0x38800000 */ ~~~ Co-authored-by: Aniruddha Kanhere <[email protected]> * Update files referencing aws_application_version.h to use iot_application_version.h (#188) * Update files referencing aws_application_version.h to use iot_application_version.h * Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository. * Remove function defs from header files (#190) * Add entropy * remove warning * Remove function defs from headers * Some corrections * More fixes and uncrustify * Remove the BaseType min function * Doxygen * Fix one CBMC proof * More cbmc proof fixes * More cbmc fixes * Some doxygen additions * Update last CBMC proof * Doxygen comments * Doxygen updates * Doxygen and spell check * Spell check and unit-test * Unit test fix * Update after comments * Update 2 after comments * Move function around * Uncrustify * Update after comments Co-authored-by: Gary Wicker <[email protected]> * Do not release a network buffer if it equals to NULL (#191) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Circumvent Qemu MPS2 networking bug (#142) * Add support for MPS2 networking with lan9118/lan9220 * Fix uncrustify errors * Enable network interrupt handling * Add network interrupt support to Qemu MPS2 AN385 * Fix function comment * Fix Uncrustify errors * Fix Uncrustify errors * Fix Uncrustify Errors * Fix typo * Cirumvent Qemu MPS2 network bug * Remove commented code, add doxygen comment * Add a project for static analysis (#195) * Add entropy * remove warning * Remove unwanted changes * Update tcp_mem_stats.c * Add Coverity * Remove unused files * Add some features * clean up * More clean up * Unwanted additions removal * Clean up * Add 32-bit compile option * Update after comments * Uncrustify * Include ICMP checksum * Uncrustify * Update ci.yml * Spell check Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Mark Tuttle <[email protected]> Co-authored-by: Mark R. Tuttle <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Hartmut Schaefer <[email protected]> Co-authored-by: evpopov <[email protected]> Co-authored-by: Emil Popov <[email protected]> Co-authored-by: shrewmouse1 <[email protected]> Co-authored-by: Paul Bartell <[email protected]> Co-authored-by: Gary Wicker <[email protected]> Co-authored-by: alfred gedeon <[email protected]> Add comment to CI.yml fix compiler warnings about casting to format string (#197) * fix compiler warnings about casting to format string Fix various warnings like: /FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r': /FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=] ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum ); ~^ ~~~~~~~~~~~~~~~~~~~ %ld * explicitly cast arguments to format string This should hopefully make the format string compatible with all architectures. * Uncrustify Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Added git-secrets check to Github actions (#201) Add header file to socket.h so that it can be compiled on its own (#204) * Fix compiler warnings when the TCP Window is not used (#124) * Fix warnings when TCP window is not used * Uncrustify * Move local variables to inner loop in prvNetworkInterfaceInput() (#144) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update litani submodule (#147) Co-authored-by: Mark R. Tuttle <[email protected]> * Fix doxygen check (#149) * Update doxygen version * update the config file * TCP_WIN: fix compile warning on x86_64 (#148) * TCP_WIN: fix compile warning on x86_64 Fix the following warning when building for 64 bit: warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow] uint32_t ulReturn = ~0UL; ^ * Update FreeRTOS_TCP_WIN.c Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix deprecated volatile compound assignment (#152) * fixed deprecated volatile compound assignment C++20 deprecates some undefined or unclear use cases of 'volatile' like compound assignments and compliant compilers warn about those deprecated operations. In vStreamBufferMoveMid the deprecated compound assignment and other direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a local variable stored back when done. * Uncrustify Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * FreeRTOS_ARP.c : store local addresses only (#120) * FreeRTOS_ARP.c : store local addresses only * Added the function xARPWaitResolution() * Added an entry to lexicon.txt. * Ran Uncrustify * Update unit test file * Update * Declared xARPWaitResolution() in FreeRTOS_IP.h * Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0 Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Remove unnecessary #ifndef (#186) * Add entropy * remove warning * Remove unnecessary ifndef * Remove unwanted changes * Don't Fragment Flags patch. (#179) * Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols Adds definitions for the IP fragmentation flags Modifies the fragmentation check for incoming frames to drop both the first and later fragments. Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP ) Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments. * Uncrustified * Uncrustify * Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 ) Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere * Adds the 'U' qualifier as requested by hs2gh fixes a typo in FreeRTOSIPConfigDefaults.h * Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion. * Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT * same as last commit, simply forgot to save this before pushing. Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix IP buffer padding check on 64bit (#146) * fix IP buffer padding check on 64bit On 64 bit systems, FreeRTOS_IPInit() would assert ipconfigBUFFER_PADDING was equal to 14 to "make sure there is enough space in pucEthernetBuffer to store a pointer." This prevents the driver from requesting additional padding, so make the assert greater than or equal to 14. Also use the final ipBUFFER_PADDING value instead of ipconfigBUFFER_PADDING, which is probably what was intended? * Update after comments Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update readme.md (#189) Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage. I had a tough time reading that table until I looked at the md source. You could also just put code fences around it: ~~~ /** * RAM area H747 H743 H742 Location * ------------------------------------------------ * DTCM 128k 128k 128k 0x20000000 * AXI-SRAM 511k 511k 384k 0x24000000 * * SRAM1 128k 128k 32k 0x30000000 * SRAM2 128k 128k 16k 0x30020000 * SRAM3 32k 32k - 0x30040000 * SRAM4 64k 64k 64k 0x38000000 * Backup SRAM 4k 4k 4k 0x38800000 */ ~~~ Co-authored-by: Aniruddha Kanhere <[email protected]> * Update files referencing aws_application_version.h to use iot_application_version.h (#188) * Update files referencing aws_application_version.h to use iot_application_version.h * Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository. * Remove function defs from header files (#190) * Add entropy * remove warning * Remove function defs from headers * Some corrections * More fixes and uncrustify * Remove the BaseType min function * Doxygen * Fix one CBMC proof * More cbmc proof fixes * More cbmc fixes * Some doxygen additions * Update last CBMC proof * Doxygen comments * Doxygen updates * Doxygen and spell check * Spell check and unit-test * Unit test fix * Update after comments * Update 2 after comments * Move function around * Uncrustify * Update after comments Co-authored-by: Gary Wicker <[email protected]> * Do not release a network buffer if it equals to NULL (#191) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Circumvent Qemu MPS2 networking bug (#142) * Add support for MPS2 networking with lan9118/lan9220 * Fix uncrustify errors * Enable network interrupt handling * Add network interrupt support to Qemu MPS2 AN385 * Fix function comment * Fix Uncrustify errors * Fix Uncrustify errors * Fix Uncrustify Errors * Fix typo * Cirumvent Qemu MPS2 network bug * Remove commented code, add doxygen comment * Add a project for static analysis (#195) * Add entropy * remove warning * Remove unwanted changes * Update tcp_mem_stats.c * Add Coverity * Remove unused files * Add some features * clean up * More clean up * Unwanted additions removal * Clean up * Add 32-bit compile option * Update after comments * Uncrustify * Create uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Add header in the socket file * Remove unwanted file * remove unwanted changes Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Mark Tuttle <[email protected]> Co-authored-by: Mark R. Tuttle <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Hartmut Schaefer <[email protected]> Co-authored-by: evpopov <[email protected]> Co-authored-by: Emil Popov <[email protected]> Co-authored-by: shrewmouse1 <[email protected]> Co-authored-by: Paul Bartell <[email protected]> Co-authored-by: Gary Wicker <[email protected]> Co-authored-by: alfred gedeon <[email protected]> User hook function for handling unsupported Ethernet frames (#200) * Adds an optional user hook that gets called for all unhandled Ethernet frames. * re-wording * Fix spell check Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Limit the number of attempts to resolve an address in xARPWaitResolution() (#206) Co-authored-by: Hein Tibosch <[email protected]> Update litani submodule to version 1.6.0 (#210) [CBMC] Add assert with readability check (#214) * Fix compiler warnings when the TCP Window is not used (#124) * Fix warnings when TCP window is not used * Uncrustify * Move local variables to inner loop in prvNetworkInterfaceInput() (#144) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update litani submodule (#147) Co-authored-by: Mark R. Tuttle <[email protected]> * Fix doxygen check (#149) * Update doxygen version * update the config file * TCP_WIN: fix compile warning on x86_64 (#148) * TCP_WIN: fix compile warning on x86_64 Fix the following warning when building for 64 bit: warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow] uint32_t ulReturn = ~0UL; ^ * Update FreeRTOS_TCP_WIN.c Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix deprecated volatile compound assignment (#152) * fixed deprecated volatile compound assignment C++20 deprecates some undefined or unclear use cases of 'volatile' like compound assignments and compliant compilers warn about those deprecated operations. In vStreamBufferMoveMid the deprecated compound assignment and other direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a local variable stored back when done. * Uncrustify Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * FreeRTOS_ARP.c : store local addresses only (#120) * FreeRTOS_ARP.c : store local addresses only * Added the function xARPWaitResolution() * Added an entry to lexicon.txt. * Ran Uncrustify * Update unit test file * Update * Declared xARPWaitResolution() in FreeRTOS_IP.h * Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0 Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Remove unnecessary #ifndef (#186) * Add entropy * remove warning * Remove unnecessary ifndef * Remove unwanted changes * Don't Fragment Flags patch. (#179) * Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols Adds definitions for the IP fragmentation flags Modifies the fragmentation check for incoming frames to drop both the first and later fragments. Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP ) Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments. * Uncrustified * Uncrustify * Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 ) Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere * Adds the 'U' qualifier as requested by hs2gh fixes a typo in FreeRTOSIPConfigDefaults.h * Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion. * Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT * same as last commit, simply forgot to save this before pushing. Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix IP buffer padding check on 64bit (#146) * fix IP buffer padding check on 64bit On 64 bit systems, FreeRTOS_IPInit() would assert ipconfigBUFFER_PADDING was equal to 14 to "make sure there is enough space in pucEthernetBuffer to store a pointer." This prevents the driver from requesting additional padding, so make the assert greater than or equal to 14. Also use the final ipBUFFER_PADDING value instead of ipconfigBUFFER_PADDING, which is probably what was intended? * Update after comments Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update readme.md (#189) Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage. I had a tough time reading that table until I looked at the md source. You could also just put code fences around it: ~~~ /** * RAM area H747 H743 H742 Location * ------------------------------------------------ * DTCM 128k 128k 128k 0x20000000 * AXI-SRAM 511k 511k 384k 0x24000000 * * SRAM1 128k 128k 32k 0x30000000 * SRAM2 128k 128k 16k 0x30020000 * SRAM3 32k 32k - 0x30040000 * SRAM4 64k 64k 64k 0x38000000 * Backup SRAM 4k 4k 4k 0x38800000 */ ~~~ Co-authored-by: Aniruddha Kanhere <[email protected]> * Update files referencing aws_application_version.h to use iot_application_version.h (#188) * Update files referencing aws_application_version.h to use iot_application_version.h * Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository. * Remove function defs from header files (#190) * Add entropy * remove warning * Remove function defs from headers * Some corrections * More fixes and uncrustify * Remove the BaseType min function * Doxygen * Fix one CBMC proof * More cbmc proof fixes * More cbmc fixes * Some doxygen additions * Update last CBMC proof * Doxygen comments * Doxygen updates * Doxygen and spell check * Spell check and unit-test * Unit test fix * Update after comments * Update 2 after comments * Move function around * Uncrustify * Update after comments Co-authored-by: Gary Wicker <[email protected]> * Do not release a network buffer if it equals to NULL (#191) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Circumvent Qemu MPS2 networking bug (#142) * Add support for MPS2 networking with lan9118/lan9220 * Fix uncrustify errors * Enable network interrupt handling * Add network interrupt support to Qemu MPS2 AN385 * Fix function comment * Fix Uncrustify errors * Fix Uncrustify errors * Fix Uncrustify Errors * Fix typo * Cirumvent Qemu MPS2 network bug * Remove commented code, add doxygen comment * Add a project for static analysis (#195) * Add entropy * remove warning * Remove unwanted changes * Update tcp_mem_stats.c * Add Coverity * Remove unused files * Add some features * clean up * More clean up * Unwanted additions removal * Clean up * Add 32-bit compile option * Update after comments * Uncrustify * Create uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update proof to use assert with readability check * Revert ci.yml changes * Remove unwanted changes * Null check * Fix adding NULL checks * Uncrustify Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Mark Tuttle <[email protected]> Co-authored-by: Mark R. Tuttle <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Hartmut Schaefer <[email protected]> Co-authored-by: evpopov <[email protected]> Co-authored-by: Emil Popov <[email protected]> Co-authored-by: shrewmouse1 <[email protected]> Co-authored-by: Paul Bartell <[email protected]> Co-authored-by: Gary Wicker <[email protected]> Co-authored-by: alfred gedeon <[email protected]> Add unit-tests for FreeRTOS_ARP.c (#209) * Fix compiler warnings when the TCP Window is not used (#124) * Fix warnings when TCP window is not used * Uncrustify * Move local variables to inner loop in prvNetworkInterfaceInput() (#144) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update litani submodule (#147) Co-authored-by: Mark R. Tuttle <[email protected]> * Fix doxygen check (#149) * Update doxygen version * update the config file * TCP_WIN: fix compile warning on x86_64 (#148) * TCP_WIN: fix compile warning on x86_64 Fix the following warning when building for 64 bit: warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow] uint32_t ulReturn = ~0UL; ^ * Update FreeRTOS_TCP_WIN.c Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix deprecated volatile compound assignment (#152) * fixed deprecated volatile compound assignment C++20 deprecates some undefined or unclear use cases of 'volatile' like compound assignments and compliant compilers warn about those deprecated operations. In vStreamBufferMoveMid the deprecated compound assignment and other direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a local variable stored back when done. * Uncrustify Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * FreeRTOS_ARP.c : store local addresses only (#120) * FreeRTOS_ARP.c : store local addresses only * Added the function xARPWaitResolution() * Added an entry to lexicon.txt. * Ran Uncrustify * Update unit test file * Update * Declared xARPWaitResolution() in FreeRTOS_IP.h * Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0 Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Remove unnecessary #ifndef (#186) * Add entropy * remove warning * Remove unnecessary ifndef * Remove unwanted changes * Don't Fragment Flags patch. (#179) * Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols Adds definitions for the IP fragmentation flags Modifies the fragmentation check for incoming frames to drop both the first and later fragments. Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP ) Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments. * Uncrustified * Uncrustify * Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 ) Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere * Adds the 'U' qualifier as requested by hs2gh fixes a typo in FreeRTOSIPConfigDefaults.h * Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion. * Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT * same as last commit, simply forgot to save this before pushing. Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix IP buffer padding check on 64bit (#146) * fix IP buffer padding check on 64bit On 64 bit systems, FreeRTOS_IPInit() would assert ipconfigBUFFER_PADDING was equal to 14 to "make sure there is enough space in pucEthernetBuffer to store a pointer." This prevents the driver from requesting additional padding, so make the assert greater than or equal to 14. Also use the final ipBUFFER_PADDING value instead of ipconfigBUFFER_PADDING, which is probably what was intended? * Update after comments Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update readme.md (#189) Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage. I had a tough time reading that table until I looked at the md source. You could also just put code fences around it: ~~~ /** * RAM area H747 H743 H742 Location * ------------------------------------------------ * DTCM 128k 128k 128k 0x20000000 * AXI-SRAM 511k 511k 384k 0x24000000 * * SRAM1 128k 128k 32k 0x30000000 * SRAM2 128k 128k 16k 0x30020000 * SRAM3 32k 32k - 0x30040000 * SRAM4 64k 64k 64k 0x38000000 * Backup SRAM 4k 4k 4k 0x38800000 */ ~~~ Co-authored-by: Aniruddha Kanhere <[email protected]> * Update files referencing aws_application_version.h to use iot_application_version.h (#188) * Update files referencing aws_application_version.h to use iot_application_version.h * Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository. * Remove function defs from header files (#190) * Add entropy * remove warning * Remove function defs from headers * Some corrections * More fixes and uncrustify * Remove the BaseType min function * Doxygen * Fix one CBMC proof * More cbmc proof fixes * More cbmc fixes * Some doxygen additions * Update last CBMC proof * Doxygen comments * Doxygen updates * Doxygen and spell check * Spell check and unit-test * Unit test fix * Update after comments * Update 2 after comments * Move function around * Uncrustify * Update after comments Co-authored-by: Gary Wicker <[email protected]> * Do not release a network buffer if it equals to NULL (#191) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Circumvent Qemu MPS2 networking bug (#142) * Add support for MPS2 networking with lan9118/lan9220 * Fix uncrustify errors * Enable network interrupt handling * Add network interrupt support to Qemu MPS2 AN385 * Fix function comment * Fix Uncrustify errors * Fix Uncrustify errors * Fix Uncrustify Errors * Fix typo * Cirumvent Qemu MPS2 network bug * Remove commented code, add doxygen comment * Add a project for static analysis (#195) * Add entropy * remove warning * Remove unwanted changes * Update tcp_mem_stats.c * Add Coverity * Remove unused files * Add some features * clean up * More clean up * Unwanted additions removal * Clean up * Add 32-bit compile option * Update after comments * Uncrustify * Create uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Add header in the socket file * Remove unwanted file * remove unwanted changes * First commit * Cleanup * Update: working version * Coverage of eARPGetCacheEntry * Update * Unit-test and clenaup * 100% line and function coverage * Uncrustify and update * 100% all coverage * Move files to correct location * Fix tests * uncrustified * Update ci.yml * Update * uncrustify and update after Hein's comments * Empty commit * Clenaup after @yanjos-dev's review * Update CI * Cleanup - pass 1 * Remove gdb * Uncrustify * Remove litani changes * Clean up * Uncrustify Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Mark Tuttle <[email protected]> Co-authored-by: Mark R. Tuttle <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Hartmut Schaefer <[email protected]> Co-authored-by: evpopov <[email protected]> Co-authored-by: Emil Popov <[email protected]> Co-authored-by: shrewmouse1 <[email protected]> Co-authored-by: Paul Bartell <[email protected]> Co-authored-by: Gary Wicker <[email protected]> Co-authored-by: alfred gedeon <[email protected]> DHCP unit test (#211) Co-authored-by: Aniruddha Kanhere <[email protected]> Repair buffer leak when replying to NBNS requests (#215) * Repair buffer leak when replying to NBNS requests * Applied Uncrustify * Variable 'pxNewBuffer' was out of scope Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217) * Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) Is not added to any ported network interfaced. * Build-check fix * Uncrustify * Uncrustify v2 * Update FreeRTOS_IP.c Co-authored-by: Christian Jensen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222) * Add a method to obtain the handle of the FreeRTOS+TCP IP task * Added the modified FreeRTOS_IP.c * Update lexicon.txt Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Code changes for unit-testing (#223) * Fix compiler warnings when the TCP Window is not used (#124) * Fix warnings when TCP window is not used * Uncrustify * Move local variables to inner loop in prvNetworkInterfaceInput() (#144) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update litani submodule (#147) Co-authored-by: Mark R. Tuttle <[email protected]> * Fix doxygen check (#149) * Update doxygen version * update the config file * TCP_WIN: fix compile warning on x86_64 (#148) * TCP_WIN: fix compile warning on x86_64 Fix the following warning when building for 64 bit: warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow] uint32_t ulReturn = ~0UL; ^ * Update FreeRTOS_TCP_WIN.c Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix deprecated volatile compound assignment (#152) * fixed deprecated volatile compound assignment C++20 deprecates some undefined or unclear use cases of 'volatile' like compound assignments and compliant compilers warn about those deprecated operations. In vStreamBufferMoveMid the deprecated compound assignment and other direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a local variable stored back when done. * Uncrustify Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * FreeRTOS_ARP.c : store local addresses only (#120) * FreeRTOS_ARP.c : store local addresses only * Added the function xARPWaitResolution() * Added an entry to lexicon.txt. * Ran Uncrustify * Update unit test file * Update * Declared xARPWaitResolution() in FreeRTOS_IP.h * Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0 Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Remove unnecessary #ifndef (#186) * Add entropy * remove warning * Remove unnecessary ifndef * Remove unwanted changes * Don't Fragment Flags patch. (#179) * Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols Adds definitions for the IP fragmentation flags Modifies the fragmentation check for incoming frames to drop both the first and later fragments. Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP ) Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments. * Uncrustified * Uncrustify * Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 ) Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere * Adds the 'U' qualifier as requested by hs2gh fixes a typo in FreeRTOSIPConfigDefaults.h * Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion. * Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT * same as last commit, simply forgot to save this before pushing. Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * fix IP buffer padding check on 64bit (#146) * fix IP buffer padding check on 64bit On 64 bit systems, FreeRTOS_IPInit() would assert ipconfigBUFFER_PADDING was equal to 14 to "make sure there is enough space in pucEthernetBuffer to store a pointer." This prevents the driver from requesting additional padding, so make the assert greater than or equal to 14. Also use the final ipBUFFER_PADDING value instead of ipconfigBUFFER_PADDING, which is probably what was intended? * Update after comments Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update readme.md (#189) Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage. I had a tough time reading that table until I looked at the md source. You could also just put code fences around it: ~~~ /** * RAM area H747 H743 H742 Location * ------------------------------------------------ * DTCM 128k 128k 128k 0x20000000 * AXI-SRAM 511k 511k 384k 0x24000000 * * SRAM1 128k 128k 32k 0x30000000 * SRAM2 128k 128k 16k 0x30020000 * SRAM3 32k 32k - 0x30040000 * SRAM4 64k 64k 64k 0x38000000 * Backup SRAM 4k 4k 4k 0x38800000 */ ~~~ Co-authored-by: Aniruddha Kanhere <[email protected]> * Update files referencing aws_application_version.h to use iot_application_version.h (#188) * Update files referencing aws_application_version.h to use iot_application_version.h * Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository. * Remove function defs from header files (#190) * Add entropy * remove warning * Remove function defs from headers * Some corrections * More fixes and uncrustify * Remove the BaseType min function * Doxygen * Fix one CBMC proof * More cbmc proof fixes * More cbmc fixes * Some doxygen additions * Update last CBMC proof * Doxygen comments * Doxygen updates * Doxygen and spell check * Spell check and unit-test * Unit test fix * Update after comments * Update 2 after comments * Move function around * Uncrustify * Update after comments Co-authored-by: Gary Wicker <[email protected]> * Do not release a network buffer if it equals to NULL (#191) Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Circumvent Qemu MPS2 networking bug (#142) * Add support for MPS2 networking with lan9118/lan9220 * Fix uncrustify errors * Enable network interrupt handling * Add network interrupt support to Qemu MPS2 AN385 * Fix function comment * Fix Uncrustify errors * Fix Uncrustify errors * Fix Uncrustify Errors * Fix typo * Cirumvent Qemu MPS2 network bug * Remove commented code, add doxygen comment * Add a project for static analysis (#195) * Add entropy * remove warning * Remove unwanted changes * Update tcp_mem_stats.c * Add Coverity * Remove unused files * Add some features * clean up * More clean up * Unwanted additions removal * Clean up * Add 32-bit compile option * Update after comments * Uncrustify * Create uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Update uncrustify.yml * Make some code changes as a precursor for unit-testing * remove unused file * Fixed failing checks * Fixed CBMC proof Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Mark Tuttle <[email protected]> Co-authored-by: Mark R. Tuttle <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Thomas Pedersen <[email protected]> Co-authored-by: Hartmut Schaefer <[email protected]> Co-authored-by: evpopov <[email protected]> Co-authored-by: Emil Popov <[email protected]> Co-authored-by: shrewmouse1 <[email protected]> Co-authored-by: Paul Bartell <[email protected]> Co-authored-by: Gary Wicker <[email protected]> Co-authored-by: alfred gedeon <[email protected]> Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226) Reformat MPS2_AN385 network driver (#224) * Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide. * Update smsc9220_eth_drv.c Remove #warning message erroneously left in. Co-authored-by: alfred gedeon <[email protected]> Uncrustify. Uncrustify again. Before sending a challenge ACK, check the sequence number more properly (#225) * Before sending a challenge ACK, check the sequence number more properly * Make xSequenceLessThan and xSequenceGreaterThan public functions * Extended comments on two public functions. * Fix Spell check * Although no changes were made to MPS2_AN385, some formatting changes to that driver Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Fix Some warnings * merge tcp_mem_stats * Add automated uncrustify * Un-uncrustify * Uncrustify - manually * Remove unused comment * Update user to be github action * Remove catch_assert from uncrustify * Add comment to let user know on what to do and run uncrustify a second time * Return a failure when uncrustify fails * Add some more info for the user Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> * Amended ETH_DMA_IT_xxx flags in ETH_DMA_ALL_INTS (#402) * Amended ETH_DMA_IT_xxx flags in ETH_DMA_ALL_INTS according to the ST docs, this is a sticky bit that must be cleared explicitly even though it is an OR of different other status bits. * Update NetworkInterface.c Style: Fix Formatting Co-authored-by: alfred gedeon <[email protected]> * Unit-tests for FreeRTOS_Sockets.c file (#407) * Initial refactoring commit * Uncrustified * Update after some bug fixes * Fix build issues * Update build details * Update with more refactor and first test * Make builds pass * Uncrustify/Add unit-test/Remove static qualifier * Update with ~100% coverage * ICMP coverage 100% * Update with some reorganization * 100% coverage utils and timers * Add Socket unit-test 70% coverage * Uncrustify and Add more UT coverage * 100% coverage * Uncrustify * Uncrustify all files * Try to merge main to this * Add ignored unit-tests and reorder inclusion order * Remove commented code from UT * Remove kernel and stubs from coverage info * Add briefs to all the functions. * Update the last functions with briefs * Uncrustify: triggered by comment. * Fix spellings * Break the test file in multiple files * Fix coverage * Uncrustify and spell check fix * IPv4/single: TCP minimum time for retransmissions (#387) * IPv4/multi: TCP minimum time for retransmissions * Corrected typo in a comment Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> * Update version number/Manifest/History and Kernel pointer for release (#383) * Update version/manifest/Kernel pointer * First TCP WIN Refactor/UT * revert kernel head * Update kernel head * Update FreeRTOS_IP.c * Update FreeRTOSIPConfigDefaults.h * Remove commented code * Remove _static from source * Revert _static * Fix compilation erros when TCP_WIN = 0 Co-authored-by: fireblade156 <[email protected]> Co-authored-by: Maurus MH. Hilber <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Aniruddha Kanhere <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Hein Tibosch <[email protected]> Co-authored-by: Mark Tuttle <[email protected]> Co-authored-by: Mark R. Tuttle <[email protected]> Co-authored-by: RAc-GIT <[email protected]>
Description
1.) In the functions prvCreateSectors aren't set the Listintegration Bytes. For this a call of vListInitialiseItem is needed
2.) In our a Application, we doesn't need the copy of the SocketSet to the ChildSockets. then ChildSockets works with different socketset then the Parents Sockent
Is possible to Integrate this change in the FreeRTOS LTS?
Is too possible, that the change of delete SocketSet with the Event "eSocketSetDeleteEvent" from FreeRTOS 202107.00 is integrated in the FreeRTOS LTS
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.