@@ -1251,25 +1251,23 @@ static void tx_eject_pending_frames(udpard_tx_t* const self, const udpard_us_t n
12511251 const tx_frame_t * const frame = tr -> cursor [ifindex ];
12521252 tx_frame_t * const frame_next = frame -> next ;
12531253 const bool last_attempt = !cavl2_is_inserted (self -> index_staged , & tr -> index_staged );
1254- const bool last_frame = frame_next == NULL ; // if not last attempt we will have to rewind to head.
1255- const udpard_tx_ejection_t ejection = {
1256- .now = now ,
1257- .deadline = tr -> deadline ,
1258- .iface_index = ifindex ,
1259- .dscp = self -> dscp_value_per_priority [tr -> priority ],
1260- .destination = tr -> destination [ifindex ],
1261- .datagram = tx_frame_view (frame ),
1262- .user = tr -> user ,
1263- };
1264- if (!self -> vtable -> eject (self , ejection )) { // The easy case -- no progress was made at this time;
1265- break ; // don't change anything, just try again later as-is
1254+ const bool last_frame = frame_next == NULL ; // if not last attempt we will have to rewind to head.
1255+ udpard_tx_ejection_t ejection = { .now = now ,
1256+ .deadline = tr -> deadline ,
1257+ .iface_index = ifindex ,
1258+ .dscp = self -> dscp_value_per_priority [tr -> priority ],
1259+ .destination = tr -> destination [ifindex ],
1260+ .datagram = tx_frame_view (frame ),
1261+ .user = tr -> user };
1262+ if (!self -> vtable -> eject (self , & ejection )) { // The easy case -- no progress was made at this time;
1263+ break ; // don't change anything, just try again later as-is
12661264 }
12671265
12681266 // Frame ejected successfully. Update the transfer state to get ready for the next frame.
12691267 if (last_attempt ) { // no need to keep frames that we will no longer use; free early to reduce pressure
12701268 UDPARD_ASSERT (tr -> head [ifindex ] == tr -> cursor [ifindex ]);
12711269 tr -> head [ifindex ] = frame_next ;
1272- udpard_tx_refcount_dec (ejection . datagram );
1270+ udpard_tx_refcount_dec (tx_frame_view ( frame ) );
12731271 }
12741272 tr -> cursor [ifindex ] = frame_next ;
12751273
0 commit comments