From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA574C433E0 for ; Wed, 10 Mar 2021 19:53:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A4A264FCA for ; Wed, 10 Mar 2021 19:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232741AbhCJTwr (ORCPT ); Wed, 10 Mar 2021 14:52:47 -0500 Received: from mga09.intel.com ([134.134.136.24]:49262 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233461AbhCJTwg (ORCPT ); Wed, 10 Mar 2021 14:52:36 -0500 IronPort-SDR: H1Y/xfKNuv+gmic8PNu0tseiTIbxDeiSfmK/Pm+CygFhXDWwFEafu3g0Yr2o3MrvQnTN4a33jh +yYN7alfF3Ew== X-IronPort-AV: E=McAfee;i="6000,8403,9919"; a="188649985" X-IronPort-AV: E=Sophos;i="5.81,238,1610438400"; d="scan'208";a="188649985" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 11:52:36 -0800 IronPort-SDR: 86BZN4aqO845YyhwGwzqwZU7t/4d0A71QBDYydWd9TaM6lrnCweNxrj/ImSNPW+RLSlj8+kohk HXhTYk2Gwh7A== X-IronPort-AV: E=Sophos;i="5.81,238,1610438400"; d="scan'208";a="448023849" Received: from jldelgad-mobl.amr.corp.intel.com (HELO vcostago-mobl2.amr.corp.intel.com) ([10.212.7.99]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 11:52:35 -0800 From: Vinicius Costa Gomes To: Vladimir Oltean , Jakub Kicinski , netdev@vger.kernel.org, Po Liu , Claudiu Manoil Cc: Richard Cochran Subject: Re: [PATCH net-next] net: add a helper to avoid issues with HW TX timestamping and SO_TXTIME In-Reply-To: <20210310145044.614429-1-vladimir.oltean@nxp.com> References: <20210310145044.614429-1-vladimir.oltean@nxp.com> Date: Wed, 10 Mar 2021 11:52:34 -0800 Message-ID: <87k0qen5vh.fsf@vcostago-mobl2.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Vladimir Oltean writes: > As explained in commit 29d98f54a4fe ("net: enetc: allow hardware > timestamping on TX queues with tc-etf enabled"), hardware TX > timestamping requires an skb with skb->tstamp = 0. When a packet is sent > with SO_TXTIME, the skb->skb_mstamp_ns corrupts the value of skb->tstamp, > so the drivers need to explicitly reset skb->tstamp to zero after > consuming the TX time. > > Create a helper named skb_txtime_consumed() which does just that. All > drivers which offload TC_SETUP_QDISC_ETF should implement it, and it nitpick: to my ears, it seems that you meant "call"/"use" instead of "implement". > would make it easier to assess during review whether they do the right > thing in order to be compatible with hardware timestamping or not. > > Suggested-by: Vinicius Costa Gomes > Signed-off-by: Vladimir Oltean > --- Acked-by: Vinicius Costa Gomes Cheers, -- Vinicius