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 C3BACA0C47 for ; Tue, 10 Aug 2021 17:45:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDBF94014F; Tue, 10 Aug 2021 17:45:12 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by mails.dpdk.org (Postfix) with ESMTP id 36AA24014F for ; Tue, 10 Aug 2021 17:45:12 +0200 (CEST) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id 1E5723F338 for ; Tue, 10 Aug 2021 15:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610312; bh=J7kasHTDew+DAEf7NC9fXBJkwM0KI7MuEzI6Ziu2OUw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lnKyXuP4jT7oMy6m2WEkSC+Jq3qTwQi8FI1583A+cIXqAtEt4pAwF0kH2Y9HRgt+v Lisl2e4B/xxDpzHgf4Di0TThYkEUdATtU06Rb6+M2BgciVQlKp5+BK+bredrvR7akw VeUI34V8fikLjpCVQVPRSE16fDUuGftCpQD9e2GHWzwwkPBuMbJBg0Qg8IkDqHhTw0 e3V06XT9VdR1loFQ/MG2FG9B5PPlaSFK3CVeSHv8hQiHn8Db7F145Y1rmY6V0cCpMN Wuk8+s+1UelV2Mz/Th2b/49kS6KK5f54L0wOxYA4YS0/3hsTVVtKW68bMVev/e9hHe qvj7Djdd6r+3Q== Received: by mail-ej1-f69.google.com with SMTP id r21-20020a1709067055b02904be5f536463so5767775ejj.0 for ; Tue, 10 Aug 2021 08:45:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J7kasHTDew+DAEf7NC9fXBJkwM0KI7MuEzI6Ziu2OUw=; b=pBD8KsNjN2A0Q7oRQHaOMR3YbpGne6TXjI30IDqsaB2rq/pOeC3KV6i8YkhvLyKhPC Ean8n3iYfn3dXPQWHPm+Brw6y1K20OY/m9Z8uxM7d9YBRREcLcbbqIXMcmi9P7+Ez652 14KPD09Bbxalm8LZNCNVJAe34AzkytZbDN2m18xkyEIs+pjBAiYgHGMuWwh18T6gdU3A 9wzjw3gxxc7owiIohRMKNLy1Bz4gglNVg19QjA+JfAKROPujiKYw8Hgm/5bjKvrF+rLw zqyl3RntSrs1Z6hVrkrmOlLVnhaDXE+akZpvEcGVCNpviHUjPdH8CE8rwrJpF0NbPhJd eLPw== X-Gm-Message-State: AOAM533+GlcTEzqXuzNTyRxkuOL0gEy0sMIJcGx60xyfyoGf4FEbXuWa RACjpwmNTPmlZFlC55/tnt8JCGqPJpamMBgTzuOR8WjbEmOxpFCquIlxYx/IXyqkhZMIN0BFCUN sil+k+ph6j4Spi+zM56clyOGg X-Received: by 2002:a17:906:3745:: with SMTP id e5mr13828213ejc.400.1628610311763; Tue, 10 Aug 2021 08:45:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfGMW+lur3227/hRLKSYwXMDanpSj5dn2PM1D1W8nbmr6YZX6jSgDyfJdfVAHj79e7d3fL+g== X-Received: by 2002:a17:906:3745:: with SMTP id e5mr13828199ejc.400.1628610311605; Tue, 10 Aug 2021 08:45:11 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id cb4sm7008642ejb.72.2021.08.10.08.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:45:11 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Yuying Zhang Cc: Aman Deep Singh , Xiaoyun Li , dpdk stable Date: Tue, 10 Aug 2021 17:40:11 +0200 Message-Id: <20210810154022.749358-91-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix MAC address after port reset' has been queued to stable release 19.11.10 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, FYI, your patch has been queued to stable release 19.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/f9aae4b6ebdcad12c010c32b4f9036b2a4486704 Thanks. Christian Ehrhardt --- >From f9aae4b6ebdcad12c010c32b4f9036b2a4486704 Mon Sep 17 00:00:00 2001 From: Yuying Zhang Date: Wed, 14 Jul 2021 02:20:27 +0000 Subject: [PATCH] app/testpmd: fix MAC address after port reset [ upstream commit 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 ] 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") Signed-off-by: Yuying Zhang Acked-by: Aman Deep Singh Acked-by: Xiaoyun Li --- 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 9485953aba..0861436c02 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2317,7 +2317,6 @@ start_port(portid_t pid) portid_t 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)) @@ -2481,11 +2480,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; -- 2.32.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-10 15:11:16.528418773 +0200 +++ 0091-app-testpmd-fix-MAC-address-after-port-reset.patch 2021-08-10 15:11:13.122638850 +0200 @@ -1 +1 @@ -From 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 Mon Sep 17 00:00:00 2001 +From f9aae4b6ebdcad12c010c32b4f9036b2a4486704 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index a48f70962f..37aba40272 100644 +index 9485953aba..0861436c02 100644 @@ -24,2 +25,2 @@ -@@ -2441,7 +2441,6 @@ start_port(portid_t pid) - int peer_pi; +@@ -2317,7 +2317,6 @@ start_port(portid_t pid) + portid_t pi; @@ -32 +33 @@ -@@ -2612,11 +2611,14 @@ start_port(portid_t pid) +@@ -2481,11 +2480,14 @@ start_port(portid_t pid)