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.129.124]) by passt.top (Postfix) with ESMTP id 1588C5A02E3 for ; Tue, 14 May 2024 21:57:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715716668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0JxVpV2Kv/K3U+nGvS96zfnz0l9IQf+PXQ88thySWso=; b=ZUARgqcjVo0t7MTjmn8syvFtb9g7V4Qkiz/B/OGczkuP0g77SL9C6esRlamFl6q1VnHxJy Zsdd0PCG11wY0sMGpJXrZvax81j79HdGmnjUuJHevggjWizXrMT4l4kXRZrdh94oYDY5Gz jt+qKo79wZ4+j3d6xddZuD0yMOWchGY= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-amJfcIcvPJWYv6rVQV_mfQ-1; Tue, 14 May 2024 15:57:46 -0400 X-MC-Unique: amJfcIcvPJWYv6rVQV_mfQ-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-43de91ba721so65746321cf.2 for ; Tue, 14 May 2024 12:57:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715716665; x=1716321465; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0JxVpV2Kv/K3U+nGvS96zfnz0l9IQf+PXQ88thySWso=; b=srIwK3qHmKGJXj1vPs4NzYq2vMvZrpNluooVXhLWyJJG/bDwtMJhGcahD2Xm+NT5ZA P74C5JbRTYDAoCZYR8Tow1BS8KlcKfxdCPgC5UTBmZh/ln5SKr6uhUcaCJZ/79n4eeXX 01INDQkjB+3tvh8LliJVPxGyHO4/XsyPr/bl5f+dntizqbCeMMJYaA8y0Eiudc/LPnNV V9h/FovtjRMLsl6Ir1XYolls4YI814YyAVI9G/dVgd3IsEIi2UI6HnhrePy97yPmjMfH ZtA3azvUiX3Ck81Ns5tDa38sD1rpAvJa8DgkbuIhBAMtTSMwWr+7/o40ai/9GUjmHnVN K1qA== X-Gm-Message-State: AOJu0YxEzJxWLr0aJCJQ1yUnmgFi04cOFdBSSev85fkrjWFYfdJ5m/ji O3zgeiNaGycab0o+b4Q8QLKVAmupbpN8eIKEztkLn0F7RddaC7/fX+zTyAaJ9mCcJR5SpQHY5FW Kcizo1UZMLMvyAZPbe428CZLFhPkt8SWuWyJ9iZnFGUXPeCj4dfoVSmqermq1vQIA+9V0jhIn8z IbW5MK9Ag7XbEeI/5Q8f0MSsNa/4kLMuhoag== X-Received: by 2002:a05:622a:2615:b0:43a:4bb6:e19d with SMTP id d75a77b69052e-43dfdb4dd6emr220458491cf.23.1715716665424; Tue, 14 May 2024 12:57:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEPrWUsAIxa5sjnGWOPz7fOwRc9w765plCgRH/Acs7fl0va/qhE3i/A8lYD7rhLDWkKg2pI7Q== X-Received: by 2002:a05:622a:2615:b0:43a:4bb6:e19d with SMTP id d75a77b69052e-43dfdb4dd6emr220458221cf.23.1715716664927; Tue, 14 May 2024 12:57:44 -0700 (PDT) Received: from [10.0.0.97] ([24.225.234.80]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43df54dda3dsm72407251cf.29.2024.05.14.12.57.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 May 2024 12:57:44 -0700 (PDT) Message-ID: <1e672f7b-2660-c2e6-6803-c2a094b84bb3@redhat.com> Date: Tue, 14 May 2024 15:57:43 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v4] tcp: move seq_to_tap update to when frame is queued To: passt-dev@passt.top, sbrivio@redhat.com, lvivier@redhat.com, dgibson@redhat.com References: <20240514194406.755076-1-jmaloy@redhat.com> From: Jon Maloy In-Reply-To: <20240514194406.755076-1-jmaloy@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: base64 Message-ID-Hash: LGCICBCFJCCO66FSXRLGOBPHA7ZYMJDO X-Message-ID-Hash: LGCICBCFJCCO66FSXRLGOBPHA7ZYMJDO X-MailFrom: jmaloy@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 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: SGksDQpJIGRpZCBhIGxpdHRsZSBtb3JlIHRoYW4gc3VnZ2VzdGVkIGJ5IERhdmlkL1N0ZWZhbm8g aGVyZSwgYnV0IEkgYW0gDQphbHdheXMgaGFwcHkNCndoZW4gSSBzZWUgc2ltcGxpZmljYXRpb25z IHRoYXQgY2FuIHJlZHVjZSB0aGUgY29kZSBhbW91bnQuDQpIb3dldmVyLCBiZWluZyBhYmxlIHRv IGVsaW1pbmF0ZSBzdHJ1Y3QgdGNwX2J1Zl91cGRhdGUgbGVkIG1lIHRvIGFub3RoZXIgDQppZGVh Lg0KDQpDb3VsZCB3ZSBqdXN0IGRvOg0KDQpzdHJ1Y3QgdGNwX2ZyYW1lIHsNCiDCoMKgwqDCoCBz dHJ1Y3QgdGNwX3RhcF9jb25uICpjb25uOw0KIMKgwqDCoMKgIHN0cnVjdCBp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