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 DD54058EC for ; Fri, 15 Aug 2014 06:40:20 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 14 Aug 2014 21:43:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,867,1400050800"; d="scan'208";a="588435438" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 14 Aug 2014 21:41:44 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 14 Aug 2014 21:39:37 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 14 Aug 2014 21:38:40 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.17]) by shsmsx102.ccr.corp.intel.com ([169.254.2.246]) with mapi id 14.03.0195.001; Fri, 15 Aug 2014 09:49:13 +0800 From: "Zhang, Helin" To: "Ding, HengX" Thread-Topic: [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when promiscuous mode enabled for i40e driver Thread-Index: AQHPuCr7l7OGf8R7/E+FAs0QycljT5vQ5a6A Date: Fri, 15 Aug 2014 01:49:12 +0000 Message-ID: References: <1408067252-14179-1-git-send-email-hengx.ding@intel.com> In-Reply-To: <1408067252-14179-1-git-send-email-hengx.ding@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [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 04:40:21 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Heng Ding > Sent: Friday, August 15, 2014 9:48 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when > promiscuous mode enabled for i40e driver >=20 > From: Ding Heng >=20 > IPv6 will run NDP with multicast packets, but multicast packets will be f= iltered > by i40e driver by default. So we need to enable multicast when promiscuou= s > mode is on, or IPv6 will fail on these cards when running testpmd and kni= app. >=20 > Signed-off-by: Ding Heng > --- > lib/librte_pmd_i40e/i40e_ethdev.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > 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 !=3D I40E_SUCCESS) > PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous\n"); > + > + status =3D i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, > + TRUE, NULL); > + if (status !=3D I40E_SUCCESS) > + PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n"); > + > } >=20 > static void > @@ -769,6 +775,11 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev > *dev) > false, NULL); > if (status !=3D I40E_SUCCESS) > PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous\n"); > + > + status =3D i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, > + false, NULL); > + if (status !=3D I40E_SUCCESS) > + PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n"); > } >=20 > static void > @@ -792,6 +803,9 @@ i40e_dev_allmulticast_disable(struct rte_eth_dev > *dev) > struct i40e_vsi *vsi =3D pf->main_vsi; > int ret; >=20 > + if (dev->data->promiscuous =3D=3D 1) > + return; /* must remain in all_multicast mode */ > + > ret =3D i40e_aq_set_vsi_multicast_promiscuous(hw, > vsi->seid, FALSE, NULL); > if (ret !=3D I40E_SUCCESS) > -- > 1.9.3 Reviewed-by: Helin Zhang