Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950AbdLEVWJ (ORCPT ); Tue, 5 Dec 2017 16:22:09 -0500 Received: from mga01.intel.com ([192.55.52.88]:50268 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbdLEVWI (ORCPT ); Tue, 5 Dec 2017 16:22:08 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,365,1508828400"; d="scan'208";a="184384524" From: Vinicius Costa Gomes To: David Miller , rcochran@linutronix.de Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, andre.guedes@intel.com, anna-maria@linutronix.de, henrik@austad.us, jesus.sanchez-palencia@intel.com, john.stultz@linaro.org, tglx@linutronix.de Subject: Re: [PATCH RFC V1 net-next 0/6] Time based packet transmission In-Reply-To: <20170918.093436.1069699729581966538.davem@davemloft.net> References: <20170918.093436.1069699729581966538.davem@davemloft.net> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/25.3.1 (x86_64-pc-linux-gnu) Date: Tue, 05 Dec 2017 13:22:07 -0800 Message-ID: <87609kj2f4.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1430 Lines: 46 Hi David, David Miller writes: > From: Richard Cochran > Date: Mon, 18 Sep 2017 09:41:15 +0200 > >> - The driver does not handle out of order packets. If user space >> sends a packet with an earlier Tx time, then the code should stop >> the queue, reshuffle the descriptors accordingly, and then >> restart the queue. > > The user should simply be not allowed to do this. > > Once the packet is in the device queue, that's it. You cannot insert > a new packet to be transmitted before an already hw queued packet, > period. > > Any out of order request should be rejected with an error. Just to clarify, I agree that after after the packet is enqueued to the HW, there's no going back, in another words, we must never enqueue anything to the HW with a timestamp earlier than the last enqueued packet. But re-ordering packets at the Qdisc level is, I think, necessary: two applications (one (A) with period of 50us and the other (B) of 100us), if it happens that (B) enqueues its packet before (A), I think, we would have a problem. The problem is deciding for how long we should keep packets in the Qdisc queue. In the implementation we are working on, this is left for the user to decide. Or do you have a reason for not doing *any* kind of re-ordering? > > I'd say the same is true for requests to send packets timed > in the past. +1 Cheers, -- Vinicius