Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4711639rwb; Tue, 20 Sep 2022 19:15:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4XHn9TgkuWr+Xucm7ZA4A/YN0JNaejDSwuZ2qy352P/iyYQlXEE2jKcIvAmdGw62W2k7e7 X-Received: by 2002:a05:6402:901:b0:454:2b6d:c39 with SMTP id g1-20020a056402090100b004542b6d0c39mr10103559edz.50.1663726527762; Tue, 20 Sep 2022 19:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663726527; cv=none; d=google.com; s=arc-20160816; b=IdfZYtLkyaNp3DR0rRnEmPvun4VYVLWEvippdvJpMn9FKV0Sdsi2cQowZdGUAxos6l rbNFFy72SdPmgCXEHed0f+VO0MPikvdFdY8REBbSO+7oE2uZnbkIZkLWz6Y12gyV6jpU F9Nap0+s1IlKj8OedLbAiCm2hxR3Ko2j5CPOGLeq6+tnuPuackqy5IgNmeG9PySe7Nlq wHpOQbb0EJw51wuoyUBy5fadaY5NY/vnDcyNS8HGK2etJBSC2P/ji2a/7S2dhjwTk3R5 u/hbzC7dWxWdMMyU413w4EHz/d8raYeWiMTve1Fgz4Jv8zsji6vxXuIRosDeIYFi8TP0 JI/g== 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=q9CZkNexxtish+UBtwe6RIT49v1UElOj7dKTWgwGRns=; b=CpOLhBjaca8/6sFSn9UDYidb90v7zvLOZuSj7mJlYSyTYApq5mrmM1Izm+QHEERI9J rnMf9NNTceoBCatGb6D8jgpc5I1cjL02OjQb4n5iFejF5GbdetIXLdl+NeyiUgfeLDdh 3+RUeOMyNzvtXSxQhGXNBqSGRuz1EFOzhnLSp/+MhMaOipkry6WRF77u1X8kuUBrart7 jTWCyVdrykU2qdW93kQ2Xn/Ozt7KgwSXGBDUl1qSAhWJjOwmI50zhETxURr/rhG0dhYt YQ5NXqxITtmA0rDq4TKPX63p41+n5JvMrfRwXHk/BHMCC6FdNopSxVqhEBFT/oT3lMln CTFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxonhyperv.com header.s=default header.b=FNl841Lv; 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 r2-20020a50aac2000000b0044fc3bffb34si1205233edc.136.2022.09.20.19.15.02; Tue, 20 Sep 2022 19:15:27 -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=FNl841Lv; 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 S231560AbiIUBX0 (ORCPT + 99 others); Tue, 20 Sep 2022 21:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231373AbiIUBXE (ORCPT ); Tue, 20 Sep 2022 21:23:04 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C9C5B7B287; Tue, 20 Sep 2022 18:23:01 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1004) id 94BFA20B9D3C; Tue, 20 Sep 2022 18:23:01 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 94BFA20B9D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1663723381; bh=q9CZkNexxtish+UBtwe6RIT49v1UElOj7dKTWgwGRns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=FNl841LvWQP20RlKZWgzBmw6G/zUAmFZNKIgDQKypE0JveSR575KuUcNpcExvBHVa 72k4noJXo4v5XoA14aXiqLyYco+Id7ppiwxmTvkh73DlIPE4Guyx1F4QGHCpS0C4t+ 0IcoS8Zukp+hj6buPHdqZTVwb8Zgd2GBgys13caE= 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 v6 07/12] net: mana: Record port number in netdev Date: Tue, 20 Sep 2022 18:22:27 -0700 Message-Id: <1663723352-598-8-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1663723352-598-1-git-send-email-longli@linuxonhyperv.com> References: <1663723352-598-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,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. Reviewed-by: Dexuan Cui Signed-off-by: Long Li Acked-by: Haiyang Zhang --- 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 345e3a47da3e..17cfee292cfb 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -2133,6 +2133,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