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 90C4AA09FF; Tue, 29 Dec 2020 21:09:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 48D5C2C27; Tue, 29 Dec 2020 21:09:22 +0100 (CET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by dpdk.org (Postfix) with ESMTP id 2C4F42BFF for ; Tue, 29 Dec 2020 21:09:20 +0100 (CET) Received: by mail-pf1-f175.google.com with SMTP id f9so8500272pfc.11 for ; Tue, 29 Dec 2020 12:09:20 -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=DBK/fDb/RFaci8KKaMGeT7VjM+S+NV3CjDNF8VSMlaXFPFQn74Imi1tp2VPCfRo1fC hsKsmSJDEEbsOX39NHhkLXvymvP5+fMy6TAN0W3RGzx2luPtiSztL2ri/2R3IzYgQxGn ooCrMBcIlOZtau9c4nIrOyJqZBG+XRJxkCoXS8J21ourortzDHY5hX5RO0IvHviVNWlq zpEfkwnZ+aNmlqMQ9ljSuyVscvANRbLqhtEJWQj+GkOJdVxSYAIpovuVIUGlGuh+kGcC gYy3etiudh2ttsmVuW+zP0r+D5IE5pupZS+KIRc2qiBjawrUmQX1AacQmbi40ngOeEtK oq3w== 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=LoM0PmzV4ZO231QRBAQVxiUjVdlqXTukDVe24bsSpChiO4ogto6ZygXMJqPr64X3v9 v1bmVSntiZ711j2lhGgrHnRyMrqwE/HHf3vbwfmANgaqwdrAx9QB19rYL+c9uKUMGJV8 XKDdHR579cVKaXL9ufyK2HAMe2dKbAfSa+kkEL5T19WGFL/r+xeYGIvXw1C5viD5weXx Ob43mFPAQiWKE31cpHsJmDqFozhAO01LCLVfc1JPsQ/iugj9ZZdVz5N+yyKlmZ+EU6FX BYHzjhKrS0B5a2nUIybVDvS5tFuvSVZKp1S+MB4/spfBY5pkOBtgpKawmdmfCnzK7t/J FKlQ== X-Gm-Message-State: AOAM533gTMVkNSvh566vra05b1yUHOHZrOwnuJTazACyiJW34qDqFIY+ j3500GvmCXnEbIGEeULN/VFqBQS4BupdSQ== X-Google-Smtp-Source: ABdhPJyd0pyyTgOoASDuOoXn5Hq9nc/on0JRHSx7skAaeOB8fO/u9jKLKylBUWwRpmmitwAddeDSgg== X-Received: by 2002:a62:97:0:b029:1ab:93bf:43a1 with SMTP id 145-20020a6200970000b02901ab93bf43a1mr43770178pfa.75.1609272557849; Tue, 29 Dec 2020 12:09:17 -0800 (PST) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id r14sm37763237pgi.27.2020.12.29.12.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 12:09:16 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 29 Dec 2020 12:09:00 -0800 Message-Id: <20201229200901.101171-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201229200901.101171-1-stephen@networkplumber.org> References: <20201227033335.85145-1-stephen@networkplumber.org> <20201229200901.101171-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/3] 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