Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2866576pxb; Tue, 13 Apr 2021 12:08:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlt44uWffFmxXxRX5BDil99SDL4Y3w0B/xN4gwBuGBpQpnpnlOOB3+WGaa68BpHyNL1bbX X-Received: by 2002:a05:6402:350f:: with SMTP id b15mr36240073edd.6.1618340935435; Tue, 13 Apr 2021 12:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618340935; cv=none; d=google.com; s=arc-20160816; b=ueJR4z2+1L4P/BOzPQfEi6bJNc1zxXL0BcnCZ+D7+G2tuHKbCDXv35ndpFRL9nquHn kNxlsNhMVGShOk6vVRK7aSP6UvZg/8zl5e2Eb28d/XunMec7k/4p9AGtJrC7Ml3g+Obk Qjf1yWBO3JhV0omA16b3m11CHWWxx7dhbeopEQ3J5sVNG0S5XtTL2VYcHo+nW1uWJ9Q4 fXwJ4oE+Ni2Ay3ktVj2Eh6Cd3yRJ/126BuY4MMpsHw05gGxQtiCrvotDG5qLdIxuuXAp 9NPALfABvBwzGPk+bgrCwL8AuJkdcOvMEgh8VmumlJEB2QfY87CBYNnEE//R3x3Rn6zn i89g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=ZkxBrXhgahAL76PVBBK7Q4bfFvD6vehXOz4V8yxaY8Q=; b=iCD8Xgwg3uSrPpnZTaIT07gLKK+kez7MfEAYYT10czoUot7kY9O057autyl7/XUgEI G2hisJj/RcnlJkvq1t2q9FOY5fMtw3VgC14bgyhclT/w+qk/QZjI/nibVjMeQt2O+oHn A8NCKrYtyvipiCQiOpCRyepYbtaHZdNDU9TP2ysdJ484RUO3DzoqDW1myjKCIc/Mbb1z zXDPFjOj2UZWus33F4Rj8qSZ+uaaDrjWGMhg3HPKlbLKZR8fxGGxQ1NGI3Z7pJgsJzmd 1Ftn0UynqWmMs1aREmDyZw99KRC2a7+Qytlh6dPRESs6IHuShBaAiHh8AOPNBntsbrTV wC4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@waldekranz-com.20150623.gappssmtp.com header.s=20150623 header.b=ARk9lGt4; 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 r5si1772963edo.476.2021.04.13.12.08.32; Tue, 13 Apr 2021 12:08:55 -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; dkim=pass header.i=@waldekranz-com.20150623.gappssmtp.com header.s=20150623 header.b=ARk9lGt4; 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 S1344619AbhDMOq4 (ORCPT + 99 others); Tue, 13 Apr 2021 10:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhDMOqz (ORCPT ); Tue, 13 Apr 2021 10:46:55 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 465D9C061756 for ; Tue, 13 Apr 2021 07:46:35 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id x13so17672205lfr.2 for ; Tue, 13 Apr 2021 07:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waldekranz-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=ZkxBrXhgahAL76PVBBK7Q4bfFvD6vehXOz4V8yxaY8Q=; b=ARk9lGt4JUI7Mwp/JCQhq8RXeBHM4DdVbLAd7FTZVbJxylhsyaKm3Ykp+7auLj8u+l epOt4KXUSGKsbAslnWOue4nlxmY1IrGboR3HUtXg1egFEtnSQnMjDJJ+zcddlXQ1atlU oOGH8qiDHRez91vwXq+PBP0WsoNAStD3Bj8613wkWL91RIQg5Ph0AVpBcV6vp2NEHAzd AYZ2KMZlIGERN3j3Rn/rtg5NAs0NyJhBHfYg9u+piXo+5plZByQcNfjDkh4r6q0n16a8 ChiYWVl1dZwfYsZJ6Ae+0DTqUj9NPO9J0epXKgVvPrYKeQDhm/t2zDwz3zLmZza4gW3I V2Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=ZkxBrXhgahAL76PVBBK7Q4bfFvD6vehXOz4V8yxaY8Q=; b=ZxePbJBsu813UfBuEGrAHmr2AfDRYiNsHnirYwDhOxkfb6JFuehoieKjR016tRjqrn mV9aDmc8dU0So6AO498cug6TwseUppf7e401N3ooDHD6CA2ytXM429hGXIIzykbrRAJF WcoADLc6nRulcOb6pd+KkL5cwQGQF98jMMkr2mj2enZintpXDSLTQmJuf+ambEMxFgcz yP0yziSBVH1tv5syNl5/yb6WN2Z3zS+PB7LmsqkLXWBaZNB8SDorf1lUC/LMhcJeHRow QQnzbdtDQqEKdNU9f9k6Jsz7wYoa9uBq5gLW1DJ9mZRYK/p+aqjkJmX59FkzA1r5Dviv 8QjA== X-Gm-Message-State: AOAM530s+Pl+tXurU++YZVN9j2pXAB2NCU8isWTR1EPOMObijs4TK/Hi mpX/Bgc319MgNvXrjUbNE8AKqA0xkj88v5IT X-Received: by 2002:a05:6512:34c7:: with SMTP id w7mr22365583lfr.83.1618325193402; Tue, 13 Apr 2021 07:46:33 -0700 (PDT) Received: from wkz-x280 (static-193-12-47-89.cust.tele2.se. [193.12.47.89]) by smtp.gmail.com with ESMTPSA id f3sm4046840ljm.5.2021.04.13.07.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 07:46:32 -0700 (PDT) From: Tobias Waldekranz To: Marek Behun 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 In-Reply-To: <20210413022730.2a51c083@thinkpad> 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> Date: Tue, 13 Apr 2021 16:46:32 +0200 Message-ID: <87im4qjl87.fsf@waldekranz.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Here there be dragons though, you need to ensure that there is no intermediate config in which any buckets are enabled on multiple ports.