Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2395103pxb; Tue, 13 Apr 2021 00:23:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnNGKOfFP5p0YfD6bDkbn95ZXEGCIXUBNmSF0gFDb6LX9yLjgvnWoQh8N9YoSlMxzJvNMa X-Received: by 2002:a17:907:3ac1:: with SMTP id fi1mr16316126ejc.139.1618298587628; Tue, 13 Apr 2021 00:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618298587; cv=none; d=google.com; s=arc-20160816; b=oPBoyeVoCFjEkrPu33lf3NTpZby93/JhFH2nasQD5wrKxwB678TCyys5ls0QaQur6A CKb2QkJC9OHs/oISj7kuIdIGxJkioreAqHlfQKfjkmbAoUPflHwAr9fL02JKCzYjbf2l NFm8YZ4pnb5jhKnDe6Cqg2hfjMRaWEsGPCxx7AH76F+4Txt+i4i35lzBP/Bzoe3tpzyC CgiiCQH/sU1BNID47fK8vF4kYBmDWRfaTlldzc4u+7LThl3+u8QT1Q+R+cAt2vHy5FF8 yhX7I9iBmXBIRbtr09cKjJp55Wpoi9LY8aYojm/xE4K7+toDpph3l6d41gjEb7MLyP3c M6Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=wQMHK7w191HnOU82l+aKt36Qsx7Uz9UZXILeVJi6Tyk=; b=ZDRZ/FO6XO3LOetf616buiiLeUJHTMyQgUjnxwT53G7HzWZTlJFsjYrWotIrESG1X+ wUhsgvq7lLaMqU6FER/99NVQ29HByjD2D8qxAHzHJKjoqE3n1MUrBYSYRVGQAe5uhez7 eG+ns43D+7SgY74QplrXMaX5PP3/LkumkHL7ToFQjTPOpSeFgHHeKwsRQaS+RBDCVFGO 2EZMYjK5H27oEVXBhkYzOEUgrf+PR+kfGZNBhov7VopLMshXbuYYyxwXEPvZEMYl31ln jMeDN0UdPCfgZp8pKFSO6xX5MBzM/7XYMUZAACO667/fi/+3pStMYjfNRCIePLTJZ6gf XrLA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lj24si4317611ejb.80.2021.04.13.00.22.44; Tue, 13 Apr 2021 00:23:07 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343840AbhDLWr1 (ORCPT + 99 others); Mon, 12 Apr 2021 18:47:27 -0400 Received: from mail.nic.cz ([217.31.204.67]:56968 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239204AbhDLWr1 (ORCPT ); Mon, 12 Apr 2021 18:47:27 -0400 Received: from thinkpad (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id 5CABE140679; Tue, 13 Apr 2021 00:47:07 +0200 (CEST) Date: Tue, 13 Apr 2021 00:47:06 +0200 From: Marek Behun To: Vladimir Oltean Cc: DENG Qingfang , Ansuel Smith , netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Andrew Lunn , Vivien Didelot , Florian Fainelli , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eric Dumazet , Wei Wang , Cong Wang , Taehee Yoo , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , zhang kai , Weilong Chen , Roopa Prabhu , Di Zhu , Francis Laniel , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC net-next 0/3] Multi-CPU DSA support Message-ID: <20210413004706.6413d615@thinkpad> In-Reply-To: <20210412221721.3gszur3hbrkhe76m@skbuf> References: <20210410133454.4768-1-ansuelsmth@gmail.com> <20210411200135.35fb5985@thinkpad> <20210411185017.3xf7kxzzq2vefpwu@skbuf> <20210412150045.929508-1-dqfext@gmail.com> <20210412163211.jrqtwwz2f7ftyli6@skbuf> <20210413000457.61050ea3@thinkpad> <20210412221721.3gszur3hbrkhe76m@skbuf> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT, USER_IN_WELCOMELIST,USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Apr 2021 01:17:21 +0300 Vladimir Oltean wrote: > On Tue, Apr 13, 2021 at 12:04:57AM +0200, Marek Behun wrote: > > On Mon, 12 Apr 2021 19:32:11 +0300 > > Vladimir Oltean wrote: > > > > > On Mon, Apr 12, 2021 at 11:00:45PM +0800, DENG Qingfang wrote: > > > > On Sun, Apr 11, 2021 at 09:50:17PM +0300, Vladimir Oltean wrote: > > > > > > > > > > So I'd be tempted to say 'tough luck' if all your ports are not up, and > > > > > the ones that are are assigned statically to the same CPU port. It's a > > > > > compromise between flexibility and simplicity, and I would go for > > > > > simplicity here. That's the most you can achieve with static assignment, > > > > > just put the CPU ports in a LAG if you want better dynamic load balancing > > > > > (for details read on below). > > > > > > > > > > > > > Many switches such as mv88e6xxx only support MAC DA/SA load balancing, > > > > which make it not ideal in router application (Router WAN <--> ISP BRAS > > > > traffic will always have the same DA/SA and thus use only one port). > > > > > > Is this supposed to make a difference? Choose a better switch vendor! > > > > :-) Are you saying that we shall abandon trying to make the DSA > > subsystem work with better performace for our routers, in order to > > punish ourselves for our bad decision to use Marvell switches? > > No, not at all, I just don't understand what is the point you and > Qingfang are trying to make. I am not trying to make a point for this patch series. I did not touch it since the last time I sent it. Ansuel just took over this series and I am just contributing my thoughts to the RFC :) I agree with you that this patch series still needs a lot of work. > LAG is useful in general for load balancing. > With the particular case of point-to-point links with Marvell Linkstreet, > not so much. Okay. With a different workload, maybe it is useful with > Marvell Linkstreet too. Again okay. Same for static assignment, > sometimes it is what is needed and sometimes it just isn't. > It was proposed that you write up a user space program that picks the > CPU port assignment based on your favorite metric and just tells DSA to > reconfigure itself, either using a custom fancy static assignment based > on traffic rate (read MIB counters every minute) or simply based on LAG. > All the data laid out so far would indicate that this would give you the > flexibility you need, however you didn't leave any comment on that, > either acknowledging or explaining why it wouldn't be what you want. Yes, you are right. A custom userspace utility for assigning CPU ports would be better here than adding lots of complication into the kernel abstraction.