From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BFF8E1B43A for ; Thu, 2 Aug 2018 12:03:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 03:03:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,435,1526367600"; d="scan'208";a="69467278" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by FMSMGA003.fm.intel.com with ESMTP; 02 Aug 2018 03:03:51 -0700 From: Radu Nicolau To: dev@dpdk.org Cc: declan.doherty@intel.com, chas3@att.com, matan@mellanox.com, Radu Nicolau Date: Thu, 2 Aug 2018 10:57:04 +0100 Message-Id: <1533203824-14430-2-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1533203824-14430-1-git-send-email-radu.nicolau@intel.com> References: <1533128278-4685-1-git-send-email-radu.nicolau@intel.com> <1533203824-14430-1-git-send-email-radu.nicolau@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] net/bonding: propagate promiscous mode in mode 4 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: , X-List-Received-Date: Thu, 02 Aug 2018 10:03:54 -0000 Update the bonding promiscuous mode enable/disable functions as to propagate the change to all slaves instead of doing nothing. Signed-off-by: Radu Nicolau --- drivers/net/bonding/rte_eth_bond_pmd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index ad6e33f..fcb2268 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2617,12 +2617,10 @@ bond_ethdev_promiscuous_enable(struct rte_eth_dev *eth_dev) case BONDING_MODE_ROUND_ROBIN: case BONDING_MODE_BALANCE: case BONDING_MODE_BROADCAST: + case BONDING_MODE_8023AD: for (i = 0; i < internals->slave_count; i++) rte_eth_promiscuous_enable(internals->slaves[i].port_id); break; - /* In mode4 promiscus mode is managed when slave is added/removed */ - case BONDING_MODE_8023AD: - break; /* Promiscuous mode is propagated only to primary slave */ case BONDING_MODE_ACTIVE_BACKUP: case BONDING_MODE_TLB: @@ -2648,8 +2646,11 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev) for (i = 0; i < internals->slave_count; i++) rte_eth_promiscuous_disable(internals->slaves[i].port_id); break; - /* In mode4 promiscus mode is set managed when slave is added/removed */ + /* Propagate to slaves only if multicast is enabled */ case BONDING_MODE_8023AD: + for (i = 0; i < internals->slave_count; i++) + if (rte_eth_allmulticast_get(internals->slaves[i].port_id) == 1) + rte_eth_promiscuous_disable(internals->slaves[i].port_id); break; /* Promiscuous mode is propagated only to primary slave */ case BONDING_MODE_ACTIVE_BACKUP: -- 2.7.5