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 A57EEA052A; Sun, 27 Dec 2020 04:34:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A63FC9BE; Sun, 27 Dec 2020 04:33:52 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by dpdk.org (Postfix) with ESMTP id BB58EC8DE for ; Sun, 27 Dec 2020 04:33:47 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id i5so5337338pgo.1 for ; Sat, 26 Dec 2020 19:33:47 -0800 (PST) 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:in-reply-to:references :mime-version:content-transfer-encoding; bh=aV9yUoo0rzdjLklqNlJXwTDcg3UKnX6zWGOlL5llG90=; b=G1m5imr3SNqdNJFYEEmrTmWRfrHupTsvnuwEuEdoATrhh4q5DbwiJ1L+9FeQBhjE3Q eYzeIpOvgydw739QXceXq7J9ZcVE4GJcM+mfKFy4t8PQrjSBhJCzgsJzMWgXZo2cnh99 Lhm1fFRby26bAnrj18S4sFAf5X5IESm+lmlyqZUuR5tb3YBbppA9EuMJQnygQQqOxc21 jQ1maLXo4we/uMjXNuWSeWrVDjAPZp2Gf5H6P5mpXTwNgRdB6d4Ab+V4Az0iObGHx0qC ILLnAm1yWzKqvQAKbGoSTwKRKEFAJofVBAGpwolYf+30Uxn5rICUex+4Ml2G1EX8ST7x owzQ== 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=aV9yUoo0rzdjLklqNlJXwTDcg3UKnX6zWGOlL5llG90=; b=os/KqtC36tyuHWK7Ejttn1+L61y1IfjdptZyxdzr5k21VvasuGieRvUjy9HomLJ4ea 19fWA7l9XmSLpJYom80Huhxx0Val1qgTwI6G+0vJ6aYgC9LV0883ACoSnV/ACAOA51kB SX4v08vGw/xUqLNmvidZ0Bz6YNMAmrLxFYjLLjN7tfiAAg9qjKRCJ52OfW2w9Ip4UNEe fLFym9erAAlJaMlKSHqvJoDqPbMKJUJUUyJ9c5LL64UrmZzZRKrK9mfC2Ei2QRojVRnM YW58BaoOkoQmrWT1TEgBKIRyEGMUhdOB8vufguKtO4+OAj5j20N7F24u7Y9jlGo6Nh7S Pi0Q== X-Gm-Message-State: AOAM5304c5vk7IJxb0KhLXAnitFKIne5PrvlzJjmv2ivQh99SqjaQRQp kEXR3sNldkoUyGFDXeucgiMtNdZRrsA7qQ== X-Google-Smtp-Source: ABdhPJzvfVhrbqG5PWG0sGYHxbir45AtlJ/c3mb2NlZ8Mbvk5rwxp/Br92y4JL3sVB6ZYoFc0xt9rA== X-Received: by 2002:a62:7fcd:0:b029:19f:5d05:4a83 with SMTP id a196-20020a627fcd0000b029019f5d054a83mr35690946pfd.45.1609040025550; Sat, 26 Dec 2020 19:33:45 -0800 (PST) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id m10sm9377462pjn.53.2020.12.26.19.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Dec 2020 19:33:44 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Date: Sat, 26 Dec 2020 19:33:35 -0800 Message-Id: <20201227033335.85145-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201227033335.85145-1-stephen@networkplumber.org> References: <20201227033335.85145-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/2] pdump: replace DEVICE_ID_SIZE with RTE_DEV_NAME_MAX_LEN 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The device string has an existing size in rte_dev.h use that instead of defining our own. Signed-off-by: Stephen Hemminger --- lib/librte_pdump/rte_pdump.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c index 3c11bd795bc1..14a392ef0340 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -12,8 +12,6 @@ #include "rte_pdump.h" -#define DEVICE_ID_SIZE 64 - RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE); /* Macro for printing using RTE_LOG */ @@ -39,14 +37,14 @@ struct pdump_request { uint32_t flags; union pdump_data { struct enable_v1 { - char device[DEVICE_ID_SIZE]; + char device[RTE_DEV_NAME_MAX_LEN]; uint16_t queue; struct rte_ring *ring; struct rte_mempool *mp; void *filter; } en_v1; struct disable_v1 { - char device[DEVICE_ID_SIZE]; + char device[RTE_DEV_NAME_MAX_LEN]; uint16_t queue; struct rte_ring *ring; struct rte_mempool *mp; @@ -485,9 +483,8 @@ rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags, struct rte_mempool *mp, void *filter) { - - int ret = 0; - char name[DEVICE_ID_SIZE]; + int ret; + char name[RTE_DEV_NAME_MAX_LEN]; ret = pdump_validate_port(port, name); if (ret < 0) @@ -531,7 +528,7 @@ int rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags) { int ret = 0; - char name[DEVICE_ID_SIZE]; + char name[RTE_DEV_NAME_MAX_LEN]; ret = pdump_validate_port(port, name); if (ret < 0) -- 2.29.2