From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44B4745A9D; Wed, 2 Oct 2024 17:57:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F2174060F; Wed, 2 Oct 2024 17:57:38 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id AC2A1402EA for ; Wed, 2 Oct 2024 17:57:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727884656; 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=dZmCfgK0wUmQ7WCeD8BY8ZybVHyavCZM4ZLUjUMl9Qw=; b=JC/se0xoDXd6iMt7A0z5G+inlcp9ncrj5tlpr2ttoxLml+SYBUAadRJorP4vifjLpdSiQH EhATOycihVB2RLEKJEJS/Ees5bn7YBsRrNiLWRI58F4tlOc7y63FMVs6GPPNm+5Wk7o+XL 887EOovc6u5EU9hNigWUE32l9C5ZC5g= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-uWCMgadpPXWD7A2IkieGJg-1; Wed, 02 Oct 2024 11:57:33 -0400 X-MC-Unique: uWCMgadpPXWD7A2IkieGJg-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6C03F19560A6; Wed, 2 Oct 2024 15:57:31 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.68]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 750301956086; Wed, 2 Oct 2024 15:57:28 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: bruce.richardson@intel.com, rjarry@redhat.com, ktraynor@redhat.com, Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Subject: [PATCH 1/2] ethdev: expose telemetry dump command for Windows Date: Wed, 2 Oct 2024 17:57:07 +0200 Message-ID: <20241002155709.2522273-2-david.marchand@redhat.com> In-Reply-To: <20241002155709.2522273-1-david.marchand@redhat.com> References: <20241002155709.2522273-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 A next commit will protect all telemetry commands. Prefer exposing all commands regardless of OS, and return an error when invoked on Windows. Signed-off-by: David Marchand --- lib/ethdev/rte_ethdev_telemetry.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/ethdev/rte_ethdev_telemetry.c b/lib/ethdev/rte_ethdev_telemetry.c index 6b873e7abe..8031a58595 100644 --- a/lib/ethdev/rte_ethdev_telemetry.c +++ b/lib/ethdev/rte_ethdev_telemetry.c @@ -227,7 +227,15 @@ eth_dev_handle_port_dump_priv(const char *cmd __rte_unused, free(buf); return 0; } -#endif /* !RTE_EXEC_ENV_WINDOWS */ +#else /* !RTE_EXEC_ENV_WINDOWS */ +static int +eth_dev_handle_port_dump_priv(const char *cmd __rte_unused, + const char *params __rte_unused, + struct rte_tel_data *d __rte_unused) +{ + return -EINVAL; +} +#endif /* RTE_EXEC_ENV_WINDOWS */ static int eth_dev_handle_port_link_status(const char *cmd __rte_unused, @@ -1403,10 +1411,8 @@ RTE_INIT(ethdev_init_telemetry) "Returns the common stats for a port. Parameters: int port_id"); rte_telemetry_register_cmd("/ethdev/xstats", eth_dev_handle_port_xstats, "Returns the extended stats for a port. Parameters: int port_id,hide_zero=true|false(Optional for indicates hide zero xstats)"); -#ifndef RTE_EXEC_ENV_WINDOWS rte_telemetry_register_cmd("/ethdev/dump_priv", eth_dev_handle_port_dump_priv, "Returns dump private information for a port. Parameters: int port_id"); -#endif rte_telemetry_register_cmd("/ethdev/link_status", eth_dev_handle_port_link_status, "Returns the link status for a port. Parameters: int port_id"); -- 2.46.2