Received: by 10.223.176.5 with SMTP id f5csp1699121wra; Sun, 28 Jan 2018 06:35:32 -0800 (PST) X-Google-Smtp-Source: AH8x2249P/MdY7EcSjovVqs7jWPRQyZiZQeyE3/dIl+UsYsNUHA4w9pOFNZWRk044YDoum3mdLA1 X-Received: by 10.101.67.193 with SMTP id n1mr19455814pgp.116.1517150132529; Sun, 28 Jan 2018 06:35:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517150132; cv=none; d=google.com; s=arc-20160816; b=yPapLoR8X5kOr9jnOUd6AezB4ro4mNPTTq2Nw68vheir3m9WkdLjXNYXQ6c0w1ZXEf hTTQ0eGvF52CKIJbOE+NzB6YE+vXDfqHaPg5RVdbdwvJlQ9mREK5OVX5t0NqedePGfAs JLXWZNTMGO2EBcQXI71lHHzjhIm2rAXq1rRinfaaKXWglmRM1eKbnYYrWEHiSg+8GHBg SbwNEe3u8LoDUPexke7XtJP6lYZ/axAbw6vmfyU01PIezA+9CKLZHMXaEtv1C7fPUiCo gIAQ6Ji5IXzDZzlIshU6KbuqNK3vmpixpg4fKKbBJ5CGUiXkKYBd11yDu9BbPkrht6WT 0T8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=yPwvHuh9NLKAOu7kVArrjr1ZgAtm+L1FrUD0hwNuQh8=; b=WupCgZUtFl8Sf8vQcqvx7JupsvjKsYoClxcactmjgprnNa+GEGcBfXnOG74g7/a9SZ pwTc3OY8QC/9sIQ3RWFG9AWryKaOzkhhzIOSPRAw/sIgd0Eu+pvHP7VRlrVq9UzU4kjO Bg9iKbj7BMgW3O0gI4GYuGWF+qau4Idz6yNQBINlFoFFujCB/ultSyUUZLXOrtvuXwCj ABtagGjPBcHWQ0QS3h9OOtSCxJb77kmAokYAID9ZgPf/r49tmNxgYDHTtMlNGIltEpMu mhCXXWD8kKJDLwOT9o1mzSMs2hVMeVkZBaKCuE6PZf1Cn1oseEUuDQRRTPxi5mB5XwCX InAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12-v6si7163028plk.425.2018.01.28.06.35.18; Sun, 28 Jan 2018 06:35:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbeA1OeI convert rfc822-to-8bit (ORCPT + 99 others); Sun, 28 Jan 2018 09:34:08 -0500 Received: from inx.pm.waw.pl ([91.202.125.194]:49603 "EHLO inx.pm.waw.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbeA1OeG (ORCPT ); Sun, 28 Jan 2018 09:34:06 -0500 X-Greylist: delayed 585 seconds by postgrey-1.27 at vger.kernel.org; Sun, 28 Jan 2018 09:34:06 EST Received: by inx.pm.waw.pl (Postfix, from userid 2530) id DB8162993F; Sun, 28 Jan 2018 15:10:34 +0100 (CET) From: Krzysztof Halasa To: Denis Du Cc: David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Carrier detect ok, don't turn off negotiation References: <751079597.1884905.1516121905374.ref@mail.yahoo.com> <751079597.1884905.1516121905374@mail.yahoo.com> <20180122.152513.1108868799788445512.davem@davemloft.net> <998451043.3408644.1516727290310@mail.yahoo.com> Date: Sun, 28 Jan 2018 15:24:16 +0100 In-Reply-To: <998451043.3408644.1516727290310@mail.yahoo.com> (Denis Du's message of "Tue, 23 Jan 2018 17:08:10 +0000 (UTC)") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Denis Du writes: >>From the above code, I can get that only Carrier have some change, it > will restart the protocol by hdlc_proto_start(dev);and thus the timer, > the previous timer expired due to protocol fail. > > If carrier keep no change by if (hdlc->carrier == on) >         goto carrier_exit; /* no change in DCD line level */It will do > nothing, not start any new protocol and thus the timer. Sorry about being late, just returned home and am trying to get all the backlogs under control. I remember the PPP standard is a bit cloudy about the possible issue, but the latter indeed exists (the PPP state machine was written directly to STD-51). There is related (more visible in practice, though we aren't affected) issue of "active" vs "passive" mode (hdlc_ppp.c is "active", and two "passives" wouldn't negotiate at all). Anyway the problem is real (though not very visible in practice, especially on relatively modern links rather than 300 or 1200 bps dialup connections) and should be fixed. Looking at the patch, my first impression is it makes the code differ from STD-51 a little bit. On the other hand, perhaps applying it as is and forgetting about the issue is the way to go. Ideally, I think the negotiation failure should end up (optionally, in addition to the current behavior) in some configurable sleep, then the negotiation should restart. If it's worth the effort at this point, I don't know. Perhaps I could look at this later, but no promises (this requires pulling on and setting up some legacy hardware). Anyway, since the patch is safe and can solve an existing problem: Acked-by: Krzysztof Halasa -- Krzysztof Halasa