From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len Date: Tue, 23 Jan 2018 10:17:03 -0800 Message-ID: References: <20180119230933.10009-1-xiyou.wangcong@gmail.com> <20180119230933.10009-3-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Linux Kernel Network Developers To: Cong Wang Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:35860 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796AbeAWSRP (ORCPT ); Tue, 23 Jan 2018 13:17:15 -0500 Received: by mail-pf0-f193.google.com with SMTP id 23so954880pfp.3 for ; Tue, 23 Jan 2018 10:17:15 -0800 (PST) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 01/23/2018 10:07 AM, Cong Wang wrote: > On Mon, Jan 22, 2018 at 2:44 PM, Cong Wang wrote: >> >> Good point, but netdev_for_each_tx_queue() doesn't handle errors >> in current code base, it is not trivial to make it returning int to reflect >> errors, since we have to rollback a partial failure too. > > I think for now we can just check for errors but not rollback, > at least attach_default_qdiscs() does not rollback either. > And I will add a comment saying we need to do it in future. > Sorry I delayed responding was thinking about some solutions. Unrolling is problematic because we may fail again on the unroll :( so I guess for this to work we would need a two phase operation with a prep and commit phase. So agree for now checking for errors seems reasonable and is at least better than without the patches. And as you say another patch set can cleanup the bigger issue of rollback. Thanks, .John