From patchwork Wed Oct 16 15:46:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 61326 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F5C01E875; Wed, 16 Oct 2019 17:47:46 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D0ED11E874 for ; Wed, 16 Oct 2019 17:47:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 08:47:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,304,1566889200"; d="scan'208";a="186187693" Received: from silpixa00399953.ir.intel.com (HELO silpixa00399953.ger.corp.intel.com) ([10.237.223.218]) by orsmga007.jf.intel.com with ESMTP; 16 Oct 2019 08:47:42 -0700 From: Ciara Power To: mtetsuyah@gmail.com Cc: dev@dpdk.org, Ciara Power Date: Wed, 16 Oct 2019 16:46:06 +0100 Message-Id: <20191016154606.39218-1-ciara.power@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [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" 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. Signed-off-by: Ciara Power --- drivers/net/null/rte_eth_null.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index e2ff41a22..b8472a0cf 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -441,11 +441,25 @@ eth_mac_address_set(__rte_unused struct rte_eth_dev *dev, return 0; } +static int +eth_dev_promiscuous_enable(__rte_unused struct rte_eth_dev *dev) +{ + return 0; +} + +static int +eth_dev_promiscuous_disable(__rte_unused struct rte_eth_dev *dev) +{ + return 0; +} + static const struct eth_dev_ops ops = { .dev_start = eth_dev_start, .dev_stop = eth_dev_stop, .dev_configure = eth_dev_configure, .dev_infos_get = eth_dev_info, + .promiscuous_enable = eth_dev_promiscuous_enable, + .promiscuous_disable = eth_dev_promiscuous_disable, .rx_queue_setup = eth_rx_queue_setup, .tx_queue_setup = eth_tx_queue_setup, .rx_queue_release = eth_queue_release,