Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3557643iob; Tue, 17 May 2022 02:38:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjA5ptb9Hw7aM2U8Uic+60GlK/IAdYNhJgcY77J21IERTlXZlIHtavc9xSCOaVW/3wSmJD X-Received: by 2002:aa7:ccc8:0:b0:42a:a827:ae74 with SMTP id y8-20020aa7ccc8000000b0042aa827ae74mr13163950edt.330.1652780293664; Tue, 17 May 2022 02:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652780293; cv=none; d=google.com; s=arc-20160816; b=fGhazSEC0m7F2bMdN5680cEXn1h7I1OSknT6wHMpoJMGGtSGTjtUp+3goQ8DMpkBiz ojEqaUDgtWJsHDde1WNaIKoOlw7Cg4VQ7b8sqKA5EWJGVm127EoJqlGrOoJxKoxR2Onl Dh7idOIoDJyG9Mki7TSJFMV2Va4w6bwOLrj4PipIYeEZwnwM7ZEHhoKygjLv3Gor0SXz CZkOeHI9l9SLGvTuiHyVvG3NgIyq5pfvIqpBBXxML76dKcIcuRmQOubQ/3ihO2+buDYW mOykzgVmNB9J5WM0dTRIsmcQqpUIVoi3bYieywtPltmTUdMVKyVEkykXtb+LfVnB1+np v4fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=4YEwMNpnuhs73NHZ6QM8LhUSh0u/pzA3ybkxsxihO5o=; b=Ni10SSYcL70PfghVPcTwMKF4+q3D4WGk5E/PDuXdLww4ViHGWtboFZidD+B3pR/xhj 2zutmhfmFrFm7yQN1Ix5O5PxKpL73+Lj7tvy7i6qqYr5rhPa9wcOJsjElIrEXJOuvIC1 KXwKmLWY6aKUiMoJhsaknsTf6L2XhuIr5K61LigofmRvuKaDGmhAUCBg//kVb/fWaKAI OCXatVunfR+TGxHh4Xz60gwVsLkGgv1gHR16IcjqrbcZntIP92vEAJj46Rh0BL/UG+rd KD5RGrrD0ids0Xime41d0T9MaMniBTqBoxr1auqZcXHozs9Gu6KCAcZMffBI4IuMUY82 3ejQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=GPtSprhw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxonhyperv.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd30-20020a170907969e00b006f37fd71fe2si2479381ejc.387.2022.05.17.02.37.47; Tue, 17 May 2022 02:38:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=GPtSprhw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxonhyperv.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244034AbiEQJF3 (ORCPT + 99 others); Tue, 17 May 2022 05:05:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236567AbiEQJEx (ORCPT ); Tue, 17 May 2022 05:04:53 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D56654968B; Tue, 17 May 2022 02:04:51 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id BB6AA20F722C; Tue, 17 May 2022 02:04:51 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BB6AA20F722C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1652778291; bh=4YEwMNpnuhs73NHZ6QM8LhUSh0u/pzA3ybkxsxihO5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=GPtSprhwNgGHoq+irb6ZwPGliargdDkiYDajjrGE6MkFTqzKUP8Yz7L+c43QExW7h y274rPkwZxPX2RZPV9tF/XWMGmj/fupyYINYOH945J7EhDKDrTyLt5k0NioYWPK65K 1TmC9iPcfHG+NoQyYt9OAaEwjzuKqKZjE1GlRT38= From: longli@linuxonhyperv.com To: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Jason Gunthorpe , Leon Romanovsky Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Long Li Subject: [PATCH 08/12] net: mana: Record port number in netdev Date: Tue, 17 May 2022 02:04:32 -0700 Message-Id: <1652778276-2986-9-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1652778276-2986-1-git-send-email-longli@linuxonhyperv.com> References: <1652778276-2986-1-git-send-email-longli@linuxonhyperv.com> Reply-To: longli@microsoft.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Long Li The port number is useful for user-mode application to identify this net device based on port index. Set to the correct value in ndev. Signed-off-by: Long Li --- drivers/net/ethernet/microsoft/mana/mana_en.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index b4af85e81834..6bb38c90b008 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1952,6 +1952,7 @@ static int mana_probe_port(struct mana_context *ac, int port_idx, ndev->max_mtu = ndev->mtu; ndev->min_mtu = ndev->mtu; ndev->needed_headroom = MANA_HEADROOM; + ndev->dev_port = port_idx; SET_NETDEV_DEV(ndev, gc->dev); netif_carrier_off(ndev); -- 2.17.1