Skip to content

Conversation

@zipperowiec
Copy link
Contributor

Add NetworkDown notification support to STM32FXX network interface.

Description

NetworkInterface for STM32FXX lacks support for NetworkDown notification.
Current driven only disables MAC interface without notification to higher layers.
Proposed solution add this notification after MAC layer operations.

Test Steps

  1. Run FreeRTOS TCP stack on STM32FXX board with ethernet cable attached.
  2. Disconnect ethernet cable.
  3. NetworkDown notification will be submitted, higher stack layers will be notified about situation and user callback will be called ( vApplicationIPNetworkEventHook(eNetworkDown) )

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

@zipperowiec zipperowiec requested a review from a team as a code owner January 11, 2023 20:10
@zipperowiec
Copy link
Contributor Author

/bot run uncrustify

Copy link
Contributor

@shubnil shubnil left a comment

Choose a reason for hiding this comment

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

Hi,
Thanks for sharing the change.
However, I have a query. Are there some observations which make it specific to STM32FXX or is it applicable to all HW. Please clarify.

@zipperowiec
Copy link
Contributor Author

Hi shubnil,

I would say this solution is pretty generic.

I used FreeRTOS_NetworkDown() to notify IP stack that network is down and this function has no hardware dependencies.
However, Ethernet driver must support some mechanism that give us an information about network state (xGetPhyLinkStatus() it STM32FXXX case) and place where we get information from networkPhy that link is down

prvEMACHandlerTask():
if( xPhyCheckLinkStatus( &xPhyObject, xResult ) != 0 ) // <-- link is down here
{
    /* Something has changed to a Link Status, need re-check. */
    prvEthernetUpdateConfig( pdFALSE ); // disable mac layer, calls  HAL_ETH_Stop( &xETH ); inside

    if( xGetPhyLinkStatus() == pdFALSE )
    {
        FreeRTOS_NetworkDown();
    }
}

Keep in mind that if driver refresh state in IRQ instead of task (as it's done in STM32Fxx case) then the is a need to use FreeRTOS_NetworkDownFromISR() instead of FreeRTOS_NetworkDown();

archigup
archigup previously approved these changes Jan 18, 2023
Copy link
Member

@AniruddhaKanhere AniruddhaKanhere left a comment

Choose a reason for hiding this comment

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

Thank you for this PR @zipperowiec!

Seems like an appropriate change to me.
Can you also take a look @htibosch?

@htibosch
Copy link
Contributor

Hello @zipperowiec,

You wrote:

give us an information about network state (xGetPhyLinkStatus() it STM32FXXX case)

Every network driver must implement one of these functions:

    /* Single interface ( see main branch ) */
    BaseType_t xGetPhyLinkStatus( void );

    /* In case multiple interfaces are used ( see labs/ipv6_multi branch ) */
    BaseType_t xGetPhyLinkStatus( struct xNetworkInterface *pxInterface );

The mechanism of going "down" and "up" is very important. While going up, an IP-address will be acquired, either static or dynamically.
Indeed the application will be informed, so it can (forcefully) close all sockets.

When the connection to a LAN is interrupted for a short period of time, any open TCP connection can continue immediately after the connection is restored. That is why I would not have any hurry to respond.
The function FreeRTOS_NetworkDownFromISR() and other FromISR in the +TCP library are more or less deprecated. Interrupts should just notify the application, and leave the work to a normal task.

There are 2 macro's that determine the Link Status polling behaviour:

    /* Check if the LinkStatus in the PHY is still high after
     * 15 seconds of not receiving packets. */
    #define ipconfigPHY_LS_HIGH_CHECK_TIME_MS    15000U

    /* Check if the LinkStatus in the PHY is still low every second. */
    #define ipconfigPHY_LS_LOW_CHECK_TIME_MS     1000U

( you can define these macro's in your copy of FreeRTOSIPConfig.h )

So when the disconnection is shorter than 15 seconds, it is assumed that the same LAN is still in use, and there is no need to go down and up.

Note that polling the PHY very frequently can be disturbing for the data transport. In a Xilinx Zynq I once saw tens of packets dropped because the driver was polling the PHY every 100 ms or so.

There is nothing wrong with your change, except that it is not downward compatible. It will break existing applications and the developers will be surprised about it.

Here is solution that uses an "iptrace" macro:

 if( xPhyCheckLinkStatus( &xPhyObject, xResult ) != 0 )
 {
     /* Something has changed to a Link Status, need re-check. */
     prvEthernetUpdateConfig( pdFALSE );
 
+    iptraceNETWORK_INTERFACE_STATUS_CHANGE()
 }

The macro or macros should be added to IPTraceMacroDefaults.h along with a clear comment:

    /* This macro will be called when the Link Status of the PHY changes.
     * xGetPhyLinkStatus() can be called to determine the current status. */
    #define iptraceNETWORK_INTERFACE_STATUS_CHANGE()

And in your FreeRTOSIPConfig.h :

#define iptraceNETWORK_INTERFACE_STATUS_CHANGE() \
    if( xGetPhyLinkStatus() == pdFALSE ) \
    { \
        FreeRTOS_NetworkDown(); \
    }

@oleszekf
Copy link

Hi @htibosch,

Thank you very much for your comment, there are many important points in it.

However, I would like to address your concerns:
Context
The main point for this PR is that STM32FXX network layer didn't inform IP stack about "Network Down" event and by extend User also hadn't information about this event. Changes in this PR address this issue.

polling the PHY
I agree that polling the PHY to often can leads to problems in the system. However non of my changes touch the PHY polling frequency or mechanism how and when this polling is realized.
The function xGetPhyLinkStatus() doesn't read any information from PHY, it just returns internal state of the network driver:

BaseType_t xGetPhyLinkStatus( void )
{
    BaseType_t xReturn;
    if( xPhyObject.ulLinkStatusMask != 0 )
    {
        xReturn = pdPASS;
    }
    else
    {
        xReturn = pdFAIL;
    }
    return xReturn;
}

not downward compatible
Could you please describe with more details how this PR breaks the downward combability?

FreeRTOS+TCP main mechanism to inform user about network state is vApplicationIPNetworkEventHook callback.
It can be called with eNetworkUp or eNetworkDown flag. This PR doesn't change this, It only fills the gap in network driver implementation for STM32FXX that was lack of support for eNetworkDown notification.

Even the example implementation of this callback, which can be found in documentation, states that user shall check if vApplicationIPNetworkEventHook has been called with eNetworkUp or eNetworkDown event before perform any actions.

/* Defined by the application code, but called by FreeRTOS-Plus-TCP when the network
connects/disconnects (if ipconfigUSE_NETWORK_EVENT_HOOK is set to 1 in
FreeRTOSIPConfig.h). */
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent )
{
uint32_t ulIPAddress, ulNetMask, ulGatewayAddress, ulDNSServerAddress;
static BaseType_t xTasksAlreadyCreated = pdFALSE;
int8_t cBuffer[ 16 ];

    /* Check this was a network up event, as opposed to a network down event. */
    if( eNetworkEvent == eNetworkUp )
    {
    .... rest of the code ....

vApplicationIPNetworkEventHook

@htibosch
Copy link
Contributor

Could you please describe with more details how this PR breaks the downward combability?

Very simple: when I disconnect and connect my STM32Fx board, the IP-address will remain the same.
When the driver calls FreeRTOS_NetworkDown(), the DHCP procedure will start again.

I propose in stead that a macro is placed:

    iptraceNETWORK_INTERFACE_STATUS_CHANGE();

And you can define the macro as you wish in your FreeRTOSIPConfig.h:

#define iptraceNETWORK_INTERFACE_STATUS_CHANGE() \
    if( xGetPhyLinkStatus() == pdFALSE ) \
    { \
        FreeRTOS_NetworkDown(); \
    }

I'm sorry, but I refuse to approve your PR as long as it will call FreeRTOS_NetworkDown() unconditionally.

@zipperowiec
Copy link
Contributor Author

@htibosch
I'm not sure if FreeRTOS TCP stack supports it but in general DHCP standard allows to request previously assigned IP address.
But I see your point here, however I have a different proposition for that, because I have some code related concerns regarding your solution.

FreeRTOS_NetworkDown() network function is define in FreeRTOS_Ip_Private.h header and using it in user code breaks the stack interface and ther is no garantee that function will not be changed/deleted in the future (like it is an stack internals).

So, my proposal is:
to introduce config flag ipconfigSUPPORT_NETWORK_DOWN_EVENT
By default ipconfigSUPPORT_NETWORK_DOWN_EVENT will not be defined -> there won't be any changes in driver behavior.

And change code to:

....Rest of the code....
        if( xPhyCheckLinkStatus( &xPhyObject, xResult ) != 0 )
        {
            /* Something has changed to a Link Status, need re-check. */
            prvEthernetUpdateConfig( pdFALSE );

#ifdef ipconfigSUPPORT_NETWORK_DOWN_EVENT 
            if( xGetPhyLinkStatus() == pdFALSE )
            {
                FreeRTOS_NetworkDown();
            }
#endif
        }
    }

Which hides internals of the stack from the user.

ipconfigSUPPORT_NETWORK_DOWN_EVENT with the code solution can be later reused in the other network drivers,

What do you think about this?

@zipperowiec
Copy link
Contributor Author

@htibosch ?

@htibosch
Copy link
Contributor

Hi @zipperowiec, sorry to respond so late. We were very busy with the integration of IPv6 into mainline. Also in the new release there will be the possibility to use multiple interfaces.

I'm not sure if FreeRTOS TCP stack supports it but in general DHCP standard allows to request previously assigned IP address.

Yes there is this function:

uint32_t vDHCPSetPreferredIPAddress( uint32_t ulIPAddress );

The DHCP client will communicate this IP-address with the server and most probably get it honoured.

But I see your point here, however I have a different proposition for that, because I have some code related concerns regarding your solution. FreeRTOS_NetworkDown() network function is define in FreeRTOS_Ip_Private.h header and using it in user code breaks the stack interface and there is no garantee that function will not be changed/deleted in the future (like it is an stack internals).

Yes, you've got a point there. I'm also happy with:

#if( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 )
{
    if( xGetPhyLinkStatus() == pdFALSE )
    {
        FreeRTOS_NetworkDown();
    }
}
#endif /* ( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 ) */

By default ipconfigSUPPORT_NETWORK_DOWN_EVENT will not be defined -> there won't be any changes in driver behavior.

In FreeRTOS projects, we rarely use #ifdef but in stead we use #if( X != 0 ) as in my example here above. And also we like to have all config variables defined, often as 0 or pdFALSE.

First the compiler will see the private FreeRTOSIPConfig.h, and then it will see FreeRTOSIPConfigDefaults.h.

Which hides internals of the stack from the user.

Agreed!

ipconfigSUPPORT_NETWORK_DOWN_EVENT with the code solution can be later reused in the other network drivers

Would be good.

Thanks so far!
Hein

Copy link
Contributor

@shubnil shubnil left a comment

Choose a reason for hiding this comment

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

I agree with Hein. Let us add a macro ipconfigSUPPORT_NETWORK_DOWN_EVENT.

@shubnil
Copy link
Contributor

shubnil commented Feb 23, 2023

Please add the ipconfigSUPPORT_NETWORK_DOWN_EVENT macros check and then we would be fine.

@oleszekf
Copy link

Hi, @htibosch @shubnil

Thanks for your replies, it seems that we have solution :)
I will change code accordingly later this week

@moninom1
Copy link
Member

moninom1 commented Mar 6, 2023

Hi @oleszekf, Thank you again for the changes. If you would like can we go ahead and make this minor update and get the change merged?

@oleszekf
Copy link

oleszekf commented Mar 6, 2023

Hi, @moninom1
Code changes from my side will be ready today evening ( CET time :) )

@zipperowiec zipperowiec dismissed stale reviews from AniruddhaKanhere and archigup via 679dd56 March 6, 2023 18:45
@zipperowiec
Copy link
Contributor Author

/bot run uncrustify

@oleszekf
Copy link

/bot run uncrustify

1 similar comment
@tony-josi-aws
Copy link
Member

/bot run uncrustify

@oleszekf
Copy link

Hi @tony-josi-aws,

What is the reason for closing my PR?

@tony-josi-aws
Copy link
Member

tony-josi-aws commented Mar 21, 2023

Hi @oleszekf, It seems the PR was autoclosed (by Github) when the formatting changes was force pushed to this PR. Can you please reopen this. Sorry for the inconvenience.

amazonKamath pushed a commit that referenced this pull request Mar 31, 2023
* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS-Plus-TCP that referenced this pull request Apr 17, 2023
…FreeRTOS#812)

* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS-Plus-TCP that referenced this pull request Apr 17, 2023
…FreeRTOS#812)

* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS-Plus-TCP that referenced this pull request Apr 17, 2023
…FreeRTOS#812)

* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS-Plus-TCP that referenced this pull request Apr 18, 2023
…FreeRTOS#812)

* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS-Plus-TCP that referenced this pull request Apr 18, 2023
…FreeRTOS#812)

* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS-Plus-TCP that referenced this pull request Apr 18, 2023
…FreeRTOS#812)

* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
moninom1 added a commit that referenced this pull request Jul 5, 2023
* Update mainline to reflect changes after the release. (#563)

* Update README.md

* Update History.txt

* Update version number macros

* Update manifest.yml

* IPv4/single SAME70 emac race condition (#567)

* Implemented Maty's solution

* Added a new statistic 'tx_write_fail'

* Uncrustify: triggered by comment.

Co-authored-by: Hein Tibosch <[email protected]>
Co-authored-by: GitHub Action <[email protected]>

* IPv4/Single: Add a SocketID to a socket (#546)

* IPv4/Single: Add a SocketID to a socket

* Change in comment

* Applied uncrustify to format the source code

* Added a few entries to lexicon.txt

* Removed the 'ipconfigUSE_SetSocketID' option

* Change to lexicon.txt

* Add unit tests for the newly added API

Co-authored-by: Hein Tibosch <[email protected]>
Co-authored-by: alfred gedeon <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>

* IPv4/single: SAME70 EMAC buffer sizes (#568)

* Implemented Maty's solution

* Added a new statistic 'tx_write_fail'

* Uncrustify: triggered by comment.

* Increase NETWORK_BUFFER_SIZE in order to include the 'ipBUFFER_PADDING' bytes

* ICMP checksum calculated manually

* Uncrustify: triggered by comment.

* Update gmac_SAM.c

Co-authored-by: Hein Tibosch <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>

* Eliminate some warnings (#578)

* Eliminate some warnings related to print statements

Authored-by:  Pete Bone  <[email protected] >

* Add MISRA justification for use of dynamic memory (#581)

* Update deprecated macros in network driver files (#579)

* Update deprecated macros in network driver files

* Fix typo in RX driver.

* Replace #warning with #error on test for deprecated macro.

* Fix doxygen check

Co-authored-by: PeterB <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>

* Fix Network-interface of the Xilinx UltraScale port (#588)

The underlying issue was when the port would be used with Jumbo frames.
During receives of Jumbo packets the data length was always set
incorrectly, which then would cause buffer allocation issues and
subsequently corrupted data would be sent to the IP-task.

After some inspection in the Xilinx UltraScale port, I found out
that when the data length would be set, the wrong mask from the
Xilinx Ethernet MAC driver would be used. By using the right mask
(XEMACPS_RXBUF_LEN_JUMBO_MASK) when Jumbo Frame support is enabled
the issue was resolved

* Fix Windows thread calling vTaskSuspendAll / xTaskResumeAll. (#592)

Co-authored-by: Jason Carroll <[email protected]>

* Updated comments for FreeRTOS_select return value (#596)

* Updated comments for FreeRTOS_select return value

* Updated the function brief for FreeRTOS_select

* Uncrustify: triggered by comment.

* Updating FreeRTOS_select function @brief

* Updated function brief for FreeRTOS_SignalSocket

* Uncrustify: triggered by comment.

* Update source/FreeRTOS_Sockets.c

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>

* Fixed readme script to build and run unit tests (#644)

* Minor warning fixes (#589)

* Eliminate compiler unused parameter warning

* Eliminate compiler unused variable warnings

* Eliminate compiler unused function warning

The function pcGetPHIName(...) would be called only in the
FreeRTOS_printf message, however FreeRTOS_printf maybe be defined
to nothing e.g. release builds, which then the warning would come up

* Rework callback setups in the EMAC-driver of the Xilinx UltraScale port

The calls to the function XEmacPs_SetHandler would trigger the
pedantic warning:

"ISO C forbids conversion of object pointer to function pointer type"

The reason for this, is that the second parameter of the function
XEmacPS_SetHandler is declared as pointer to a void type, but the
function "expects" a function pointer, which in setup_isr rightly
happens.

However IMHO, this is just bad code from the side of Xilinx, as not
on all architectures the size of a data pointer is identical to the
size of a function pointer, which also is correctly recognised by
the compiler.

Instead of using the "bad" function XEmacPs_SetHandler, we can set the
handlers manually to the EmacPS-instance.

* Uncrustify: triggered by comment.

* Update source/portable/NetworkInterface/xilinx_ultrascale/x_emacpsif_hw.c

Co-authored-by: Paul Bartell <[email protected]>

* Apply suggestions from code review

Co-authored-by: Paul Bartell <[email protected]>

* Address comments from reviews

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Paul Bartell <[email protected]>

* Use CBMC XML output to enable VSCode debugger (#673)

Prior to this commit, CBMC would emit logging information in plain text
format, which does not contain information required for the CBMC VSCode
debugger. This commit makes CBMC use XML instead of plain text.

Co-authored-by: Mark Tuttle <[email protected]>

* Remove need of token

* Use vTaskDelay for sleep in the network-interface of xilinx_ultrascale (#698)

The issue here is that, the FreeRTOS IP-task would block all other
tasks during PHY-link speed negotiations, as it was using busy
waiting. However this is not really ideal. A much more suitable
function for such a task would be `vTaskDelay`.

* Make sure that a TCP socket is closed only once (#707)

* Make sure that a TCP socket is closed only once

* Fix failing test cases for FreeRTOS_TCP_IP unit test modules post PR#705 changes

* Uncrustify: triggered by comment.

* Fix failing test cases for FreeRTOS_TCP_IP unit test modules post PR - 705 changes

---------

Co-authored-by: Hein Tibosch <[email protected]>
Co-authored-by: GitHub Action <[email protected]>

* Remove Dup function HAL_ETH_SetMDIOClockRange. (#711)

* Update PR template to include checkbox for ut change (#734)

* Main/TCP4 : ACK number in TCP RESET reply to SYN packet (#724)

* Main/TCP4 : ACK number in TCP RESET reply to SYN packet

* Typo fix

* Add unit-test for coverage; Fix ntohl to htonl

* Fix unit-test

---------

Co-authored-by: Nikhil Kamath <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>

* #556 Initial Cmake Module definition. (#557)

* #556 Initial Cmake Module definition.

* Fixing CI builds, rely on pcap. (#556)

* Updating tested configurations and minor clean-up of missing network interfaces (#555)

* Further clean-up based on testing with build environment. (#555)

* Using single definition for libraries everywhere. (#555)

* Fixing A_CUSTOM_NETWORK_IF compile option.

* Identifying and fixing compile issues.

* Adding in additional warnings for GNU to ignore for now.

* Fixing formatting issues with uncrustify.

* More warnings for GNU used by CI/CD pipeline.

* Assuming custom for build tests and using latest freertos-kernel code.  Updated readme for how to consume at project level.

* Fixing up issues identified in the PR. Making the build_test EXCLUDE_FROM_ALL so only compiled if requested.

* Changing to support C89 instead of C99. Renaming tcp_tools to tcp_utilities to mimic the directory.

* Using C90 ISO.  Fixing compiler warnings.

* Fixing non C90 compliant declaration after statement

* Separating out CMakeLists so each port is independent.

* Updating warning list in code.

* Fixed formatting with uncrustify.

* Fix failing tests

* Fix failing unit-test

* Fix a typo.

---------

Co-authored-by: Aniruddha Kanhere <[email protected]>

* CMake: Fix GIT_REPOSITORY and GIT_TAG (#742)

* Allow use of loopback addresses in IP stack (127.0.0.0/8) (#754)

Authored-by: Adam St. Amand <[email protected]>

* Add release candidate automation (#761)

This is a minimal subset of release automation which only creates a tag
and verifies it.

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add CBMC-running GitHub Action;

This commit adds a GitHub Action that runs the CBMC proofs in this
repository upon pushes and pull requests

* Copy CBMC output directory to CI location

This commit ensures that the output directory for CBMC proofs is in the
correct location expected by the FreeRTOS CI-CD repository.

* rx: Read mac address using FreeRTOS_GetMACAddress() rather than using the defines (#765)

* Read mac address using FreeRTOS_GetMACAddress() rather than using the defines
---------
Co-authored-by: GitHub Action <[email protected]>

* cmake: Remove add_subdirectory( cbmc ) call

CBMC proofs cannot currently be run using CMake.

fixes #753

* FreeRTOS_IP.h: Fix build error introduced by 55658e1 in FreeRTOS-Kernel

* Add Nxp1060 network interface (#774)

* Update PR template to include checkbox for ut change

* Create NetworkInterface.c

* Uncrustify: triggered by comment.

* Address PR comments

* Uncrustify: triggered by comment.

* Update NetworkInterface.c

* Uncrustify: triggered by comment.

* Update copyright year

* Refactor the init function. Add 'brief'. Cleanup.

* Uncrustify: triggered by comment.

* Update global link status only when the network is quiet

* Uncrustify: triggered by comment.

* Update copyright yeat

* Update the driver to deal with network cable disconnects

* Uncrustify: triggered by comment.

* Update NetworkInterface.c

* Clean up and address PR comments

* More cleanup and address PR comments

* Uncrustify: triggered by comment.

* Empty-Commit

* Address issue comments

* Uncrustify: triggered by comment.

* Empty-Commit to trigger workflow

* Remove Full-Duplex restriction

* Uncrustify: triggered by comment.

* Empty-Commit to trigger workflow

---------

Co-authored-by: GitHub Action <[email protected]>

* Correct GCC warnings (#798)

* Correct GCC warnings

Corrects warnings with current GCC flags
for GCC 7.5.0. The only suppressed warning pertains
to function to object pointer conversion which is
required and common for socket callbacks.

* PR feedback

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Nikhil Kamath <[email protected]>

* Cleanup of NXP1060 network driver (#801)

* Update PR template to include checkbox for ut change

* Empty-Commit to trigger workflow

* Fix issues pointed out in PR comments

* Uncrustify: triggered by comment.

* Empty-Commit to trigger workflow

---------

Co-authored-by: GitHub Action <[email protected]>

* Fix Clang warnings (#809)

Corrects several warnings from Clang flags
for Clang 13.

Inspired by @phelter's bug report
#558

* uncrustify yml fix (#815)

* Add NetworkDown notification to NetworkInterface.c [PR: #671] (#812)

* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: GitHub Action <[email protected]>

* Uncrustify bot command fix (#816)

* fix uncrustify run command

* test uncrustify

* Revert "test uncrustify"

This reverts commit f660ab4.

* Fix uncrustify bot command - disable install prompt (#819)

* fix uncrustify run command

* test uncrustify

* Revert "test uncrustify"

This reverts commit f660ab4.

* removing apt-get prompt while installing git

* Removing deprecated set-output command from uncrustify bot run yml (#820)

* fix uncrustify run command

* test uncrustify

* Revert "test uncrustify"

This reverts commit f660ab4.

* removing apt-get prompt while installing git

* removing the deprecated set-output command from uncrustify bot run yml, use latest git

* IPv4/Single: Let send() stop blocking after a connection reset (#561)

* IPv4/Single: Let send() stop after a protocol error

* Remove token need

* Repaired unit-testing

* Added the cunftion test_FreeRTOS_send_DisconnectionOccursDuringWait()

* Added a comment for unit-test function test_FreeRTOS_send_DisconnectionOccursDuringWait()

* Added an item to lexicon.txt

* Restored original tcp_utilities

* Restored original tcp_utilities, once more

---------

Co-authored-by: Hein Tibosch <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>
Co-authored-by: Nikhil Kamath <[email protected]>

* Add logs to print random number generation failure (#908)

Add logs to print random number generation failure for better debugging of issue.

* Update usage of uint64_t according to C90 standard (#907)

Co-authored-by: kar-rahul-aws <[email protected]>

* Fix pragma pack in CCS compiler to push/pop (#906)

`#pragma pack(1)` would make it so that all structs inserted after pack_struct_start.h
was included for the TI arm compiler would be packed, leading to potential unaligned memory access error.
Refer: https://www.ti.com/lit/ug/spnu151w/spnu151w.pdf SECTION 5.11.23

* Modified libslirp backend file to cover different libslirp library versions (#929)

Authored-by: Xiaodong Li <[email protected]>

* Update according to devIntegration

* Update links to point to main directory

---------

Signed-off-by: Gaurav Aggarwal <[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: GitHub Action <[email protected]>
Co-authored-by: alfred gedeon <[email protected]>
Co-authored-by: Pete Bone <[email protected]>
Co-authored-by: PeterB <[email protected]>
Co-authored-by: ChristosZosi <[email protected]>
Co-authored-by: jasonpcarroll <[email protected]>
Co-authored-by: Jason Carroll <[email protected]>
Co-authored-by: Tony Josi <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Paul Bartell <[email protected]>
Co-authored-by: Kareem Khazem <[email protected]>
Co-authored-by: Mark Tuttle <[email protected]>
Co-authored-by: Tony Josi <[email protected]>
Co-authored-by: ActoryOu <[email protected]>
Co-authored-by: Nikhil Kamath <[email protected]>
Co-authored-by: phelter <[email protected]>
Co-authored-by: Adam St. Amand <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: sayyadumar <[email protected]>
Co-authored-by: Paul Bartell <[email protected]>
Co-authored-by: Kody Stribrny <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Filip Oleszek <[email protected]>
Co-authored-by: zipperowiec <[email protected]>
Co-authored-by: kar-rahul-aws <[email protected]>
Co-authored-by: Rahul Arasikere <[email protected]>
Co-authored-by: Xiaodong Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants