From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76CE4A0A0C for ; Wed, 14 Jul 2021 13:44:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FFA84132E; Wed, 14 Jul 2021 13:44:01 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id BE1844069F; Wed, 14 Jul 2021 13:43:57 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10044"; a="210308574" X-IronPort-AV: E=Sophos;i="5.84,239,1620716400"; d="scan'208,217";a="210308574" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 04:43:55 -0700 X-IronPort-AV: E=Sophos;i="5.84,239,1620716400"; d="scan'208,217";a="459960412" Received: from amandee1-mobl.gar.corp.intel.com (HELO [10.215.193.202]) ([10.215.193.202]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 04:43:52 -0700 To: Yuying Zhang , dev@dpdk.org, xiaoyun.li@intel.com, qi.z.zhang@intel.com Cc: stable@dpdk.org References: <20210714022027.940655-1-yuying.zhang@intel.com> From: "Singh, Aman Deep" Message-ID: <25deb3e1-238d-8b6a-b422-6d6066cbd311@intel.com> Date: Wed, 14 Jul 2021 17:13:41 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210714022027.940655-1-yuying.zhang@intel.com> Content-Language: en-GB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v1] app/testpmd: fix port MAC address after resetting port X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Yuying, On 7/14/2021 7:50 AM, Yuying Zhang wrote: > MAC address of each port in global variable ports hasn't been updated > after resetting. It was the initial one after resetting VF MAC address. > This patch gets correct port MAC address when starting port. > > Fixes: a5279d25616d ("app/testpmd: check status of getting MAC address") > Cc: stable@dpdk.org > > Signed-off-by: Yuying Zhang > --- > app/test-pmd/testpmd.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 1cdd3cdd12..204e0d52cd 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2456,7 +2456,6 @@ start_port(portid_t pid) > int peer_pi; > queueid_t qi; > struct rte_port *port; > - struct rte_ether_addr mac_addr; > struct rte_eth_hairpin_cap cap; > > if (port_id_is_invalid(pid, ENABLED_WARN)) > @@ -2627,11 +2626,14 @@ start_port(portid_t pid) > RTE_PORT_HANDLING, RTE_PORT_STARTED) == 0) > printf("Port %d can not be set into started\n", pi); > > - if (eth_macaddr_get_print_err(pi, &mac_addr) == 0) > + if (eth_macaddr_get_print_err(pi, &port->eth_addr) == 0) > printf("Port %d: %02X:%02X:%02X:%02X:%02X:%02X\n", pi, > - mac_addr.addr_bytes[0], mac_addr.addr_bytes[1], > - mac_addr.addr_bytes[2], mac_addr.addr_bytes[3], > - mac_addr.addr_bytes[4], mac_addr.addr_bytes[5]); > + port->eth_addr.addr_bytes[0], > + port->eth_addr.addr_bytes[1], > + port->eth_addr.addr_bytes[2], > + port->eth_addr.addr_bytes[3], > + port->eth_addr.addr_bytes[4], > + port->eth_addr.addr_bytes[5]); > > /* at least one port started, need checking link status */ > need_check_link_status = 1; Acked-by: Aman Deep Singh