On 5/27/25 18:35, Tim Harvey wrote:
> On Mon, May 26, 2025 at 5:17 AM Jerome Forissier
> <jerome.foriss...@linaro.org> wrote:
>>
>> Hi Tim,
>>
>> On 5/23/25 20:31, Tim Harvey wrote:
>>> Hi Jerome,
>>>
>>> I've enabled LWIP on imx8mm_venice to see how it's doing and while
>>> dhcp/dns/ping/wget appear to work great, tftp is broken.
>>>
>>> Enabling LWIP_DEBUG shows the following:
>>> ip4_input: packet accepted on interface et
>>> IP packet dropped since it was fragmented (0x2000) (while IP_REASSEMBLY ==
>>> 0).
>>
>> Hmmmmm IP_REASSEMBLY should probably default to 1.
>>>
>>> I tried enabling IP_REASSEMBLY in lwip but that seems to change the issue
>>> to:
>>> ip4_input: packet accepted on interface et
>>> ip4_input:
>>> IP header:
>>> +-------------------------------+
>>> | 4 | 5 | 0xc0 | 108 | (v, hl, tos, len)
>>> +-------------------------------+
>>> | 10568 |000| 0 | (id, flags, offset)
>>> +-------------------------------+
>>> | 64 | 1 | 0xe25b | (ttl, proto, chksum)
>>> +-------------------------------+
>>> | 172 | 24 | 0 | 2 | (src)
>>> +-------------------------------+
>>> | 172 | 24 | 21 | 251 | (dest)
>>> +-------------------------------+
>>> ip4_input: p->len 108 p->tot_len 108
>>> Unsupported transport protocol 1
>>>
>>> Any ideas what the issue is here?
>>
>> Not really :-/ Does the transfer work with a smaller block size?
>> (CONFIG_TFTP_BLOCKSIZE, default 1468, try 500 for instance). You could
>> also enable CONFIG_LWIP_DEBUG_RXTX in order to get a full hex dump of
>> the messages going into/out of the lwIP stack.
>
> Hi Jerome,
>
> My config was with 4096, setting it to 1468 works and anything above
> that seems to cause this failure.
Good to know.
> Some sort of fragmentation issue?
Quite possibly, yes. In any case it does not make much sense to use a
clock size that causes the packet to be larger than the PMTU (it would
be sub-optimal) but it should definitely work, especially since I don't
believe PMTU discovery is implemented in lwIP. I add this to my to-do
list but feel free to investigate further :)
Thanks,
--
Jerome
>
> Best Regards,
>
> Tim