Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1647124pxb; Sun, 18 Apr 2021 02:30:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7kwgryJWO5xp5jc5eRDZxyNejQHd++V7fe/uXU4wHPNQe7wCvQyKJXxA0z/0dInrCoD+z X-Received: by 2002:a17:906:3111:: with SMTP id 17mr16477852ejx.403.1618738244901; Sun, 18 Apr 2021 02:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618738244; cv=none; d=google.com; s=arc-20160816; b=kpSfOAlPp1MgxCiW5Ague3/5gnM7RZ9PkRefkbpkvt+MBp0CXOYB7z/Z3TVvXjz/nw gir3nCasdDa3CFA9TqvSnWKa4oiBA0DddEIP+SoffLedfPtiuQtGM2qMUgCUfDPjCNX6 VfZperU+pCfYxiJg8WJ7iGnLPZqFg4Mt4wZHsRJgowSDQIJSqwoucjJsaUzJLsF7JQuj 9qyJu3bRaDev520l0sIdnjPirOgcrbBTGBJbeLF5mqKiS10egaQ44Qm+vL91O9bQnjqz McYAN+TWo6HWavXnDhctj2BjIElmG3hppZBjgMRXc+I5PGzlW6A+1C9X5Y8Uq8BK5EHW CJ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v/1M/L499hZyI5mn763mhocGrkehyzJ4CL0gqtMtDDM=; b=sMQGBGYKsxqXK6InMJ7MtM9GFtzLFez6PrhzR68qlQEkNxNFhdqIHtYhpboDJzeJn9 bQhLe/RverBU9PdQjapyF+BlSPlrUpxj5C8JeJ9kRj4+F/P6S/AcHuwRAKXlknGEGBU4 K+l8buw91y7JYG723+CW+aQW6vfbfNtb8Umlk4bXKacp6NF8oo7pVHfvUWqAF9fOdR+T MUUtEdHNRG21wvDl0eAgROy8w0VaV6zOghBqZWV2EexGpN+jAPekR1AxFW+YhHYJ0op9 RkUpysSQ/f3vYu3FD3JKc8ouE8+09WjugroSsHXrHp0bRw9RFsShtzW0BP66EIPfE5op sUNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uT1F1Egj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 27si9520066ejx.312.2021.04.18.02.30.19; Sun, 18 Apr 2021 02:30:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uT1F1Egj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229976AbhDRJ2E (ORCPT + 99 others); Sun, 18 Apr 2021 05:28:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbhDRJ2D (ORCPT ); Sun, 18 Apr 2021 05:28:03 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 469AAC06174A; Sun, 18 Apr 2021 02:27:34 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id j7so253792eds.8; Sun, 18 Apr 2021 02:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=v/1M/L499hZyI5mn763mhocGrkehyzJ4CL0gqtMtDDM=; b=uT1F1EgjLkeQQbIEx9YANIteIS7ppt5WXtaUy+UwfYnJK4YLxRo3a4qCJ98WIUSviK O827UdpPE+1p8kZG23t0fZ61gNLMD6lJluDR56Fk860fl8sAwQitVenM+T0EGPfcligE /jOficIOYSPeJj2B02msKciWADzdJJdve6aCZAE7Y968cPpbZWEjmM6qndN4aS32WSz9 pCtQJCW+HbCMnRT5XxlIitYc31w6hP9Lcv+E1zOEWftiU5vq+AXwcGpB031LEkei7yhJ cxIuv05ETQev6gvNYf2xmwv93GP4rRv3vxxMvBHK3DelmfigCqzn3eKM0wC7LczeCkBz 0RBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=v/1M/L499hZyI5mn763mhocGrkehyzJ4CL0gqtMtDDM=; b=Wgw4+47dzbQOMfRH9ceBTjRpNCNR1hlzUe2dO1atBnKEPL5H94yWvtJJjGMFQ3go0U q5ty65FneVfTU4p087ZI/XpJWWfRlGh19F9WEx8/JQQIRQlfYIDchEE6IZ/0CPjMa758 9gaiVte2sJpt3IdWRQehm569t0Jel/BP8//kNipjPYgdT7TyriEnxd8voGOjNz/Ctjqh LliFjxwSv7zpimt6kKj9olUp0udLlV8U5fdoZ25dzdszHUqRAp9ngia93o6ovbzGl0Lc RM3VjAE1lL+tgVnepw1pZntrIqZQJ97jm5aSHRjTIabWjPnllwzp99kGnh6in6G7Id2P CxEw== X-Gm-Message-State: AOAM5328k8GBP3k/rOt7bD+lOtuxvWw5FweP1Jk5n/90m1hg2p/Lwm0M UxEHLgQZn/PVYQLfRP22Uio= X-Received: by 2002:a05:6402:1685:: with SMTP id a5mr19523633edv.185.1618738052983; Sun, 18 Apr 2021 02:27:32 -0700 (PDT) Received: from skbuf (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id n12sm3476887edw.95.2021.04.18.02.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 02:27:32 -0700 (PDT) Date: Sun, 18 Apr 2021 12:27:31 +0300 From: Vladimir Oltean To: Yangbo Lu Cc: netdev@vger.kernel.org, Richard Cochran , Vladimir Oltean , "David S . Miller" , Jakub Kicinski , Jonathan Corbet , Kurt Kanzenbach , Andrew Lunn , Vivien Didelot , Florian Fainelli , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next 2/3] net: mscc: ocelot: convert to ocelot_port_txtstamp_request() Message-ID: <20210418092731.jmuio2terv2spa3h@skbuf> References: <20210416123655.42783-1-yangbo.lu@nxp.com> <20210416123655.42783-3-yangbo.lu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210416123655.42783-3-yangbo.lu@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 16, 2021 at 08:36:54PM +0800, Yangbo Lu wrote: > Convert to a common ocelot_port_txtstamp_request() for TX timestamp > request handling. > > Signed-off-by: Yangbo Lu > --- > drivers/net/dsa/ocelot/felix.c | 14 +++++--------- > drivers/net/ethernet/mscc/ocelot.c | 24 +++++++++++++++++++++--- > drivers/net/ethernet/mscc/ocelot_net.c | 18 +++++++----------- > include/soc/mscc/ocelot.h | 5 +++-- > 4 files changed, 36 insertions(+), 25 deletions(-) > > diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c > index cdec2f5e271c..5f2cf0f31253 100644 > --- a/drivers/net/dsa/ocelot/felix.c > +++ b/drivers/net/dsa/ocelot/felix.c > @@ -1399,18 +1399,14 @@ static bool felix_txtstamp(struct dsa_switch *ds, int port, > struct sk_buff *skb, struct sk_buff **clone) > { > struct ocelot *ocelot = ds->priv; > - struct ocelot_port *ocelot_port = ocelot->ports[port]; > > - if (ocelot->ptp && ocelot_port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) { > - *clone = skb_clone_sk(skb); > - if (!(*clone)) > - return false; > + if (!ocelot->ptp) > + return false; > > - ocelot_port_add_txtstamp_skb(ocelot, port, *clone); > - return true; > - } > + if (ocelot_port_txtstamp_request(ocelot, port, skb, clone)) > + return false; > > - return false; > + return true; Considering the changes you'll have to make to patch 1 (changing the return value and populating DSA_SKB_CB(skb)->clone at the end of this function: Reviewed-by: Vladimir Oltean