From patchwork Tue Dec 5 14:51:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 134882 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40F0C4367A; Tue, 5 Dec 2023 15:51:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5C2842E5D; Tue, 5 Dec 2023 15:51:28 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 1D47F42E67; Tue, 5 Dec 2023 15:51:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701787887; x=1733323887; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mB87Yr8bI3gEWYh6yom5zPrqVYFbbAmIkyiCru9TvYw=; b=lEmYHG6u4VZ5NbIrIOHrT/5Kp5xsOfSZkJmblK9pQ+E2PmscLW3yDrsP 8rNnJ0SPZMNoKd67Gyespz/sEf9aI93w01N0uxNGrI2OyHJql2TGtXcZl NB07bsKLQRZcu924b1md0TSio8XAIGf2bM9yr9a9S0L5jCZPXEYWiroQn u12srE6hTy3TwMF9NyKyvhNXe5nG0if89wD8PsdEY3NufZQxlisa8GdlE a7IJkKTFdreWqXka5xMputqByHPEqVcqDdYqsOt1p+fdCBlPTSXUEZL1M rHfMSxjQwVPQkMg6+7iK+f0Gt8PBXByz9gYh/q2EmB8/j4muTjEyK0Fd9 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="374089969" X-IronPort-AV: E=Sophos;i="6.04,252,1695711600"; d="scan'208";a="374089969" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 06:51:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="1018234168" X-IronPort-AV: E=Sophos;i="6.04,252,1695711600"; d="scan'208";a="1018234168" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.152]) by fmsmga006.fm.intel.com with ESMTP; 05 Dec 2023 06:51:25 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: skori@marvell.com, david.marchand@redhat.com, Bruce Richardson , stable@dpdk.org Subject: [PATCH 2/3] buildtools/dpdk-cmdline-gen: fix IP address initializer Date: Tue, 5 Dec 2023 14:51:08 +0000 Message-Id: <20231205145109.1000464-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231205145109.1000464-1-bruce.richardson@intel.com> References: <20231205145109.1000464-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The IP address type should be generic for both IPv4 and IPv6 and so use the cmdline lib's TOKEN_IPADDR_INITIALIZER rather than TOKEN_IPV4_INITIALIZER. Fixes: 37666691e9ed ("buildtools: add a tool to generate cmdline boilerplate") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Acked-by: Sunil Kumar Kori --- buildtools/dpdk-cmdline-gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/dpdk-cmdline-gen.py b/buildtools/dpdk-cmdline-gen.py index faee4ffca7..8b4f22ca24 100755 --- a/buildtools/dpdk-cmdline-gen.py +++ b/buildtools/dpdk-cmdline-gen.py @@ -79,7 +79,7 @@ def process_command(lineno, tokens, comment): result_struct.append(f"\tcmdline_ipaddr_t {t_name};") initializers.append( f"static cmdline_parse_token_ipaddr_t cmd_{name}_{t_name}_tok =\n" - f"\tTOKEN_IPV4_INITIALIZER(struct cmd_{name}_result, {t_name});" + f"\tTOKEN_IPADDR_INITIALIZER(struct cmd_{name}_result, {t_name});" ) elif t_type.startswith("(") and t_type.endswith(")"): result_struct.append(f"\tcmdline_fixed_string_t {t_name};")