diff --git a/configs/viewtool-stm32f107/README.txt b/configs/viewtool-stm32f107/README.txt index bfdc3dff828..28cca5bdaac 100644 --- a/configs/viewtool-stm32f107/README.txt +++ b/configs/viewtool-stm32f107/README.txt @@ -1002,11 +1002,19 @@ Configurations tcpblaster: - The tcpblaster example derives from the nettest example and basicallyi + The tcpblaster example derives from the nettest example and basically duplicates that application when the nettest PERFORMANCE option is selected. tcpblaster has a little better reporting of performance stats, however. This configuration derives directly from the netnsh configuration and most - of the notes there should applie equally here. + of the notes there should apply equally here. + General usage instructions: + 1. On the host: + a. cd to apps/examples/tcpblaster + b. Run the host tcpserver[.exe] program that was built in that directory + 2. On the target: + a. Run the tcpclient built in application. + 3. When you get tire of watch the numbers scroll by, just kill the tcpserver + on the host. diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h index e9f39c8de3d..0e97c6f275d 100644 --- a/include/nuttx/net/net.h +++ b/include/nuttx/net/net.h @@ -341,6 +341,11 @@ void net_unlock(void); * Atomically wait for sem (or a timeout( while temporarily releasing * the lock on the network. * + * Caution should be utilized. Because the network lock is relinquished + * during the wait, there could changes in the network state that occur + * before the lock is recovered. Your design should account for this + * possibility. + * * Input Parameters: * sem - A reference to the semaphore to be taken. * abstime - The absolute time to wait until a timeout is declared. @@ -360,6 +365,11 @@ int net_timedwait(sem_t *sem, FAR const struct timespec *abstime); * Description: * Atomically wait for sem while temporarily releasing the network lock. * + * Caution should be utilized. Because the network lock is relinquished + * during the wait, there could changes in the network state that occur + * before the lock is recovered. Your design should account for this + * possibility. + * * Input Parameters: * sem - A reference to the semaphore to be taken. * @@ -378,6 +388,11 @@ int net_lockedwait(sem_t *sem); * Allocate an IOB. If no IOBs are available, then atomically wait for * for the IOB while temporarily releasing the lock on the network. * + * Caution should be utilized. Because the network lock is relinquished + * during the wait, there could changes in the network state that occur + * before the lock is recovered. Your design should account for this + * possibility. + * * Input Parameters: * throttled - An indication of the IOB allocation is "throttled" * diff --git a/net/utils/net_lock.c b/net/utils/net_lock.c index 9bc62b0c247..c439274416b 100644 --- a/net/utils/net_lock.c +++ b/net/utils/net_lock.c @@ -270,6 +270,11 @@ void net_restorelock(unsigned int count) * Atomically wait for sem (or a timeout( while temporarily releasing * the lock on the network. * + * Caution should be utilized. Because the network lock is relinquished + * during the wait, there could changes in the network state that occur + * before the lock is recovered. Your design should account for this + * possibility. + * * Input Parameters: * sem - A reference to the semaphore to be taken. * abstime - The absolute time to wait until a timeout is declared. @@ -329,6 +334,11 @@ int net_timedwait(sem_t *sem, FAR const struct timespec *abstime) * Description: * Atomically wait for sem while temporarily releasing the network lock. * + * Caution should be utilized. Because the network lock is relinquished + * during the wait, there could changes in the network state that occur + * before the lock is recovered. Your design should account for this + * possibility. + * * Input Parameters: * sem - A reference to the semaphore to be taken. * @@ -350,6 +360,11 @@ int net_lockedwait(sem_t *sem) * Allocate an IOB. If no IOBs are available, then atomically wait for * for the IOB while temporarily releasing the lock on the network. * + * Caution should be utilized. Because the network lock is relinquished + * during the wait, there could changes in the network state that occur + * before the lock is recovered. Your design should account for this + * possibility. + * * Input Parameters: * throttled - An indication of the IOB allocation is "throttled" * diff --git a/net/utils/utils.h b/net/utils/utils.h index 75d1dd89044..41f0c9dcfe1 100644 --- a/net/utils/utils.h +++ b/net/utils/utils.h @@ -288,7 +288,7 @@ uint16_t ipv4_upperlayer_chksum(FAR struct net_driver_s *dev, uint8_t proto); * Name: ipv6_upperlayer_chksum * * Description: - * Perform the checksum calcaultion over the IPv6, protocol headers, and + * Perform the checksum calculation over the IPv6, protocol headers, and * data payload as necessary. * * Input Parameters: