On Tue, Jun 04, 2024 at 11:30:20PM +0200, Stefano Brivio wrote: > On Tue, 4 Jun 2024 14:29:08 -0400 > Jon Maloy wrote: > > > +/** > > + * tcp_revert_seq() - Revert affected conn->seq_to_tap after failed transmission > > + * @conns: Array of connection pointers corresponding to queued frames > > + * @frames: Two-dimensional array containing queued frames with sub-iovs > > + * @num_frames: Number of entries in the two arrays to be compared > > + */ > > +static void tcp_revert_seq(struct tcp_tap_conn **conns, struct iovec (*frames)[TCP_NUM_IOVS], > > + int num_frames) > > +{ > > + int i; > > + > > + for (i = 0; i < num_frames; i++) { > > + struct tcp_tap_conn *conn = conns[i]; > > + struct tcphdr *th = frames[i][TCP_IOV_PAYLOAD].iov_base; > > + uint32_t seq = ntohl(th->seq); > > + > > + if (SEQ_LE(conn->seq_to_tap, seq)) > > + continue; > > See: > https://archives.passt.top/passt-dev/Zkr_4LkjDImgFqSi@zatzit > https://archives.passt.top/passt-dev/ZlkrBFkxliCCT3st@zatzit > > about this if (SEQ_LE) ... continue; As Jon mentioned in Monday's call, this looks weird in isolation but makes sense after the change in the second patch. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson