From patchwork Fri Feb 3 09:54:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 20148 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E694ABD28; Fri, 3 Feb 2017 10:55:22 +0100 (CET) Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by dpdk.org (Postfix) with ESMTP id A6A76FFA; Fri, 3 Feb 2017 10:55:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1311; q=dns/txt; s=iport; t=1486115709; x=1487325309; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=oahbss77JxgI2mRchTjkITp+WB3WUTeRkozdgReywz0=; b=MOaPEkvbBXo6/GXLAW29fFKEoLp7biZPqc0WgT66SaRQ6OfWoGh2cliY 54cvIGrL/GM5DT2JuDSXds3Tuo34ZCrvDGDBXGvuz9o3Bo3byjydhqEvw 24nZTXIm3OfNhtWx6uYKC1DtcRgmdaJOehW6QpR3jLH+zOaTdkMs8bYsp 4=; X-IronPort-AV: E=Sophos;i="5.33,328,1477958400"; d="scan'208";a="202295375" Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2017 09:55:08 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id v139t8IM015596; Fri, 3 Feb 2017 09:55:08 GMT Received: by cisco.com (Postfix, from userid 392789) id 29C863FAAEB4; Fri, 3 Feb 2017 01:55:08 -0800 (PST) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, John Daley , stable@dpdk.org Date: Fri, 3 Feb 2017 01:54:46 -0800 Message-Id: <20170203095446.4614-2-johndale@cisco.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20170203095446.4614-1-johndale@cisco.com> References: <20170203095446.4614-1-johndale@cisco.com> Subject: [dpdk-dev] [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification 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" The wrong offset was being used to specify the mask and value for the IPv6 traffic class field for fdir. Also, since the 1 byte field is not byte aligned in the header, do the shifting in big endian and then convert the 32-bit vtc_flow to little endian as expected by the adapter. Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series") Cc: stable@dpdk.org Signed-off-by: John Daley --- drivers/net/enic/enic_clsf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c index c2218fe..2665b6e 100644 --- a/drivers/net/enic/enic_clsf.c +++ b/drivers/net/enic/enic_clsf.c @@ -315,8 +315,10 @@ copy_fltr_v2(struct filter_v2 *fltr, struct rte_eth_fdir_input *input, input->flow.ipv6_flow.dst_ip[i]; } if (input->flow.ipv6_flow.tc) { - ipv6_mask.vtc_flow = masks->ipv6_mask.tc << 16); - ipv6_val.vtc_flow = input->flow.ipv6_flow.tc << 16; + ipv6_mask.vtc_flow = rte_be_to_cpu_32((uint32_t) + masks->ipv6_mask.tc << 20); + ipv6_val.vtc_flow = rte_be_to_cpu_32((uint32_t) + input->flow.ipv6_flow.tc << 20); } if (input->flow.ipv6_flow.hop_limits) { ipv6_mask.hop_limits = masks->ipv6_mask.hop_limits;