From: John Daley Subject: [PATCH 2/2] net/enic: fix flow director IPv6 traffic class specification Date: Fri, 3 Feb 2017 01:54:46 -0800 Message-ID: <20170203095446.4614-2-johndale@cisco.com> References: <20170203095446.4614-1-johndale@cisco.com> Cc: dev@dpdk.org, John Daley , stable@dpdk.org To: ferruh.yigit@intel.com Return-path: In-Reply-To: <20170203095446.4614-1-johndale@cisco.com> 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; -- 2.10.0