From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id E3E345A004E for ; Tue, 06 Aug 2024 08:18:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1722925121; bh=GoleA12ObP21/AUFzxidMXe9RmXMOE97TA0bWrs1nAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nes55ozqXi4AgDLARPsYyaaZHs/WHl3Z26GxuuBseI/kNscS56gxLZRyslz401XCw Qo289y0TQcgwVrM3xJrj6FsNMZqC6oCI+tYtSW7cfbyYvqmMXewd8Fy1jrWO0cBfOi LzyOEn3NdmUiWn63kRfAv32ep4G5U6c5wwtx4pMtJju7Z922CKUnSypAj2/fEqmn1s 6AyJ4d+eyyeXRWeDa36fzN788uZ+a1xexnhHK7bCw4R5k/AdP0sJtYPJVs+/SlyKUL cwanM8sOOUyAIies9sAkfNHjXZ24QWR8o3LYNjF5Bpph1MGWQiYhYIZqZnoXd4PE9i wU2wRQ8EjT+6g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WdNRP1dLTz4wx5; Tue, 6 Aug 2024 16:18:41 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 1/4] util: Some corrections for timespec_diff_us Date: Tue, 6 Aug 2024 16:18:36 +1000 Message-ID: <20240806061839.1950144-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240806061839.1950144-1-david@gibson.dropbear.id.au> References: <20240806061839.1950144-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Message-ID-Hash: 3MFMAMMWF64DS7JT364D6EVOZ74YBMLW X-Message-ID-Hash: 3MFMAMMWF64DS7JT364D6EVOZ74YBMLW X-MailFrom: dgibson@gandalf.ozlabs.org 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: David Gibson 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: VGhlIGNvbW1lbnQgZm9yIHRpbWVzcGVjX2RpZmZfdXMoKSBjbGFpbXMgaXQgd2lsbCB3cmFwIGFm dGVyIDJeNjTCtXMuICBUaGlzDQppcyBpbmNvcnJlY3QgZm9yIHR3byByZWFzb25zOg0KICAqIEl0 IHJldHVybnMgYSBsb25nIGxvbmcsIHdoaWNoIGlzIHByb2JhYmx5IDY0LWJpdHMsIGJ1dCBtaWdo dCBub3QgYmUNCiAgKiBJdCByZXR1cm5zIGEgc2lnbmVkIHZhbHVlLCBzbyBldmVuIGlmIGl0IGlz IDY0IGJpdHMgaXQgd2lsbCB3cmFwIGFmdGVyDQogICAgMl42M8K1cw0KDQpDb3JyZWN0IHRoZSBj b21tZW50IGFuZCB1c2UgYW4gZXhwbGljaXRseSA2NC1iaXQgdHlwZSB0byBhdm9pZCB0aGF0DQpp bXByZWNpc2lvbi4NCg0KU2lnbmVkLW9mZi1ieTogRGF2aWQgR2lic29uIDxkYXZpZEBnaWJzb24u ZHJvcGJlYXIuaWQuYXU+DQotLS0NCiB1dGlsLmMgfCA0ICsrLS0NCiB1dGlsLmggfCAyICstDQog MiBmaWxlcyBjaGFuZ2VkLCAzIGluc2VydGlvbnMoKyksIDMgZGVsZXRpb25zKC0pDQoNCmRpZmYg LS1naXQgYS91dGlsLmMgYi91dGlsLmMNCmluZGV4IGYyZTI2YTdhLi4wY2M5MDhhNSAxMDA2NDQN Ci0tLSBhL3V0aWwuYw0KKysrIGIvdXRpbC5jDQpAQCAtMjQ0LDkgKzI0NCw5IEBAIHZvaWQgc29j a19wcm9iZV9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