Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp181018lqe; Thu, 4 Apr 2024 03:41:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWZPQAB/qlswWl5l9kQipZgIUlizIOLqasxa+Uq2YiLYmNS4Jr+1qDfGfTfK6Ts3DmyjFrFI/9ohL/KEhSu45hSuAziv+lx8ix1PqXQg== X-Google-Smtp-Source: AGHT+IFvESsYSFpB32LvPL4RI0f5YCSf1Ub9QjJHcMeVQItXDUVAedzPKprTpGWVEwXV/MkC1oBv X-Received: by 2002:a05:6a20:3ca3:b0:1a5:6d3a:65ed with SMTP id b35-20020a056a203ca300b001a56d3a65edmr3297730pzj.3.1712227260257; Thu, 04 Apr 2024 03:41:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712227260; cv=pass; d=google.com; s=arc-20160816; b=pTV+6YplOwSRnNGRFTLX84OghsfYYoapSZH+rqJPlLelhBS7r0ukgK39f6Q8yaWYlH tNlO6FOBUqSbitiofTvxPxcj7u1TAVD1hZgHIpRGzv/latzxN9E9FA1cSW4LIkQxwx+K Unu557RLKGvRE6DgFIFpEk1raT5gFhQCutG9ECtUM2CT76hveE10DFcd7S6K84ifOl4S 0Z88F/rT/+r/UBiiG+E+SWrlSqk/AFP/N04lilu7plaJM63wHAMakXEYXhtwdq9s2e34 L+zMdRdKKM2+86aYee8ZmvqPmwz3JnV0DaHTBBJtUNsqPD2X6U5V5G9HJx5DvhDWDpWA Bl4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=gEu4cBn378/joci9QMSBd+Fr2ZU6q36lFExgj65cyUc=; fh=5/phqtfQMgcmHLVZZnQyHViML7Ok/bFqzoZPuIrbm3E=; b=WEVKwJ+dW6vbSZZZrQ+URsbpUGPWKfaZzTcD2N6NNANvaIJc7nkUrxbNw8+BeYeDWL 7L4mRaPd8QCm6TQXoGo2+ymjBTQ8HmzXmE6fo3+8rW3kzHJSZ6A13I9rwX3/G8A+cm0Z SSMJVDsMA8kGCTzSd6Px4GmcOBRGdAnegkD05Lmg2DHqA7WnTg2BweG2yZh1KToRAxfg G7PoxgTKKyrnQ7dh6sOfxllsBu1bQ0c2q5gmPob1UCsTYzPCJLlY9vscqyqTxqa2Kfjo QtKL17wkFvkj7bT7V3K0pCII6RgyaWlD+B7l34YdKjHp3X+Ciz/CAlYkf8H3NrFsAXZZ EkFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IGQ6lWzb; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-131247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v62-20020a626141000000b006e70e6b2ec4si14863311pfb.24.2024.04.04.03.40.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:41:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IGQ6lWzb; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-131247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D650C289952 for ; Thu, 4 Apr 2024 10:40:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28C768062E; Thu, 4 Apr 2024 10:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IGQ6lWzb" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 54C927F7F7 for ; Thu, 4 Apr 2024 10:40:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712227247; cv=none; b=KBSmhqZFUHy5vf5mwB6LjA74m/8Xvb0seh/ZA3Cm12zwId/v2/4O8oGuIh+W8cF/0ti1owSGSABLOvdVsWn+msFiCLT4jpZC6r6ghGR4NWyqYIxOHyuWOutyWyXH+4lS1oiWUhHUkMHdsAq4gyLa9J6zvt0rtZoujYsV5YFQkwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712227247; c=relaxed/simple; bh=j6S1pM1Rhkz+8qgQx/WACVD+lnZ8tWloWcxfHeTksGA=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=BvAeHcUYYzBuLoRn3lfTEfmRHPH499YQ31m/Cs7YzP0S8lAknCh+2BmCgMwEeVoMP31yBrdql7nnufJk+tx1NqNFKpMdSys3PStlfC4P/vde9PN0anPt8bukzhRKIogj/ac+C2rpXC8bIFe0id/DXRh/UcSdGwWT6IfYt/w+gBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IGQ6lWzb; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712227244; 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:autocrypt:autocrypt; bh=gEu4cBn378/joci9QMSBd+Fr2ZU6q36lFExgj65cyUc=; b=IGQ6lWzbLJsOvKNedT1AKf9myUbzp27fvwWP7rbIvdnwUpMd56iwWc0syEg4fvr8n1yrhE gl5sroOdefY+s74PVNQMMK/l00xTCGtYCv7kWl3baBuI0QlWtI/Dw2AC+ULw+k68WjZWn3 0NHT7o1XYFfvTucLGD3We+BegWscUoU= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-OD6BDeCDN0quglzWkfOdEQ-1; Thu, 04 Apr 2024 06:40:42 -0400 X-MC-Unique: OD6BDeCDN0quglzWkfOdEQ-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2d6884f6de1so1640261fa.0 for ; Thu, 04 Apr 2024 03:40:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712227241; x=1712832041; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gEu4cBn378/joci9QMSBd+Fr2ZU6q36lFExgj65cyUc=; b=n/W7l8X21i6jbcxE4441bvHSGHkFK0YLmNtIi7IrQbbpO9lm5hvCqHoiGowx/poR8H Gv4T3AmLhjYE79cVo2k3oAFbz4dt7Td40dphTgfYhkNdqJzLlRBAXuAjMgIlBw7xaPkO B5uh5nr8cQXw/J++NpTVvc/+6FuPP9A14wMbCoNHdNrPyizeQWi/OmShvM73JCqskFlm i7ZFA3Q37Y/agBs4iZTN5TyIA8U+PZ+UlSXuFC19QaGuFpjGGmbyizf4a7euyQiHAmht 95tNw1fLiaYl2EOxcKwrl3XiyJZ94QiQdaT/cS7Bmtzi/TwyrrKjaaLwzMtV5CwKTWFg BJ4g== X-Gm-Message-State: AOJu0YxUjW1OtmY7C0SquWhA8walZlsKQL1XIU7LHa7vNuPSEiA5BEY4 8G0zm0crj2Levoh/Ljp6NXkERVx9DVaJohyyUHUrz6JeDK2Pe2YzFnz7fflyirQguU/xXaeZxpa vUNo0WLuG4h4uExMJjp4zVMJF4Y0PM0XByxvzOWxUkWP9rwt5WTWi3WCec21DtA== X-Received: by 2002:a2e:8495:0:b0:2d4:25c5:df1e with SMTP id b21-20020a2e8495000000b002d425c5df1emr1381601ljh.5.1712227241078; Thu, 04 Apr 2024 03:40:41 -0700 (PDT) X-Received: by 2002:a2e:8495:0:b0:2d4:25c5:df1e with SMTP id b21-20020a2e8495000000b002d425c5df1emr1381580ljh.5.1712227240636; Thu, 04 Apr 2024 03:40:40 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-247-213.dyn.eolo.it. [146.241.247.213]) by smtp.gmail.com with ESMTPSA id bg35-20020a05600c3ca300b004162020cee2sm2314012wmb.4.2024.04.04.03.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:40:40 -0700 (PDT) Message-ID: <7c8be16329668d343a971e265e923543cba5e304.camel@redhat.com> Subject: Re: [PATCH net-next v5 1/2] net: ethernet: ti: am65-cpts: Enable RX HW timestamp for PTP packets using CPTS FIFO From: Paolo Abeni To: Chintan Vankar , Dan Carpenter , Siddharth Vadapalli , Heiner Kallweit , Andrew Lunn , Roger Quadros , Richard Cochran , Jakub Kicinski , Eric Dumazet , "David S. Miller" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Date: Thu, 04 Apr 2024 12:40:38 +0200 In-Reply-To: <20240402114405.219100-2-c-vankar@ti.com> References: <20240402114405.219100-1-c-vankar@ti.com> <20240402114405.219100-2-c-vankar@ti.com> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhb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KujlTuUTpoyT3xwAzkmSxN1nABoutHEO/N87fpIbpbZaIdinF7b9srwUvDOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2024-04-02 at 17:14 +0530, Chintan Vankar wrote: > Add a new function "am65_cpts_rx_timestamp()" which checks for PTP > packets from header and timestamps them. >=20 > Add another function "am65_cpts_find_rx_ts()" which finds CPTS FIFO > Event to get the timestamp of received PTP packet. >=20 > Signed-off-by: Chintan Vankar > --- >=20 > Link to v4: > https://lore.kernel.org/r/20240327054234.1906957-1-c-vankar@ti.com/ >=20 > Changes from v4 to v5: > - Updated commit message. > - Replaced "list_del_entry()" and "list_add()" functions with equivalent > "list_move()" function. >=20 > drivers/net/ethernet/ti/am65-cpts.c | 64 +++++++++++++++++++++++++++++ > drivers/net/ethernet/ti/am65-cpts.h | 6 +++ > 2 files changed, 70 insertions(+) >=20 > diff --git a/drivers/net/ethernet/ti/am65-cpts.c b/drivers/net/ethernet/t= i/am65-cpts.c > index c66618d91c28..bc0bfda1db12 100644 > --- a/drivers/net/ethernet/ti/am65-cpts.c > +++ b/drivers/net/ethernet/ti/am65-cpts.c > @@ -906,6 +906,70 @@ static int am65_skb_get_mtype_seqid(struct sk_buff *= skb, u32 *mtype_seqid) > return 1; > } > =20 > +static u64 am65_cpts_find_rx_ts(struct am65_cpts *cpts, u32 skb_mtype_se= qid) > +{ > + struct list_head *this, *next; > + struct am65_cpts_event *event; > + unsigned long flags; > + u32 mtype_seqid; > + u64 ns =3D 0; > + > + am65_cpts_fifo_read(cpts); > + spin_lock_irqsave(&cpts->lock, flags); am65_cpts_fifo_read() acquires and releases this same lock. If moving to a lockless schema is too complex, you should at least try to acquire the lock only once. e.g. factor out a lockless __am65_cpts_fifo_read variant and explicitly acquire the lock before invoke it. > + list_for_each_safe(this, next, &cpts->events) { > + event =3D list_entry(this, struct am65_cpts_event, list); > + if (time_after(jiffies, event->tmo)) { > + list_del_init(&event->list); > + list_add(&event->list, &cpts->pool); Jakub suggested to use list_move() in v4, you should apply that here, too. Cheers, Paolo