Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2224827pxb; Sun, 18 Apr 2021 23:49:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysjiFX6zz5Y+SU/QTCsVf4KP0WR0Sd4y9pP3ATtijWhvE57dlGe+mpoaUc01HmX2ZSOTxU X-Received: by 2002:aa7:cb4c:: with SMTP id w12mr23462649edt.181.1618814943029; Sun, 18 Apr 2021 23:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618814943; cv=none; d=google.com; s=arc-20160816; b=cbc70Yp+WDTxXBKb3TR4AmXggyk0pywtltnQXTvrGNIPl5szvMZr6cdYBPVBI1WQLS kCzeuguCaz3JyvgwuTNq9QtnaeoPmkBgPkIf1NO4YtspGRyHrgRXNAZ6FZ0wucptUn/E D1nZUG4U74AkNKUcGeOCyB5yHxHgSWr6SM4BbH6MB2wsjjSmyn1OVuI2fqC92qcJBkdX CIXW1E3vCdSdMob3IoAmueYvSW+oN1kaCs4Eq6MXw63iz6N6c3GQ0xoyuFwQ935eVprz +626KwJFBVXE5F32G7zZI6g0+48KsJ+dShDEtFfEpYUkrIJWcUJHHq3humtidfM4XaGL d6ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=qXQLGERhsSNeIwqSxvWOuT357Vy3ZJhmHq0+8ZCeYcc=; b=ANRfuhQppoW62+T07nTUETiDi3P00/EFwULApWVGGhziElcsTeOcn+S26PC/0kJQ/i NTYPnm3cAqdu/rjiA2JnFomZaRa9NdCNYTXyfNbESkR0DWUfmkCysINWLrgHY6Glgyxo c6o8GzsoNaiXzPCw3JYNmPvd/RONGqyB1hp+bdhWES2q/HiDNm6CQOiI7FJLIiP+MEgB nVHVBw/RUC4iJ+4pgnLYmILBa5vkPQIB+3v4nNwkq0m4AMhdEY61lDXyPJfKZ1u7WV9V 7MvVr/i8agR3ZriPpygGzwswVdvIT+7vJd7F1+rvXqtpqZCPUuWeQ5cGI+BtIzZ/TsXG CGJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pPii5bN9; dkim=neutral (no key) header.i=@linutronix.de header.b=arsPGNtl; 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=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si2563882edz.510.2021.04.18.23.48.39; Sun, 18 Apr 2021 23:49:03 -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=@linutronix.de header.s=2020 header.b=pPii5bN9; dkim=neutral (no key) header.i=@linutronix.de header.b=arsPGNtl; 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=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237590AbhDSGrF (ORCPT + 99 others); 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-kernel@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----- --=-=-=--