From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47ED9A0093 for ; Thu, 28 May 2020 18:25:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF1C31DC28; Thu, 28 May 2020 18:25:29 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 945A41D996 for ; Thu, 28 May 2020 18:25:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590683127; 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=ehCb8Gl+g00ho3CJkg2tqwmvFkjQAN8YFuVdbj1FhOw=; b=FIIrqDKrZrRIp50nMPd00Xp8hG5izsRthkVHFBGs5DGNKNNFM55PrAO0t8NSbpQFkzp2Qv r3ztRAd4+zmVFvn8qhAEt1yvdHIR8i8zLPYbgm+To/1YiQFZjk2r3kHbXKhDCud3RldZfR BwOS2hAdBN7pR5+ZxtWeUdydUMcESTU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-481-ruPnzhu8O02A4Tl_NoWHcQ-1; Thu, 28 May 2020 12:25:24 -0400 X-MC-Unique: ruPnzhu8O02A4Tl_NoWHcQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D15751005512; Thu, 28 May 2020 16:25:22 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDD9C60C05; Thu, 28 May 2020 16:25:21 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: Ferruh Yigit , dpdk stable Date: Thu, 28 May 2020 17:22:37 +0100 Message-Id: <20200528162322.7863-50-ktraynor@redhat.com> In-Reply-To: <20200528162322.7863-1-ktraynor@redhat.com> References: <20200528162322.7863-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/dpaa: use dynamic log type' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/03/20. 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-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/84c30c50224735a4b52e6284e8369c126cf048a9 Thanks. Kevin. --- >From 84c30c50224735a4b52e6284e8369c126cf048a9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 30 Mar 2020 21:41:55 -0700 Subject: [PATCH] net/dpaa: use dynamic log type [ upstream commit b7c7ff6e3b34ac088237f85cf4ac5cc30c859a18 ] The static PMD logtype should not be used by drivers. Instead, use existing log macros in this driver. Also use standard rte_ether routine to format ether address. Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup") Signed-off-by: Stephen Hemminger Reviewed-by: Ferruh Yigit --- drivers/net/dpaa/dpaa_ethdev.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index f41a01e113..adbf5f6074 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -828,6 +828,6 @@ dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (qman_query_fq_frm_cnt(rxq, &frm_cnt) == 0) { - RTE_LOG(DEBUG, PMD, "RX frame count for q(%d) is %u\n", - rx_queue_id, frm_cnt); + DPAA_PMD_DEBUG("RX frame count for q(%d) is %u", + rx_queue_id, frm_cnt); } return frm_cnt; @@ -943,6 +943,5 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, if (ret) - RTE_LOG(ERR, PMD, "error: Adding the MAC ADDR failed:" - " err = %d", ret); + DPAA_PMD_ERR("Adding the MAC ADDR failed: err = %d", ret); return 0; } @@ -970,5 +969,5 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, 0); if (ret) - RTE_LOG(ERR, PMD, "error: Setting the MAC ADDR failed %d", ret); + DPAA_PMD_ERR("Setting the MAC ADDR failed %d", ret); return ret; @@ -1220,4 +1219,5 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) struct fman_if_bpool *bp, *tmp_bp; uint32_t cgrid[DPAA_MAX_NUM_PCD_QUEUES]; + char eth_buf[ETHER_ADDR_FMT_SIZE]; PMD_INIT_FUNC_TRACE(); @@ -1366,13 +1366,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) /* copy the primary mac address */ ether_addr_copy(&fman_intf->mac_addr, ð_dev->data->mac_addrs[0]); + ether_format_addr(eth_buf, sizeof(eth_buf), &fman_intf->mac_addr); - RTE_LOG(INFO, PMD, "net: dpaa: %s: %02x:%02x:%02x:%02x:%02x:%02x\n", - dpaa_device->name, - fman_intf->mac_addr.addr_bytes[0], - fman_intf->mac_addr.addr_bytes[1], - fman_intf->mac_addr.addr_bytes[2], - fman_intf->mac_addr.addr_bytes[3], - fman_intf->mac_addr.addr_bytes[4], - fman_intf->mac_addr.addr_bytes[5]); + DPAA_PMD_INFO("net: dpaa: %s: %s", dpaa_device->name, eth_buf); /* Disable RX mode */ @@ -1501,6 +1495,5 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused, if (access("/tmp/fmc.bin", F_OK) == -1) { - RTE_LOG(INFO, PMD, - "* FMC not configured.Enabling default mode\n"); + DPAA_PMD_INFO("* FMC not configured.Enabling default mode"); default_q = 1; } -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-28 17:13:01.718576186 +0100 +++ 0050-net-dpaa-use-dynamic-log-type.patch 2020-05-28 17:12:59.121555948 +0100 @@ -1 +1 @@ -From b7c7ff6e3b34ac088237f85cf4ac5cc30c859a18 Mon Sep 17 00:00:00 2001 +From 84c30c50224735a4b52e6284e8369c126cf048a9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b7c7ff6e3b34ac088237f85cf4ac5cc30c859a18 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index fce9ce2feb..5f81968d80 100644 +index f41a01e113..adbf5f6074 100644 @@ -24 +25 @@ -@@ -882,6 +882,6 @@ dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) +@@ -828,6 +828,6 @@ dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) @@ -33 +34 @@ -@@ -997,6 +997,5 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, +@@ -943,6 +943,5 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, @@ -41 +42 @@ -@@ -1024,5 +1023,5 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, +@@ -970,5 +969,5 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, @@ -48 +49 @@ -@@ -1307,4 +1306,5 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) +@@ -1220,4 +1219,5 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) @@ -51 +52 @@ -+ char eth_buf[RTE_ETHER_ADDR_FMT_SIZE]; ++ char eth_buf[ETHER_ADDR_FMT_SIZE]; @@ -54 +55 @@ -@@ -1458,13 +1458,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) +@@ -1366,13 +1366,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) @@ -56,2 +57,2 @@ - rte_ether_addr_copy(&fman_intf->mac_addr, ð_dev->data->mac_addrs[0]); -+ rte_ether_format_addr(eth_buf, sizeof(eth_buf), &fman_intf->mac_addr); + ether_addr_copy(&fman_intf->mac_addr, ð_dev->data->mac_addrs[0]); ++ ether_format_addr(eth_buf, sizeof(eth_buf), &fman_intf->mac_addr); @@ -70,2 +71,2 @@ -@@ -1579,6 +1573,5 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused, - if (!is_global_init && (rte_eal_process_type() == RTE_PROC_PRIMARY)) { +@@ -1501,6 +1495,5 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused, +