From patchwork Wed Feb 26 13:45:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaolong Ye X-Patchwork-Id: 66055 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25530A055A; Wed, 26 Feb 2020 14:48:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CD671BFAB; Wed, 26 Feb 2020 14:48:18 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0E4431C01 for ; Wed, 26 Feb 2020 14:48:16 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 05:48:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,488,1574150400"; d="scan'208";a="241670739" Received: from yexl-server.sh.intel.com ([10.67.117.17]) by orsmga006.jf.intel.com with ESMTP; 26 Feb 2020 05:48:14 -0800 From: Xiaolong Ye To: Maxime Coquelin , Tiwei Bie , Zhihong Wang Cc: dev@dpdk.org, David Marchand , Xiaolong Ye Date: Wed, 26 Feb 2020 21:45:34 +0800 Message-Id: <20200226134534.15292-1-xiaolong.ye@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default 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" With this patch, the promiscuous and multicast fields are initialized as enabled for vhost PMD by default, this allows the devices to be used when running applications that attempt to enable promiscuous or multicast mode. Similar things have done for other virtual PMDs by commit f165210321c4 ("drivers/net: enable promiscuous and multicast by default") Signed-off-by: Xiaolong Ye Reviewed-by: Maxime Coquelin --- drivers/net/vhost/rte_eth_vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 458ed58f5..fcf317151 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1331,6 +1331,8 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, internal->disable_flags = disable_flags; data->dev_link = pmd_link; data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE; + data->promiscuous = 1; + data->all_multicast = 1; eth_dev->dev_ops = &ops;