From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 12CB81B6B0 for ; Tue, 30 Jan 2018 19:33:10 +0100 (CET) Received: by mail-wr0-f177.google.com with SMTP id v31so12252087wrc.11 for ; Tue, 30 Jan 2018 10:33:10 -0800 (PST) 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:in-reply-to; bh=R5P51RQR6XZCoVs9wBss0IBV8Oltpo4BcfeWkMaC7u4=; b=dfY73xhuCWcA2aqE2lak+felorIoioFJbgMvTeKZEA669zddF2AcawHyLHeq8cNAkk 1jOUgCfJy0w51e2GceL64oe9/drnG6bO0cm8sbrXlfcOOGU7tOeTBAI6r9YZrMcdzJzL ACpR/oMXl7SlfLMCd5ZTqclQKYKZ8wIOAw37atEB7xlvwZ11Izv3YPr/+j5pLScG6ppw 2LW3sji9X74qBEf1DxGkPGKZIqnZgMESllWzNenjrWGeTx5go06TC09Ty8ZwA3GULhHm eCCZsehH/HvoxUxlOVw7O2+4vAykKe/Ywtrtm06WHeYBkIthwO0kZRAp4CQFfBCUu5Ad oh5Q== 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:in-reply-to; bh=R5P51RQR6XZCoVs9wBss0IBV8Oltpo4BcfeWkMaC7u4=; b=BukAieyp4YdS/wtJbK5FJyDl0tv6gW3wOWJ4wQNl5pX3xGPkSmCZBAL7zmdpbXDOvg 2t2rWdLKSSzwoc0t+SMxLELZd0j/GmTwxb5l13ju7lZWH0kIRjdC5I5kgxdaDSbfZa/W +G/SwHG02iVBXljucEEjtcu55t/89WMHVcBaDS2FbBmOqOYqLL6ZTJOc70Z6rLB6h60q ENYhWxG+dvm1GI3n2zHJdqAq/rvW9sRt6ixyMIuTJB08kp4YEu+rppLhhSGkgGH+czHs vi+8MXmy2MIg8dOnh7yX3c2Dyqni1IZUvLMJ0uKnIadn+92QQh5mXLyolgq9GaB3tiEg HDnQ== X-Gm-Message-State: AKwxytdLYXJ28vAxkcoJQ5/2heDTlhemKJfGIMp/6K/Gq5vE75LeC/55 jixWPOjHRNenJDP4vFY1jinKeQ== X-Google-Smtp-Source: AH8x226EppjulFVS+w5vWJEUIfOn7JkaISeUI2em7m6lvrxGT37DncQUmsErZffrDW430HVpfDxVWg== X-Received: by 10.223.141.211 with SMTP id o77mr13516457wrb.39.1517337189805; Tue, 30 Jan 2018 10:33:09 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 19sm7618393wrx.73.2018.01.30.10.33.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 10:33:09 -0800 (PST) Date: Tue, 30 Jan 2018 19:32:56 +0100 From: Adrien Mazarguil To: Marcelo Ricardo Leitner Cc: Shahaf Shuler , Nelio Laranjeiro , dev@dpdk.org Message-ID: <20180130183256.GR4256@6wind.com> References: <20180129170310.14142-1-adrien.mazarguil@6wind.com> <20180130144512.21872-1-adrien.mazarguil@6wind.com> <20180130144512.21872-3-adrien.mazarguil@6wind.com> <20180130175459.GP3494@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180130175459.GP3494@localhost.localdomain> Subject: Re: [dpdk-dev] [PATCH v4 2/4] net/mlx4: spawn rdma-core dependency plug-in 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: Tue, 30 Jan 2018 18:33:10 -0000 On Tue, Jan 30, 2018 at 03:54:59PM -0200, Marcelo Ricardo Leitner wrote: > On Tue, Jan 30, 2018 at 04:34:54PM +0100, Adrien Mazarguil wrote: > ... > > + handle = dlopen(MLX4_GLUE, RTLD_LAZY); > > + if (!handle) { > > + rte_errno = EINVAL; > > + dlmsg = dlerror(); > > + if (dlmsg) > > + ERROR("cannot load glue library: %s", dlmsg); > > + goto glue_error; > > + } > > + sym = dlsym(handle, "mlx4_glue"); > > + if (!sym || !*sym) { > > + rte_errno = EINVAL; > > + dlmsg = dlerror(); > > + if (dlmsg) > > + ERROR("cannot resolve glue symbol: %s", dlmsg); > > + goto glue_error; > > + } > > + mlx4_glue = *sym; > > + return 0; > > +glue_error: > > + if (handle) > > + dlclose(handle); > > + ERROR("cannot initialize PMD due to missing run-time" > > + " dependency on rdma-core libraries (libibverbs," > > + " libmlx4)"); > > Patches are mostly LGTM. The only concern left is if ERROR is the > appropriate log level here. I know it's a fatal error for Mellanox > cards, but Considering DPDK will load all drivers for probing the hw, > these messages will show up even when using other cards. So what about > switching to WARNING instead? Should be less confusing to the users > then. Right, this is a leftover from the orginal patch that bundled mlx4_glue.so with the PMD. An error message should only be printed when dlsym() fails, not dlopen(). Depending on whether this series gets applied in the meantime, I'll either send a v5 update or a separate fix tomorrow. -- Adrien Mazarguil 6WIND