DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Singh, Aman Deep" <aman.deep.singh@intel.com>
To: Yuying Zhang <yuying.zhang@intel.com>,
	dev@dpdk.org, xiaoyun.li@intel.com, qi.z.zhang@intel.com
Cc: stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1] app/testpmd: fix port MAC address after resetting port
Date: Wed, 14 Jul 2021 17:13:41 +0530	[thread overview]
Message-ID: <25deb3e1-238d-8b6a-b422-6d6066cbd311@intel.com> (raw)
In-Reply-To: <20210714022027.940655-1-yuying.zhang@intel.com>

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 <yuying.zhang@intel.com>
> ---
>   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 <aman.deep.singh@intel.com>


  reply	other threads:[~2021-07-14 11:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  2:20 Yuying Zhang
2021-07-14 11:43 ` Singh, Aman Deep [this message]
2021-07-15  2:15 ` Li, Xiaoyun
2021-07-24 11:29   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25deb3e1-238d-8b6a-b422-6d6066cbd311@intel.com \
    --to=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaoyun.li@intel.com \
    --cc=yuying.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).