Sam Price created a merge request: 
https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/58

Project:Branches: TheSamPrice/rtems-lwip:mdns-on-fixed-ring to 
rtems/pkg/rtems-lwip:main
Author: Sam Price

## Summary

xilinx: Bound the transmit-ring wait in the MAC filter update

xemacpsif_mld6_mac_hash_update() and xemacpsif_igmp_mac_filter_update() both
open with

    while(txring->HwCnt);

which never returns if the transmit-done interrupt does not retire the
outstanding descriptors.  Joining a multicast group reaches here while
descriptors queued by IPv6 duplicate address detection are still outstanding,
so mdns_resp_add_netif() simply never returns.

Observed on arm/xilinx_zynq_a9_qemu, diagnosed with gdb attached to a hung
guest:

    #0 xemacpsif_mld6_mac_hash_update (...) at xemacpsif.c:582
    #1 xemacpsif_mld6_mac_filter_update (...)
    #2 mld6_joingroup_netif (...) at mld6.c:377
    #3 mdns_resp_add_netif (...) at mdns.c:2406

Bounded, under __rtems__ so the vendor code is unchanged elsewhere.  Giving up
and continuing is the right failure: what follows stops the MAC, rewrites the
hash register and restarts it, so an unretired descriptor costs one packet on a
link that has only just come up -- against a function that never returns.

This is not the whole of the problem.  With it applied the join completes and
the interface then stops transmitting altogether, which is the stop/reset/
restart sequence further down this same function and wants someone who knows
the GEM ring handling.  This commit turns a hang into a diagnosable fault; it
does not make multicast work.

Signed-off-by: Samuel Price <[email protected]>
Assisted-by: Claude Opus 5 (1M context) <[email protected]>


## Generative AI

<!-- If you have used AI please use the "AI Contribution" template otherwise 
leave this blank see our fulls statement at 
https://www.rtems.org/generative-ai/-->


<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/58
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/namespace/22/sent_notifications/5-1lgwy7idk3f3007naovs260vw-m/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to