Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2545259pxb; Tue, 9 Mar 2021 05:25:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJweOlt/TQS/6e3YCFC+OYk9nlXb5VYQiE8k5PV5EbE42d6ZSpHTTi95yVA0HLLnn69ZZdaQ X-Received: by 2002:a17:906:4e99:: with SMTP id v25mr20396890eju.532.1615296334182; Tue, 09 Mar 2021 05:25:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615296334; cv=none; d=google.com; s=arc-20160816; b=gOmArpwsYYD3YanqNeV0/aakJkbjyLwy4+OTcVae5TTxX7ca1Cf9XkZ5Hqg63QP9rl HnqKG1t3S4YeNV+XITfiPnFMCh2cDUheaLqlaMavO4E8d6wA57KHzAKNmzq9/cGEnFEN NZl/46x9MF/iCEFK4W3PO+IphlrQQMjgb7BgMv0vkawWia8516TtK5lIE4H7dFE42qOK XZ1YD6DRdTLPvPXjNDLZZgXbdDBWsW3U7JD60IwnUlJCOsCZP0uA8YtsuZbTlSxRc6Hh KtEVwwWdNbCPfPg7rdFxXn3BLJaNN/R66L4nDEONyhAo1u0nWut8O7ZY+KB48+Newhd9 tU8A== 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=fJnOuBEK7plHyRdjcwlwPk1QJQlwoXSObZoI7S51qGQ=; b=rDuV9roKa+PHI7lrbqQL2A4uVvKoaFIv3vMxrH0Uh1IXT9AxCuz0dzYUAPxDGTbYbA f7xEsNUQgl9vNZ6KJomjppYWkohnEWnZlLmyvAhsij1Whdgn2j9r2qAMHKQ355gfu6NC MQiW2stRuj+XDoPNhXdnQN4aWbmSvosCiLf86iZr4gzWixgKrkwVzqdPm54KoCdL9+XW 0p321oougwydMnLTUfElttoWk0ie9oTdg2XAudAU40lsKEcAZDTHOPQV6FzSQU1jorCE AG5BWM0LObeZnihMfzfpFItSteGGvcVKc9QPGFhXM0fmi1bIyJlRnvCAq153U5znGwFB vs5w== 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 eb10si9409585ejc.273.2021.03.09.05.25.11; Tue, 09 Mar 2021 05:25:34 -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 S231278AbhCINYJ (ORCPT + 99 others); Tue, 9 Mar 2021 08:24:09 -0500 Received: from mxout70.expurgate.net ([194.37.255.70]:55579 "EHLO mxout70.expurgate.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbhCINXx (ORCPT ); Tue, 9 Mar 2021 08:23:53 -0500 Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.90) (envelope-from ) id 1lJcKv-000AV7-QL; Tue, 09 Mar 2021 14:23:45 +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 1lJcKu-0006uV-H8; Tue, 09 Mar 2021 14:23:44 +0100 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 0C0D0240041; Tue, 9 Mar 2021 14:23:44 +0100 (CET) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 6CB50240040; Tue, 9 Mar 2021 14:23:43 +0100 (CET) Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id DE993200DE; Tue, 9 Mar 2021 14:23:41 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 09 Mar 2021 14:23:41 +0100 From: Martin Schiller To: Xie He Cc: "David S. Miller" , Jakub Kicinski , Jonathan Corbet , Krzysztof Halasa , linux-x25@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC] net: x25: Queue received packets in the drivers instead of per-CPU queues Organization: TDT AG In-Reply-To: <20210305054312.254922-1-xie.he.0141@gmail.com> References: <20210305054312.254922-1-xie.he.0141@gmail.com> Message-ID: <4b30ca506b0d79ef5ba1a5e9ce9cf2cd@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,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::1615296225-0000B5A4-919C9C8D/0/0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-03-05 06:43, Xie He wrote: > X.25 Layer 3 (the Packet Layer) expects layer 2 to provide a reliable > datalink service such that no packets are reordered or dropped. And > X.25 Layer 2 (the LAPB layer) is indeed designed to provide such > service. > > However, this reliability is not preserved when a driver calls > "netif_rx" > to deliver the received packets to layer 3, because "netif_rx" will put > the packets into per-CPU queues before they are delivered to layer 3. > If there are multiple CPUs, the order of the packets may not be > preserved. > The per-CPU queues may also drop packets if there are too many. > > Therefore, we should not call "netif_rx" to let it queue the packets. > Instead, we should use our own queue that won't reorder or drop > packets. > > This patch changes all X.25 drivers to use their own queues instead of > calling "netif_rx". The patch also documents this requirement in the > "x25-iface" documentation. I've tested the hdlc_x25 driver. Looks good to me. Acked-by: Martin Schiller