From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B120FB366 for ; Fri, 15 Aug 2014 03:44:36 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 14 Aug 2014 18:47:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,867,1400050800"; d="scan'208";a="588383260" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 14 Aug 2014 18:47:38 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s7F1laoM032407; Fri, 15 Aug 2014 09:47:36 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s7F1lXt6014288; Fri, 15 Aug 2014 09:47:35 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s7F1lXUo014284; Fri, 15 Aug 2014 09:47:33 +0800 From: Heng Ding To: dev@dpdk.org Date: Fri, 15 Aug 2014 09:47:32 +0800 Message-Id: <1408067252-14179-1-git-send-email-hengx.ding@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when promiscuous mode enabled for i40e driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 01:44:37 -0000 From: Ding Heng IPv6 will run NDP with multicast packets, but multicast packets will be filtered by i40e driver by default. So we need to enable multicast when promiscuous mode is on, or IPv6 will fail on these cards when running testpmd and kni app. Signed-off-by: Ding Heng --- lib/librte_pmd_i40e/i40e_ethdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 9ed31b5..539dae5 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -755,6 +755,12 @@ i40e_dev_promiscuous_enable(struct rte_eth_dev *dev) true, NULL); if (status != I40E_SUCCESS) PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous\n"); + + status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, + TRUE, NULL); + if (status != I40E_SUCCESS) + PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n"); + } static void @@ -769,6 +775,11 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev *dev) false, NULL); if (status != I40E_SUCCESS) PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous\n"); + + status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, + false, NULL); + if (status != I40E_SUCCESS) + PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n"); } static void @@ -792,6 +803,9 @@ i40e_dev_allmulticast_disable(struct rte_eth_dev *dev) struct i40e_vsi *vsi = pf->main_vsi; int ret; + if (dev->data->promiscuous == 1) + return; /* must remain in all_multicast mode */ + ret = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, FALSE, NULL); if (ret != I40E_SUCCESS) -- 1.9.3