Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1249233pxb; Fri, 26 Feb 2021 06:25:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3H4/LWQFyiKH3hzVUK9dutGrU75GND5vRa0T+IvItgYGvPzoapEDp6M0Ik/1Xgiuw4cGM X-Received: by 2002:a17:906:f296:: with SMTP id gu22mr2770630ejb.20.1614349513141; Fri, 26 Feb 2021 06:25:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614349513; cv=none; d=google.com; s=arc-20160816; b=kel1vHTTnyXwbs2LrG4ISL89dBSdia7Gj+TAGdYjfGDOy/2qKoEvM5HR9eLBVtHV8t X1pux03XIYT2Iojn99QoHiP0BUxbNCdWw6ZefaGXmPm1OnZX2dSFbeyiCVB9jbN6H4Dn /hfIbh43tya/GUrGW5Nhk4j/3JvZpy6KvfaMxjsozdYu6OXJ2LiWoZpUolG9qiZTtovK fzqVjPbfPnY5c+xsD+xS1MSiohuDBcInNS0hD46xi/zk3C3GqktjjJaVXwHsevtKsKoj 3s3tfC5qq+FULYpF4Pc4oN/HnpA3M7OKzwS/QJd/R29O7y6B6Yh9aL3dxl6nB3LNXXLN 6/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :organization:subject:cc:to:from:date:content-transfer-encoding :mime-version; bh=hRDhNH8tBAJZ4qZX18BywT1CBPdETpdsL2u4SaCIPm4=; b=Iycn1g/LSnFMgJP56trDB69Wtt9kOv1yv4GYQUImao7oLesM4EUU0F8n2WSmNvcKYW otUml4hCgbBJKFCeOJLgkvVxXcSBaqCTfokQtPyx3lC0tD6mQFtdUBn8tzC5UuYl7qdN rU3QOGHmOF+t5dm4QAk1jYp43Mbtzei3xPEVLvy1ByZMiqNCCO0zoqfX79tkDeyCCd3e AfNhKFgmCtIEGXSd/lqzvH/00WMn/OF8NYEDK60ECvZcqlkx0x1OwUBPegeH40/vgSGU 23Rmb8T/avTM4w+JrGLvCZSNY34dHzGqrux7RVnu2h5EY9bzVaJ1VrWSpMRue1fIu6PA AIqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ke17si5846150ejc.582.2021.02.26.06.24.49; Fri, 26 Feb 2021 06:25:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbhBZOWy (ORCPT + 99 others); Fri, 26 Feb 2021 09:22:54 -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-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de X-purgate-type: clean X-purgate: clean X-purgate-ID: 151534::1614349258-000052FF-44B5BAFB/0/0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.