Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1560360pxb; Thu, 28 Jan 2021 21:59:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvrFaLnhGNYWcJmmgZm4RJtuP98Y7diHouRqehVjTF1rj5jHuz54ojAv+nc3L0uqCnbY2C X-Received: by 2002:a50:9ee9:: with SMTP id a96mr3353795edf.343.1611899944883; Thu, 28 Jan 2021 21:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611899944; cv=none; d=google.com; s=arc-20160816; b=0bglAJnawoB9JkKiqvS/CNDCjs046duGL2q8QDj61VkH19+j11sbYsJNh0xYYV8f2B tGna/WcFK6a4iVhKTdNXrNXKH71dQZIeIbS1nK5yLuTetagWiqiRlCYNx7oZxqV/c/Ug GRjTKuzm7FpmDjDwAgz/DM2lv3H2LT6DdlQW8BIDLxYMJ1OqXbjruTd9QJ8EnpwdWlP4 +BWjeAgUewpeySFlwiftPAcLdatqbBaOe+CrSmZPaQkveEyJyapFeBJWWM00wCByWakP b2ZZCvpF2QNR0AHXROZCkHRMTMoUwVGA3akhUgwwrm/uI+VCQlnQn8ukU2k49aKX0RZG ypvg== 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=MphQZ/MZQqvSuhB7np+fEVzexsN8KLOmhB/F7oMMDIA=; b=EOoFCxkE0HdXM+rb71kL3diIQPx8+D293f6/FYpre37cG7kB8yZOlF4JmXDDHo8p8b 7bM8DwgJoHvYZb55o2RHd3pWHfy5Q9D0k7XEQMdJoOASPvgsijsIxEN+qFO/zmOwwiXF HgMtkHYZDFMu06vqADAXHxQeOlP6Y5L2D2p+ZsRCvQVzYL0ZL5wpHUrrS2dTWc/fk5cv wT/qZeFsk71GGf4ftwQ3yiUZ8JuTVLYtp+deUkOvoXbtOC7LvS5f6i0w3ENTDaEpB4PZ +qmhP5Aml5VKe662IZ9vVUuuXmA0j3LYL/MLxGIIe8XAeQLpmF/AqBvglAbF4JwEaLZD YxIQ== 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 ay26si4661784edb.317.2021.01.28.21.58.40; Thu, 28 Jan 2021 21:59:04 -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 S231855AbhA2F6I (ORCPT + 99 others); Fri, 29 Jan 2021 00:58:08 -0500 Received: from mxout70.expurgate.net ([194.37.255.70]:38131 "EHLO mxout70.expurgate.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229757AbhA2F6G (ORCPT ); Fri, 29 Jan 2021 00:58:06 -0500 Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.90) (envelope-from ) id 1l5MlS-0007Q7-Mb; Fri, 29 Jan 2021 06:56:14 +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.90) (envelope-from ) id 1l5MlR-0001XU-Hr; Fri, 29 Jan 2021 06:56:13 +0100 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 8D7AC240041; Fri, 29 Jan 2021 06:56:12 +0100 (CET) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 02A5A240040; Fri, 29 Jan 2021 06:56:12 +0100 (CET) Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id CD22B229C8; Fri, 29 Jan 2021 06:56:10 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 29 Jan 2021 06:56:10 +0100 From: Martin Schiller To: Xie He Cc: Jakub Kicinski , "David S. Miller" , Linux X25 , Linux Kernel Network Developers , LKML , Krzysztof Halasa Subject: Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames Organization: TDT AG In-Reply-To: References: <20210127090747.364951-1-xie.he.0141@gmail.com> <20210128114659.2d81a85f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Message-ID: <3f67b285671aaa4b7903733455a730e1@dev.tdt.de> 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 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-ID: 151534::1611899774-0000A9C4-665386D1/0/0 X-purgate: clean X-purgate-type: clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-01-28 23:06, Xie He wrote: > On Thu, Jan 28, 2021 at 11:47 AM Jakub Kicinski > wrote: >> >> Noob question - could you point at or provide a quick guide to >> layering >> here? I take there is only one netdev, and something maintains an >> internal queue which is not stopped when HW driver stops the qdisc? > > Yes, there is only one netdev. The LAPB module (net/lapb/) (which is > used as a library by the netdev driver - hdlc_x25.c) is maintaining an > internal queue which is not stopped when the HW driver stops the > qdisc. > > The queue is "write_queue" in "struct lapb_cb" in > "include/net/lapb.h". The code that takes skbs out of the queue and > feeds them to lower layers for transmission is at the "lapb_kick" > function in "net/lapb/lapb_out.c". > > The layering is like this: > > Upper layer (Layer 3) (net/x25/ or net/packet/) > > ^ > | L3 packets (with control info) > v > > The netdev driver (hdlc_x25.c) > > ^ > | L3 packets > v > > The LAPB Module (net/lapb/) > > ^ > | LAPB (L2) frames > v > > The netdev driver (hdlc_x25.c) > > ^ > | LAPB (L2) frames > | (also called HDLC frames in the context of the HDLC subsystem) > v > > HDLC core (hdlc.c) > > ^ > | HDLC frames > v > > HDLC Hardware Driver @Xie: Thank you for the detailed presentation. > >> Sounds like we're optimizing to prevent drops, and this was not >> reported from production, rather thru code inspection. Ergo I think >> net-next will be more appropriate here, unless Martin disagrees. > > Yes, I have no problem in targeting net-next instead. Thanks! I agree.