Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp973130lql; Tue, 12 Mar 2024 03:54:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzxcYz0bLfp82qIr0YULBp6HqXO2zMgHUKVgtD6BlOfJxoXM+s1SZgnBHtmAP665eMtADwme2+Hm59Qmn+b4B3csjedTgkM3OeI6chJw== X-Google-Smtp-Source: AGHT+IFSC913jhkELfD2v5Cr0VSTSb/h/TqEvrKzpLdwMeu5gPNlfugippe6EfK+r0HZbOs2YUC5 X-Received: by 2002:a17:90a:fa10:b0:29b:976d:b5b2 with SMTP id cm16-20020a17090afa1000b0029b976db5b2mr2780803pjb.17.1710240897854; Tue, 12 Mar 2024 03:54:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710240897; cv=pass; d=google.com; s=arc-20160816; b=JgZXAYGjqYPRrCguxtMOjzAf1g0U5pYUipMpWelnzJvpjfnnUv1bQlfQuFbOF/PRt9 KrmUvt98wcvDMpHUe9C1U7wOes5Za48nUiGlHjB6/pMx9qg9iCnQAt58x0aBTpjJSHiC GhqCG/yiBX6MYSO4xVA8lqXUXmjYgzS0N8pCa0FQoDMYD/9SyUZ3Ps035roxPs96fDjM 8JLW6C22Xb/BNYgWAucZl5L1yC2OI+nZW0SSRs/XRER7jfD+kVUWR43kY9Yo48QOt/9Y kc8keFWoG6Fz+0fbisheSWnPR61yHcJhC9entmfzH/bGRdMVAlv2Wzt4Vr/W9yyWUsqA JfLg== 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=svJBs6ZSFI76DADWJEw/YqilQwWjyKwiwB1uTQI4XK8=; fh=KhbjzQPCXqVO12xsq/yEonGnBU/AbRkw3zFXLaPaRSM=; b=TmSwSDIvR4QEfsjVtOEVV55IGY75s9XJArvBHm0FiyJ45DgzUuqHlI/UjlWLRlpetj xC7ba5MCAdwc61Zb+gpDXoZFkdK6mewpv1H7qSyeNkSWYcfZ3iWPHmA1t1zdmXpiwx99 CInK9yu2JMl72VCvcqqwczlqTdJISZeZ7TPJDc0DU43nAmF8/Zo8UzSrq+f+6kkAJX97 d8fAYR7hfNGKeOgUoI17R6zJvDDr/354+t5Gb8/R43dqzpZEc3+nji2pm4XR+Bv+t76k OFN3MH5vv5PTBmh8RgVfV92xAHb1B3A1jRf2VB0/HDEles6EycxQ8t0g0WDs204hGxFH J1Cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e9fb7J6P; 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-100142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id w20-20020a17090a8a1400b0029bafb3a527si8422354pjn.151.2024.03.12.03.54.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 03:54:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e9fb7J6P; 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-100142-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100142-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3A2EBB22400 for ; Tue, 12 Mar 2024 10:50:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84B5E78695; Tue, 12 Mar 2024 10:50:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="e9fb7J6P" 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 D88EB2572 for ; Tue, 12 Mar 2024 10:50:36 +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=1710240638; cv=none; b=J+gcuJ3pvRTN+OOHHv9z9uvK/D6nlx9afBvrjPjWNJBgr5yxXx4Ig1VHJkK9ShzjPph8L/wvSuobY0ddvHWRBy6/eky9LgehkhrSnlChzA+gLHqfVmMV2SI2QZfCTHcizGb+6goRrCLImYzqu9YPd1L+AMx1z9pvnsiODK2wIW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710240638; c=relaxed/simple; bh=I2NqWB5cKvQto9fV3SpLZWdY5q6ODb3FJ2D3h10i79s=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=ZuI4tIA93fft7aBC0lXvL5PQkTqdOf6ELy00iaS5v6ocLmhjddL9dV9BC20ptE7L+OxThH5XsHYm+gWzTWOJQMOaHhdD6Vd4UWF6Q/rZuh+Neel0GsfOSdb9Ncbu3tuwAvKMTHMY5EjLvjMAUI+nMiAdSGZA8odrz3U1TxGYDcc= 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=e9fb7J6P; 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=1710240635; 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=svJBs6ZSFI76DADWJEw/YqilQwWjyKwiwB1uTQI4XK8=; b=e9fb7J6Pp9OdXqvjzOE5/e/JMjLOuxnoTCaYxYwE09K+XNLw9Of40m+buobdRVVwMJIFER vNvsnl105VJIx8nHWEj9AgbMIeX1mEMxrlSz3D9W7hWgT+4HQ28SEHp7m5GWBVkQyFbjib B2SEzeAvYAxrGErKm7W978xRc//74JE= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-189-uN7hNRTPMqC48fHBoncYtA-1; Tue, 12 Mar 2024 06:50:34 -0400 X-MC-Unique: uN7hNRTPMqC48fHBoncYtA-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-56827399088so932674a12.0 for ; Tue, 12 Mar 2024 03:50:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710240633; x=1710845433; 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=svJBs6ZSFI76DADWJEw/YqilQwWjyKwiwB1uTQI4XK8=; b=gXfM6LiBH/H25XZOUPRkmSBEsWzbR5GltxjKtTmJJ++exnb4NJivKGCRgoyVS5ZpW9 v4EyfRZf3x/BiZ/VWTODOdCkh9wDxb+msC0W6TClXTHE7g9quABhhjndNjpzJh5LzHcO MDSjrx49m8Yt7R5s6ZdQlvDrEHCuEvzSNgvT0qFQQQYiaCljUvZfwJxmFdf0pwTzveJ9 zyyVsMYjcd4mp3xKCADOtDyvcxZY63fbnKMRRpv8QXLHahHOb3PT2ydIhI3dUAN4Z5HO BmI4WkHqbok4w7LRzJMUZ8YN03vPh6ibjXmB5AYTlOMYT0Y2VTD1RagZAOufCREeS8t7 m1TQ== X-Gm-Message-State: AOJu0Yz6O08rjERgdgrTiuCm1HER79U/aV4L2JRUnIwJv4NiZS9Xa2u0 wmel+hbf1YqhjsEnAr/yC/yxzX2eT7fPajZfZcUXkMy1SVvpp9E08ngH1ZBKg0JjkcuOnnMrfLw /jpJVQRvKm0XMl4y3tHcgaXZ6YYv+3icj7ycQAH1jZOcj8Y+AFCLyreVHDKEIqQ== X-Received: by 2002:a17:906:32c3:b0:a45:dd12:5e30 with SMTP id k3-20020a17090632c300b00a45dd125e30mr5999623ejk.2.1710240633351; Tue, 12 Mar 2024 03:50:33 -0700 (PDT) X-Received: by 2002:a17:906:32c3:b0:a45:dd12:5e30 with SMTP id k3-20020a17090632c300b00a45dd125e30mr5999597ejk.2.1710240632946; Tue, 12 Mar 2024 03:50:32 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-226-128.dyn.eolo.it. [146.241.226.128]) by smtp.gmail.com with ESMTPSA id gt20-20020a1709072d9400b00a46025483c7sm3449266ejc.72.2024.03.12.03.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 03:50:32 -0700 (PDT) Message-ID: Subject: Re: [PATCH v2 1/3] net: ethernet: ti: am65-cpts: Enable PTP RX HW timestamp using CPTS FIFO From: Paolo Abeni To: Chintan Vankar , Dan Carpenter , Siddharth Vadapalli , Heiner Kallweit , Vladimir Oltean , Grygorii Strashko , Andrew Lunn , Roger Quadros , Richard Cochran , Jakub Kicinski , Eric Dumazet , "David S. Miller" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Date: Tue, 12 Mar 2024 11:50:30 +0100 In-Reply-To: <20240312100233.941763-1-c-vankar@ti.com> References: <20240312100233.941763-1-c-vankar@ti.com> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0/Pd1pdQEiRuvfM5DUXDo/YOZLV0NfRFU9SmtIPhbdm9cV8Hf8mUwubihiJB/9zPvVq8xfiVbdT0sPzBtxW0fXwrbFxYAOFvT0UC2MjlIsukjmXOUJtdZ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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-03-12 at 15:32 +0530, Chintan Vankar wrote: > diff --git a/drivers/net/ethernet/ti/am65-cpts.c b/drivers/net/ethernet/t= i/am65-cpts.c > index c66618d91c28..6c1d571c5e0b 100644 > --- a/drivers/net/ethernet/ti/am65-cpts.c > +++ b/drivers/net/ethernet/ti/am65-cpts.c > @@ -859,29 +859,6 @@ static long am65_cpts_ts_work(struct ptp_clock_info = *ptp) > return delay; > } > =20 > -/** > - * am65_cpts_rx_enable - enable rx timestamping > - * @cpts: cpts handle > - * @en: enable > - * > - * This functions enables rx packets timestamping. The CPTS can timestam= p all > - * rx packets. > - */ > -void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en) > -{ > - u32 val; > - > - mutex_lock(&cpts->ptp_clk_lock); > - val =3D am65_cpts_read32(cpts, control); > - if (en) > - val |=3D AM65_CPTS_CONTROL_TSTAMP_EN; > - else > - val &=3D ~AM65_CPTS_CONTROL_TSTAMP_EN; > - am65_cpts_write32(cpts, val, control); > - mutex_unlock(&cpts->ptp_clk_lock); > -} > -EXPORT_SYMBOL_GPL(am65_cpts_rx_enable); It looks like the above chunk will cause a transient build break, as the function is still in use and the caller will be removed by the next patch. I guess you should move this chunk there. > - > static int am65_skb_get_mtype_seqid(struct sk_buff *skb, u32 *mtype_seqi= d) > { > unsigned int ptp_class =3D ptp_classify_raw(skb); > @@ -906,6 +883,72 @@ 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, struct sk_buff *= skb, > + int ev_type, u32 skb_mtype_seqid) > +{ > + 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); > + 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); > + continue; > + } > + > + mtype_seqid =3D event->event1 & > + (AM65_CPTS_EVENT_1_MESSAGE_TYPE_MASK | > + AM65_CPTS_EVENT_1_SEQUENCE_ID_MASK | > + AM65_CPTS_EVENT_1_EVENT_TYPE_MASK); > + > + if (mtype_seqid =3D=3D skb_mtype_seqid) { > + ns =3D event->timestamp; > + list_del_init(&event->list); > + list_add(&event->list, &cpts->pool); > + break; > + } > + } > + spin_unlock_irqrestore(&cpts->lock, flags); Ouch, you have to acquire an additional lock per packet and a lot of cacheline dithering. Not strictly necessary for this series, but I suggest to invest some time reconsidering this schema, it looks bad from performance pov. Possibly protecting the list with RCU and leaving the recycle to the producer could help. Additionally net-next is currently closed for the merge window, please post the new revision (including the target tree in the subj prefix) when net-next will re-open in ~2weeks. Cheers, Paolo