From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1266BA0519; Mon, 22 Jun 2020 17:25:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6FEDF1D8CF; Mon, 22 Jun 2020 17:25:52 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 7C1231D8CC; Mon, 22 Jun 2020 17:25:50 +0200 (CEST) IronPort-SDR: v4Hv9mhRdszxMN+pviaXOzmOfE/fFGSVHnRRQHUoj8XAc6nwlBIt+5Shfs/EMONbWP+SSgqc8N WH2bR83PM6rw== X-IronPort-AV: E=McAfee;i="6000,8403,9659"; a="141292794" X-IronPort-AV: E=Sophos;i="5.75,267,1589266800"; d="scan'208";a="141292794" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 08:25:49 -0700 IronPort-SDR: F1t13Q9ZaMu6i/zxu43MH9oitJ19bLpvcK5y5s9ZGK1ZwmTYsfE7I3R8A/NL32wsdDWur0Ocbb pNFfSkgtjxig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,267,1589266800"; d="scan'208";a="318807828" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jun 2020 08:25:49 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 08:25:49 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 08:25:48 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.89]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0439.000; Mon, 22 Jun 2020 23:25:45 +0800 From: "Zhang, Qi Z" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2 2/4] net/ice: add redirect support for VSI list rule Thread-Index: AQHWRHIG9+yassBl9UGsMfQaDngOgKjkwhzQ Date: Mon, 22 Jun 2020 15:25:45 +0000 Message-ID: <039ED4275CED7440929022BC67E7061154842FE3@SHSMSX103.ccr.corp.intel.com> References: <20200605074031.16231-1-wei.zhao1@intel.com> <20200617061429.6447-1-wei.zhao1@intel.com> <20200617061429.6447-3-wei.zhao1@intel.com> In-Reply-To: <20200617061429.6447-3-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action 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 v2 2/4] net/ice: add redirect support for VSI list rule 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Zhao1, Wei > Sent: Wednesday, June 17, 2020 2:14 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Qi Z ; Zhao1, Wei > > Subject: [PATCH v2 2/4] net/ice: add redirect support for VSI list rule >=20 > This patch enable redirect switch rule of vsi list type. >=20 > Fixes: 397b4b3c5095 ("net/ice: enable flow redirect on switch") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/ice/ice_switch_filter.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_switch_filter.c > b/drivers/net/ice/ice_switch_filter.c > index a5dd1f7ab..3c0c36bce 100644 > --- a/drivers/net/ice/ice_switch_filter.c > +++ b/drivers/net/ice/ice_switch_filter.c > @@ -1662,6 +1662,9 @@ ice_switch_redirect(struct ice_adapter *ad, > uint16_t lkups_cnt; > int ret; >=20 > + if (rdata->vsi_handle !=3D rd->vsi_handle) > + return 0; > + > sw =3D hw->switch_info; > if (!sw->recp_list[rdata->rid].recp_created) > return -EINVAL; > @@ -1673,25 +1676,32 @@ ice_switch_redirect(struct ice_adapter *ad, > LIST_FOR_EACH_ENTRY(list_itr, list_head, ice_adv_fltr_mgmt_list_entry, > list_entry) { > rinfo =3D list_itr->rule_info; > - if (rinfo.fltr_rule_id =3D=3D rdata->rule_id && > + if ((rinfo.fltr_rule_id =3D=3D rdata->rule_id && > rinfo.sw_act.fltr_act =3D=3D ICE_FWD_TO_VSI && > - rinfo.sw_act.vsi_handle =3D=3D rd->vsi_handle) { > + rinfo.sw_act.vsi_handle =3D=3D rd->vsi_handle) || > + (rinfo.fltr_rule_id =3D=3D rdata->rule_id && > + rinfo.sw_act.fltr_act =3D=3D ICE_FWD_TO_VSI_LIST)){ > lkups_cnt =3D list_itr->lkups_cnt; > lkups_dp =3D (struct ice_adv_lkup_elem *) > ice_memdup(hw, list_itr->lkups, > sizeof(*list_itr->lkups) * > lkups_cnt, ICE_NONDMA_TO_NONDMA); > + Acked-by: Qi Zhang Applied to dpdk-next-net-intel after=20 1, remove above redundant empty line and=20 2. reword on the commit log and title as below Title: redirect switch rule with to VSI list action Support redirect a switch rule if its action is to VSI list. Thanks Qi > if (!lkups_dp) { > PMD_DRV_LOG(ERR, "Failed to allocate memory."); > return -EINVAL; > } >=20 > + if (rinfo.sw_act.fltr_act =3D=3D ICE_FWD_TO_VSI_LIST) { > + rinfo.sw_act.vsi_handle =3D rd->vsi_handle; > + rinfo.sw_act.fltr_act =3D ICE_FWD_TO_VSI; > + } > break; > } > } >=20 > if (!lkups_dp) > - return 0; > + return -EINVAL; >=20 > /* Remove the old rule */ > ret =3D ice_rem_adv_rule(hw, list_itr->lkups, > -- > 2.19.1