From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C790BC433E0 for ; Fri, 26 Feb 2021 14:23:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74B0B64EE1 for ; Fri, 26 Feb 2021 14:23:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbhBZOWz (ORCPT ); Fri, 26 Feb 2021 09:22:55 -0500 Received: from mxout70.expurgate.net ([91.198.224.70]:58921 "EHLO mxout70.expurgate.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbhBZOWv (ORCPT ); Fri, 26 Feb 2021 09:22:51 -0500 Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1lFdzG-000FB0-Ps; Fri, 26 Feb 2021 15:20:58 +0100 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFdzF-000PO6-IK; Fri, 26 Feb 2021 15:20:57 +0100 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id B884A240041; Fri, 26 Feb 2021 15:20:56 +0100 (CET) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 12F2E240040; Fri, 26 Feb 2021 15:20:56 +0100 (CET) Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id 7E2A4200E1; Fri, 26 Feb 2021 15:20:55 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 26 Feb 2021 15:20:55 +0100 From: Martin Schiller To: Xie He Cc: Jakub Kicinski , Leon Romanovsky , "David S. Miller" , Linux X25 , Linux Kernel Network Developers , LKML , Krzysztof Halasa , Jonathan Corbet , linux-doc@vger.kernel.org Subject: Re: [PATCH net-next RFC v4] net: hdlc_x25: Queue outgoing LAPB frames Organization: TDT AG In-Reply-To: References: <20210216201813.60394-1-xie.he.0141@gmail.com> <20210219103948.6644e61f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <906d8114f1965965749f1890680f2547@dev.tdt.de> Message-ID: X-Sender: ms@dev.tdt.de User-Agent: Roundcube Webmail/1.3.16 X-purgate-type: clean X-purgate: clean X-purgate-ID: 151534::1614349258-000052FF-44B5BAFB/0/0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2021-02-22 09:56, Xie He wrote: > On Sun, Feb 21, 2021 at 11:14 PM Martin Schiller wrote: >> >> I'm not really happy with this change because it breaks compatibility. >> We then suddenly have 2 interfaces; the X.25 routings are to be set >> via >> the "new" hdlc_x25 interfaces instead of the hdlc interfaces. >> >> I currently just don't have a nicer solution to fix this queueing >> problem either. On the other hand, since the many years we have been >> using the current state, I have never noticed any problems with >> discarded frames. So it might be more a theoretical problem than a >> practical one. > > This problem becomes very serious when we use AF_PACKET sockets, > because the majority of frames would be dropped by the hardware > driver, which significantly impacts transmission speed. What I am > really doing is to enable adequate support for AF_PACKET sockets, > allowing users to use the bare (raw) LAPB protocol. If we take this > into consideration, this problem is no longer just a theoretical > problem, but a real practical issue. I have now had a look at it. It works as expected. I just wonder if it would not be more appropriate to call the lapb_register() already in x25_hdlc_open(), so that the layer2 (lapb) can already "work" before the hdlc_x25 interface is up. Also, I have a hard time assessing if such a wrap is really enforceable. Unfortunately I have no idea how many users there actually are. > > If we don't want to break backward compatibility, there is another > option: > We can create a new API for the HDLC subsystem for stopping/restarting > the TX queue, and replace all HDLC hardware drivers' netif_stop_queue > and netif_wake_queue calls with calls to this new API. This new API > would then call hdlc_x25 to stop/restart its internal queue. > > But this option would require modifying all HDLC hardware drivers' > code, and frankly, not all HDLC hardware drivers' developers care > about running X.25 protocols on their hardware. So this would cause > both hardware driver instabilities and confusion for hardware driver > developers.