From patchwork Wed Aug 29 16:24:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 10580631 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6150614E1 for ; Wed, 29 Aug 2018 16:25:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50F982B6CD for ; Wed, 29 Aug 2018 16:25:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 396D72B72E; Wed, 29 Aug 2018 16:25:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A01752B6CD for ; Wed, 29 Aug 2018 16:25:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728976AbeH2UWm (ORCPT ); Wed, 29 Aug 2018 16:22:42 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41396 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729189AbeH2UWl (ORCPT ); Wed, 29 Aug 2018 16:22:41 -0400 Received: by mail-pl1-f194.google.com with SMTP id b12-v6so2519499plr.8 for ; Wed, 29 Aug 2018 09:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=HSyJH4U3MJMI/oLthjX37uebwzgPttugYsZjImt05Wo=; b=f5hIsU0oOk3DRgnVm5by9gbSzycfNLnmwIlQwKKxzXw+uaoUVTCIaD2LtuBBuzt/0p Y8X7fp2pWz69FovE1IL0nj7qPDbIoydDakBiSQkp9a7gd7+utRNqJ4nyIcAKKunNkGOc MbOWXGjVp1WZ1whsqEZZVmLqh08vV15eCj8YRoZ+ZmWuS+ptrqPqBGYBhwvDk/nVrdzo YwtrPxAeTwObWEKngxXUwvrqwYg60Tqsf1AFcpk3I0CVboy/thBWDaJ9O5dKAfL3P76a UST5Rd36nCuTi840g+dOBXwYm27Q0TYFpbauqvd/eqQo+Um9fpyxAJIxe+j5mtUEv+IK mZAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HSyJH4U3MJMI/oLthjX37uebwzgPttugYsZjImt05Wo=; b=J4Ghrubh5UsRFSXA5ohLbsTnJFCXCVDph6x3fvPdbYdEu0YwoDkF6M1jkBL++yvF2n TEx7MEr2FvZAOBAZLazb5l+O7PRcExVOGiMcva7J6gH5KkZZxHDnAELbotsZkKwcyQbJ MgtiJIKhG2oJWcGEfWWSAIQWvpb23U4WL0grHP7rXGzQPJWB4iosFZFYktl0QnoalT1q xR14CbVVegPYleqjxSoPQ+02NTPcv7ou/vjBl06ra+/3W+vnu1Z+KzTQDA7YwtyRz4LK /YXXUYMeo+fpVk6tzGRIcLx569NWx+gsdU5VGw5G6vZviK9laptfUjWqSIiTsl1UN9+s hiGg== X-Gm-Message-State: APzg51Co8ZqsryC4hY9l34X4/i1Ow+YKmYzHweJp5kt4wan1x39rlg/I Id7fC0Wx6BGDUyySBWKkPk6X3Q== X-Google-Smtp-Source: ANB0VdbRiA5a7qfqB2b2dGw/OqWEIkW2uwE7BdfqrhwNx56es4pFLo125PqoKGFf99xyixlDjWH+2w== X-Received: by 2002:a17:902:7884:: with SMTP id q4-v6mr6600706pll.174.1535559900659; Wed, 29 Aug 2018 09:25:00 -0700 (PDT) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id y18-v6sm5742943pfl.90.2018.08.29.09.24.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Aug 2018 09:24:59 -0700 (PDT) From: Stephen Hemminger X-Google-Original-From: Stephen Hemminger To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com Cc: devel@linuxdriverproject.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH net-next 0/2] hv_netvsc: associate VF and PV device by serial number Date: Wed, 29 Aug 2018 09:24:50 -0700 Message-Id: <20180829162452.25805-1-sthemmin@microsoft.com> X-Mailer: git-send-email 2.18.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Hyper-V implementation of PCI controller has concept of 32 bit serial number (not to be confused with PCI-E serial number). This value is sent in the protocol from the host to indicate SR-IOV VF device is attached to a synthetic NIC. Using the serial number (instead of MAC address) to associate the two devices avoids lots of potential problems when there are duplicate MAC addresses from tunnels or layered devices. The patch set is broken into two parts, one is for the PCI controller and the other is for the netvsc device. Normally, these go through different trees but sending them together here for better review. The PCI changes were submitted previously, but the main review comment was "why do you need this?". This is why. Stephen Hemminger (2): PCI: hv: support reporting serial number as slot information hv_netvsc: pair VF based on serial number drivers/net/hyperv/netvsc.c | 3 ++ drivers/net/hyperv/netvsc_drv.c | 58 ++++++++++++++++------------- drivers/pci/controller/pci-hyperv.c | 30 +++++++++++++++ 3 files changed, 66 insertions(+), 25 deletions(-)