From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 242635A0307 for ; Tue, 04 Jun 2024 23:31:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717536705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E5dTCw0K4ts2wZ2LoRoNjhNM+8QsMtDoh8Qu4egg4ys=; b=JURlr1ECaqpGJ9jWxHakzUI9uIj813H/+eJ2VF+7kunlbQAkP76Z93CkGt1fbobWU4LRnv 9yyfN8k111nS5CAdVXQMhBx6gKhAc2P/RLNBp1CsuzjNVYnZv0/7wVY7TINbhdOpc19pDU cL8wTJD4qFlqBF1kPOS+afhmi29/YPY= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-512-aWFbhG4SNH23w3qzr6Ya7g-1; Tue, 04 Jun 2024 17:31:43 -0400 X-MC-Unique: aWFbhG4SNH23w3qzr6Ya7g-1 Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-3d1fab1b7b0so1510226b6e.1 for ; Tue, 04 Jun 2024 14:31:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717536702; x=1718141502; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=E5dTCw0K4ts2wZ2LoRoNjhNM+8QsMtDoh8Qu4egg4ys=; b=SLvWM6U1bxSisU1hvFJO7pyBMfiEfymEM4LvoktZhhskYFR0yK06xqg3JcSUu4FP5M ckg2mmlDh2Khvnv8Gc+aF21BDcL7HQwwrUrb5NG2BFcgsqaW9yzYMxDKr9I0vOUTqSSN 1M5o12Sx8YUuvhaPxvZR1WiYciqFO6V3wdvrzv4hEZSfYNB8nrRmceuup2x0GnwWpi3h 3YzUv2CVilkTybjvVr5kKCR3tTCu/KmSTCwv/MYWghYfRKC7JWJ57ZQanbqaGF+pZJve 8VTzzB9hNkUIM8u6fmwFfr8gmoKU0cI3zPnB7lAB1cM9erbpIHASLAqPD8My2/HYvzaQ tcBg== X-Gm-Message-State: AOJu0YxgBo3QnEDJiOU2DnikzB2Ro5Ou/CmmzkuCAjNkIcAPqusDvQ5A AsO9LcszNPmlR7zax6XwGj6B+dZM4VRWFFGouL4EspKgkEXntpx6LFxxjen7N+9v20Crs4flCNC wHf1pJbNSgk1rVVX2okmoiimfaQ5s88Grx+XiY+1NrLp3HPXdkrdgqvzldVsPCkKZHuTAsr/Ug6 OgvNI6UakCAnuBfcXzUt7Z+K5wXdbhkfOJQ3I= X-Received: by 2002:aca:901:0:b0:3d2:3f:d024 with SMTP id 5614622812f47-3d2043d5c3bmr550590b6e.36.1717536702306; Tue, 04 Jun 2024 14:31:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGX9a8J7m4uKX9Wffw6meQBW6KCmZUzcgNHMDOxehRBDD8niq3/7T2CU+cqpy4Tpaf5oFmmeg== X-Received: by 2002:aca:901:0:b0:3d2:3f:d024 with SMTP id 5614622812f47-3d2043d5c3bmr550559b6e.36.1717536701790; Tue, 04 Jun 2024 14:31:41 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6afb9a067c3sm25032806d6.77.2024.06.04.14.31.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2024 14:31:41 -0700 (PDT) Date: Tue, 4 Jun 2024 23:30:20 +0200 From: Stefano Brivio To: Jon Maloy Subject: Re: [PATCH v8] tcp: move seq_to_tap update to when frame is queued Message-ID: <20240604233020.1edad3a9@elisabeth> In-Reply-To: <20240604182908.1833186-1-jmaloy@redhat.com> References: <20240604182908.1833186-1-jmaloy@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: A6S47J4RISNTX5SZRDIKUAHY6BGYUMRE X-Message-ID-Hash: A6S47J4RISNTX5SZRDIKUAHY6BGYUMRE X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 4 Jun 2024 14:29:08 -0400 Jon Maloy 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