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.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 23609C76191 for ; Thu, 18 Jul 2019 11:18:50 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 63FA0217F4 for ; Thu, 18 Jul 2019 11:18:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.b="FJLlFt4Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63FA0217F4 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 F21391B53; Thu, 18 Jul 2019 13:18:47 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 7EBED152A for ; Thu, 18 Jul 2019 13:18:46 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id c2so25046038wrm.8 for ; Thu, 18 Jul 2019 04:18:46 -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=PfDyXF22AaIk8oDwwTazUOA91iY+d3AdVgXBJXMVy9I=; b=FJLlFt4Q+71FHajrWMWs/tE9aiwTMO6DYczbaha9Ef3q4bh8JtQUn/aidTKBxy2Plf bYLWM5xBUFSyHIe2dA+P6l1csTDMM/rtB3Xg7ghkgYaJMvaXQzCqp9g5sCfAzh1YaxFm tRcRmijPBvhIGa1hpHFQuhbE73/mKkNfD76UGvn12kOVsfhKpLSfoLYWPXpGJQhUq8BS rF+KZJwZac0eyh/YJrsX5481h32TQiNn7ZO8ejvtzGezm4yRQeMVsyKGhtsaHRGes5QE T/9bVf8qyL0omJuPzcmHuZazjkp+pX8vLGNAceniYITNzyB2mwGoURJiQ+2469x/XYla Q+dw== 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=PfDyXF22AaIk8oDwwTazUOA91iY+d3AdVgXBJXMVy9I=; b=BlZB72mi2dviGWmhGAf4Y5SPYBI14g8slG3nYAu7LLblbhHL3m7O9X6KQ2JBC5mZDZ Z17L+DiPJCf77JuvIcNxxB0aUrT4LUzmRbQ0E4xIOTLibA8wSOWvQsW+rWLxFonjbBhn eRSMPvYyAr7/sARqS37kwNDQqEF3/WYVZhKE+1e7uW1TCit8+5Y/DktnwY4BMVqH8a0T 5miJuAYy/gdIxncf9ra4lQjQuizOoiHkUJIpkg9XrUBR1bReZ8XaiL0FkQCix36TBdb3 a4Eu4mD5xVnorloTLMMLIMrVyoSel0jmJZH8UWI1bylm+8gztOSEuMxSMdg8iXsouotP oQ8Q== X-Gm-Message-State: APjAAAWc23HOGtR848vW3cKnpZxcPKUDTvmuluYQrDMm1iFe6vsuEBKp o+Td3y6NED+zfKcTqTQJNVccjw== X-Google-Smtp-Source: APXvYqynYg8lhdmruiesnWW5s3sPWF5QBbc88ZjKXrS6LWUpuI4Ygn/UMDJm5HLR2+CMZ6eZNaeM6A== X-Received: by 2002:a5d:53c2:: with SMTP id a2mr50608288wrw.8.1563448726109; Thu, 18 Jul 2019 04:18:46 -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 x16sm20531537wmj.4.2019.07.18.04.18.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2019 04:18:44 -0700 (PDT) Date: Thu, 18 Jul 2019 13:18:42 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Ferruh Yigit Cc: Stephen Hemminger , dev@dpdk.org Message-ID: <20190718111842.qmsoghde2zcthlxb@bidouze.vm.6wind.com> References: <20190621220824.18073-1-stephen@networkplumber.org> <20190624081558.bsu3j2inahwumlzj@bidouze.vm.6wind.com> <20190624082338.3ddfc6fa@hermes.lan> <20190624162741.3yrlloefjvbibq7z@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Wed, Jul 17, 2019 at 07:21:51PM +0100, Ferruh Yigit wrote: > On 6/24/2019 5:27 PM, Gaëtan Rivet wrote: > > 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 > > is this an ack :) > Yes sorry, Acked-by: Gaetan Rivet > > > >> Sorry, after working with failsafe my impression is that it is not > >> built with that in mind. > > > -- Gaëtan Rivet 6WIND