From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH] mlx4: use dummy rxqs when a non-pow2 number is requested Date: Thu, 24 Mar 2016 13:25:51 +0100 Message-ID: <56F3DCCF.3@6wind.com> References: <1458576484-28211-1-git-send-email-olivier.matz@6wind.com> <20160324122043.GC13728@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, adrien.mazarguil@6wind.com To: Bruce Richardson Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id AA6A22BE4 for ; Thu, 24 Mar 2016 13:25:54 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id u125so10176088wmg.1 for ; Thu, 24 Mar 2016 05:25:54 -0700 (PDT) In-Reply-To: <20160324122043.GC13728@bricha3-MOBL3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Bruce, On 03/24/2016 01:20 PM, Bruce Richardson wrote: >> @@ -734,12 +734,12 @@ dev_configure(struct rte_eth_dev *dev) >> } >> if (rxqs_n == priv->rxqs_n) >> return 0; >> - if ((rxqs_n & (rxqs_n - 1)) != 0) { >> - ERROR("%p: invalid number of RX queues (%u)," >> - " must be a power of 2", >> + if (!rte_is_power_of_2(rxqs_n)) { >> + WARN("%p: number of RX queues (%u), must be a" >> + " power of 2: remaining queues will be inactive", > > I'm not sure how clear this warning message is. To the reader there are no > extra "remaining" queues referred to, as it's not stated that the driver is > allocating extra queues. How about e.g.: > > WARN("%p: number of RX queues on device must by a power of 2. Allocating %u > queues, of which %u will be active. Remaining queues will be inactive"...) > You're right, I'll send a v2 with a clearer message. Regards, Olivier