mbox series

[0/3] net: lwip: map struct udevice to struct netif

Message ID 20250306142525.3079189-1-jerome.forissier@linaro.org
Headers show
Series net: lwip: map struct udevice to struct netif | expand

Message

Jerome Forissier March 6, 2025, 2:25 p.m. UTC
This is a small NET_LWIP cleanup. Instead of re-creating a struct netif
from a struct udevice every time a nework operation is requested (dhcp,
ping, etc.), store the netif inside the udevice.

No functional change is expected, but the behavior of the network stack
might change a bit since not removing the device may have impacts on
various states in the stack (the ARP cache for instance).

Jerome Forissier (3):
  dm: core: add 'netif' field to struct udevice for NET_LWIP
  net: lwip: save struct netif in struct udevice
  net: lwip: remove net_lwip_remove_netif()

 include/dm/device.h |  5 +++++
 include/net-lwip.h  |  5 ++---
 net/lwip/dhcp.c     |  7 ++-----
 net/lwip/dns.c      |  5 +----
 net/lwip/net-lwip.c | 25 +++++++++++--------------
 net/lwip/ping.c     |  8 ++------
 net/lwip/tftp.c     |  5 +----
 net/lwip/wget.c     |  9 ++-------
 8 files changed, 26 insertions(+), 43 deletions(-)