Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1038804iog; Wed, 15 Jun 2022 19:09:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1seuNTZ4iVJqqZi5gzT32z11tDr5a+neVDX8EEUHISYYkvAa/P1k2EhP8CAHdF8IH/k+9mE X-Received: by 2002:a17:902:e742:b0:168:bd3e:967f with SMTP id p2-20020a170902e74200b00168bd3e967fmr2487107plf.116.1655345375703; Wed, 15 Jun 2022 19:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655345375; cv=none; d=google.com; s=arc-20160816; b=Q5HnhXXdoS9qwkqdjO5ZZJ0CF6XvLZL8rf7KXUNUFdry3V3eoxnKgWzX73fnMQ7lrc QzTRvmX1Kexdd8CqgSNNVtAhk00x2YJxiVrjwWmndwiyMWsHeCDY4RZKSiE72DqVV4Wt 1r4jVi+4YIKW2DNb5AYtTnyRxXZj91aGnfYVbQn2laLRERJ4CRxCdkH+YxhD23pnyT0c 3jalWdvPzMGK1DWgjW5dvx7CEbAvrhJUq5edL46xLtRnKxaO2HvOPEurPSCZWWxQzBS2 ohqKb98RvfLeES9stnGoi5RLCWThJdlNo9R+qZEUnxO64aJotFUBwdIdsWtXojtSaDPv uSQA== 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=mdJ7NrqDICYWm9sKPzBwo5lU7lgJE/b9OGT82GG26KY=; b=PTVc9MQxY8CTGlLulRjyzWYztg98KzZVR8rW+6FRxYScHsjABSTgZs/uRS4QxxNWqz 6p2lvllZOPnhXbPVSDanv5Z5MIchNzXlZaAUznPpLDeYd3v7ylim1QhQ/H7WVdBG2O4E 7Nt3huAJSMeqT08K0ylX6cmuUgvRWQSSDdssNiJ7ChiDFwDLU+x9s7X/ghvXZPk+sjSA ENGeDhpsht31+6Sfzgy5rpPF8n7x87GWLRYTgxVA62soKS7aVg2j5kskOHDHjhY1aL9+ tXbqGA30Uv2XUInXJlYyuZL1DId58RSpkUX6XvLrU2HgCINd6Mh7I6LYBpy1uCNlI1ar w3xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=jLKDB8MA; 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 q14-20020a170902f78e00b00168ebc82df8si1061030pln.61.2022.06.15.19.09.22; Wed, 15 Jun 2022 19:09:35 -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=jLKDB8MA; 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 S1358436AbiFPCIE (ORCPT + 99 others); Wed, 15 Jun 2022 22:08:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350941AbiFPCHj (ORCPT ); Wed, 15 Jun 2022 22:07:39 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A015F5F4B; Wed, 15 Jun 2022 19:07:37 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id 09F8320C32AA; Wed, 15 Jun 2022 19:07:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 09F8320C32AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1655345253; bh=mdJ7NrqDICYWm9sKPzBwo5lU7lgJE/b9OGT82GG26KY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=jLKDB8MAWbTMi7pSiKUASz01VRoPV6DsXaVkZfduYjVKoUMY7Lo2rBXZeYRckL3A3 ob61hqA5Kjq1fWlGteB/VmrSSzlLmNfcVtEV/VUBuloHUF9sFejMvkzSRnDe+o8knb 4Gz/iDPNvM+mvjudi1rM7Whuckas7KePro01CKCs= 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 , edumazet@google.com, shiraz.saleem@intel.com, Ajay Sharma Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Long Li Subject: [Patch v4 08/12] net: mana: Record port number in netdev Date: Wed, 15 Jun 2022 19:07:16 -0700 Message-Id: <1655345240-26411-9-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1655345240-26411-1-git-send-email-longli@linuxonhyperv.com> References: <1655345240-26411-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 b769fccc076d..963a4dbb46ea 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -1975,6 +1975,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