From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 7070F1B1C0 for ; Wed, 10 Jan 2018 14:52:09 +0100 (CET) Received: by mail-wr0-f196.google.com with SMTP id o7so14611592wro.8 for ; Wed, 10 Jan 2018 05:52:09 -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:content-transfer-encoding:in-reply-to :user-agent; bh=7n10vOmjyAACZrNXF/fMvnt5vHtaBwU80sOfxNpN2/8=; b=sMx2mPnsoufdOoHX2Rz4vG+c7mMhBzXW1PFUbUPY51LyF0hpCNx9zGkrQDBq9Ysny5 vfFjmSXeeoUUAdEMsX9aegV5SJcg8t285stB0MWiYW4v0XR6y3TOny/yGiwE4ILvflZN sZHjcBpLZP1PIIH4Z3Y3dZNhhA+809LveMLtEM8UIPw9u+/XVPgzmE4kER6j9C68dclO sZZQTvgbMJP/y/4OmEz4X62tkkub4Y47ROCRs9vDr9w0S08hLvN20bl/JN7887In+bJC 5H6bgx8yKDKrylcf79PTEK1LSI6TgWHcuPyF8KbrPog9SrTsfSZ2dKudp+9jV/2AHJuR cf+A== 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=7n10vOmjyAACZrNXF/fMvnt5vHtaBwU80sOfxNpN2/8=; b=PxXSYLrqFaYgL2NK12w1tXVj9kj+93tnkFN//+SLPHOJ95A++98ki2qPK456RTWq3E biIif6+o/gqYhaeFOx/jZ2kZ/zOLZt1c0oUdQiQF4v0qphViL6bUlDRFACRXH9Tga2pW umeg7l28F++pb051A4kcYs1WWZ1DtXPuhnEqd9iVpJgCrUefmhTyVKEBKW20yYfHawGH lkf9R6Bd0iNrbTzMhZ358UxiOgo0W1VMf59RXZ8CcUxFuJh/VZvwmsLftaplA2fPIWFY 4IsGfEDSniymcukfD3c3UMaqYkKWRUXlG5t4P760U3QycTsb3b3WEiPQ1o+VLzSVzxIc OJdg== X-Gm-Message-State: AKGB3mJRshxaaCEEoZBkmeIyMULlIsaSERM/GePLReRxtYPOZqcVmLwF r366Q0f7wsKXmz/C3n90KhOhqDWY X-Google-Smtp-Source: ACJfBouwu1fRm/u8E95QzyozGWrDbazrqQLDj9KaMOFyE2z62vmWi5JPDUvGdkJbidMrOeiQZKbyRw== X-Received: by 10.223.165.84 with SMTP id j20mr16638331wrb.278.1515592328779; Wed, 10 Jan 2018 05:52:08 -0800 (PST) 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 u10sm5542535wrg.6.2018.01.10.05.52.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2018 05:52:07 -0800 (PST) Date: Wed, 10 Jan 2018 14:51:56 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: "dev@dpdk.org" , Thomas Monjalon Message-ID: <20180110135156.fzfsivwn6mo7sx3b@bidouze.vm.6wind.com> References: <1513703415-29145-1-git-send-email-matan@mellanox.com> <1515587465-9304-1-git-send-email-matan@mellanox.com> <1515587465-9304-7-git-send-email-matan@mellanox.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 v4 6/6] net/failsafe: fix removed device handling 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: Wed, 10 Jan 2018 13:52:09 -0000 Hi Matan, On Wed, Jan 10, 2018 at 12:43:33PM +0000, Matan Azrad wrote: > Hi Gaetan > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Matan Azrad > > Sent: Wednesday, January 10, 2018 2:31 PM > > To: Thomas Monjalon ; Gaetan Rivet > > > > Cc: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH v4 6/6] net/failsafe: fix removed device handling > > > > There is time between the physical removal of the device until sub-device > > PMDs get a RMV interrupt. At this time DPDK PMDs and applications still > > don't know about the removal and may call sub-device control operation > > which should return an error. > > > > In previous code this error is reported to the application contrary to fail-safe > > principle that the app should not be aware of device removal. > > > > Add an removal check in each relevant control command error flow and > > prevent an error report to application when the sub-device is removed. > > > > Signed-off-by: Matan Azrad > > --- > > drivers/net/failsafe/failsafe_flow.c | 18 ++++++++++------- > > drivers/net/failsafe/failsafe_ops.c | 35 ++++++++++++++++++++++-------- > > --- > > drivers/net/failsafe/failsafe_private.h | 11 +++++++++++ > > 3 files changed, 46 insertions(+), 18 deletions(-) > > > > diff --git a/drivers/net/failsafe/failsafe_flow.c > > b/drivers/net/failsafe/failsafe_flow.c > > index 153ceee..c072d1e 100644 > > --- a/drivers/net/failsafe/failsafe_flow.c > > +++ b/drivers/net/failsafe/failsafe_flow.c > > @@ -87,7 +87,7 @@ > > DEBUG("Calling rte_flow_validate on sub_device %d", i); > > ret = rte_flow_validate(PORT_ID(sdev), > > attr, patterns, actions, error); > > - if (ret) { > > + if ((ret = fs_err(sdev, ret))) { > This assignment in "if" statement causes to checkpatch error, I sent it as is because you asked it like this. > If you think I need to change it, I see 2 options: > > 1. > ret = fs_err(sdev, ret); > if (ret ) {...} > > 2. > if (fs_err(sdev, &ret)) {..} > > what do you think? > Yes I forgot that checkpatch was like this. Our mail crossed, but I acked this patch. I think this is acceptable at the driver level, or should be at the discretion of the driver maintainer. So personally, I'd say leave it this way. If someone or something shouts about this we will consider alternatives. Otherwise this is readable and easily understandable as-is. Regards, -- Gaëtan Rivet 6WIND