From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756187AbcGGD5M (ORCPT ); Wed, 6 Jul 2016 23:57:12 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:32923 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756010AbcGGD5K (ORCPT ); Wed, 6 Jul 2016 23:57:10 -0400 Date: Wed, 6 Jul 2016 20:57:21 -0700 From: Stephen Hemminger To: Juerg Haefliger Cc: netdev@vger.kernel.org, jeffrey.t.kirsher@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/ixgbe: Allow resetting VF admin mac to zero Message-ID: <20160706205721.15eae36c@xeon-e3> In-Reply-To: <1467364778-27198-1-git-send-email-juerg.haefliger@hpe.com> References: <1467364778-27198-1-git-send-email-juerg.haefliger@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 1 Jul 2016 11:19:38 +0200 Juerg Haefliger 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 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.