From patchwork Mon Oct 21 12:22:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 61589 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 49DA81BEFD; Mon, 21 Oct 2019 14:25:01 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 08D6C1BEFB for ; Mon, 21 Oct 2019 14:24:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 05:24:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,323,1566889200"; d="scan'208";a="397307234" Received: from silpixa00399953.ir.intel.com (HELO silpixa00399953.ger.corp.intel.com) ([10.237.223.218]) by fmsmga005.fm.intel.com with ESMTP; 21 Oct 2019 05:24:57 -0700 From: Ciara Power To: thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, mtetsuyah@gmail.com, bruce.richardson@intel.com Cc: dev@dpdk.org, Ciara Power Date: Mon, 21 Oct 2019 13:22:36 +0100 Message-Id: <20191021122238.58852-1-ciara.power@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v2 0/2] enable virtual PMD promiscuous and multicast 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" When virtual PMDs are used to run sample applications, the application fails due to the enable promiscuous function being called. The virtual PMDs do not have dev_ops for enabling promiscuous mode, and return -ENOTSUP as a result. Promiscuous and multicast modes are now initialised as enabled for the virtual PMDs included in this patchset. When the enable promiscuous function is called, a check now exists to allow the function return successfully if the state is already enabled for the device. This allows virtual PMDs run existing sample applications without failing. --- v2: * Removed dummy dev_ops functions. * Added promiscuous state check in ethdev API functions. * Initialised promiscuous and multicast states to enabled. Ciara Power (2): ethdev: add check for device promiscuous state drivers/net: set enabled promiscuous and multicast drivers/net/kni/rte_eth_kni.c | 2 ++ drivers/net/null/rte_eth_null.c | 2 ++ drivers/net/pcap/rte_eth_pcap.c | 2 ++ drivers/net/ring/rte_eth_ring.c | 2 ++ lib/librte_ethdev/rte_ethdev.c | 22 ++++++++++++---------- 5 files changed, 20 insertions(+), 10 deletions(-)