Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2102657ybg; Thu, 24 Oct 2019 04:53:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbmAD9ti68vlhvDQHyCIpQF7M0pnyKWwVQgNRFpYq4pH3U32FfLGzMbeIRnB9uHuocZ7Cn X-Received: by 2002:a17:906:54c7:: with SMTP id c7mr36111948ejp.226.1571918010255; Thu, 24 Oct 2019 04:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571918010; cv=none; d=google.com; s=arc-20160816; b=NtFGMvitLS7XqYmMndgkq78jT+VqOgMUDswKuSm6ixgWMFEyPIdIRhIu/IydegjAUt gfM5KIFpX1a0OTJWFPphnFLOFXJToQ/yN7JpTAnjbgIlcOBA+uLUn04Pzjji8dTnSq0L AfMkJhby0ECvR8+r2MpYGsYdWbM9yH4VODWi06GgBuyqk6AaqyIWZBgzQ4/p10UG/yky 7fO6RWioCnX71wo9nl/69uqxrvgjPlDAfhZmadq69gT3F56bwASdSnyTZxborHrfZS1y hSZby3Ii5MoQEoydqSW5YgqDrXkdoIqdHfIQS8Ys9ew3niKJvNPH1vUxfI7BdHxlcTcm NNMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QOrRgBSXpKlQbq6/XicVegpjHbS0n3UmJLpAj4QLq40=; b=0TjXXjs9VREFhKRzlfdqzF4nk/pxnxveT6MNt5wbpbmjGo4nTOhZW3DZe6XXAle88Q WnxyyCjj1/6XWwtoeU7sK82yaDCAPX5ffi90w4f58Qp1SO9VwAU9kbKCmWh0CKjNKgeZ +PZUWqR96p7N0/rxQdBaGRbBRsmb0FSjcu5BQc78Rw4N0AVPJ8aqjT1B2mlcoRPO7t0V ZCTM7/2P7qLT948MjHo8iUcdLPvfSYOpTXWsDLmzPIqyNH7RdG0SZjPUZDqf+4WxpVPx gkWeLO2Ty+20UYPeWNjvDeP4J+r4B8JZ9+Ciy5mCTvOWF46chkuncZpXQG4TcIbBXdKd jGNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=VNeFRUAx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si11515926edb.226.2019.10.24.04.53.05; Thu, 24 Oct 2019 04:53:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=VNeFRUAx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387441AbfJWSBD (ORCPT + 99 others); Wed, 23 Oct 2019 14:01:03 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54790 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732365AbfJWSBC (ORCPT ); Wed, 23 Oct 2019 14:01:02 -0400 Received: by mail-wm1-f68.google.com with SMTP id g7so4201631wmk.4 for ; Wed, 23 Oct 2019 11:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QOrRgBSXpKlQbq6/XicVegpjHbS0n3UmJLpAj4QLq40=; b=VNeFRUAxmOAgNGJxcnbD6ZhmgZLedJxbfGqZSPtYqNoed4gFKhPHdPGjnpMqbscH1m Mo4irZt3HVrKp9k+B0toVSTxl0iCzG9YdqHr68gYdBliPNQ0Oxr7j/B66X5NpZJcAycw vv+GnwakB5+NJEo5qa+SLodKtzdnw5s+MwzDh0JpLSeVSI8i4JJrUbYZR6wvI1yjVep5 SVLUOA3J/24T6ssZlQqBofwNLO+Y1yN9gca9Um20XOEu1Wcj0do1YY8NbxB13hvaHJ7c ILxMqXpjKGaBOAu1q7Hja62cfCY5MpopgexHa8TK6mZymO3TgGbN5ghaE7dNQJoNdJ2+ 1tDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QOrRgBSXpKlQbq6/XicVegpjHbS0n3UmJLpAj4QLq40=; b=snzQ4x1ehGn7KJLnPU+j11FzYF49gi2EdDY0ULHF5+peoeqP/qy3RXFPVWTiaoop7K MSpH0AWTXXnlDHX2O2O8tvNUc51iiWrKD1wsDBxYtR04h6xEp5dGN0ljoSuGBSFTvBI/ /AwUU1w+Ns5KLE4xTIh7C533kM98ID/nHyPYxTyXbtuKfTNa0YBOukA+8fr2mnjBe9wt xnZykrGlSDC7sZHxx75qBMxPEDXeV2FGv1gAUZeMGHV6YXILb0Fws6lsnQ20kIF+62Jw fL+8znT3NpQyU7ywv/NN/xTGAemLrKU2cYO5rRjBxe2FcxKRkMhhOkdwGv1TfBIEg6tX waIg== X-Gm-Message-State: APjAAAUAHl8lLgRDh9166OzR4xYjREJ/1QtA/JK5HNcM2d204I+63d/z /M7Afn9QsW6OCc+lkjBZWhcXMQ== X-Received: by 2002:a1c:9e0d:: with SMTP id h13mr988724wme.136.1571853660319; Wed, 23 Oct 2019 11:01:00 -0700 (PDT) Received: from netronome.com (fred-musen.rivierenbuurt.horms.nl. [2001:470:7eb3:404:a2a4:c5ff:fe4c:9ce9]) by smtp.gmail.com with ESMTPSA id d199sm13125872wmd.35.2019.10.23.11.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 11:00:59 -0700 (PDT) Date: Wed, 23 Oct 2019 20:00:58 +0200 From: Simon Horman To: Matteo Croce Cc: netdev , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S . Miller" , Stanislav Fomichev , Daniel Borkmann , Song Liu , Alexei Starovoitov , Paul Blakey , LKML Subject: Re: [PATCH net-next 4/4] bonding: balance ICMP echoes in layer3+4 mode Message-ID: <20191023180057.GC28355@netronome.com> References: <20191021200948.23775-1-mcroce@redhat.com> <20191021200948.23775-5-mcroce@redhat.com> <20191023100132.GD8732@netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 23, 2019 at 06:58:16PM +0200, Matteo Croce wrote: > On Wed, Oct 23, 2019 at 12:01 PM Simon Horman > wrote: > > > > On Mon, Oct 21, 2019 at 10:09:48PM +0200, Matteo Croce wrote: > > > The bonding uses the L4 ports to balance flows between slaves. > > > As the ICMP protocol has no ports, those packets are sent all to the > > > same device: > > > > > > # tcpdump -qltnni veth0 ip |sed 's/^/0: /' & > > > # tcpdump -qltnni veth1 ip |sed 's/^/1: /' & > > > # ping -qc1 192.168.0.2 > > > 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 315, seq 1, length 64 > > > 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 315, seq 1, length 64 > > > # ping -qc1 192.168.0.2 > > > 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 316, seq 1, length 64 > > > 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 316, seq 1, length 64 > > > # ping -qc1 192.168.0.2 > > > 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 317, seq 1, length 64 > > > 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 317, seq 1, length 64 > > > > > > But some ICMP packets have an Identifier field which is > > > used to match packets within sessions, let's use this value in the hash > > > function to balance these packets between bond slaves: > > > > > > # ping -qc1 192.168.0.2 > > > 0: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 303, seq 1, length 64 > > > 0: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 303, seq 1, length 64 > > > # ping -qc1 192.168.0.2 > > > 1: IP 192.168.0.1 > 192.168.0.2: ICMP echo request, id 304, seq 1, length 64 > > > 1: IP 192.168.0.2 > 192.168.0.1: ICMP echo reply, id 304, seq 1, length 64 > > > > > > Signed-off-by: Matteo Croce > > > > I see where this patch is going but it is unclear to me what problem it is > > solving. I would expect ICMP traffic to be low volume and thus able to be > > handled by a single lower-device of a bond. > > > > ... > > Hi, > > The problem is not balancing the volume, even if it could increase due > to IoT devices pinging some well known DNS servers to check for > connection. > If a bonding slave is down, people using pings to check for > connectivity could fail to detect a broken link if all the packets are > sent to the alive link. > Anyway, although I didn't measure it, the computational overhead of > this changeset should be minimal, and only affect ICMP packets when > the ICMP dissector is used. So the idea is that by using different id values ping could be used to probe all lower-devices of a bond? If so then I understand why you want this and have no particular objection.