Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp66952lqo; Tue, 7 May 2024 12:18:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrQH4WnXbl2fAU0eCWJAopteWSn+5xgrHvS/ek4ghZNytVaHqiYASXICml82t4o2XM8T3ToriWMoPlcF+bP5UJPDKaSN2fiVPL5AFSdA== X-Google-Smtp-Source: AGHT+IGCsf5mZv7maRxUVbspDicH3hUl9oPVEOQ8MRHAYR5XojSDhFNQ2DIsKwit4DAmruBPdq5v X-Received: by 2002:a17:906:1b09:b0:a59:c3a7:59d3 with SMTP id a640c23a62f3a-a59fa885805mr62890066b.13.1715109517445; Tue, 07 May 2024 12:18:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715109517; cv=pass; d=google.com; s=arc-20160816; b=iwyZFl5VTupcRHATxmZstq2QYiEyKH+uxzB59ebt4VEQNzJadf4gH++NcItsWZ5mBW xZ/oDScDle9Ya1ZFZU1iDVxdbNgKp4XqGs62dOz16+Rxbc3P394+2Bwpe9Jr5SoCy2a5 SqYy2edBq1VKsq9WbiwfJcHFKTz8cTUdgA85mC5Tz+dPAZRL+0w+Wxv9qAIMj8eh+OIL ht791seCz9R9zZmYlOAasiB25Xa41FWfPsske0+QPmg7njqQ7UEKkLspOKxfb16dB9qr 0/bFPF8pbIKioCStwUL+2XRmHFj49EDGFukkJhlCl6w9Vb/3OeJmyT4RFn87D4LynRkG EDZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:from:date:dkim-signature; bh=YnFaPLp90E21WYAiuGhKeevnSOSTstIAB4WFXm8KCZo=; fh=8TmOkYWBrMVx5uJKW77J6ChdDmx/Mb32FmIkI6C83CE=; b=SH05EYLerWGqGDtPYgTkfFKGJ3p6btKqh1w8aXPupUeOip2wiPgZhPfWASlt6H7hzf STryMgkYAvHOP8hjH3lHDuSoiizy4iINtT8AfPmqSsGVN0qasX8tbTZpGRXkO+s5wPKL 0EMYOee8pfbqU8XDnf3HI7jpY5q10tnkDuV8yTh8nuAp5bybxc2kKGWp/yoCVeYtoF+Y IeziLZxBFSWSLJdHthU6BkHWL2f+BG2ZcsleBKD7QUftno0D9FfifJh1Pr/c+YjagtNl gh/nvvRNb/TjWv3hlqHJLJH4b7HRpiGSrldtShUTp9guiBb05IQiCCYp2K+CajQJb5Rc acgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kMkVTNNv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-172050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d22-20020a170906041600b00a59a7567db4si4188967eja.487.2024.05.07.12.18.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kMkVTNNv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-172050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 089771F25228 for ; Tue, 7 May 2024 19:18:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1062B16DEDA; Tue, 7 May 2024 19:18:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kMkVTNNv" Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE9D81E534; Tue, 7 May 2024 19:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715109505; cv=none; b=HnA+vyea6UVEn5i3ObIZ7H9DOTgMTXmKHE9fYzLHB3G+ktNMqPxbCLTNiJL81coRtrhKUEks4W3yca6ii9aAfMBpEm24awb2Vf1NjoU72HZIKwbgAeTXS0/pTEGtYF/YUf0oKorVrIwYqsttRt1ow8xCyQlx/Jh8GMxuZXVba0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715109505; c=relaxed/simple; bh=L10iW1XnYAr019F5MAAWEsx7pIjc8LRWcQ1HoQdQV0g=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: Mime-Version:Content-Type; b=uyksxJ6wAEcleK6aRAKsyjTm8Qbv/tsTqILVFctzaGDYgtIiDX+cy9np+hyVEgJVfqIQfTNaP18jkMQyTbxhJVMIFfJl2epcz2CxsSlTdYEUy8xQZwoZaSm79SFttJaCXDd0pHodMGYaWkUkVbR2ePLkzZSZEk4cCQIFYwRhA00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kMkVTNNv; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-434c3d21450so12950791cf.0; Tue, 07 May 2024 12:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715109503; x=1715714303; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=YnFaPLp90E21WYAiuGhKeevnSOSTstIAB4WFXm8KCZo=; b=kMkVTNNvhX+rL3ttTKaWtaADU29HSWVG6r6usyE2INyEWZbaYTa0Zgwf7kzgm7D2EH IpeqFJ5GevugKUn6nDbsucdpiwT7piCIK/Ytn8yF0DQbSHzwAU6QmS9a/+3K8dUo5Z3v bjEOupREQ5iEab+BXfgdZa3/b6UjSebK7JAsYMjpFZuTAYAh++dp3NQNeAjGL/x2CuCa GrqXnGj9M9HpzyUj0AgMsWyMeiYMS0n1Uqa5ipZf6HhXb6YUxH+5dDWsR/+iNjk/DCx2 /UiMWoltmnS7Jx00/C6bOPURB7Y5DxUBWnrxEuRAQ8HwE0+OIX73j/dMiCX5kQsgAFgF 1Q9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715109503; x=1715714303; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YnFaPLp90E21WYAiuGhKeevnSOSTstIAB4WFXm8KCZo=; b=aPWD0SwMGHIEFUHa/vWK+Mc+MXOBYADEZN8zTiIbsEFAH0L8Xw1DaT+oozo8aY+Dkx oT9c8kS+Msoy5Xlufbj5FUd6K+dZunGymojULK4/uKkRPMv6moCJX7dz13RHRlaXUsk6 /08FzExpRbKJ2BEeBaBhpvxgeYgAdqxnWcD+8KwpqkLMLGMB02fRJCTCP9mIhEwHhLg7 vnZhYl9VuUSsWNu6y+t7rAF/ogGYwwhKhMo0E54CBn1ObuVwXwwEGvm1dGmNXOnxSHst ah8EpCMLDEHjqcr/+fDl3TDsoVXVtny5+jE729+4z6O9kfLgzng6kZvGnDN6+pGLuuMQ LUJg== X-Forwarded-Encrypted: i=1; AJvYcCXjd5x2E5Rd0wjD7JzZTFagyoFWM6KDOW1xi0jqkvnkQR2MfTmbVpIKMc89dnUafFRf45AfjfIjakmmgIlTZB9gAJY72tHnSdPvI1wtOUtX/eUFA+h1tDAfzdVFokrJ3vA3vREGC88eLNhGa9oBtGxR2JjuEF8cwOIE X-Gm-Message-State: AOJu0Yx990DFa0EEs7W0qI45sxBz0axcuYi/A8l1v2XGKghTH/mvbMWi vX/TWpv6GjCvi8yjxN332IiCDouHpc6hSY1v4dx37sdf9RBn/FAX X-Received: by 2002:ac8:5805:0:b0:437:9875:9905 with SMTP id d75a77b69052e-43dbf5101a4mr6806571cf.27.1715109502847; Tue, 07 May 2024 12:18:22 -0700 (PDT) Received: from localhost (164.146.150.34.bc.googleusercontent.com. [34.150.146.164]) by smtp.gmail.com with ESMTPSA id hh10-20020a05622a618a00b00436510ddc5esm6695624qtb.34.2024.05.07.12.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:18:22 -0700 (PDT) Date: Tue, 07 May 2024 15:18:22 -0400 From: Willem de Bruijn To: "Abhishek Chauhan (ABC)" , Willem de Bruijn , Martin KaFai Lau Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Halaney , Martin KaFai Lau , Daniel Borkmann , bpf , kernel@quicinc.com Message-ID: <663a7e7e1f5b5_cc75c294c0@willemb.c.googlers.com.notmuch> In-Reply-To: References: <20240504031331.2737365-1-quic_abchauha@quicinc.com> <20240504031331.2737365-3-quic_abchauha@quicinc.com> <663a12f089b81_726ea29426@willemb.c.googlers.com.notmuch> Subject: Re: [RFC PATCH bpf-next v6 2/3] net: Add additional bit to support clockid_t timestamp type Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Abhishek Chauhan (ABC) wrote: > > > On 5/7/2024 4:39 AM, Willem de Bruijn wrote: > > Martin KaFai Lau wrote: > >> On 5/3/24 8:13 PM, Abhishek Chauhan wrote: > >>> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c > >>> index fe86cadfa85b..c3d852eecb01 100644 > >>> --- a/net/ipv4/ip_output.c > >>> +++ b/net/ipv4/ip_output.c > >>> @@ -1457,7 +1457,10 @@ struct sk_buff *__ip_make_skb(struct sock *sk, > >>> > >>> skb->priority = (cork->tos != -1) ? cork->priority: READ_ONCE(sk->sk_priority); > >>> skb->mark = cork->mark; > >>> - skb->tstamp = cork->transmit_time; > >>> + if (sk_is_tcp(sk)) > >> > >> This seems not catching all IPPROTO_TCP case. In particular, the percpu > >> "ipv4_tcp_sk" is SOCK_RAW. sk_is_tcp() is checking SOCK_STREAM: > >> > >> void __init tcp_v4_init(void) > >> { > >> > >> /* ... */ > >> res = inet_ctl_sock_create(&sk, PF_INET, SOCK_RAW, > >> IPPROTO_TCP, &init_net); > >> > >> /* ... */ > >> } > >> > >> "while :; do ./test_progs -t tc_redirect/tc_redirect_dtime || break; done" > >> failed pretty often exactly in this case. > >> > > > > Interesting. The TCP stack opens non TCP sockets. > > > > Initializing sk->sk_clockid for this socket should address that. > > > Willem, Are you suggesting your point from the previous patch ? > No, just for this custom socket to initialize the sk_clockid. It is not a TCP socket, but only used by TCP.