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 962C9A00D7; Thu, 31 Oct 2019 11:46:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E6FE1C06B; Thu, 31 Oct 2019 11:46:31 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 3C1971BEA8 for ; Thu, 31 Oct 2019 11:46:29 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id n17so6188345ioa.0 for ; Thu, 31 Oct 2019 03:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=99w647zb1LdvLqUYNir+aofp1a9rOGl97ZV5ZBr5/vU=; b=ooS5vURl166BP0XYaq100RjSQPo8VTso+U7gjtEdhsY+7HfqEzlTK5M3aP6gaJZAjy PWLxV1FgEuwUc2AQTbtUGTkL5EM4m3iGnkaXvUzObQqDIWscymAbJdmTx6KK1XXCptSh TWCert3Z7urdd+HnYQV0ckNZxGhnzGNn0PN6LXSz+FEJS1AJDHuGfSzS/IzvMv348kdb u4uglM0JIh5vuthCY6Kavqw4+0dxIP/Djl5nAvjQTffZCJrzKN7N5+buFXFmk1gcdZOJ Ax4hnlXKgpt/qNi0yFFEdGQ6Gr43+lDSO9PcYpnH5c08s0+0rGQAyZnuHggLaCB9VU2M RokQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=99w647zb1LdvLqUYNir+aofp1a9rOGl97ZV5ZBr5/vU=; b=IRaYLDRi1SfQikVhKyEFc6k/6Lc5ZuNw7W5/30+U/WXnuJDy9gPCkR/flVVLYaRqGD 2d82QmqcfUAiBeqR9x2PdeBbr1JkYMtIiB81rZ9vp56tpERxzmWm2Z4wgdWYr6BroDzb vAQ7AM3pYQj97hGQYyfOir7OODqKMujadt8WupX8LayjTmhZIkMt3Ayyn6OdaTKJmwGo 5xYFUMgRUezvLuIXDHxyfMJT6TKrb9ix9/MuzQXTtY1NR9T8vPskyLC4MYOfrj68x5NX oNL06PZtE5DGL9QvNPfwooIXSmATWW5a/Ufs0Uzn1ygPWUfwvl/rb9wkswE2jPBUDpIo 09HA== X-Gm-Message-State: APjAAAXvmKFjs8f4lP1r8HDg4lfGv02YcCLOkQ/NWg2V/JAtYn5XFc8q sf5OrU8WHafjgYmUPFposqqfdpTmUzWEAIcbhgI= X-Google-Smtp-Source: APXvYqypiYd7LKJc3XdUwWnlPgz+DGGmRcMNEjOcdmwgH3mFsFXwaCpudO9H90VpPZZV8+mCFfgBLQunc2YhB1EfEk4= X-Received: by 2002:a5d:8598:: with SMTP id f24mr4174382ioj.60.1572518788198; Thu, 31 Oct 2019 03:46:28 -0700 (PDT) MIME-Version: 1.0 References: <20191015075133.38560-1-haiyue.wang@intel.com> <1811898.7XjjD7ZjLQ@xps> <12001140.UMXFOKstgs@xps> In-Reply-To: From: Jerin Jacob Date: Thu, 31 Oct 2019 16:16:11 +0530 Message-ID: To: "Wang, Haiyue" Cc: "Yigit, Ferruh" , Thomas Monjalon , dpdk-dev , "Ye, Xiaolong" , "Kinsella, Ray" , "Iremonger, Bernard" , "Sun, Chenmin" , Andrew Rybchenko , Slava Ovsiienko , Stephen Hemminger , David Marchand , Jerin Jacob Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add the API for getting burst mode information 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" > > 'rte_eth_burst_mode_option_name()' can get "struct rte_eth_burst_mode" as > > parameter and convert the 'options' to string and combine into single string as > > a helper function to the applications. > > > > Change: > const char * > rte_eth_burst_mode_option_name(uint64_t option) > > to: > int > rte_eth_burst_mode_option_name(struct rte_eth_burst_mode *mode, char *str) ? Since we are not ready to _remove_ flags in public API and rc2 time is ticking, probably the following the change would be enough. IMO, This API can be used only for logging purpose, I don't want to spend too many cycles on this discussion. I am leaving the decision to ethdev maintainers to accommodate the specifics of adding a string-based alternate options scheme. [master][dpdk.org] $ git diff diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index c36c1b631..2f9d2c0a7 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1272,8 +1272,11 @@ enum rte_eth_burst_mode_option { * Ethernet device RX/TX queue packet burst mode information structure. * Used to retrieve information about packet burst mode setting. */ +#define RTE_ETH_BURST_MODE_ALT_OPT_SIZE 128 + struct rte_eth_burst_mode { uint64_t options; + char alternate_options[RTE_ETH_BURST_MODE_ALT_OPT_SIZE]; };