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 6994AA0471 for ; Thu, 18 Jul 2019 05:06:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 244032C17; Thu, 18 Jul 2019 05:06:26 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2F692DE3; Thu, 18 Jul 2019 05:06:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 20:06:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="251679523" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 17 Jul 2019 20:06:22 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jul 2019 20:06:16 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by shsmsx102.ccr.corp.intel.com ([169.254.2.3]) with mapi id 14.03.0439.000; Thu, 18 Jul 2019 11:06:13 +0800 From: "Yang, Qiming" To: "Wang, Ying A" , "Zhang, Qi Z" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH 3/3] net/ice: add flow ipv6 tc support Thread-Index: AQHVPQudLwrRAsa9yUiOgRiyUoCaKqbPsOlQ Date: Thu, 18 Jul 2019 03:06:12 +0000 Message-ID: References: <1563413923-404004-1-git-send-email-ying.a.wang@intel.com> <1563413923-404004-4-git-send-email-ying.a.wang@intel.com> In-Reply-To: <1563413923-404004-4-git-send-email-ying.a.wang@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 3/3] net/ice: add flow ipv6 tc support 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: Wang, Ying A=20 Sent: Thursday, July 18, 2019 9:39 AM To: Zhang, Qi Z Cc: Yang, Qiming ; dev@dpdk.org; Wang, Ying A ; stable@dpdk.org Subject: [PATCH 3/3] net/ice: add flow ipv6 tc support When set flow ipv6 tc rule, ice_get_flow_field will set error. This patch fixes this issue. Fixes: d76116a4678f ("net/ice: add generic flow API") Cc: stable@dpdk.org Signed-off-by: Wang Ying A --- drivers/net/ice/ice_generic_flow.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_gener= ic_flow.c index 2c57276..5725bff 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -282,8 +282,7 @@ static uint64_t ice_get_flow_field(const struct rte_flo= w_item pattern[], if (!(ipv6_spec && ipv6_mask)) break; =20 - if (ipv6_mask->hdr.payload_len || - ipv6_mask->hdr.vtc_flow) { + if (ipv6_mask->hdr.payload_len) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, @@ -317,6 +316,11 @@ static uint64_t ice_get_flow_field(const struct rte_fl= ow_item pattern[], input_set |=3D ICE_INSET_IPV6_PROTO; if (ipv6_mask->hdr.hop_limits =3D=3D UINT8_MAX) input_set |=3D ICE_INSET_IPV6_HOP_LIMIT; + if ((ipv6_mask->hdr.vtc_flow & + rte_cpu_to_be_32(RTE_IPV6_HDR_TC_MASK)) + =3D=3D rte_cpu_to_be_32 + (RTE_IPV6_HDR_TC_MASK)) + input_set |=3D ICE_INSET_IPV6_TOS; } =20 break; @@ -486,7 +490,7 @@ static uint64_t ice_get_flow_field(const struct rte_flo= w_item pattern[], rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, - "Invalid mask no exist"); + "Invalid pattern"); break; } } --=20 1.8.3.1 Acked-by: Qiming Yang