Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1345900pxb; Thu, 28 Jan 2021 14:09:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjZIshPG2dsfJQIVVEZDdfiw1wx1oDIFHBzXmD8VN96giT1g11XRxS/9rYI3Z+cK6/axgS X-Received: by 2002:a17:906:af92:: with SMTP id mj18mr1574257ejb.290.1611871771750; Thu, 28 Jan 2021 14:09:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611871771; cv=none; d=google.com; s=arc-20160816; b=uSkFzHvjKAm4LR7D+TTRDhGDKx+E09ODsyYsL05YXmJcgUCtReHZN40PZ3SmZVomGn l23D7JoANdZjX8n8R5s171MFwCKURFGOTnKf6vo/B5VXveypYMjUC+83cvhq4qzOxep4 p0G6bM9y8vC4xsb+2VFBc3arr9XUipCF88Jqizpp/cICitOVgkQfiTJsaHGkFMlp+j7S mPU5pvnflynb//Xi7WAbTaxn5GcGhTt73CyQYfntRMeG6LOmPuN5CDsxTvj8QvRsaPH0 3T2+2nV5HRZwKLhzuIZRUOzeehDGGn+aBw89XaX6WxO2k+kPHXebQHerCF/dZbXPz5Es T/Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gwbhYTYlKJc3qWdffrQGsNa7auYkd8037d2LbAoaq+4=; b=OpCeERfuddZCgoghl2VvATP46vmq7F+qYQ85/9zYmnTWAZPzjuk2Ljgb9vgbphMeZC Tb7dvdBTXxj4TQ6b2QNVpr2CXLl63vT3pik4Dvddp5aq8JsbCCXI+V4LwmhWiy1tZrPp fokR34bTLJlwB+iSvAeqo+2nNXDmi/yWBfG0DQ35CnBG5wH+5zWa2iP84cYq6oJhiMOS TrwLbCGMda/3CEcMxhguBj1Dp7qVGADdWj/MgsEW0bXCCrB0uEakAKUoefJa1igiQ7Pn d0Jrr6bK1wBY2i0vjBLiHeFB8MlElT0peHv3aUcMLq0lp2Ka/dvBnyqjKCi2uEZYi+M5 gddA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="db/3JuT7"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs11si3618273ejb.637.2021.01.28.14.09.07; Thu, 28 Jan 2021 14:09:31 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="db/3JuT7"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231315AbhA1WHx (ORCPT + 99 others); Thu, 28 Jan 2021 17:07:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbhA1WHu (ORCPT ); Thu, 28 Jan 2021 17:07:50 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7A9CC061573; Thu, 28 Jan 2021 14:07:09 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id j11so1523080plt.11; Thu, 28 Jan 2021 14:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gwbhYTYlKJc3qWdffrQGsNa7auYkd8037d2LbAoaq+4=; b=db/3JuT74AtHbaNhPY2iun2rxxrUDTOmNcTQ6ISyxUVI80SvBONASBZrgcArON/+Dx sODZKu+kRLiq/khuiNm/HKLWRc8fAiF/157bhEUHqqfIMbLB6o9auw/wjx9LXaEzSIx7 9DrA63JAq/e1DFj/sZ0FShOYkVaNit+f/UhRoaxN+oxD6C0r47FXz1muA3xlsnMwoepc AnUTV7wnnkvlp/9vBmGtzZASlGWhSnDmKdtnthItkTQUIXi8Ym2415vaiWjFOb3m+764 I5W3QDM2PF9Ta5jfeGPIyocwaLbaJ2E/XoXgGmDOdqy+zBiL4hyBLkSICq3bpvSXj9Fg OrVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gwbhYTYlKJc3qWdffrQGsNa7auYkd8037d2LbAoaq+4=; b=kkKgfkU7aXGFds1zBG+mmLinoW4Wn9Ik+CIOTQe+VEvtC6UmNg48klM4XaBBNeE82Y icS5xS5bqCvFay+pVx5Bf32rJIzhCzlxG+p2W4MzSrwXEFlg2lXC35dRrJG8jA5wyQF4 tHtcQX6jSkpXh6ZC/y7Gjna80RQAbiUvf7eOZX1wG6c0BvbIbINI+K1Qs2muWebYQ4KS fYwgOMY8Pgldox5YwZBpHg9m3S1KifrBhnx3vT36S8HmvQt1Pdyvy0AQ9V73ynWpp+mP eMPIByWv7HB0k63M+Tya+eeH3H1qZd8Nr8+zH9DovFV4SAk/dYuPZbmhCJUrlrOP3rZC dhDg== X-Gm-Message-State: AOAM5316QGtKpRPafCpBTBcS8j12eGLIybjcGXCJQRuEzpCx0N+IUuWk gts3PB0zF8EvGIxSpxTwVuBJGvHbhY3FviqqE9Q= X-Received: by 2002:a17:902:9a4a:b029:dc:435c:70ad with SMTP id x10-20020a1709029a4ab02900dc435c70admr1408753plv.77.1611871629557; Thu, 28 Jan 2021 14:07:09 -0800 (PST) MIME-Version: 1.0 References: <20210127090747.364951-1-xie.he.0141@gmail.com> <20210128114659.2d81a85f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210128114659.2d81a85f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Xie He Date: Thu, 28 Jan 2021 14:06:58 -0800 Message-ID: Subject: Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames To: Jakub Kicinski Cc: "David S. Miller" , Linux X25 , Linux Kernel Network Developers , LKML , Martin Schiller , Krzysztof Halasa Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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!