From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1034DC433B4 for ; Tue, 13 Apr 2021 15:14:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E268E6117A for ; Tue, 13 Apr 2021 15:14:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344367AbhDMPPI (ORCPT ); Tue, 13 Apr 2021 11:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242392AbhDMPPG (ORCPT ); Tue, 13 Apr 2021 11:15:06 -0400 Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 052CBC061574; Tue, 13 Apr 2021 08:14:46 -0700 (PDT) Received: from thinkpad (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id 2E28A140A5F; Tue, 13 Apr 2021 17:14:44 +0200 (CEST) Date: Tue, 13 Apr 2021 17:14:43 +0200 From: Marek Behun To: Tobias Waldekranz Cc: Vladimir Oltean , 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: <20210413171443.1b2b2f88@thinkpad> In-Reply-To: <87im4qjl87.fsf@waldekranz.com> References: <20210410133454.4768-1-ansuelsmth@gmail.com> <20210411200135.35fb5985@thinkpad> <20210411185017.3xf7kxzzq2vefpwu@skbuf> <878s5nllgs.fsf@waldekranz.com> <20210412213045.4277a598@thinkpad> <8735vvkxju.fsf@waldekranz.com> <20210412235054.73754df9@thinkpad> <87wnt7jgzk.fsf@waldekranz.com> <20210413005518.2f9b9cef@thinkpad> <87r1jfje26.fsf@waldekranz.com> <87o8ejjdu6.fsf@waldekranz.com> <20210413015450.1ae597da@thinkpad> <20210413022730.2a51c083@thinkpad> <87im4qjl87.fsf@waldekranz.com> 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-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 13 Apr 2021 16:46:32 +0200 Tobias Waldekranz wrote: > On Tue, Apr 13, 2021 at 02:27, Marek Behun wrote: > > On Tue, 13 Apr 2021 01:54:50 +0200 > > Marek Behun wrote: > > > >> I will look into this, maybe ask some follow-up questions. > > > > Tobias, > > > > it seems that currently the LAGs in mv88e6xxx driver do not use the > > HashTrunk feature (which can be enabled via bit 11 of the > > MV88E6XXX_G2_TRUNK_MAPPING register). > > This should be set at the bottom of mv88e6xxx_lag_sync_masks. > > > If we used this feature and if we knew what hash function it uses, we > > could write a userspace tool that could recompute new MAC > > addresses for the CPU ports in order to avoid the problem I explained > > previously... > > > > Or the tool can simply inject frames into the switch and try different > > MAC addresses for the CPU ports until desired load-balancing is reached. > > > > What do you think? > > As you concluded in your followup, not being able to have a fixed MAC > for the CPU seems weird. > > Maybe you could do the inverse? Allow userspace to set the masks for an > individual bond/team port in a hash-based LAG, then you can offload that > to DSA. What masks?