From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 2E20F1B5BB for ; Thu, 11 Oct 2018 19:59:49 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id v133-v6so4540785pgb.2 for ; Thu, 11 Oct 2018 10:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=212b/Qvrzx9UQ/UVf/Y3Vkrq16rLOUCqWkRCvHV32fQ=; b=QnzhtDMt2NgTecvBMmnNkju1B3sJGhpxBYc7K1OYIUHmyi9gqA6SWUBKkH8d4c8R3v DB345drhOylWU2betYweeA9gA+a843DRrD/iiP7RrL6l7veeupflw9E6Voy9wKv+1l2N RHHkgUUwhQTCuTctxtIiclYbHKgcWJYWgIjx8u4F9lU4IFVmfcD/sCc17EINI7XnspXd 8Yh64U9BLKPc6uFRJ1IrjfMTCcx6a/OEku4rQqPR7dAjiCMsWnPHb8ni3SNWpg8No5Ar jIw6b1X7aKUSlYAuXObZ/PQOuoLAfH3nDHKgX/v+8iO/A74a42NgZRtfJEESRjeprY4T gEdw== 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:mime-version :content-transfer-encoding; bh=212b/Qvrzx9UQ/UVf/Y3Vkrq16rLOUCqWkRCvHV32fQ=; b=K0IiaKv53sAyvL31JXjBh5XFdnWsNb7x76eIXv6CyyQjFVu0mDt9fOEJcHQ+xOydRH rc/4QxQaV7IxW9NKJdTkdfJoG3eate2UDxudgUJZmec11WjSClVhBxIui5enaLwJ/3r9 1B3UaFfJUOwCZvwhXklGba4dslWI8dSWtyihX6CWvlCE7ix/ZG/HCGhMrF55w3XFLPHY zYB1854KO0xxYmOOizeM/PHht1783qw7USUd6xfwgucVYv68fJ+QlnuggHVVLua8i6mh 7+CUT3YKjueiVpm9TB+hI6mzwLr6g2+s2hK/uPR6Gs/NO0/PK0bIyGUXes9TKxib8oGN Lr4Q== X-Gm-Message-State: ABuFfojAt3a/ZhNuDlCuDbsVF1P/WyZWNknTgiKHESFS8zwSf5wWsWJx b3xRi6vIj+j+FRGicr1v5VHV2wUn8KI= X-Google-Smtp-Source: ACcGV60RwHo/DUjM1w9/G63Nkdjw9wz8blW6TiyuCFt9hbVkacxXcQq0fEQIdSlP/lHsUSG3RAp9VQ== X-Received: by 2002:a65:64d5:: with SMTP id t21-v6mr2360756pgv.428.1539280788249; Thu, 11 Oct 2018 10:59:48 -0700 (PDT) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id r65-v6sm38904283pfj.5.2018.10.11.10.59.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 10:59:47 -0700 (PDT) From: Stephen Hemminger To: thomas@monjalon.net, ferruh.yigit@intel.com Cc: dev@dpdk.org, Stephen Hemminger Date: Thu, 11 Oct 2018 10:59:40 -0700 Message-Id: <20181011175940.6800-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] ethdev: add function name to log message X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Oct 2018 17:59:49 -0000 While debugging some virtio driver issues, saw: Invalid port_id=3 but it was not clear which function was logging this because the same log is being done in multiple places in ethdev. Trivial fix is to prefix with function name as is done in other drivers. Signed-off-by: Stephen Hemminger --- drivers/net/failsafe/failsafe.c | 1 - lib/librte_ethdev/rte_ethdev.h | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index c3999f0265b2..3830ed33dba2 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -2,7 +2,6 @@ * Copyright 2017 6WIND S.A. * Copyright 2017 Mellanox Technologies, Ltd */ - #include #include #include diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 012577b0ab22..9632c67b929b 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -161,8 +161,9 @@ extern "C" { extern int rte_eth_dev_logtype; -#define RTE_ETHDEV_LOG(level, ...) \ - rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, "" __VA_ARGS__) +#define RTE_ETHDEV_LOG(level, fmt, ...) \ + rte_log(RTE_LOG_ ## level, rte_eth_dev_logtype, \ + "%s():" fmt, __func__, ## __VA_ARGS__) struct rte_mbuf; -- 2.19.1