Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753105AbcLHTES (ORCPT ); Thu, 8 Dec 2016 14:04:18 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:54835 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648AbcLHTEQ (ORCPT ); Thu, 8 Dec 2016 14:04:16 -0500 Subject: Re: [PATCH 3/6] net: ethernet: ti: cpts: add support of cpts HW_TS_PUSH To: Richard Cochran References: <20161128230428.6872-1-grygorii.strashko@ti.com> <20161128230428.6872-4-grygorii.strashko@ti.com> <20161203232130.GA17944@netboy> CC: "David S. Miller" , , Mugunthan V N , Sekhar Nori , , , Rob Herring , , Murali Karicheri , Wingman Kwok From: Grygorii Strashko Message-ID: <58eea45f-b8fe-6892-e784-b41638c62fd8@ti.com> Date: Thu, 8 Dec 2016 13:04:11 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161203232130.GA17944@netboy> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [128.247.83.173] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 946 Lines: 24 On 12/03/2016 05:21 PM, Richard Cochran wrote: > On Mon, Nov 28, 2016 at 05:04:25PM -0600, Grygorii Strashko wrote: >> This also change overflow polling period when HW_TS_PUSH feature is >> enabled - overflow check work will be scheduled more often (every >> 200ms) for proper HW_TS_PUSH events reporting. > > For proper reporting, you should make use of the interrupt. The small > fifo (16 iirc) could very well overflow in 200 ms. The interrupt > handler should read out the entire fifo at each interrupt. > huh. Seems this is not really good idea, because MISC Irq will be triggered for *any* CPTS event and there is no way to enable it just for HW_TS_PUSH. So, this doesn't work will with current code for RX/TX timestamping (which uses polling mode). + runtime overhead in net RX/TX caused by triggering more interrupts. May be, overflow check/polling timeout can be made configurable (module parameter). -- regards, -grygorii