Skip to content

Commit 04a4b54

Browse files
HTRamseyactions-usertony-josi-aws
authored
Remove xProcessedTCPMessage (#1122)
* Remove xProcessedTCPMessage * Uncrustify: triggered by comment --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Tony Josi <[email protected]>
1 parent e7ddc7d commit 04a4b54

File tree

6 files changed

+0
-37
lines changed

6 files changed

+0
-37
lines changed

source/FreeRTOS_IP.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,6 @@
9292
#endif
9393
#endif
9494

95-
#if ( ipconfigUSE_TCP != 0 )
96-
97-
/** @brief Set to a non-zero value if one or more TCP message have been processed
98-
* within the last round. */
99-
BaseType_t xProcessedTCPMessage;
100-
#endif
101-
10295
/** @brief If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet
10396
* driver will filter incoming packets and only pass the stack those packets it
10497
* considers need processing. In this case ipCONSIDER_FRAME_FOR_PROCESSING() can
@@ -2021,10 +2014,6 @@ static eFrameProcessingResult_t prvProcessIPPacket( const IPPacket_t * pxIPPacke
20212014
{
20222015
eReturn = eFrameConsumed;
20232016
}
2024-
2025-
/* Setting this variable will cause xTCPTimerCheck()
2026-
* to be called just before the IP-task blocks. */
2027-
xProcessedTCPMessage++;
20282017
break;
20292018
#endif /* if ipconfigUSE_TCP == 1 */
20302019
default:

source/FreeRTOS_IP_Timers.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ void vCheckNetworkTimers( void )
301301
* check must be repeated. */
302302
xNextTime = xTCPTimerCheck( xWillSleep );
303303
prvIPTimerStart( &xTCPTimer, xNextTime );
304-
xProcessedTCPMessage = 0;
305304
}
306305
}
307306

source/include/FreeRTOS_IP.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,6 @@ extern NetworkBufferDescriptor_t * pxARPWaitingNetworkBuffer;
485485
#define vPrintResourceStats() do {} while( ipFALSE_BOOL ) /**< ipconfigHAS_PRINTF is not defined. Define vPrintResourceStats to a do-while( 0 ). */
486486
#endif
487487

488-
#if ( ipconfigUSE_TCP != 0 )
489-
490-
/** @brief Set to a non-zero value if one or more TCP message have been processed
491-
* within the last round. */
492-
extern BaseType_t xProcessedTCPMessage;
493-
#endif
494-
495488
#include "FreeRTOS_IP_Utils.h" /*TODO can be moved after other 2 includes */
496489

497490

test/unit-test/FreeRTOS_IP/FreeRTOS_IP_utest.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,6 @@ void test_prvProcessIPPacket_TCP( void )
26592659
uint8_t ucEthBuffer[ ipconfigTCP_MSS ];
26602660
IPHeader_t * pxIPHeader;
26612661
BaseType_t xReturnValue = pdTRUE;
2662-
uint32_t backup = xProcessedTCPMessage;
26632662
struct xNetworkInterface xInterface;
26642663

26652664
memset( ucEthBuffer, 0, ipconfigTCP_MSS );
@@ -2689,7 +2688,6 @@ void test_prvProcessIPPacket_TCP( void )
26892688
eResult = prvProcessIPPacket( pxIPPacket, pxNetworkBuffer );
26902689

26912690
TEST_ASSERT_EQUAL( eFrameConsumed, eResult );
2692-
TEST_ASSERT_EQUAL( backup + 1, xProcessedTCPMessage );
26932691
}
26942692

26952693
/**
@@ -2705,7 +2703,6 @@ void test_prvProcessIPPacket_TCPProcessFail( void )
27052703
uint8_t ucEthBuffer[ ipconfigTCP_MSS ];
27062704
IPHeader_t * pxIPHeader;
27072705
BaseType_t xReturnValue = pdTRUE;
2708-
uint32_t backup = xProcessedTCPMessage;
27092706
NetworkEndPoint_t xEndPoint = { 0 };
27102707
struct xNetworkInterface xInterface;
27112708

@@ -2736,7 +2733,6 @@ void test_prvProcessIPPacket_TCPProcessFail( void )
27362733
eResult = prvProcessIPPacket( pxIPPacket, pxNetworkBuffer );
27372734

27382735
TEST_ASSERT_EQUAL( eProcessBuffer, eResult );
2739-
TEST_ASSERT_EQUAL( backup + 1, xProcessedTCPMessage );
27402736
}
27412737

27422738
/**

test/unit-test/FreeRTOS_IP_Timers/FreeRTOS_IP_Timers_stubs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ volatile BaseType_t xInsideInterrupt = pdFALSE;
4444

4545
NetworkBufferDescriptor_t * pxARPWaitingNetworkBuffer;
4646

47-
BaseType_t xProcessedTCPMessage;
48-
4947
struct xNetworkEndPoint * pxNetworkEndPoints;
5048
struct xNetworkInterface * pxNetworkInterfaces;
5149

test/unit-test/FreeRTOS_IP_Timers/FreeRTOS_IP_Timers_utest.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ extern IPTimer_t xARPTimer;
7474
extern IPTimer_t xDNSTimer;
7575
#endif
7676

77-
#if ( ipconfigUSE_TCP != 0 )
78-
79-
/** @brief Set to a non-zero value if one or more TCP message have been processed
80-
* within the last round. */
81-
extern BaseType_t xProcessedTCPMessage;
82-
#endif
83-
8477
extern IPTimer_t xARPResolutionTimer;
8578
extern BaseType_t xAllNetworksUp;
8679
extern IPTimer_t xNetworkTimer;
@@ -636,8 +629,6 @@ void test_vCheckNetworkTimers_AllTimersInactivePendingMessages( void )
636629
xTCPTimer.bActive = pdFALSE;
637630
xARPResolutionTimer.bActive = pdFALSE;
638631

639-
xProcessedTCPMessage = pdTRUE;
640-
641632
uxQueueMessagesWaiting_ExpectAnyArgsAndReturn( pdTRUE );
642633

643634
vSocketCloseNextTime_Expect( NULL );
@@ -660,8 +651,6 @@ void test_vCheckNetworkTimers_AllTimersInactive_2( void )
660651
xTCPTimer.bActive = pdFALSE;
661652
xARPResolutionTimer.bActive = pdFALSE;
662653

663-
xProcessedTCPMessage = pdTRUE;
664-
665654
uxQueueMessagesWaiting_ExpectAnyArgsAndReturn( pdFALSE );
666655

667656
xTCPTimerCheck_ExpectAndReturn( pdTRUE, 0x123 );
@@ -674,7 +663,6 @@ void test_vCheckNetworkTimers_AllTimersInactive_2( void )
674663

675664
vCheckNetworkTimers();
676665

677-
TEST_ASSERT_EQUAL( 0, xProcessedTCPMessage );
678666
TEST_ASSERT_EQUAL( 0x123, xTCPTimer.ulRemainingTime );
679667
TEST_ASSERT_EQUAL( pdFALSE_UNSIGNED, xTCPTimer.bExpired );
680668
TEST_ASSERT_EQUAL( pdTRUE_UNSIGNED, xTCPTimer.bActive );

0 commit comments

Comments
 (0)