From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ANBRJKmS; dkim-atps=neutral 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 258845A004C for ; Mon, 26 Aug 2024 21:58:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724702327; 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=sZeMyJWkAVcCvry81yl0/4YWVdBPs30WCndQ9OE2fq0=; b=ANBRJKmSzWkj1unk4eJZXfu2CKrt0gyEDQZb4+s/KjEPJObUZxOojrxJkxX1CMt6Z8GwED gUcK66OBsV1k90rYmuvLTjaM7USN+5QmAxeZLxFanys1dvu3BO28HtJI45HFdh+yccZnKQ KCAMoN5JElP9zj5RySGQMQHTIeTHSu0= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-160-r4YNePXqNxm4Vnz-25bKrQ-1; Mon, 26 Aug 2024 15:58:45 -0400 X-MC-Unique: r4YNePXqNxm4Vnz-25bKrQ-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6c32c044aa6so1773346d6.0 for ; Mon, 26 Aug 2024 12:58:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724702325; x=1725307125; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sZeMyJWkAVcCvry81yl0/4YWVdBPs30WCndQ9OE2fq0=; b=OjTAN52qgOZ//Yx62WxRZD+ErCp/DKlioW8E2QAspLYExS6XmBlmUt7Gq/D+c+bBgp odJrPtJHT/qC3hFwFUBGGEGMYn3rz3D535WsEQpGz4MDLAbnDieSe23IfmsDi/jRTLm6 BZ0Kp/mt2iL8uv2w4IGnrCSyu4v9kuMsfSQYqmmBvTc5AGbQtOPVgQEqzNqXXuWueTU9 OeOZEfEfwVK9Ojkz8ZmXXHWIOO2eK04ahfsVdC6l0t6o/mRM+cvErr4soOW5i1xorrRD bfbMwUscjvZWtfMSnDTRvl9aPAXueyy2zV224pcWuJsqTNcFdKXFZ5PppycIhECplEqE IVuA== X-Forwarded-Encrypted: i=1; AJvYcCWK+5eVslEeBm8pIFUAVH36K8j4YtWWR1hoOkjPVi0qMpK/T7ZrwUBOJkkXdVasrVu0oCtXOZfYDRU=@passt.top X-Gm-Message-State: AOJu0YyzgC4Gs9wRS0td1UWexYbtc6++p5qmtnXuu6o/z57nye4WJgMd 4wwi8Qt1I9Fkl97ZjgbZUq973spZ97C7MaWK1JQMOl1FPChBQuxsWPoJuMFZThu8T/bLYOb/qv3 5TYKv+hyjTfsZ0OHv2bIuYA21BbsxFyxDs3rTDFN8hNpcrlFd/A== X-Received: by 2002:a05:6214:5882:b0:6b4:4585:8e43 with SMTP id 6a1803df08f44-6c32b6bc8e3mr4885896d6.31.1724702325143; Mon, 26 Aug 2024 12:58:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHZaThSq1wtxJRl+kk1RkVzDOkBRPqIFqK0pqxMp5jgbqjVm7RZy7HnATCZO0XJItbPYBFjw== X-Received: by 2002:a05:6214:5882:b0:6b4:4585:8e43 with SMTP id 6a1803df08f44-6c32b6bc8e3mr4885646d6.31.1724702324628; Mon, 26 Aug 2024 12:58:44 -0700 (PDT) Received: from [10.0.0.174] ([24.225.235.209]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c162db07c0sm49711836d6.90.2024.08.26.12.58.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 12:58:44 -0700 (PDT) Message-ID: <9f4dd14d-fbe3-4c61-b04c-f0e6b8096d7b@redhat.com> Date: Mon, 26 Aug 2024 15:58:42 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] selftests: add selftest for tcp SO_PEEK_OFF support To: Jason Xing References: <20240823211902.143210-1-jmaloy@redhat.com> <20240823211902.143210-3-jmaloy@redhat.com> From: Jon Maloy In-Reply-To: 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: VAANZ4XCA3JJZLZNBRU6V4XQUFF62GLR X-Message-ID-Hash: VAANZ4XCA3JJZLZNBRU6V4XQUFF62GLR 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 CC: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, passt-dev@passt.top, sbrivio@redhat.com, lvivier@redhat.com, dgibson@redhat.com, eric.dumazet@gmail.com, edumazet@google.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: DQoNCk9uIDIwMjQtMDgtMjMgMTk6NDQsIEphc29uIFhpbmcgd3JvdGU6DQo+IEhlbGxvIEpvbiwN Cj4NCj4gT24gU2F0LCBBdWcgMjQsIDIwMjQgYXQgNToxOeKAr0FNIDxqbWFsb3lAcmVkaGF0LmNv bT4gd3JvdGU6DQo+PiBGcm9tOiBKb24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