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 AF60CA00BE; Tue, 29 Oct 2019 15:09:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2B0BD1BEB5; Tue, 29 Oct 2019 15:09:19 +0100 (CET) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 22A331BEB4 for ; Tue, 29 Oct 2019 15:09:17 +0100 (CET) Received: by mail-il1-f194.google.com with SMTP id z10so11436219ilo.8 for ; Tue, 29 Oct 2019 07:09:17 -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=Xv0QcAxioH9vUg9Hw0tOdqmuePQBWamVH+QK06GeKwo=; b=XdTaQUHvVX1g7U7uRhXqBSBmP3THHruTs0csUWxpt3+N+Q+tUtH5nmtrjLYPr0J2lN j1JESqEip72iIHMpp1+R4a9gJWdvkPbx3f1wu4xRN4O7KTxMSu1Ud/4ixbpON+a6NUKl +hQ49RoaCQZRCiUYfXT640Gc/9X+M0jwm+uWYVPsHp1y/xBwPRkhPlfzDE20wBbGOczi 0NhJP9d3CkvbWHwwqaX397T1OdwFP6bRY5A2W/FntyCUNf5HLZacrpi2wcCCk3gC0Oc0 DmBJrkHx6gjnigfMe8tFBcMuP9xUYR6So8nMttAjtwlFQe9guWQMmgr945Sv+iULpxqF vVOQ== 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=Xv0QcAxioH9vUg9Hw0tOdqmuePQBWamVH+QK06GeKwo=; b=KsIaUSXonWUsTsHQNuFP/yF7zfogcsu0C20iOsnodcZAZlLebJFb9ryzM7am6jGUJQ DV9DSh4smwLLiRs2KhMI++iLxcsHs9YRv0AzBV1lVem892+WMgcLTxCJFyeUNmnd2Ps1 M4pMUhSHx/Jk/zwcdY7kAG+Vl4a9UVjCUZa3QXE4z5pYwljjVhzapcIwlAWRvLrriUg+ 0Ej2Z8u8Kpq27zOB5QL+o0vQyoGFMGbMCWJHXnqEGQ302RKVuZIsDzQqgtFuOa4j94rO IVL4jjQwn4NQPC2XXZA2UFgVYc/kKsCA2GhrqgTXdiautgYfvpWEM7eMILEIx1bogDfo FrmQ== X-Gm-Message-State: APjAAAXNm8IaZzsg8Ai3P5uPUOQTifwm/OfICiPXyZgGzdoRZH0Lt6Fd VJRs/vilP5QaZNZ0Tnm5P7si8kkBejbKQUz7mN4= X-Google-Smtp-Source: APXvYqz+Xp37+b3q3mLGAsSCDJpIYGDvDvIaDA/OlGL8+acadlnLDvsLALGerc1Ml2mHNfTAXyiuAi42Tku1gjQANE0= X-Received: by 2002:a92:aa48:: with SMTP id j69mr27330665ili.162.1572358156082; Tue, 29 Oct 2019 07:09:16 -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: Tue, 29 Oct 2019 19:38:59 +0530 Message-ID: To: "Wang, Haiyue" Cc: Thomas Monjalon , "Yigit, Ferruh" , 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" > > > > > > > > > > How about *_str_* style ? > > > > _name kind of implies it the string. may be _mode is good as it is short. > > > > > int > > > rte_eth_rx_burst_mode_str_get(uint16_t port_id, uint16_t queue_id, > > > char *buf, int buflen) > > > > About the function, keep the same is better ? Then we need no whole > replace, just update the parameters, and the parameters indicated that > it is in string format. In this case, we need additional PMD op to get the buflen as the application will not know the buffer size in advance. It needs to come from the driver and common code. See below. > > > We don't need buflen as it is not known to the application. The > > typical pattern, we followed, > > in dpdk is, when function called buf as NULL then the function returns > > the expected size so that > > the application can alloc and get the buffer from ethdev layer on the > > next iteration. > > > > > > A little complicated and too heavy for using ? where is the example code ? See rte_eth_xstats_get_names() API as example for dynamic buffer allocation and similar use case in DPDK.