From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-3.cisco.com (rcdn-iport-3.cisco.com [173.37.86.74]) by dpdk.org (Postfix) with ESMTP id 1A512FFA for ; Fri, 3 Feb 2017 10:52:22 +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=1486115543; x=1487325143; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=oahbss77JxgI2mRchTjkITp+WB3WUTeRkozdgReywz0=; b=lhUhaDcYNdvFJ22iepZq8SsmUqzEVChZrQfHxRV8fOe+QmYAujgLARfU a5foqIMC4aJGgnJYEmx6fE+yrlEveRsW9fSJD1HGNemi2f3BaSibEqadR X/vjjOcyOKHBzU/LHcsxvPy3jK0BaWQ4QKBltEmaVTrerOzEWOG/2ltaK Y=; X-IronPort-AV: E=Sophos;i="5.33,328,1477958400"; d="scan'208";a="193713061" Received: from alln-core-12.cisco.com ([173.36.13.134]) by rcdn-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Feb 2017 09:52:21 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-12.cisco.com (8.14.5/8.14.5) with ESMTP id v139qL9p027644; Fri, 3 Feb 2017 09:52:21 GMT Received: by cisco.com (Postfix, from userid 392789) id B153F3FAAEB4; Fri, 3 Feb 2017 01:52:21 -0800 (PST) From: John Daley To: johnda888@gmail.com Cc: John Daley , stable@dpdk.org Date: Fri, 3 Feb 2017 01:52:18 -0800 Message-Id: <20170203095218.32015-2-johndale@cisco.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20170203095218.32015-1-johndale@cisco.com> References: <20170203095218.32015-1-johndale@cisco.com> Subject: [dpdk-stable] [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 09:52:23 -0000 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; -- 2.10.0