From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8315A2EDB for ; Fri, 6 Sep 2019 11:24:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 907CF1F290; Fri, 6 Sep 2019 11:24:37 +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 2ECEE1F279 for ; Fri, 6 Sep 2019 11:24:36 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id w13so5789204wru.7 for ; Fri, 06 Sep 2019 02:24:36 -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=ayJ4CZaB1qpBnOpRMv/im8BMUWHlVnxL/nhfyhdMH3o=; b=NPKlK1qoTmg7YTj8iLt9jcFqAkb4YDWLlpePlTBm5FAXwQjgIa950Mudl8fha49nDM ZheSnmEbj4ohUnn2VSeeaFsaBSTRzh1kcg9EfpfMjTuLMadiIXJ7dIdMifMUjOpgSsyN ujdvW/LrDGW9pW207CPrU2jhjHyLgZN7+onRBVm3bKUY/wHMKPw129vpMA7LRqPHsQk5 ZXATNBLIkTFH9dDjb1yqDrrWmUis3y9TVz+y4hCeqAsDET4mCPEA+CnZj5Ojewrja3PA oI5GiAEWhtJNO4ASDc8J5gj9c8zeYQY6SCHFnQLkFDexY5BnfLIlVCQ9cah+nlJCdg6k mc9A== 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=ayJ4CZaB1qpBnOpRMv/im8BMUWHlVnxL/nhfyhdMH3o=; b=TvA+swOvbKYJQy9tsKBBLgoLT/dMG5QAWaS3cMUMAhB8M+vaXm+iBjpGPD8gJtXzYr 8uRMVKQAvb3SMSv+po76cHIe5AZjF9nZ0NI+hZN+2yIhtlVsQe0xcGYggp26wJyU2uhn P7R0BB6+2ZI0vmlgb/YkFFWvHzIPMq87mfrqDN8SK/21hGMsAnRNVs8IWdk/2Ca4MHLW 2aAjO29K1blijA04kvo/rWvkuAERYed4uGgHcij8RAGA7ujXU/GjNp7s8Io4p+QW+CMX Q4GNFzPZvJvu6ViOtBivbwNED+QNnuE9XjMrdwElC30/7fCFLrZ9jcdMROqpiVIhc0uJ w7SA== X-Gm-Message-State: APjAAAVURdehDo/qIobbgQXwF4A5zPz02myEFhCukh7M54+hvqTkcLlE 17S4l/YhzMstNLYdZo5yBby6IreyKMw= X-Google-Smtp-Source: APXvYqx6tEMfuZvbT92/r0+xUkNN4ihKVgg8jF8Sg0gWhzJzU9s57Nd2ThhVCOgr/DO/vsg0C0cG7g== X-Received: by 2002:adf:8b13:: with SMTP id n19mr3033050wra.203.1567761875918; Fri, 06 Sep 2019 02:24:35 -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 n30sm623397wmd.15.2019.09.06.02.24.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Sep 2019 02:24:35 -0700 (PDT) Date: Fri, 6 Sep 2019 11:24:33 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Andrew Rybchenko Cc: Stephen Hemminger , dev@dpdk.org, Ivan Ilchenko Message-ID: <20190906092433.nlcqic77c4nr2ayf@bidouze.vm.6wind.com> References: <1567699852-31693-1-git-send-email-arybchenko@solarflare.com> <1567699852-31693-3-git-send-email-arybchenko@solarflare.com> <20190905093615.2c3bbb57@hermes.lan> 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 02/13] net/failsafe: check code of promiscuous mode switch 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 Thu, Sep 05, 2019 at 07:38:23PM +0300, Andrew Rybchenko wrote: > On 9/5/19 7:36 PM, Stephen Hemminger wrote: > > On Thu, 5 Sep 2019 17:10:40 +0100 > > Andrew Rybchenko wrote: > > > > > + if (ret != 0) { > > > + ERROR("Failed to apply promiscuous mode"); > > > + return ret; > > > + } > > Just return the error as normal and let caller deal with it. > > Additional logging is not necessary. > > In this particular case we simply follow style around. > No strong opinion. Up to Gaetan. > Ok, actually I missed a few things. You should leave the error message in and keep it consistent with the rest. However, you should test ret against fs_err(sdev, ret), you can find other uses of it elsewhere in the file. When rte_eth_promiscuous_enable returns -ENODEV, it is not an error for failsafe (as an absent device is expected at some point). Stephen if you would prefer never to have messages, it should be changed all throughout the driver instead. If prefer it I would accept a patch about it. Just want to keep it consistent. -- Gaëtan Rivet 6WIND