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 BAE71A0A03; Mon, 18 Jan 2021 17:18:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 998E6140D36; Mon, 18 Jan 2021 17:18:25 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id 77DF8140CE6 for ; Mon, 18 Jan 2021 17:18:24 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id F3FEC1829; Mon, 18 Jan 2021 11:18:22 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 18 Jan 2021 11:18:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= jbsjUbM3dMQJNDr1riUWdFfcZ15SmT1fyt52RD1jXaY=; b=F0dgoUsXfJLCfzlg QwONNgs+aKI9sYC6nk+H7noawHc8NAaI9mRPQ3hvoMQF16i80tLuHkicGj2ze1LQ yeAwFhKLGR9BZ5tQCEBD5Rj8ngnlGxTt/U6tzrWDXRzDHJjEqAOeoJ+L3GJ5rO1m iWKqx5QBPTEu6p16S1JACmpeLqsbE5ZIokkZH+cOm3aJBjzkr6W+bqcIkg6n12v/ SQ8o0hIekNecjzP5TdAvFLVjOVTmlS8LDf0ayZ3kPGNOh26+wQN7QFsYjW09HOI4 MnUf5BPvzt54kosnChR6CVlsBJt7duMeksKHYgLaqAhqSET7K4pqfULYUQQGzRyw Mxfexw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=jbsjUbM3dMQJNDr1riUWdFfcZ15SmT1fyt52RD1jX aY=; b=mvSrgrwp8LrwONp8MMhzK2iDtKKGwFsT9FMErimGxZ5kf6RTkOkaQsYpS d0CsKAymRNncpy6XOsPIECDaV6QbOAPW+W9//IpLMIAtaiu84IqFKNoJtmHlxhvf Epc+DBZOjVgZiX8pwUiVt+ANCurv9+m781I85oZ9y3Qa6rHGjCcFAeRxncV5g7u8 0NwTpDX9+PGEGDAyhtuwW8YwqVRLyjUC8NrYr3//d/BMHM2xd2Yxf1KuaoyXEDqK harZekq7VTXgkLT6XjzXixXTzfDAS927+aRlOw2RYvB4ezFnNloEVjgjVFVkTr11 BOtOYYqvLTzTTsTYjilYRGXXBvkiQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrtdekgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 35AF424005D; Mon, 18 Jan 2021 11:18:21 -0500 (EST) From: Thomas Monjalon To: Xueming Li Cc: Ferruh Yigit , Andrew Rybchenko , Olivier Matz , dev@dpdk.org, Viacheslav Ovsiienko , Asaf Penso Date: Mon, 18 Jan 2021 17:18:20 +0100 Message-ID: <6719978.oSDc5pInoS@thomas> In-Reply-To: <1610968623-31345-3-git-send-email-xuemingl@nvidia.com> References: <1610968623-31345-1-git-send-email-xuemingl@nvidia.com> <1610968623-31345-3-git-send-email-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 2/9] ethdev: support representor port list 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 Sender: "dev" 18/01/2021 12:16, Xueming Li: > To support extended representor syntax, this patch extends the > representor list parsing to support for representor port range in > devargs, examples: > representor=[1,2,3] - single list > representor=[1,3-5,7,9-11] - list with singles and ranges > > Signed-off-by: Xueming Li > Acked-by: Viacheslav Ovsiienko Parsing functions are usually difficult to read. If you need to do another version, I would recommend adding an oneline comment on top of parsing functions to give a hint about what it is really doing. Here, > +static int > +rte_eth_devargs_enlist(uint16_t *list, uint16_t *len_list, > + const uint16_t max_list, uint16_t val) here, > +static char * > rte_eth_devargs_process_range(char *str, uint16_t *list, uint16_t *len_list, > const uint16_t max_list) here, > +static char * > +rte_eth_devargs_process_list(char *str, uint16_t *list, uint16_t *len_list, > + const uint16_t max_list) and also for this old one: > @@ -121,6 +115,9 @@ rte_eth_devargs_parse_representor_ports(char *str, void *data)