From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A8306E72 for ; Tue, 14 Jul 2015 02:59:53 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 13 Jul 2015 17:59:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,467,1432623600"; d="scan'208";a="605582888" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2015 17:59:51 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 14 Jul 2015 08:59:50 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.146]) with mapi id 14.03.0224.002; Tue, 14 Jul 2015 08:59:47 +0800 From: "Lu, Wenzhuo" To: "Kylulin, Yury" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] e1000: enable allmulticast support for VF Thread-Index: AQHQmVU0VFHdAGPCtUmrdBlMSeBSrJ3abHwg Date: Tue, 14 Jul 2015 00:59:47 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC0909CF9D1E@shsmsx102.ccr.corp.intel.com> References: <1432824407-11415-1-git-send-email-yury.kylulin@intel.com> In-Reply-To: <1432824407-11415-1-git-send-email-yury.kylulin@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 Subject: Re: [dpdk-dev] [PATCH] e1000: enable allmulticast support for VF 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: Tue, 14 Jul 2015 00:59:54 -0000 Hi Yury, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yury Kylulin > Sent: Thursday, May 28, 2015 10:47 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] e1000: enable allmulticast support for VF >=20 > Add support to enable and disable reception of all multicast packets by t= he VF > using standard API rte_eth_allmulticast_enable()/rte_eth_allmulticast_dis= able(). >=20 > Signed-off-by: Yury Kylulin > --- > drivers/net/e1000/igb_ethdev.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) >=20 > diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethde= v.c > index e4b370d..5196bd5 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -135,6 +135,8 @@ static int igbvf_dev_configure(struct rte_eth_dev *de= v); > static int igbvf_dev_start(struct rte_eth_dev *dev); static void > igbvf_dev_stop(struct rte_eth_dev *dev); static void igbvf_dev_close(str= uct > rte_eth_dev *dev); > +static void igbvf_allmulticast_enable(struct rte_eth_dev *dev); static > +void igbvf_allmulticast_disable(struct rte_eth_dev *dev); > static int eth_igbvf_link_update(struct e1000_hw *hw); static void > eth_igbvf_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_st= ats); > static void eth_igbvf_stats_reset(struct rte_eth_dev *dev); @@ -280,6 +28= 2,8 > @@ static const struct eth_dev_ops igbvf_eth_dev_ops =3D { > .dev_start =3D igbvf_dev_start, > .dev_stop =3D igbvf_dev_stop, > .dev_close =3D igbvf_dev_close, > + .allmulticast_enable =3D igbvf_allmulticast_enable, > + .allmulticast_disable =3D igbvf_allmulticast_disable, > .link_update =3D eth_igb_link_update, > .stats_get =3D eth_igbvf_stats_get, > .stats_reset =3D eth_igbvf_stats_reset, > @@ -2272,6 +2276,22 @@ igbvf_dev_close(struct rte_eth_dev *dev) > igbvf_dev_stop(dev); > } >=20 > +static void > +igbvf_allmulticast_enable(struct rte_eth_dev *dev) { > + struct e1000_hw *hw =3D E1000_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > + > + e1000_promisc_set_vf(hw, e1000_promisc_multicast); } > + > +static void > +igbvf_allmulticast_disable(struct rte_eth_dev *dev) { > + struct e1000_hw *hw =3D E1000_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > + > + e1000_promisc_set_vf(hw, e1000_promisc_disabled); } This function disables both multicast and unicast. The PF function eth_igb_= allmulticast_disable disables multicast but not unicast. I think it's bette= r that VF and PF have the behavior. Wenzhuo > + > static int igbvf_set_vfta(struct e1000_hw *hw, uint16_t vid, bool on) { > struct e1000_mbx_info *mbx =3D &hw->mbx; > -- > 1.7.9.5