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 4C6C3A034F for ; Tue, 1 Mar 2022 11:44:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4072D407FF; Tue, 1 Mar 2022 11:44:40 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3DE91407FF for ; Tue, 1 Mar 2022 11:44:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646131478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UE3MUVDypQHimKBQXB6Lr9ohVpIWfAW43M4VjOCrGKU=; b=bptd7z4KPQ80WOTMT5EN5xVIco1YQTGDoWwa2nr11lGANwDSKc/XaCvY7gE4r7S4ehflTU D+hEYV4rwo79ISgEWt83/gdrclczdzi9SkBNfYiIuEkLbtxgpURgbthpoz5xddWSDRFli2 +MMx+i1528bv/Nrp6dnC1O95jjWMNe4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-52-xbtY8wLoNFGjFrbBGV674A-1; Tue, 01 Mar 2022 05:44:35 -0500 X-MC-Unique: xbtY8wLoNFGjFrbBGV674A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F2C24100C609; Tue, 1 Mar 2022 10:44:34 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id A805A752D2; Tue, 1 Mar 2022 10:44:13 +0000 (UTC) From: Kevin Traynor To: David Marchand Cc: Christophe Fontaine , Ferruh Yigit , dpdk stable Subject: patch 'ethdev: fix MAC address in telemetry device info' has been queued to stable release 21.11.1 Date: Tue, 1 Mar 2022 10:41:57 +0000 Message-Id: <20220301104300.334382-41-ktraynor@redhat.com> In-Reply-To: <20220301104300.334382-1-ktraynor@redhat.com> References: <20220301104300.334382-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 Hi, FYI, your patch has been queued to stable release 21.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/06/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/116bfaa14e1db21c3d3fbd2ec4cfd125c790bded Thanks. Kevin --- >From 116bfaa14e1db21c3d3fbd2ec4cfd125c790bded Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 16 Feb 2022 15:13:16 +0100 Subject: [PATCH] ethdev: fix MAC address in telemetry device info [ upstream commit ffe77e911f6a3d62757bc740670c4fda28f882f2 ] The right size for a human readable MAC is RTE_ETHER_ADDR_FMT_SIZE. While at it, the net library provides a helper for MAC address formatting. Prefer it. Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info") Reported-by: Christophe Fontaine Signed-off-by: David Marchand Reviewed-by: Ferruh Yigit --- lib/ethdev/rte_ethdev.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index e59958e6f5..bf93534b90 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -6307,5 +6307,5 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, { struct rte_tel_data *rxq_state, *txq_state; - char mac_addr[RTE_ETHER_ADDR_LEN]; + char mac_addr[RTE_ETHER_ADDR_FMT_SIZE]; struct rte_eth_dev *eth_dev; char *end_param; @@ -6348,11 +6348,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, rte_tel_data_add_dict_int(d, "rx_mbuf_alloc_fail", eth_dev->data->rx_mbuf_alloc_failed); - snprintf(mac_addr, RTE_ETHER_ADDR_LEN, "%02x:%02x:%02x:%02x:%02x:%02x", - eth_dev->data->mac_addrs->addr_bytes[0], - eth_dev->data->mac_addrs->addr_bytes[1], - eth_dev->data->mac_addrs->addr_bytes[2], - eth_dev->data->mac_addrs->addr_bytes[3], - eth_dev->data->mac_addrs->addr_bytes[4], - eth_dev->data->mac_addrs->addr_bytes[5]); + rte_ether_format_addr(mac_addr, sizeof(mac_addr), + eth_dev->data->mac_addrs); rte_tel_data_add_dict_string(d, "mac_addr", mac_addr); rte_tel_data_add_dict_int(d, "promiscuous", -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-03-01 10:41:02.422757833 +0000 +++ 0041-ethdev-fix-MAC-address-in-telemetry-device-info.patch 2022-03-01 10:41:01.308244099 +0000 @@ -1 +1 @@ -From ffe77e911f6a3d62757bc740670c4fda28f882f2 Mon Sep 17 00:00:00 2001 +From 116bfaa14e1db21c3d3fbd2ec4cfd125c790bded Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ffe77e911f6a3d62757bc740670c4fda28f882f2 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 70c850a2f1..29a3d80466 100644 +index e59958e6f5..bf93534b90 100644 @@ -24 +25 @@ -@@ -5632,5 +5632,5 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, +@@ -6307,5 +6307,5 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, @@ -31 +32 @@ -@@ -5673,11 +5673,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused, +@@ -6348,11 +6348,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,