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 9D088A317C for ; Thu, 17 Oct 2019 15:43:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9795A1E8EF; Thu, 17 Oct 2019 15:43:48 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 234721E8E9 for ; Thu, 17 Oct 2019 15:43:46 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 06:43:46 -0700 X-IronPort-AV: E=Sophos;i="5.67,307,1566889200"; d="scan'208";a="190028663" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.95]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Oct 2019 06:43:44 -0700 Date: Thu, 17 Oct 2019 14:43:41 +0100 From: Bruce Richardson To: Ferruh Yigit Cc: Andrew Rybchenko , Ciara Power , mtetsuyah@gmail.com, dev@dpdk.org, Thomas Monjalon Message-ID: <20191017134341.GA912@bricha3-MOBL.ger.corp.intel.com> References: <20191016154606.39218-1-ciara.power@intel.com> <5b6af628-7101-484b-01db-16272025105f@solarflare.com> <04b0cc0a-633f-212e-22ab-147b7f3e6a1a@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <04b0cc0a-633f-212e-22ab-147b7f3e6a1a@intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [dpdk-dev] [RFC] net/null: add empty promiscuous mode functions 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, Oct 17, 2019 at 12:05:56PM +0100, Ferruh Yigit wrote: > On 10/17/2019 11:51 AM, Andrew Rybchenko wrote: > > On 10/17/19 1:47 PM, Ferruh Yigit wrote: > >> On 10/17/2019 11:37 AM, Andrew Rybchenko wrote: > >>> On 10/16/19 9:07 PM, Ferruh Yigit wrote: > >>>> On 10/16/2019 4:46 PM, Ciara Power wrote: > >>>>> Adding promiscuous functions prevents sample applications failing when run > >>>>> on this virtual PMD. The sample applications call promiscuous functions, > >>>>> and fail if this function call returns an error, which occurs when the > >>>>> virtual PMD does not support the promiscuous function being called. > >>>>> > >>>>> This change will be implemented for all virtual PMDs that currently do not > >>>>> have existing promiscuous functions. Multicast functions will also be > >>>>> added for virtual PMDs to prevent sample application breakages here also. > >>>> +Andrew > >>>> > >>>> With the some ethdev APIs returning error code, some sample applications stop > >>>> working with virtual interfaces, > >>>> > >>>> We can, > >>>> 1- update sample applications to ignore the errors > >>>> 2- Add dummy dev_ops support to (almost all) virtual PMDs (what this RFC suggests) > >>>> > >>>> (1) puts us back to before the ethdev APIs updated status, and this may be wrong > >>>> for the physical devices case, so I am for this RFC. > >>>> > >>>> Only perhaps we can have some common empty function and keep assigning that one > >>>> to reduce the dummy code, what do you think? > >>> I don't like the idea to have common empty/dummy functions. > >>> If virtual PMD behaves in accordance with enabled promiscuous mode, > >>> it should initialize it properly on init: > >>>      eth_dev->data->promiscuous = 1; > >>> If so, if application requires promiscuous mode, attempt to enable will > >>> do nothing. If application requires non-promiscuous mode, disable will > >>> fail and it is good. > >> It is technically correct that we can't disable promiscuous mode in virtual PMDs > >> but I think mainly we don't really care so it returning error may make the > >> applications fail/exit unnecessarily with virtual PMDs. > > > > If I test virtual PMD promiscuous mode, I would prefer enable/disable > > callback to say me truth. > > > > If application really does not care, it should be in the application code. > > Application can't change this because they may be caring return result for the > physical devices. > > Up until this release these missing dev_ops in virtual PMDs were silently > ignored, now APIs are more strict on this (which is good) but to get close the > previous behavior for virtual PMDs we need to relax on these features (like > saying success on promiscuous disable although it didn't). > The other variable here is how often an app is going to request promiscuous disabling? Given that most ports generally come up in that state anyway, and one needs to request enabling it, surely the disable case is relatively rare? In that case I'd tend to agree with having disabling it returning error for vpmds. /Bruce