Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp87185imm; Mon, 1 Oct 2018 07:06:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV61x6Ut7S+xqevutXjnbyBBOyyK8eJTR8Z9IGqZmieEquIF09b7aepin9uQJC6o5rtQTzl8s X-Received: by 2002:a17:902:650f:: with SMTP id b15-v6mr11816905plk.2.1538402814503; Mon, 01 Oct 2018 07:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538402814; cv=none; d=google.com; s=arc-20160816; b=GKd0LzgV13SJsZ8YqYObae0gn33rAnRms1Jg3Kyt3Ph8Uhd8BaBSnDFns8JV9SNfhU a76U9WE6Hxsl1dvEjrIjkRCPpIpHM7nN/RCOxg9m6SpZRPahdRSlCqMuiZmpNUJfzUv5 2FcXPpa+/Ow+dIa4xkbjx/U5wWQX88FsKeCyTH59Kq4c0GzRK+3+hIb3dq3WCYiUPGVV 7II3cvj1981x/wmI6cUbbBQHZfcx/1dTe2pwFViy6i6VZhfXIZOVh+xj14ad4adA0328 wDBckckE4SlUH7al2Q3g63VziU6518QIGA2jXObIu2Bhpm2xE82JmmMtKpdRQNGmngtX weig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=5T7pE4qzMkLVakrC9ZdwQdfR3ePliJEv70qnWJM9I1E=; b=T7vUE5YtdhtKtOwMhLJidJ39JPSDtgyPKSG49gQckK1VhIwf+tXRmqzlu+0qlZn7Kh TYI0cpuSsfoX3SciiKx1n8lWy5dI+AGZubILEkbmSxetBlCPcwy5AtuXCVr1DlhOWA9o EDNK1lpzIOASJUsgB0NThsL+oKXppXMXPpubFmWxTkrgeRldQOI53dxa9osnc9GEWpcm eGUd6Tt0y/Z5EmnEM0vrKZfZO+L/7HQf9h8EF6rZBSCK5FHux+IZZyu5/D/kp6TJXUEl F1PJPSqsIIV8ICboSZibjxON+EHk2o/Ws+Q4thdbGUj3R0SHul1X2s2jqrifG6lEXGc4 5Gxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="o/nL5UDU"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k24-v6si12076162pgj.28.2018.10.01.07.06.32; Mon, 01 Oct 2018 07:06:54 -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=@gmail.com header.s=20161025 header.b="o/nL5UDU"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729457AbeJAUoS (ORCPT + 99 others); Mon, 1 Oct 2018 16:44:18 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:32953 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728979AbeJAUoR (ORCPT ); Mon, 1 Oct 2018 16:44:17 -0400 Received: by mail-qt1-f196.google.com with SMTP id q40-v6so1127709qte.0; Mon, 01 Oct 2018 07:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5T7pE4qzMkLVakrC9ZdwQdfR3ePliJEv70qnWJM9I1E=; b=o/nL5UDU/6j6EJ3ugGsGQEtzXJhWN+6ei5Fit/8mDi0gi8hnAUMBEomCbXkzQdvDGt WB3xQh0FjmerkcvmwtfsJO3H8xyFmv7HElOEwncS4iytzn3hXcxqjzxV7oGxeb146n2+ yPDweCXZWSFTrd4juxrobSPTDT/2u94I8TMPi1ZtP1JwJoHR3nt5x2nljrUamtLtkY6j acowRDgs21NoFPmsuyEDa54gtiYlugbUSRB9CCxh9pqHFV+O4QGIxK+1FVUvF87Eua0G +0WIzhT4hHaCvT/J7O4GspZUpXKjm/ay7T9w9FQRHNzqzrynBE3oOcwJiVAnAnTX+PNl TCqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5T7pE4qzMkLVakrC9ZdwQdfR3ePliJEv70qnWJM9I1E=; b=kjbDLBcXLKrB2caS/FS99I5uR/NrPHfnBr+KrpfK87cCFGtO/wUcCX6tCD462cQGKL HSfwva0tFEVONodWNSsJe0A3f3o++6kNADfBY1tYVSpQ1SrVxVuWZkaO6oMLLFRLOaKY dKIbBRKDEJaUycXSqT6SQj4qLggGPD1NVHtkJ95wfwCr7Wtd2dj7IVK0quxkC4bHtRlO n1eTcXm8P+BHWa2//e3uAcKPQi/xnYbfGLOGLjmSGQC8/mmqVkH7qReakZQfHqiXOAT9 smvPZA1GqiOqmzeYisPQIFOnO0n1YWgrf/f+TkxB1NfxcS6PET7xnG35NiuDq4ULgGHM 0AAA== X-Gm-Message-State: ABuFfogDYsvg7V4X/N28RR93SnGQxDZdcf3RJOetj9i+QU0Dv6FV1OLw FPpPb+HPTeUC1jP3tVDQ2wxwGLWU X-Received: by 2002:ac8:fa2:: with SMTP id b31-v6mr8739275qtk.2.1538402777715; Mon, 01 Oct 2018 07:06:17 -0700 (PDT) Received: from [192.168.1.10] (pool-96-255-154-210.washdc.fios.verizon.net. [96.255.154.210]) by smtp.gmail.com with ESMTPSA id f48-v6sm6149086qte.17.2018.10.01.07.06.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 07:06:16 -0700 (PDT) Subject: Re: [PATCH] team: set IFF_SLAVE on team ports To: Jiri Pirko , Stephen Hemminger Cc: Jan Blunck , LKML , netdev@vger.kernel.org References: <1436435914-8903-1-git-send-email-jblunck@infradead.org> <20150709100727.GE2270@nanopsycho.orion> <20150710064147.GA2204@nanopsycho.orion> <20180930071414.GF2209@nanopsycho.orion> <20180930113805.3b8e62a1@shemminger-XPS-13-9360> <20180930093452.GG2209@nanopsycho.orion> From: Chas Williams <3chas3@gmail.com> Message-ID: Date: Mon, 1 Oct 2018 10:06:16 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180930093452.GG2209@nanopsycho.orion> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/30/18 05:34, Jiri Pirko wrote: > Sun, Sep 30, 2018 at 11:38:05AM CEST, stephen@networkplumber.org wrote: >> On Sun, 30 Sep 2018 09:14:14 +0200 >> Jiri Pirko wrote: >> >>> Thu, Sep 27, 2018 at 04:04:26PM CEST, 3chas3@gmail.com wrote: >>>> >>>> >>>> On 07/10/15 02:41, Jiri Pirko wrote: >>>>> Thu, Jul 09, 2015 at 05:36:55PM CEST, jblunck@infradead.org wrote: >>>>>> On Thu, Jul 9, 2015 at 12:07 PM, Jiri Pirko wrote: >>>>>>> Thu, Jul 09, 2015 at 11:58:34AM CEST, jblunck@infradead.org wrote: >>>>>>>> The code in net/ipv6/addrconf.c:addrconf_notify() tests for IFF_SLAVE to >>>>>>>> decide if it should start the address configuration. Since team ports >>>>>>>> shouldn't get link-local addresses assigned lets set IFF_SLAVE when linking >>>>>>>> a port to the team master. >>>>>>> >>>>>>> I don't want to use IFF_SLAVE in team. Other master-slave devices are >>>>>>> not using that as well, for example bridge, ovs, etc. >>>>>>> >>>>>> >>>>>> Maybe they need to get fixed too. I've used that flag because it is >>>>>> documented as >>>>>> a "slave of a load balancer" which describes what a team port is. >>>>>> >>>>>> >>>>>>> I think that this should be fixed in addrconf_notify. It should lookup >>>>>>> if there is a master on top and bail out in that case. >>>>>> >>>>>> There are other virtual interfaces that have a master assigned and want to >>>>>> participate in IPv6 address configuration. >>>>> >>>>> Can you give me an example? >>>> >>>> I would like to revisit this patch (yes, I know it has been a while). I >>>> believe the VRF implementation uses master to group the interfaces under >>>> a single interface. >>>> >>>> I don't see a reason not to use IFF_SLAVE since team and bonding are fairly >>>> similar. >>> >>> Again, why do you need team port to have IFF_SLAVE flag? What do you >>> want to achieve >> >> Without setting this flag IPv6 will try and make a link specific address. > > Why is it not an issue with bridge, ovs, and other master-slave devices? > It very well might be an issue for bridge and ovs. Other master-slave devices include the existing VRF implementation in the kernel and those slave interfaces will certainly want to use IPv6. However, IFF_SLAVE has a specific meaning: ./include/uapi/linux/if.h: * @IFF_SLAVE: slave of a load balancer. Volatile. The bonding driver is not the only user: ./drivers/net/eql.c:#define eql_is_slave(dev) ((dev->flags & IFF_SLAVE) == IFF_SLAVE) ./drivers/net/eql.c: slave->dev->flags &= ~IFF_SLAVE; ./drivers/net/eql.c: slave->dev->flags |= IFF_SLAVE; The team driver would like to use this same flag since it is a load balancer as well. The side effect of not assigning IPv6 is a bonus. The fact that bridges and ovs are also likely broken is a different issue. Should there be a another flag that says "layer 2 only"? Very possibly, but that is something all these interfaces should be using to include bonding, team, eql, obs, bridge etc. That's not a reasonable objection to labeling the team slave as slaves since they are literally slaves of a load balancer.