Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp95372pxb; Wed, 14 Apr 2021 10:13:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJc9/h3qmUi3AwNNje5aLthknA8fyd324RAt6Z3yNeQCHvEk8T/+OMGfRUtIUmnC1np0W/ X-Received: by 2002:a63:ab05:: with SMTP id p5mr38653545pgf.149.1618420435871; Wed, 14 Apr 2021 10:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618420435; cv=none; d=google.com; s=arc-20160816; b=xFVHxPePhCNP58E+RdoEx8dG2D+FbwMn8P+bMtogGAgKOKB6b8UShZVg+r1YR8OYAf 5VPjr/TughheMqeWqQEn9SRjJ64g2c0EYOoqBrYioVyQ7BfN+gOeJ1X8v7IehGOyIahi aqItJFddlDczfZ8UyKQH0/Fc7Neb+J5ICOBW9HGIgi1tfygUIN2SQ+AVLG2Shoc6SEYm r/FRKsXVzWi+Gzzf9X4ZzVxtOF8R5TXRoK3ThXc/MmaRlPrRrvUoxclfYpGtj5ikSPZt QBy8YAJA2CKIaiSfoCqCe4VIA+jKnwZCpAO+zFPHimY3SDurjKafV3u1JqnrMqk/5eBH T/lQ== 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=cTq469rRU5WsAUKbQaVuMzVQkxtjFoR/oaslpCtm1Vk=; b=cVnji64sKXvvTrVYuRAiEgnKteDq3++gPS0BGhXWBj5u2NOKpnk9yCwvQmPr9Pn09A jo0VL4o8G4G7ogudRdK5Q9PXDpXdJHkNPRWCxItWJ/KhbGh0tT4IOLf6oSMtv7ubbpNp 76hh9yjX4jI3YhVCgSUmuh3SuRE4GLMEviaFbmRUzhdVzKbqsjBR4WhUPkVy+SLfC9+i 8i773Jy1QPdADyVSb/sS8/haA2JlE8VEgz+u19kraRzkjUEWM1em3bXXxGYGDqBDCB6Z j0xL7AP4NETShSwSo9s4RnreKql+MFAk3g/5SLu/kt5EmJvK1Xa5Uh1hN0ogOVAB9Ksf /ncA== 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 i2si220489pla.320.2021.04.14.10.13.42; Wed, 14 Apr 2021 10:13: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; 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 S1350215AbhDNPPE (ORCPT + 99 others); Wed, 14 Apr 2021 11:15:04 -0400 Received: from mail.nic.cz ([217.31.204.67]:46284 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350114AbhDNPPD (ORCPT ); Wed, 14 Apr 2021 11:15:03 -0400 Received: from thinkpad (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id C5E55140AF8; Wed, 14 Apr 2021 17:14:40 +0200 (CEST) Date: Wed, 14 Apr 2021 17:14:39 +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: <20210414171439.1a2e7c1a@thinkpad> In-Reply-To: <87fszujbif.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> <20210413171443.1b2b2f88@thinkpad> <87fszujbif.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-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 20:16:24 +0200 Tobias Waldekranz wrote: > You could imagine a different mode in which the DSA driver would receive > the bucket allocation from the bond/team driver (which in turn could > come all the way from userspace). Userspace could then implement > whatever strategy it wants to maximize utilization, though still bound > by the limitations of the hardware in terms of fields considered during > hashing of course. The problem is that even with the ability to change the bucket configuration however we want it still can happen with non-trivial probability that all (src,dst) pairs on the network will hash to one bucket. The probability of that happening is 1/(8^(n-1)) for n (src,dst) pairs. On Turris Omnia the most common configuration is that the switch ports are bridged. If the user plugs only two devices into the lan ports, one would expect that both devices could utilize 1 gbps each. In this case there is 1/8 probability that both devices would hash to the same bucket. It is quite bad if multi-CPU upload won't work for 12.5% of our customers that are using our device in this way. So if there is some reasonable solution how to implement multi-CPU via the port vlan mask, I will try to pursue this. Marek