[PATCH] net:lwip: Add debug line to net-lwip

Jerome Forissier jerome.forissier at linaro.org
Fri Dec 5 18:35:17 CET 2025


Hi Andrew,

On 12/5/25 10:46, Andrew Goodbody wrote:
> When debugging the LWIP NFS implementation this debug line helped to
> show the cause of an error. This could be useful to someone in the
> future.
> 
> Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
> ---
>  net/lwip/net-lwip.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
> index 8741f65fe12e23cc30068506453a762533f8a67f..f70857204b2808139ac3ccacd89d5719b7db12d2 100644
> --- a/net/lwip/net-lwip.c
> +++ b/net/lwip/net-lwip.c
> @@ -297,6 +297,7 @@ static struct pbuf *alloc_pbuf_and_copy(uchar *data, int len)
>  	/* We allocate a pbuf chain of pbufs from the pool. */
>  	p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
>  	if (!p) {
> +		debug("Failed to allocate pbuf !!!!!\n");

The exclamations are a bit too much ;-) I might remove them when
picking up this patch. That being said:

Reviewed-by: Jerome Forissier <jerome.forissier at linaro.org>

>  		LINK_STATS_INC(link.memerr);
>  		LINK_STATS_INC(link.drop);
>  		return NULL;
> 
> ---
> base-commit: 59f9fcc1f514762674ac07c13c2a85f7aace7250
> change-id: 20251205-lwip_dbg-243f89da0aa8
> 
> Best regards,

Thanks,
-- 
Jerome


More information about the U-Boot mailing list