Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp78354lqo; Tue, 7 May 2024 12:43:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrDRupz7MofQISrA+lsyYyUK2PTlTd6uSOZsIVoECyvillJQ6OuUMB3ZtfzJXD91WpOQGIBN5/frXZ2HZoOWoYoUdIcdo79kwlwjaZCg== X-Google-Smtp-Source: AGHT+IHicAGHYs+tgJ8Ka6+0FCXFfeb44UCQowHALSV3nqXknm2r24ajqjs1WXd6wUAyqgONPctj X-Received: by 2002:aa7:99cc:0:b0:6ea:df65:ff7d with SMTP id d2e1a72fcca58-6f49c21342amr619060b3a.10.1715111028936; Tue, 07 May 2024 12:43:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715111028; cv=pass; d=google.com; s=arc-20160816; b=ieGjeL4js01fYJyRtJhe5K16/fSbtlYvu0++kGXgjwLd15bJGUPtN43eg1i1oNuo9Q N8JAos989P0Tv/ct59L6o33ysRmHVyMiKugPo7wSa69TYVSK4vkS8YZ32cETkMoH/zIp CaZon4Pmmie7hiDdvWp9wE8JK7oCSiH/mA6QWoJZUUY9td7Yq0QiJPCRA5Qqv0RJLKCD 0H6RioWP/u0/cayntH0e1HlnBh+35rX7aYopTOpLEE+e1uPNYz1hICSG1AR3hU2fSH5M KBjz5i6RZKlLpIvHOc92+fAfpEv4SCVrwWvUuJpWWuF2klrY4OemHn2wBo08FE1B5msl xmAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=jCFHp8W259KAmupqm+5dmy2ouOi8pkhAE6sb3LDJp+c=; fh=PiUCJs25LCzKq5GHYJNHx6YeucqCwjRAz7O85jQkCpA=; b=f+fZfr8zJxWFWMNZHYlS25OHsfHv/HT+xrOX12zRDtlh/z7WGUFgUmv9yVcfUpXPKU oRj8fVLbuYnm/kpD/cGBK9gokVRK81lQPvF0oG3zkaiFssR4mrBK3VnqCqSec0n+psNS Mnvt87vNOMmgthQ3qAkd4zLIz9WHQX6poOWBWUGQQ+uAU0VUPLLrs16mDPwz/SLFL9bk GI+2Qdu95XTb0tQnGQTQDjMVYzY8khi7+93zoC82hHH2iOPI4uoTF1jh1LSFF/SRasBB A0GDjhAHIxHOLk8NRJQESr+kKgAHSx3CGT44U82zoBU5s1/Xx/mQmKIOuD79/8UMqDHX BMvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XtspuWq3; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-172071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172071-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g15-20020a63520f000000b0060bef6c5008si11012626pgb.56.2024.05.07.12.43.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:43:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XtspuWq3; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-172071-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172071-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DE713B22FD6 for ; Tue, 7 May 2024 19:39:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D659F16E890; Tue, 7 May 2024 19:39:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="XtspuWq3" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADF2C7350C; Tue, 7 May 2024 19:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715110758; cv=none; b=naxSiac4rr0MRjfKjCBVezV4TtMQeeHjYHCu7Wce0qlqidQBL29AtZC56XCVdZIvtRbQ5grXLfjZojwqwxdgC1k3hK79A/Snl/wNVYA2x5kvfHsozVv4GlJ9pgs+22fDJhAZd8oboKusoDiqOL/5X5aPvuLu+dLgX5kK1RihmwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715110758; c=relaxed/simple; bh=mv1uSj5Kq4YcblH7Tz4McLmQNmcq+h6m2ps+PPU3mMs=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=aPIdojKcVpY+rJWBZSVOiYp46pKa+WhEQFzGcBRpd1Zek4Vx7nq5WwXS9DqvBkwlHl8oBoocQr8CRBTVyb2+E0QD21eqR9S6fhL+SpIkDUkhMPfNNGLBsbuecifSbau0cumgqdeEmpbbCGI0BOpM/G437IcQpxmD/ROwxCHsT74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=XtspuWq3; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 447IgltP007564; Tue, 7 May 2024 19:38:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=jCFHp8W259KAmupqm+5dmy2ouOi8pkhAE6sb3LDJp+c=; b=Xt spuWq3dFAY8G1hA5LmYlv/MzMQKcD5COPXhRkXmszpUjhCWeul6pDBezTy5ly0YJ UKQbr0DulLlUeFabm2Q90cT5zmitV9GXW/xNzQb7zUWlnt/Oo3VcCU09X1TenaRq q10mUG1xCMF+GJhEXPUGpaZzRFP8y85zDccY9trtDYhB5yAkEjrlly/+nQrMw4fT Gl66YVSCpKzZrQxD+mQWoXUBdQ8UFy52/rCGCJAY0j193NOXY7kadS/B53c810jp DZLqLW2hmhyq0VBhcdRoTBS7J2MA9kjL1qGQ7XFD8lAgYFktCoNKPJk75Rn9pr+K QFbaCEQOhMSdEcHWiJCg== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xyste03ay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 May 2024 19:38:57 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 447Jcu3N029224 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 May 2024 19:38:56 GMT Received: from [10.110.127.27] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 7 May 2024 12:38:52 -0700 Message-ID: <69c55618-931a-48f4-a25c-0d5666bcb5cb@quicinc.com> Date: Tue, 7 May 2024 12:38:51 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH bpf-next v6 2/3] net: Add additional bit to support clockid_t timestamp type Content-Language: en-US To: Willem de Bruijn , Martin KaFai Lau CC: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , Andrew Halaney , "Martin KaFai Lau" , Daniel Borkmann , bpf , References: <20240504031331.2737365-1-quic_abchauha@quicinc.com> <20240504031331.2737365-3-quic_abchauha@quicinc.com> <663a12f089b81_726ea29426@willemb.c.googlers.com.notmuch> <663a7e7e1f5b5_cc75c294c0@willemb.c.googlers.com.notmuch> From: "Abhishek Chauhan (ABC)" In-Reply-To: <663a7e7e1f5b5_cc75c294c0@willemb.c.googlers.com.notmuch> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: J5C4MZW2Ei4xKG093PaksBBJHC0lxS63 X-Proofpoint-ORIG-GUID: J5C4MZW2Ei4xKG093PaksBBJHC0lxS63 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-07_12,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 priorityscore=1501 malwarescore=0 mlxscore=0 bulkscore=0 clxscore=1015 mlxlogscore=999 spamscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405070136 On 5/7/2024 12:18 PM, Willem de Bruijn wrote: > 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. Thanks Willem, Noted! Which means there are only two places these custom RAW tcp socket are getting called 1. tcp_ipv4.c 2. tcp_ipv6.c I will take care of initializing sk_clockid to monotonic in the next patch in the above two files. Let me know if i missed out anything.