From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 7E95F2BF5 for ; Mon, 8 Jan 2018 15:32:12 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id n138so14469427wmg.2 for ; Mon, 08 Jan 2018 06:32:12 -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=BY9YfInDDd2X4C+oi7vmMzWEX+BBN0HByzonRf6+b6c=; b=aiUK1VLXxxozjJS4j/BeqsnWXDtuPqn4snZ683liMcvIX277uYceIWCSK0xw8N2wNJ fvq9O2yGcK9zRfRLCnK4e+aWlcutgIJJl8QXHZ8lYn3shqxXDEFyqzHsc9hQ/QxhBWaN uUJLeI4BmHHI8EelZtDIKf/FPD26c4K/yaBCVjoATt34223J1gYOV0Fi8N6oacjvxW98 gzs0Sgdg5hPDzd/2/81/BnGt96uBHSc8ehJ+i/xSHRs+oEU79MoWuTSxNFpN+8R7zgpJ x/BZ0583NW7oZretDHUYbp2LcIylAH4zegYppY967BFBIEE5Cnb28PnCQUb/sW+aohFf Svcg== 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=BY9YfInDDd2X4C+oi7vmMzWEX+BBN0HByzonRf6+b6c=; b=Qrqsya7xLlBaLRPVPEuSpKE4IHX3u/+CfIi4+JSfurLyfEfUAV5V/pYU5M6LV9v2IA uxlCehJMU1WDmZPWSoW9cyYe8V0HDfQkmJDwdr5YgH0EjiXYfWQdvvB0xJaIqd9YYarp fqgGD+7xMdcOFmRF1R+Vq7urBk+WGQKItsnQJpooQMzZjN/AzOwlufTA3gp6G9C3shcx C0GKptOzNTSEAsU0zgfn2sj56y39xe6rfiO5KxhatzojGCwkAWGhZE8Tdpi1tT8/R6gJ LtIt8OssuE3F7euBVhmTyLsLrYezSZzEBqsjrUdYyWxrMSu3Sneu21luGlqQdvTKepYc EZHQ== X-Gm-Message-State: AKGB3mI1ghqOkKgG0sY2RrH3fZAzchSuwPV4SXEe2StTSxEoVDq94B5m VCpzNHLQTciSCl91CacZONYfFw== X-Google-Smtp-Source: ACJfBosKOul1wFWqakrZrny0n0suAN2YdGoFvJ9goNyQuhAuJsyzGOVM8tPLCIycAg4PafxwVadu0Q== X-Received: by 10.28.45.83 with SMTP id t80mr8979598wmt.90.1515421932086; Mon, 08 Jan 2018 06:32:12 -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 q13sm6909325wrg.68.2018.01.08.06.32.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jan 2018 06:32:11 -0800 (PST) Date: Mon, 8 Jan 2018 15:31:59 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: Adrien Mazarguil , Thomas Monjalon , "dev@dpdk.org" Message-ID: <20180108143159.toov5p2uxpajqg6e@bidouze.vm.6wind.com> References: <1513175370-16583-1-git-send-email-matan@mellanox.com> <1513703415-29145-1-git-send-email-matan@mellanox.com> <1513703415-29145-7-git-send-email-matan@mellanox.com> <20171219222131.plcfn5wqggyn5znw@bidouze.vm.6wind.com> <20180108105739.qkyejshupojkwyv2@bidouze.vm.6wind.com> <20180108134654.wb7svquzhuuvvmh6@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 v3 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: Mon, 08 Jan 2018 14:32:12 -0000 On Mon, Jan 08, 2018 at 02:00:54PM +0000, Matan Azrad wrote: > Hi Gaetan > > > > > Your environment does not include the function, but this is within > > > > fs_flow_destroy (please update to include the context by the way it > > > > helps a lot the review :). Afterward, line 162 ret is directly used as return > > value. > > > > > > > I don't understand what do you mean. > > > > > > > Also, fs_err() would need to transform rte_errno when relevant > > > > (mostly in failsafe_flow.c I think). > > > > > > > Your suggestion is always to update rte_errno to 0 in case the error is > > because of removal? > > > > > > > If the error is indeed due to the device being absent, then rte_errno should > > be set back to its previous value I think. > So, I think it will require old rte_errno save before each device command... > Why not to set it to 0 in the special case(removal) by the new internal API? > Resetting it to 0 might be sufficient, yes. There might be some old-school devs out-there that would such things as: do_thing_x(); do_thing_y(); do_thing_z(); if (check_for_any_error(errno)) { abort(); } But I'm not too fond of this kind of pattern, so I'm not specifically opposed to code that does not go with this flow. -- Gaëtan Rivet 6WIND