Re: [QEMU][PATCH 1/1] hw/net/can: Fix sorting of the tx queue

2024-05-30 Thread Francisco Iglesias
Hi Shiva, On Wed, May 29, 2024 at 03:54:58PM +0530, Shiva sagar Myana wrote: > Returning an uint32_t casted to a gint from g_cmp_ids causes the tx queue to > become wrongly sorted when executing g_slist_sort. Fix this by always > returning -1 or 1 from g_cmp_ids based on the ID comparison instead.

[QEMU][PATCH 1/1] hw/net/can: Fix sorting of the tx queue

2024-05-29 Thread Shiva sagar Myana
Returning an uint32_t casted to a gint from g_cmp_ids causes the tx queue to become wrongly sorted when executing g_slist_sort. Fix this by always returning -1 or 1 from g_cmp_ids based on the ID comparison instead. Also, if two message IDs are the same, sort them by using their index and transmit