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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 8E811C433B4 for ; Mon, 19 Apr 2021 06:46:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 614276101C for ; Mon, 19 Apr 2021 06:46:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237567AbhDSGrF (ORCPT ); Mon, 19 Apr 2021 02:47:05 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:43376 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233256AbhDSGrF (ORCPT ); Mon, 19 Apr 2021 02:47:05 -0400 From: Kurt Kanzenbach DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1618814794; 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: in-reply-to:in-reply-to:references:references; bh=qXQLGERhsSNeIwqSxvWOuT357Vy3ZJhmHq0+8ZCeYcc=; b=pPii5bN9MwHpzibsWOaN/JQEYaLDuLXw8jrKabJy4RtMt4LZ2+R3sMCrnEXHp3Ez1BqS06 ka7zL9xK5q7REX5n5a5za3A0vt3ovBkgZ8OGLw7BQlQfbJ6CPJWymI5uJvl9q8Z5Zg0LZY qe6c7XFv/1aSf+SDmHGOrOkvkYKAX7Ziv2f9Q7xlSlzUyfp0JqG6Ym6L2wI3ue0EqVYZpI jsMNp/AMuduxYYNRVHvg1zXvN3cizxzpZy36RMfw8gjJSjuOiwo6AebJeYBmyrjVuF+akW CYmCp2+sKqStCtJaBTNO6CSAjO4ItOYwpI0/E62/kLIclIvXPQ8ORe+tEd4Xjw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1618814794; 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: in-reply-to:in-reply-to:references:references; bh=qXQLGERhsSNeIwqSxvWOuT357Vy3ZJhmHq0+8ZCeYcc=; b=arsPGNtl1GtiP4AXseM/lEYzZ9mbyMPldbujH4Mf0NFPFrpyu98yi4CjQDpa8H0FVkK8+R JoC9CcefFtZ8mzCA== To: Yangbo Lu , netdev@vger.kernel.org Cc: Yangbo Lu , Richard Cochran , Vladimir Oltean , "David S . Miller" , Jakub Kicinski , Jonathan Corbet , 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 1/3] net: dsa: optimize tx timestamp request handling In-Reply-To: <20210416123655.42783-2-yangbo.lu@nxp.com> References: <20210416123655.42783-1-yangbo.lu@nxp.com> <20210416123655.42783-2-yangbo.lu@nxp.com> Date: Mon, 19 Apr 2021 08:46:33 +0200 Message-ID: <87k0oyzs8m.fsf@kurt> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org --=-=-= Content-Type: text/plain On Fri Apr 16 2021, Yangbo Lu wrote: > Optimization could be done on dsa_skb_tx_timestamp(), and dsa device > drivers should adapt to it. > > - Check SKBTX_HW_TSTAMP request flag at the very beginning, instead of in > port_txtstamp, so that most skbs not requiring tx timestamp just return. > > - No longer to identify PTP packets, and limit tx timestamping only for PTP > packets. If device driver likes, let device driver do. > > - It is a waste to clone skb directly in dsa_skb_tx_timestamp(). > For one-step timestamping, a clone is not needed. For any failure of > port_txtstamp (this may usually happen), the skb clone has to be freed. > So put skb cloning into port_txtstamp where it really needs. > > Signed-off-by: Yangbo Lu PTP still works. Tested-by: Kurt Kanzenbach # hellcreek --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEooWgvezyxHPhdEojeSpbgcuY8KYFAmB9J0kACgkQeSpbgcuY 8KZ8txAAnfpbhXSCEuUfR4ACDZwTqdlJxqHz1GE6AIuKLCcK6G1HuTLRN4f/Vjcq JKIZAJWN+OMSuAx4OrHqMaE79mlYxsd10gWybHoHbBliTWZt2QCMjpZ3kcqpgYHk QCWOAuuFq1DNENqRS+BL47W86OlhaPns37BAW+O8+4j3QxPfHAL2aYOlq9DZgEVP 5klbziOUS4Dg0Mvxc6k7gtm/ecJMZGG6PdvVnWRv9rllvTBsgJi4TrpXt/maZF7Y I1vsc8g755sXe6ds6EpppUsyXALVLv+/5ABGU+q5HvY5lXVTw4x3ohUmtG3+PLaq eH7cNBKrFuU5yvQupWOG3Fq5KA5d4WdD7izhBNYWyTxCnXsc6g4oUgsj/+Y/f48+ BtM3/mWJuYPIW4IL0JJP4OtB/OtTPrIfMyUFlNgwhc1NtQaojOS4KRhlkGLgjNeF oOSWt2c/CLAyq13VkubQAsFOP3/ro2fKqCUQ+fdr7w6ovRPywqlvDJKIF0gQ9dSI 0+XMkN1dhlpwrkyd8AyB4tcEaI8QgIBj7DILZSPNjXXbsIm8wMfnztPXJZEjM/Z0 ND9ET4vCIB6SxW3ctZdF0sICB8qEjnNNuJzQ1QEeNjK8ZUOizY9ijxLxwsNIFzs8 +RanrIUm043DUOcz6iPVr1h9myLlvMpI9qnxbiFtv7iKlui9vbs= =5c3T -----END PGP SIGNATURE----- --=-=-=--