From patchwork Wed Jan 30 10:38:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Cvek X-Patchwork-Id: 1033408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RWdE2u/p"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="T/bCRYDh"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43qKZw595Sz9s3q for ; Wed, 30 Jan 2019 21:38:16 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Content-Type: MIME-Version:Date:Message-ID:From:To:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=builRQQm+djg7ikhdhT4r8o/Xk0vwXlGWsaKPNjOJDs=; b=RWdE2u/phftrp+9EWDR409mKgK ZJAeIXv40APJpw6U3aWhwsI0v4Njr3fk0sfnndUG67E/ldbDdmbMn6zFwlxmigkVZl6BtOQ/khhaf wPw2AFccBlZ7jDqUh5/cAkkTnQKS/1zGq4do+LBVmPehC2n5J+0yxUaX9AJZaAOGS7Z4+cLLeeVZ7 2cnUfO+DFUUr9bwl8EsJBln9WITpGsZoWYbGtl1+UG22UgR41jIHGvxf3B3y3bF+ZgzVMduEnurki M/qfP+RFRNJruqDWqEhe97y1q6G2b1rzE8NDqVcfM8EvzQFINnTvfTma91c8ltbJUaKxRENGF1sJJ 2OavRt/w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gonFy-0005oo-AQ; Wed, 30 Jan 2019 10:38:10 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gonFt-0005nx-Rl for openwrt-devel@lists.openwrt.org; Wed, 30 Jan 2019 10:38:09 +0000 Received: by mail-wr1-x442.google.com with SMTP id p7so25518049wru.0 for ; Wed, 30 Jan 2019 02:38:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=7fabGa6XLtgpH9mImNyC1Sbt4fbO2RhPEr19VA/qpVc=; b=T/bCRYDhuQVzWTryfaF06p33BVefnjlbP49X/3EVcc0YTSM/a6KDrPVDayV5JvM0rg ziqrar/7SXHJBc9dvyE6j8oSBU6rzMyIC69myy3+igzQRVKN9xWByAzUuDCTLF1lFmYJ SxPaLTlXWM09KapeQYnEddRDi81rjfJOMfFc8/I0hZd0Orq01TaOUqWwRM1UL3XOHi9v YhhfSxDE0YFM0p/qpIGk0P6A31dwdJvVn4tecZBJFgQ0MttEg1cqYmTseQdLGSM1l+RU 6qqjGQpwxlEwMq6mmW+RK2HAicg/pEUz/H/upphpGeRlGwYe9oXZNeZuelheoJYfhBHN jd/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=7fabGa6XLtgpH9mImNyC1Sbt4fbO2RhPEr19VA/qpVc=; b=IHbOy/AanzB1rDwrXbybIAE1/bcJ41O43nNWWDq1qx+unDKJ79ZgWrXU39sGIw2grr kX2UNoXNrmawR+ugjc3NeiMoVBQx5amPkkQRrWq2aecgalrY56tBIMaPul8QaszB1+zF mDqtRxROSjzJmU5XCX0rjskrANFDgOMacb4seZXj+99i6DlaMfEunMSxZGmJr71rCGZl g0BvOBLFk16maAakkrxbdkuWL0XEgfsHHGWFi+ESuoWx1a9vYY/P4JdQktT/Xfr4ziju GOUAvEKuPgnSA+kuKawzUuMEojaglxPzJJoxFzkPa/nyJxQbI2ta0Oar5obxSwIT5aHw od0Q== X-Gm-Message-State: AJcUukcsUDX+sQRUM4eQuKglWCGx4o5whMpFo5MuU0ZL7YK6V5eFeOz2 YY4tZX0Bmpdca9l8o3isWWUXFfMy X-Google-Smtp-Source: ALg8bN5WO73E8l/0vT7Q07F84AcbjvU/walbyFScxxQKeqCtuDvGKl/e8eLVRufJ8U4oKQEx2bV80g== X-Received: by 2002:adf:8c09:: with SMTP id z9mr25835662wra.301.1548844683424; Wed, 30 Jan 2019 02:38:03 -0800 (PST) Received: from kontron.lan (2001-1ae9-0ff1-f191-8db3-42be-61e5-f6f7.ip6.tmcz.cz. [2001:1ae9:ff1:f191:8db3:42be:61e5:f6f7]) by smtp.gmail.com with ESMTPSA id y185sm863522wmg.34.2019.01.30.02.38.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jan 2019 02:38:02 -0800 (PST) To: openwrt-devel@lists.openwrt.org From: Petr Cvek Message-ID: <97e9b305-b22f-18e3-f472-ab6a11b681a3@gmail.com> Date: Wed, 30 Jan 2019 11:38:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190130_023805_931985_0D0B8BEE X-CRM114-Status: GOOD ( 18.73 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (petrcvekcz[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [RFC] lantiq: SMP interrupts and ethernet driver backport from vanilla v5 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Hello, I discovered the lantiq xrx200 lacks support for interrupts on secondary VPE, and I've managed to add this functionality to the kernel, the second icu controller lives on base address 0x1f880300 and works in the same way as first. Tested with 4.14.93 kernel, untested patches in the attachment or on openwrt forum: https://forum.openwrt.org/t/xrx200-irq-balancing-between-vpes/29732/11 My second submission is a backported xrx200 ethernet driver from vanilla kernel v5 patched with switch and phy functions. Using kernel napi polling seems to highly increase the throughput of the network. Trying to initially increase the throughput of the network I've found there is an inefficiently setting of DMA burst size. My patch sets this value to a higher value. These two patches were tested with 4.14.93 kernel too, there is forum thread: https://forum.openwrt.org/t/how-can-we-make-the-lantiq-xrx200-devices-faster/9724/30 RFC for any parallel development info (next version of ethernet driver will be based on vanilla kernel version?), ideas, testing ... best regards, Petr Cvek --- ./a/arch/mips/lantiq/xway/dma.c 2019-01-26 09:37:07.000000000 +0100 +++ ./b/arch/mips/lantiq/xway/dma.c 2019-01-30 05:04:42.750889682 +0100 @@ -194,6 +194,11 @@ ltq_dma_w32(p, LTQ_DMA_PS); switch (p) { case DMA_PORT_ETOP: + + //TODO test without when ethernet driver is stable + ltq_dma_w32_mask(0x3c, (DMA_2W_BURST << 4) | (DMA_2W_BURST << 2), + LTQ_DMA_PCTRL); + /* * Tell the DMA engine to swap the endianness of data frames and * drop packets if the channel arbitration fails.