public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Jon Maloy <jmaloy@redhat.com>
Cc: passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com
Subject: Re: [PATCH v8] tcp: move seq_to_tap update to when frame is queued
Date: Tue, 4 Jun 2024 23:30:20 +0200	[thread overview]
Message-ID: <20240604233020.1edad3a9@elisabeth> (raw)
In-Reply-To: <20240604182908.1833186-1-jmaloy@redhat.com>

On Tue,  4 Jun 2024 14:29:08 -0400
Jon Maloy <jmaloy@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


  reply	other threads:[~2024-06-04 21:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 18:29 [PATCH v8] tcp: move seq_to_tap update to when frame is queued Jon Maloy
2024-06-04 21:30 ` Stefano Brivio [this message]
2024-06-04 23:59   ` David Gibson
2024-06-05  9:53     ` Stefano Brivio
2024-06-05 16:21   ` Jon Maloy
2024-06-04 23:59 ` David Gibson
2024-06-05 19:58 ` Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240604233020.1edad3a9@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=dgibson@redhat.com \
    --cc=jmaloy@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).