lwIP watchdog not being serviced

Jérôme Forissier jerome.forissier at linaro.org
Thu May 29 10:10:08 CEST 2025


Le mer. 28 mai 2025, 18:29, Tim Harvey <tharvey at gateworks.com> a écrit :

> On Wed, May 28, 2025 at 12:57 AM Jerome Forissier
> <jerome.forissier at linaro.org> wrote:
> >
> > 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;
> >         ...
> > }
> >
>
> Hi Jerome,
>
> I knew you would know exactly where to put it - works great.


Good.

Shall I
> submit a patch authored by you and signed-off by both of us?
>

I suggest you author it and add your sign-off and add me as Suggested-by.

Thanks,
-- 
Jérôme


> Thanks,
>
> Tim
>


More information about the U-Boot mailing list