From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EC35229CF for ; Fri, 6 Jan 2017 09:54:58 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 06 Jan 2017 00:54:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,323,1477983600"; d="scan'208";a="1108762476" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 06 Jan 2017 00:54:57 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 6 Jan 2017 00:54:57 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 6 Jan 2017 00:54:56 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Fri, 6 Jan 2017 16:54:55 +0800 From: "Lu, Wenzhuo" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v7 03/27] net/i40e: set VF MAC anti-spoofing from PF Thread-Index: AQHSZ7RxGFibniA2E0mSLbfBujklaaErJOjw Date: Fri, 6 Jan 2017 08:54:54 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B5566FB@shsmsx102.ccr.corp.intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1483426488-117332-1-git-send-email-wenzhuo.lu@intel.com> <1483426488-117332-4-git-send-email-wenzhuo.lu@intel.com> <9BB6961774997848B5B42BEC655768F810CC3CB8@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810CC3CB8@SHSMSX103.ccr.corp.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 v7 03/27] net/i40e: set VF MAC anti-spoofing from PF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 08:54:59 -0000 Hi Jingjing, > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, January 6, 2017 8:33 AM > To: Lu, Wenzhuo; dev@dpdk.org > Cc: Lu, Wenzhuo > Subject: RE: [dpdk-dev] [PATCH v7 03/27] net/i40e: set VF MAC anti-spoofi= ng > from PF >=20 > > + > > + vsi->info.valid_sections =3D > > cpu_to_le16(I40E_AQ_VSI_PROP_SECURITY_VALID); > > + if (on) > > + vsi->info.sec_flags |=3D > > I40E_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK; > > + else > > + vsi->info.sec_flags &=3D > > ~I40E_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK; > > + > > + memset(&ctxt, 0, sizeof(ctxt)); > > + (void)rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info)); > > + ctxt.seid =3D vsi->seid; > > + > > + hw =3D I40E_VSI_TO_HW(vsi); > > + ret =3D i40e_aq_update_vsi_params(hw, &ctxt, NULL); > > + if (ret !=3D I40E_SUCCESS) > > + PMD_DRV_LOG(ERR, "Failed to update VSI params"); >=20 > If fails, will you revert the info in vsi struct? Will not. Just leverage the existing behavior. I think it has some good sid= e as user should not try it again and again if not success. >=20 > > + > > + return ret; >=20 > Please return eth dev lib error code, but not I40E_XXX Yes, will change it.