From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com [209.85.128.181]) by dpdk.org (Postfix) with ESMTP id C96DF56A1 for ; Thu, 6 Jul 2017 13:37:52 +0200 (CEST) Received: by mail-wr0-f181.google.com with SMTP id k67so25082916wrc.2 for ; Thu, 06 Jul 2017 04:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=PiMtZtk0p8IaruIxZOBRlCgfxVRAOM5FhVauOaXsIfc=; b=B4n0KsehYN9Bb8+Uhut4Oz48oERowZutzkkTgheRfROYgkbQQGOvxAZw+HRXx6M/1C wq6gWTowwwTOws3RybvnBJ1kEaxPyknkPRY1LMj0g2htldFde9fGpYTkLuVlCM/aubwT eIK54wsLN7ad/nk781gjTCX66qstG9uyj8H3dyHlRs75yNqIZlKdGcXJJa2FrpF2/dTd zJeVizc+GR/kha8OzlWyb7Z5GF9NmcMoSXGjk2BWuPf6StPdjM72BeKNOq4DNwjexfBt JPZzoM5ZkOeRh4mDB4G9dJR/vGE7tLeU15z32ql16Cz/7Q6rWMyuEeztMwPX4iZw/MVi 1dNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=PiMtZtk0p8IaruIxZOBRlCgfxVRAOM5FhVauOaXsIfc=; b=dksN3z8Xz0lxhxLtGoPyqDbxvvDygf8V4q9yOJmWp0iDouvUu58iouNARQGvbbcA2c Ab48rrQnleEw5nXHNNmZNOflsyalJ+F2SI8xbxGjFePgpf+VtSEgO6Mz85fkG1d9qJKB 3GH6kruL0npEc12l7glo8SL17L8on8KaIxhE7JrNSZcYDSiaMxOOcnfziCUNEHeaAwOP KUpYunOBC7YmlRuhK7EkD42Vn+hsK/FbY5xgFhdhQpEdDuPDrcLozbLCufLFTicbUUUU doSdu8mtxxKsGpcVYmRg0mEktjLn4n/MvpY2LQJYjle8uzhVrdSaueSUaJesm+YyyeOv hmnA== X-Gm-Message-State: AIVw110wgtwoMLypEf/7IY3ptFt6KLPC+2AvRzHSNFXn6M+yEO+Befgl dkABLakmKcIrQh7SvuE= X-Received: by 10.28.130.196 with SMTP id e187mr278084wmd.24.1499341072229; Thu, 06 Jul 2017 04:37:52 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id s30sm113110wrc.13.2017.07.06.04.37.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 04:37:51 -0700 (PDT) Date: Thu, 6 Jul 2017 13:37:43 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Thomas Monjalon Cc: Shreyansh Jain , dev@dpdk.org Message-ID: <20170706113743.GK11154@bidouze.vm.6wind.com> References: <20170705134521.GI11154@bidouze.vm.6wind.com> <2074223.j7Uj7OpmZu@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2074223.j7Uj7OpmZu@xps> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v7 5/6] bus: add helper to find a bus from a device name 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: , X-List-Received-Date: Thu, 06 Jul 2017 11:37:53 -0000 On Thu, Jul 06, 2017 at 12:10:10PM +0200, Thomas Monjalon wrote: > 05/07/2017 15:45, Gaëtan Rivet: > > On Wed, Jul 05, 2017 at 07:05:40PM +0530, Shreyansh Jain wrote: > > > >+struct rte_bus * > > > >+rte_bus_find_by_device_name(const char *str) > > > >+{ > > > >+ char name[32]; > > > > > > It is possible to use a constant here? Basically, I am not sure why '32' has > > > been chosen - or maybe, it might remind a reader in future the reason for > > > this value. > > > > > > Just to clarify: is there any documented limit on bus name? Until this > > > point, the name (and length) of bus was responsibility of bus driver > > > implementation. eal_common_bus.c doesn't codify any limit - so, this may > > > have to be advertised, even if just within the code. > > > > I agree that this is not clear. First thing however: this is a limit on > > the device name length, not bus. > > > > This problem is fixed in [1], as a single common device name location is > > defined. The problem is that it is in another patchset (even if both are > > closely linked and were only separated to ease integration). > > > > This limit was currently taken from the arbitrary limit of device in > > name in the original rte_devargs for virtual devices. I think it could > > be exported as a define by rte_dev.h, used there and reused in [1] to > > define the new rte_devargs structure. > > Please check this patch which was integrated yesterday: > http://dpdk.org/commit/48d8675c9cf > Now you can use RTE_DEV_NAME_MAX_LEN instead of hardcoded 32. > Yes I just saw that while rebasing, it's exactly what I needed. It will be in the next version. -- Gaëtan Rivet 6WIND