From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 073D4C43613 for ; Mon, 24 Jun 2019 08:16:04 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4DCFB2083D for ; Mon, 24 Jun 2019 08:16:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=6wind.com header.i=@6wind.com header.b="cBkbzFym" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DCFB2083D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=6wind.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 858541BF38; Mon, 24 Jun 2019 10:16:02 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 24BAD1BF26 for ; Mon, 24 Jun 2019 10:16:01 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id z23so12320085wma.4 for ; Mon, 24 Jun 2019 01:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=FhHFT+i8vtyX0GWjVEb26SmShdM33U4FTJ70nQE+b2Y=; b=cBkbzFymGSU6MsspnrCKNncms/3MxYcKSHrBCMWbfBBNd+Y2YPa9LfQYi9PUGL5nsR D4pFk2FKXYI7Ix2VGon3BO2zFv458IJxrTai/40wMXtBguDRaiqnwwWo/XYlyWeXcnXn qCb67XdGwRR6SxmUk/0V8jm6KhRHu+0Pa2boxq9ZgquYuGNOCENO2ZF+QtFJlyJZc2fl I+hae1cZaS4NpDf85+nU71mZae1n8T+uvgVGEjzTCoMQsrgD9j0dufBzuDpw7UyHQyJU q/HVUFwTVJJVqpPKezqnWirHg6I4qYJvI3doRFjF6ARfQEKJWg95kC+XiKT4tShtl73C W5AQ== 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=FhHFT+i8vtyX0GWjVEb26SmShdM33U4FTJ70nQE+b2Y=; b=ZkctjvM88yAxX1nPyXi0Nsm5NwXeSO/XqMigVGq6f9aZP+bIhEU/xg08nfx7lORa3h uS9rLN/MDUS7tUGttU8z9DhkCmN/mMgbTXE/zkt5X8h1iAIVUxTyuNZXj7q0Vg8Nb+73 GbYE5SEhwllUZ8/bh/t0jtTJe0uyAs1BttCNGblGF+GCjrwY9UGZnP5GYEBiDGAy4hvD Vaoymr+WMjEyHTCTHgEEkZPnQis9FvBA8TNsJpcdpG0rS88XIVi4pzkqsk05pxtQBQLe 6pR9jnwwcxJ05pfJzw3MN7o/wjq+kqQHRhNunSXz1s7t2c5h1vsvinaQJkm2ac/W+P95 4ukw== X-Gm-Message-State: APjAAAWl3siqp7E5Apv6MpsK7oTrNH6vbbdVYdC/cIo5P0Fs9i1TfhVt xNMAbuC0PAglituCgXyylHv4CxVdcng= X-Google-Smtp-Source: APXvYqw54TDWElihpdka8/AFVsi1K5lyJyxOJ4TLlkz5G8rsCcsxaWlK2NopCU86r3TbJVTfJERVwA== X-Received: by 2002:a1c:7304:: with SMTP id d4mr14279812wmb.39.1561364160676; Mon, 24 Jun 2019 01:16:00 -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 j4sm8453213wrx.57.2019.06.24.01.15.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2019 01:15:59 -0700 (PDT) Date: Mon, 24 Jun 2019 10:15:58 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20190624081558.bsu3j2inahwumlzj@bidouze.vm.6wind.com> References: <20190621220824.18073-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190621220824.18073-1-stephen@networkplumber.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] failsafe: skip devargs if not present in secondary 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" Hello Stephen, On Fri, Jun 21, 2019 at 03:08:24PM -0700, Stephen Hemminger wrote: > When secondary process is run was noticing that the log always > contained complaints about unable to parse devargs. > > It turns out that an empty devargs turns into "" and this > value is not parsable. Change the failsafe secondary to just > skip doing devargs if it empty. > Commit log needs a little rework, a few typos. > Signed-off-by: Stephen Hemminger > --- > drivers/net/failsafe/failsafe.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c > index e91c274d8059..04ca0cab0d78 100644 > --- a/drivers/net/failsafe/failsafe.c > +++ b/drivers/net/failsafe/failsafe.c > @@ -364,6 +364,10 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) > * A sub-device can be plugged later. > */ > FOREACH_SUBDEV(sdev, i, eth_dev) { > + /* skip empty devargs */ > + if (sdev->devargs.name[0] == '\0') > + continue; > + An empty devargs being named "" is part of the internals of rte_devargs. The clean solution would be to add a `bool rte_devargs_empty()` function and test the devargs with it. The simple solution is your proposition. Clean seems a little heavy-handed, but it would be more stable. If you agree, you can add the helper. I'm ok with keeping it simple otherwise. > /* rebuild devargs to be able to get the bus name. */ > ret = rte_devargs_parse(&devargs, > sdev->devargs.name); > -- > 2.20.1 > -- Gaëtan Rivet 6WIND