Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp37220pxb; Tue, 12 Jan 2021 19:17:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQu6COUgiUdqSZNHPsuzjc45R6jyx3+OmFcBjy01zfoHE36iJK0q5FF+GXV/Ncb9U5FlFx X-Received: by 2002:a05:6402:5193:: with SMTP id q19mr124726edd.264.1610507832178; Tue, 12 Jan 2021 19:17:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610507832; cv=none; d=google.com; s=arc-20160816; b=ZLZj+e9PiMC8vNP52qTUPaNVaVAbYY9h962rzwNTnIMnLvbArPY0yM/FN6OC7xatn7 ShzcBoV4aTma4tOoEdCmF49YyG3zsVJScI5xGc+41ShaixZZfboxCU5mXBd5gXG9oxa9 +P8eTMynb/UyIilsg8Qhl3Ry1FXVqYHYZm3w33okQxl7c4QOvT4by3YfeXFnrA2Dk/n8 n8sWQHiAACr9mnEBPy4gd9hlZcFN5/adpSqrCUN6fsnye8f7I3tGEtwNebwVqB8xXH0h cojLNFc7hSSa7u1R89Ze68P1bPdIQQvp62x8Ue7Is/DuBSEb517S7deeMT6gvva1JGdP Lkpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Fks7S4sWATCTrvgOGnefCKrK3VzEzfrq2t139PnWz5s=; b=c8pN5Y8KGbwzTtVo7VVe7lcxVQtbPQjsCYDBRl0mQ3jWqAigRjYHguY1tjOTNq8lOB xRRAeBmfNh7ApSldrdi/rkB2E20jNF2TGDKBCwlGAG1oew/4XxDczspYg6QEDr7BcJJx TTsQ2CCYTgK5KYMGhOeYq0fBfPdVKsx6twGcsmz8BhlQP2cuMOM4ErpPn+PZBAIbICzS sCg/F0ZDbqsUaS8Gy8VeeeEyAuI7dX+W5caosF4BCbmmHY64eY33Jt0YIMzdjFN4le8I TB8Z1fJ5RomdHbOoXqvOloXrB8uQSLCFj96V5BQBkQuUuA90au9+6aNm+BDx/HJMJ3Bg E+IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kp5AGdTN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o26si362009edw.74.2021.01.12.19.16.48; Tue, 12 Jan 2021 19:17:12 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=Kp5AGdTN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405152AbhALWdu (ORCPT + 99 others); Tue, 12 Jan 2021 17:33:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29457 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbhALWdu (ORCPT ); Tue, 12 Jan 2021 17:33:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610490743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fks7S4sWATCTrvgOGnefCKrK3VzEzfrq2t139PnWz5s=; b=Kp5AGdTN3bRnOzGOBP6D9hnzVUzdOfuyRP6+ylWB3i/7XeI4XcIaqxRhZ7vPgxv+on1O0R 3ZIzojxVNbHlgadqn77JeslMuM5WxEVSXgpRVdm2b73b4vrxWtwqiF2c4GILIUbDWmoXWA kZS07BcNPOwBcq4+nI0jS0si6wJeqdg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-588-Z82Ggr4cMQy_P00oAJMsZg-1; Tue, 12 Jan 2021 17:32:19 -0500 X-MC-Unique: Z82Ggr4cMQy_P00oAJMsZg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0380BE75C; Tue, 12 Jan 2021 22:32:18 +0000 (UTC) Received: from redhat.com (dhcp-17-185.bos.redhat.com [10.18.17.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C098D1F0; Tue, 12 Jan 2021 22:32:16 +0000 (UTC) Date: Tue, 12 Jan 2021 17:32:14 -0500 From: Jarod Wilson To: Jay Vosburgh Cc: linux-kernel@vger.kernel.org, Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Jakub Kicinski , Thomas Davis , netdev@vger.kernel.org Subject: Re: [RFC PATCH net-next] bonding: add a vlan+srcmac tx hashing option Message-ID: <20210112223214.GJ476710@redhat.com> References: <20201218193033.6138-1-jarod@redhat.com> <21784.1608337139@famine> <20210108000340.GC29828@redhat.com> <20210112211216.GI476710@redhat.com> <30207.1610487550@famine> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30207.1610487550@famine> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 01:39:10PM -0800, Jay Vosburgh wrote: > Jarod Wilson wrote: > > >On Thu, Jan 07, 2021 at 07:03:40PM -0500, Jarod Wilson wrote: > >> On Fri, Dec 18, 2020 at 04:18:59PM -0800, Jay Vosburgh wrote: > >> > Jarod Wilson wrote: > >> > > >> > >This comes from an end-user request, where they're running multiple VMs on > >> > >hosts with bonded interfaces connected to some interest switch topologies, > >> > >where 802.3ad isn't an option. They're currently running a proprietary > >> > >solution that effectively achieves load-balancing of VMs and bandwidth > >> > >utilization improvements with a similar form of transmission algorithm. > >> > > > >> > >Basically, each VM has it's own vlan, so it always sends its traffic out > >> > >the same interface, unless that interface fails. Traffic gets split > >> > >between the interfaces, maintaining a consistent path, with failover still > >> > >available if an interface goes down. > >> > > > >> > >This has been rudimetarily tested to provide similar results, suitable for > >> > >them to use to move off their current proprietary solution. > >> > > > >> > >Still on the TODO list, if these even looks sane to begin with, is > >> > >fleshing out Documentation/networking/bonding.rst. > >> > > >> > I'm sure you're aware, but any final submission will also need > >> > to include netlink and iproute2 support. > >> > >> I believe everything for netlink support is already included, but I'll > >> double-check that before submitting something for inclusion consideration. > > > >I'm not certain if what you actually meant was that I'd have to patch > >iproute2 as well, which I've definitely stumbled onto today, but it's a > >2-line patch, and everything seems to be working fine with it: > > Yes, that's what I meant. > > >$ sudo ip link set bond0 type bond xmit_hash_policy 5 > > Does the above work with the text label (presumably "vlansrc") > as well as the number, and does "ip link add test type bond help" print > the correct text for XMIT_HASH_POLICY? All of the above looks correct to me, output below. Before submitting... Could rename it from vlansrc to vlan+srcmac or some variation thereof if it's desired. I tried to keep it relatively short, but it's perhaps a bit less succinct like I have it now, and other modes include a +. $ sudo modprobe bonding mode=2 max_bonds=1 xmit_hash_policy=0 $ sudo ip link set bond0 type bond xmit_hash_policy vlansrc $ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v4.18.0-272.el8.vstx.x86_64 Bonding Mode: load balancing (xor) Transmit Hash Policy: vlansrc (5) MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 $ sudo ip link add test type bond help Usage: ... bond [ mode BONDMODE ] [ active_slave SLAVE_DEV ] [ clear_active_slave ] [ miimon MIIMON ] [ updelay UPDELAY ] [ downdelay DOWNDELAY ] [ peer_notify_delay DELAY ] [ use_carrier USE_CARRIER ] [ arp_interval ARP_INTERVAL ] [ arp_validate ARP_VALIDATE ] [ arp_all_targets ARP_ALL_TARGETS ] [ arp_ip_target [ ARP_IP_TARGET, ... ] ] [ primary SLAVE_DEV ] [ primary_reselect PRIMARY_RESELECT ] [ fail_over_mac FAIL_OVER_MAC ] [ xmit_hash_policy XMIT_HASH_POLICY ] [ resend_igmp RESEND_IGMP ] [ num_grat_arp|num_unsol_na NUM_GRAT_ARP|NUM_UNSOL_NA ] [ all_slaves_active ALL_SLAVES_ACTIVE ] [ min_links MIN_LINKS ] [ lp_interval LP_INTERVAL ] [ packets_per_slave PACKETS_PER_SLAVE ] [ tlb_dynamic_lb TLB_DYNAMIC_LB ] [ lacp_rate LACP_RATE ] [ ad_select AD_SELECT ] [ ad_user_port_key PORTKEY ] [ ad_actor_sys_prio SYSPRIO ] [ ad_actor_system LLADDR ] BONDMODE := balance-rr|active-backup|balance-xor|broadcast|802.3ad|balance-tlb|balance-alb ARP_VALIDATE := none|active|backup|all ARP_ALL_TARGETS := any|all PRIMARY_RESELECT := always|better|failure FAIL_OVER_MAC := none|active|follow XMIT_HASH_POLICY := layer2|layer2+3|layer3+4|encap2+3|encap3+4|vlansrc LACP_RATE := slow|fast AD_SELECT := stable|bandwidth|count -- Jarod Wilson jarod@redhat.com