From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
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 09:59:58 +1000 [thread overview]
Message-ID: <Zl-qfs7Y9-BV3-sD@zatzit> (raw)
In-Reply-To: <20240604233020.1edad3a9@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]
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.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-06-05 0:00 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 [this message]
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=Zl-qfs7Y9-BV3-sD@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=dgibson@redhat.com \
--cc=jmaloy@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/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).