public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Jon Maloy <jmaloy@redhat.com>
To: Stefano Brivio <sbrivio@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: Wed, 5 Jun 2024 12:21:26 -0400	[thread overview]
Message-ID: <e1eb36fe-9834-4dd1-a99d-12a1235f1700@redhat.com> (raw)
In-Reply-To: <20240604233020.1edad3a9@elisabeth>



On 2024-06-04 17:30, 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;
>
My point is, again, that in the next patch in the series I do

static void tcp_revert_seq(struct tcp_tap_conn **conns, struct iovec 
(*frames)[T
                         continue;

                 conn->seq_to_tap = seq;
+               tcp_set_peek_offset(conn->sock, seq - 
conn->seq_ack_from_tap);
         }
  }

So, this still makes sense.

///jon


  parent reply	other threads:[~2024-06-05 16:21 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
2024-06-05 16:21   ` Jon Maloy [this message]
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=e1eb36fe-9834-4dd1-a99d-12a1235f1700@redhat.com \
    --to=jmaloy@redhat.com \
    --cc=dgibson@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).