public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Jon Maloy <jmaloy@redhat.com>,
	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: Wed, 5 Jun 2024 11:53:00 +0200	[thread overview]
Message-ID: <20240605115247.4df1f27c@elisabeth> (raw)
In-Reply-To: <Zl-qfs7Y9-BV3-sD@zatzit>

On Wed, 5 Jun 2024 09:59:58 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Tue, Jun 04, 2024 at 11:30:20PM +0200, Stefano Brivio wrote:
> > 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;  
> 
> As Jon mentioned in Monday's call, this looks weird in isolation but
> makes sense after the change in the second patch.

Ah, oops, sorry, you're right, I forgot about that.

-- 
Stefano


  reply	other threads:[~2024-06-05  9:53 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
2024-06-04 23:59   ` David Gibson
2024-06-05  9:53     ` Stefano Brivio [this message]
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=20240605115247.4df1f27c@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --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).