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.6 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,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 EDF1FC43613 for ; Mon, 24 Jun 2019 16:27:45 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 5EFBE205C9 for ; Mon, 24 Jun 2019 16:27:45 +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="jhFwVQxW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EFBE205C9 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 B3C821BB4F; Mon, 24 Jun 2019 18:27:44 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id AB3181B9E0 for ; Mon, 24 Jun 2019 18:27:43 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id x4so14584102wrt.6 for ; Mon, 24 Jun 2019 09:27:43 -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=3r6UFwjsS6W/z6a3/nqKI1Pr3iH2KiucIPE3NZaYPdY=; b=jhFwVQxWXFYMywiVjVvo06oaJWYreReSFTHzUdozXdfRl6ahYn8EVtHzIZr6bci2NO P/OsWBXITo6LRo81xkcg2DP8eHlHtc3CYkGTBBiyA5iKdVCQ+hp2lM5qIrp0FtiJroCp VOH5P2fBAvsl2ihSEtVn3EGQGFxfkEVwRebaiDlOOdFKKwTtvZs+fZv1A7Mz65kf0yv0 unKePr0Jf/yu2YQGev84nFP5HmZyKjx/9lU8+x6S9UxJTAhkS7gwaEEntQVcUqlvJhvJ oxOz/YlPsvEbrZ3zcHZGtEnF/MgkoJwTv8ZzVds6NGDsYnI2tcCGStk6VZj2p5P6N21m q6QQ== 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=3r6UFwjsS6W/z6a3/nqKI1Pr3iH2KiucIPE3NZaYPdY=; b=nUWQafofgr2Fsc41sWc5sh+07aStvjFmO42mP68TPg7THNnBaTtgpA1VNcgDX+FesK Pum6zSb3Xi4IDPXXGuhDrYNV9RO08cxXJpAfzic/n3SktrCqIcfhm8iBaaeBhpI5AdnP PqQbajt1MuN3MyY8oKdmlMjF37w74QNEw1rQfSyJlLeRqwAmz4wKRv19Gayprp1ezIsl djbVukOeil+CST/L92ZrstEchBB0rCzT55DCLHi/xqQmIJNBugxSDrpB7n1+lD4q7scK Hb1eEf6O7M9NXnyJtseNgJlAO0hUC3VyVrj3mfoCLdhS2w3Nk2QOh+U4/yxGj5Ns+Kyc NmkQ== X-Gm-Message-State: APjAAAUEMVlZnEgG4ybuhP4bca3JU+IWhMjPSSBLbt9POQ3WVBzzQlI5 f5nKJhRHIgrLxeFxFLeZO141hslOex4= X-Google-Smtp-Source: APXvYqyFXA+9X6jQRnoNiPCr94vvWUqUnNQGMa0lANzlbUOdKJj46Li9qVikhlE/4jwgnSniDngeFg== X-Received: by 2002:adf:f181:: with SMTP id h1mr16005027wro.18.1561393663380; Mon, 24 Jun 2019 09:27:43 -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 m9sm13140446wrr.14.2019.06.24.09.27.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2019 09:27:42 -0700 (PDT) Date: Mon, 24 Jun 2019 18:27:41 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20190624162741.3yrlloefjvbibq7z@bidouze.vm.6wind.com> References: <20190621220824.18073-1-stephen@networkplumber.org> <20190624081558.bsu3j2inahwumlzj@bidouze.vm.6wind.com> <20190624082338.3ddfc6fa@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190624082338.3ddfc6fa@hermes.lan> 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" On Mon, Jun 24, 2019 at 08:23:38AM -0700, Stephen Hemminger wrote: > On Mon, 24 Jun 2019 10:15:58 +0200 > Gaëtan Rivet wrote: > > > 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 > > > > > > > Simpler is better. Ok > Sorry, after working with failsafe my impression is that it is not > built with that in mind. -- Gaëtan Rivet 6WIND