On Tue, 4 Jun 2024 14:29:08 -0400 Jon Maloy <jmaloy(a)redhat.com> 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; -- Stefano