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 AF3D49E7 for ; Tue, 16 Jun 2015 03:36:31 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 15 Jun 2015 18:36:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,622,1427785200"; d="scan'208";a="744056587" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2015 18:36:29 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.110.14) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 16 Jun 2015 09:36:29 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.46]) with mapi id 14.03.0224.002; Tue, 16 Jun 2015 09:36:27 +0800 From: "Lu, Wenzhuo" To: "Kylulin, Yury" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] e1000: enable allmulticast support for VF Thread-Index: AQHQmVU0VFHdAGPCtUmrdBlMSeBSrJ2uddow Date: Tue, 16 Jun 2015 01:36:26 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC0909CF33B1@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, 16 Jun 2015 01:36:32 -0000 Hi Yury, I have comments. I think the function name " igbvf_allmulticast_disable" is= a little misleading. Because this function will disable not only multicast= but also unicast, right? Thanks. -----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 Add support to enable and disable reception of all multicast packets by the= VF using standard API rte_eth_allmulticast_enable()/rte_eth_allmulticast_d= isable(). Signed-off-by: Yury Kylulin --- drivers/net/e1000/igb_ethdev.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.= 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 *dev)= ; 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(struct rte_= eth_dev *dev); +static void igbvf_allmulticast_enable(struct rte_eth_dev *dev); static=20 +void igbvf_allmulticast_disable(struct rte_eth_dev *dev); static int eth_igbvf_link_update(struct e1000_hw *hw); static void eth_ig= bvf_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats); s= tatic void eth_igbvf_stats_reset(struct rte_eth_dev *dev); @@ -280,6 +282,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); } + 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