This reverts commit fa652f9c24.
When testing iperf on boards such as ESP32-C6, ESP32-C3, and ESP32,
blocking issues are encountered, so the patch is reverted.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
The main content of this submission is to limit both the TX/RX buffers
of TCP/UDP to throttled IOBs, avoiding impacts on the sending and
receiving of control-type messages.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
expose the query interface of the network card to the network card
driver so that the network card driver can support more features.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This patch fixes the validation order in netdev ioctl handlers for
Bluetooth, IEEE 802.15.4, and packet radio devices. The command type
should be validated before checking the argument pointer to return
the correct error code (-ENOTTY vs -EINVAL).
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
netdev:when network device is running status,the network protocol stack is allowed to send packet to the network device and to receive from the network device
Signed-off-by: wangchen <wangchen41@xiaomi.com>
reduce the execution consumption of irrelevant code
testing the TX rates of TCP and UDP based on the Infineon board can
increase them by 13%.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
when traversing g_netdevices, it is necessary to ensure that they are
not modified during the traversal.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This reverts commit 696a94c8055dc59933457e8ce5c3c91dbecab980
first, when continuous ping from tester to vela, if ignore arp expire when ping response use arp_out to build L2 layer, this cause TC13 testing arp entry expire feature failed. second, the patch of support queue iob when arp_out failed can fix this bug.
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
Improve the behavior of the ARP table so that the manually configured
ARP table has the highest priority, can only be manually modified to
other values, otherwise will never change again, and will not time out.
The modified behavior is consistent with that of Linux.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
use netdev_list_lock to protect all network card traversal, registration,
and deregistration operations.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
otherwise, if the mld timers are not cancelled, an illegal address will
be accessed after timeout. to avoid this scenario, when the network card
is unregistered, all MLD timers must be attempted to be synchronously
cancelled.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
the same variable type in linux is char, in order to avoid modifying
the third-party library code when porting the third-party library code.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Referring to Linux,if there is only a loopback network device and the destination address does not belong to the loopback address, then the loopback network devices is not selected
Signed-off-by: wangchen <wangchen41@xiaomi.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
When our apps call getifaddrs on lo frequently, the loopback device will failed in SIOCGIFHWADDR and print too many error logs.
Signed-off-by: wangchen <wangchen41@xiaomi.com>
Support longest prefix match routing described as "Longest Match" in
RFC 1812, Section 5.2.4.3, Page 75.
Introduced `prefixlen` to indicate the prefix length of currently
founded route, and only looks up for longer prefix in all later steps.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
The `xxx_ipv6multicast` function in each driver is not adapted to
multiple IPv6 addresses yet, and they're redundant, so try to take them
into common code.
Change:
1. Add MAC `g_ipv6_ethallnodes` and `g_ipv6_ethallrouters` in
`icmpv6_devinit` and call them in `netdev_register`
2. Add multicast MAC for Neighbor Solicitation when adding any IPv6
address, and remove them when IPv6 address is removed
3. Select `NET_MCASTGROUP` when `NET_ICMPv6` because now we need
`d_addmac` when we have ICMPv6
Note:
We want modules outside net stack to call functions like
`netdev_ipv6_add` and never touch the related MAC address, so these MAC
functions are added as internal functions to `net/netdev/netdev.h`
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
Previously ipv6 multi-address support decided packet source
address based on its destination. This doesn't work if NuttX
device has multiple addresses within same subnet.
Instead when a packet is a response to existing connection,
the source address should be based on the destination address
used in the received packet.
When implementing IPv6-related logic, we found the `net_ipv6_pref2mask`
and `net_ipv6addr_copy` are using different argument order:
```
net_ipv6addr_copy(ifaddr->addr, addr);
net_ipv6_pref2mask(preflen, ifaddr->mask);
```
Change the order to:
```
net_ipv6addr_copy(ifaddr->addr, addr);
net_ipv6_pref2mask(ifaddr->mask, preflen);
```
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
Note that user-space related code, like procfs and lifreq related ioctl commands, are not touched in this commit.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>