From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 17BF456A8 for ; Fri, 23 Sep 2016 05:35:50 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 22 Sep 2016 20:35:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,380,1470726000"; d="scan'208";a="12448841" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 22 Sep 2016 20:35:48 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Sep 2016 20:35:47 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.118]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.95]) with mapi id 14.03.0248.002; Fri, 23 Sep 2016 11:35:45 +0800 From: "Wang, Xiao W" To: "Yigit, Ferruh" , "Lu, Wenzhuo" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 05/39] net/ixgbe/base: support VF multicast promiscuous Thread-Index: AQHSAHqAcCd1kxS4rE2xRBm5+LtWHqCAqQcAgAXodoA= Date: Fri, 23 Sep 2016 03:35:44 +0000 Message-ID: References: <1472312902-16963-1-git-send-email-xiao.w.wang@intel.com> <1472312902-16963-6-git-send-email-xiao.w.wang@intel.com> <293acea6-24df-690c-78fe-f5b4cb5b913c@intel.com> In-Reply-To: <293acea6-24df-690c-78fe-f5b4cb5b913c@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmUwYTY4OGMtZGY4Yi00NzJiLTkxYzktYTMwMjlhMWUwYWYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ikt2V1wvY24wSm1NUGp3WmxrXC82dXJlWVwvTlZ1YkVUT1wvN3hieUJaNjVEQ3JBPSJ9 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 05/39] net/ixgbe/base: support VF multicast promiscuous 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, 23 Sep 2016 03:35:51 -0000 Hi Ferruh, > -----Original Message----- > From: Yigit, Ferruh > Sent: Tuesday, September 20, 2016 1:06 AM > To: Wang, Xiao W ; Lu, Wenzhuo > > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 05/39] net/ixgbe/base: support VF multicas= t > promiscuous >=20 > On 8/27/2016 4:47 PM, Xiao Wang wrote: > > Currently, VF is limited to 30 multicast addresses. In order to > > accommodate more addresses, this patch adds support for VF multicast > > promiscuous. >=20 > It looks like functionality not changed, just > ixgbevf_update_xcast_mode() moved to ixgbe_mac_operations struct. >=20 > Is 30 multicast address limitation remains with this patch? >=20 You're right, we have supported this feature in ixgbe_ethdev.c before, now = shared code supports it, so it looks like just a function movement patch. I will rewrite the commit log to avoid misunderstanding. > > > > Signed-off-by: Xiao Wang > > --- > > drivers/net/ixgbe/base/ixgbe_mbx.h | 2 +- > > drivers/net/ixgbe/base/ixgbe_type.h | 1 + > > drivers/net/ixgbe/base/ixgbe_vf.c | 38 > ++++++++++++++++++++++++++++++++ > > drivers/net/ixgbe/base/ixgbe_vf.h | 1 + > > drivers/net/ixgbe/ixgbe_ethdev.c | 43 ++---------------------------= -------- > > 5 files changed, 43 insertions(+), 42 deletions(-) > > > > diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h > b/drivers/net/ixgbe/base/ixgbe_mbx.h > > index d775142..c3e301f 100644 > > --- a/drivers/net/ixgbe/base/ixgbe_mbx.h > > +++ b/drivers/net/ixgbe/base/ixgbe_mbx.h > > @@ -111,7 +111,7 @@ enum ixgbe_pfvf_api_rev { > > /* mailbox API, version 1.2 VF requests */ > > #define IXGBE_VF_GET_RETA 0x0a /* VF request for RETA */ > > #define IXGBE_VF_GET_RSS_KEY 0x0b /* get RSS key */ > > -#define IXGBE_VF_UPDATE_XCAST_MODE 0x0C > > +#define IXGBE_VF_UPDATE_XCAST_MODE 0x0c > > > > /* GET_QUEUES return data indices within the mailbox */ > > #define IXGBE_VF_TX_QUEUES 1 /* number of Tx queues > supported */ > > diff --git a/drivers/net/ixgbe/base/ixgbe_type.h > b/drivers/net/ixgbe/base/ixgbe_type.h > > index b2fdfcd..96b5cbd 100644 > > --- a/drivers/net/ixgbe/base/ixgbe_type.h > > +++ b/drivers/net/ixgbe/base/ixgbe_type.h > > @@ -3883,6 +3883,7 @@ struct ixgbe_mac_operations { > > s32 (*init_uta_tables)(struct ixgbe_hw *); > > void (*set_mac_anti_spoofing)(struct ixgbe_hw *, bool, int); > > void (*set_vlan_anti_spoofing)(struct ixgbe_hw *, bool, int); > > + s32 (*update_xcast_mode)(struct ixgbe_hw *, int); > > > > /* Flow Control */ > > s32 (*fc_enable)(struct ixgbe_hw *); > > diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c > b/drivers/net/ixgbe/base/ixgbe_vf.c > > index a75074a..20a739c 100644 > > --- a/drivers/net/ixgbe/base/ixgbe_vf.c > > +++ b/drivers/net/ixgbe/base/ixgbe_vf.c > > @@ -75,6 +75,7 @@ s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw) > > hw->mac.ops.set_uc_addr =3D ixgbevf_set_uc_addr_vf; > > hw->mac.ops.init_rx_addrs =3D NULL; > > hw->mac.ops.update_mc_addr_list =3D ixgbe_update_mc_addr_list_vf; > > + hw->mac.ops.update_xcast_mode =3D ixgbevf_update_xcast_mode; > > hw->mac.ops.enable_mc =3D NULL; > > hw->mac.ops.disable_mc =3D NULL; > > hw->mac.ops.clear_vfta =3D NULL; > > @@ -419,6 +420,43 @@ s32 ixgbe_update_mc_addr_list_vf(struct ixgbe_hw > *hw, u8 *mc_addr_list, > > } > > > > /** > > + * ixgbevf_update_xcast_mode - Update Multicast mode > > + * @hw: pointer to the HW structure > > + * @xcast_mode: new multicast mode > > + * > > + * Updates the Multicast Mode of VF. > > + **/ > > +s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode) > > +{ > > + struct ixgbe_mbx_info *mbx =3D &hw->mbx; > > + u32 msgbuf[2]; > > + s32 err; > > + > > + switch (hw->api_version) { > > + case ixgbe_mbox_api_12: > > + break; > > + default: > > + return IXGBE_ERR_FEATURE_NOT_SUPPORTED; > > + } > > + > > + msgbuf[0] =3D IXGBE_VF_UPDATE_XCAST_MODE; > > + msgbuf[1] =3D xcast_mode; > > + > > + err =3D mbx->ops.write_posted(hw, msgbuf, 2, 0); > > + if (err) > > + return err; > > + > > + err =3D mbx->ops.read_posted(hw, msgbuf, 2, 0); > > + if (err) > > + return err; > > + > > + msgbuf[0] &=3D ~IXGBE_VT_MSGTYPE_CTS; > > + if (msgbuf[0] =3D=3D (IXGBE_VF_UPDATE_XCAST_MODE | > IXGBE_VT_MSGTYPE_NACK)) >=20 > What if other flags set in msgbuf[0] > Please check 18/39 patch, which fixes something similar to this >=20 This condition should be as (msgbuf[0] =3D=3D original value of msgbuf[0] |= NACK ), It's what the 18/39 patch fixes. No such issue for this function. Thanks, Xiao >=20 > > + return IXGBE_ERR_FEATURE_NOT_SUPPORTED; > > + return IXGBE_SUCCESS; > > +} > > +