Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1438683

Re: [PATCH] net/ixgbe: Allow resetting VF admin mac to zero

Path csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Alexander Duyck <alexander.duyck@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] net/ixgbe: Allow resetting VF admin mac to zero
Date Thu, 07 Jul 2016 17:40:02 +0200
Message-ID <rSjzc-nu-29@gated-at.bofh.it> (permalink)
References <rQ2VP-4RO-1@gated-at.bofh.it> <rS8DL-1uN-7@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Lo8SiFa0bBJqIf91d43m0WHxv4O0h35SX68I4BXmsc4=; b=AKDqD+Z1+pxrfOzdsZ/4uMXjoA1G1Z35En/g2qPEJV9HYr/iIkL4Mn9YXWqDix0lvx E+3F8GTPgPyBDHcbmfBHnTiJhsOiVhVDLiEGK5eGVL774yZdnfxJHxVyfkGgRgdsQUeF Qw69KTwMpgpZ7cJDTgrfp+g3SECsGcGRw4ZGmr8GXUArymQBOHWRGEy2YbwVcsbqAYTb 3Bb9VkTeVj3X60VH+hAYwiHTzdK2LwZ4wDFT8Lv5QNkPWqdpK4wH6Y6kdIQ1G8gdmSO0 rbNEIWWWBEQIewMNM6/ejsDgGF61JMPBYEE0ZJaNPyS7co5xf9uhXekz0Of20EKKQOaB VnPA==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Lo8SiFa0bBJqIf91d43m0WHxv4O0h35SX68I4BXmsc4=; b=O9SVOPtoxsosoDPBGg2pdNbiDbaqZ8fwkWuyIVteEVQe6Z+CooSx6Ea01h4i4BtznA +Zu8dpS7b0D0UIEhS4yG8vLUbipOLNL34/VMM7bhPuUWdJbah2f8syJF3WesKWsw6YaF 1INlRK/O5XTQtEkyEcxhcO1zUhN8Yhp79GiqXHWrWmkBrTTdt+Ee1plr1vjuFQnEG4Y0 BoGXQ8CwpT80bNuc9GrTboYSQURfe1ldsXIDnsUtYZAlKD4e9VpnxsBBnZE74zWD7M5+ vNPyQjKqCNf6JLGRFN46qM2NK436ygTs2rkxbu0qF4uqfl58tkq7dl09c/6X4Z4mgpnx R8ew==
X-Gm-Message-State ALyK8tJaKFyfr+PddCtYIVs4JyMhzJZ3DXu5Qef+ZBxnSXlUR2Bl7v+i9+uBKZF31f9Ax5BLd7SkUnyYmVvV/A==
X-Received by 10.107.31.129 with SMTP id f123mr3431100iof.180.1467905905503; Thu, 07 Jul 2016 08:38:25 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 34
Organization linux.* mail to news gateway
X-Original-Cc Juerg Haefliger <juerg.haefliger@hpe.com>, Netdev <netdev@vger.kernel.org>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
X-Original-Date Thu, 7 Jul 2016 08:38:24 -0700
X-Original-Message-ID <CAKgT0UeYdRAo8F7QsKMn1Wws0Psvy6aXCCE7Ms0qdJ5B-PDSyg@mail.gmail.com>
X-Original-References <1467364778-27198-1-git-send-email-juerg.haefliger@hpe.com> <20160706205721.15eae36c@xeon-e3>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1438683

Show key headers only | View raw


On Wed, Jul 6, 2016 at 8:57 PM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Fri,  1 Jul 2016 11:19:38 +0200
> Juerg Haefliger <juerg.haefliger@hpe.com> wrote:
>
>> The VF administrative mac addresses (stored in the PF driver) are
>> initialized to zero when the PF driver starts up.
>>
>> These addresses may be modified in the PF driver through ndo calls
>> initiated by iproute2 or libvirt.
>>
>> While we allow the PF/host to change the VF admin mac address from zero
>> to a valid unicast mac, we do not allow restoring the VF admin mac to
>> zero. We currently only allow changing this mac to a different unicast mac.
>>
>> This leads to problems when libvirt scripts are used to deal with
>> VF mac addresses, and libvirt attempts to revoke the mac so this
>> host will not use it anymore.
>>
>> Fix this by allowing resetting a VF administrative MAC back to zero.
>>
>> Implementation and commit message shamelessly stolen from:
>> commit 6e5224224faa ("net/mlx4_core: Allow resetting VF admin mac to zero")
>>
>> Signed-off-by: Juerg Haefliger <juerg.haefliger@hpe.com>
>
> Since set mac is allowed any time even when device is up, you must
> prevent a a device that is in UP state from having all zero MAC address.

I'm pretty sure the actual MAC address of the VF does not change in
such a case, it should retain the last MAC address it was given from
the PF and report link down until a new one is assigned.

- Alex

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] net/ixgbe: Allow resetting VF admin mac to zero Juerg Haefliger <juerg.haefliger@hpe.com> - 2016-07-01 11:30 +0200
  Re: [PATCH] net/ixgbe: Allow resetting VF admin mac to zero Stephen Hemminger <stephen@networkplumber.org> - 2016-07-07 06:00 +0200
    Re: [PATCH] net/ixgbe: Allow resetting VF admin mac to zero Alexander Duyck <alexander.duyck@gmail.com> - 2016-07-07 17:40 +0200

csiph-web