Hi Tim,

On 5/27/25 21:07, Tim Harvey wrote:
> Hi Jerome,
> 
> In my continued evaluation to see if I want to switch my boards over
> to use lwIP I've noticed that the watchdog does not get serviced
> during at least http/tftp which surprised me. This causes board resets
> when transferring large files such as disk images.
> 
> It seems lwIP is missing some calls to schedule(). Do you have a
> suggestion for the right place to call this for lwIP?

That's a good point. Anywhere in the receive loops should be OK, for
example right after net_lwip_rx(udev, netif). But for simplicity and
to avoid pattern duplication we may want to call schedule() as well
as sys_check_timeouts() inside net_lwip_rx():

int net_lwip_rx(struct udevice *udev, struct netif *netif)
{
        struct pbuf *pbuf;
        uchar *packet;
        int flags;
        int len;
        int i;

        /* lwIP timers */
        sys_check_timeouts();
        /* Other tasks and actions */
        schedule();

        if (!eth_is_active(udev))
                return -EINVAL;
        ...
}

Regards,
-- 
Jerome

> 
> Best Regards,
> 
> Tim

Reply via email to