patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'app/testpmd: fix flow director endianness' has been queued to stable release 16.07.2
Date: Wed,  2 Nov 2016 18:21:28 +0800	[thread overview]
Message-ID: <1478082097-16957-32-git-send-email-yuanhan.liu@linux.intel.com> (raw)
In-Reply-To: <1478082097-16957-1-git-send-email-yuanhan.liu@linux.intel.com>

Hi,

FYI, your patch has been queued to stable release 16.07.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 11/06/16.
So please shout if anyone has objections.

Thanks.

	--yliu

---
>From f174f3c9deceb1b885553f6be1cb2adae0c89350 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Wed, 19 Oct 2016 09:23:00 +0800
Subject: [PATCH] app/testpmd: fix flow director endianness

[ upstream commit 0a0060e3969bf2be983da8e4e4f74e66725da0ec ]

The vlan mask and tunnel id mask of flow director are defined as big
endian. So they should be converted.
When the mask is printed, the parameters are not converted either.
This patch converts the mask parameters.

Fixes: 7c554b4f0484 ("app/testpmd: update display of flow director information")
Fixes: 53b2bb9b7ea7 ("app/testpmd: new flow director commands")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-pmd/cmdline.c |  6 +++---
 app/test-pmd/config.c  | 34 +++++++++++++++++++++-------------
 2 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f2e4729..09a2832 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8971,16 +8971,16 @@ cmd_flow_director_mask_parsed(void *parsed_result,
 			return;
 		}
 
-		mask->vlan_tci_mask = res->vlan_mask;
+		mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
 	} else if (fdir_conf.mode ==  RTE_FDIR_MODE_PERFECT_TUNNEL) {
 		if (strcmp(res->mode_value, "Tunnel")) {
 			printf("Please set mode to Tunnel.\n");
 			return;
 		}
 
-		mask->vlan_tci_mask = res->vlan_mask;
+		mask->vlan_tci_mask = rte_cpu_to_be_16(res->vlan_mask);
 		mask->mac_addr_byte_mask = res->mac_addr_byte_mask;
-		mask->tunnel_id_mask = res->tunnel_id_mask;
+		mask->tunnel_id_mask = rte_cpu_to_be_32(res->tunnel_id_mask);
 		mask->tunnel_type_mask = res->tunnel_type_mask;
 	} else {
 		if (strcmp(res->mode_value, "IP")) {
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 795ca75..1457e4a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2058,25 +2058,33 @@ set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value)
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
-	printf("\n    vlan_tci: 0x%04x", mask->vlan_tci_mask);
+	printf("\n    vlan_tci: 0x%04x", rte_be_to_cpu_16(mask->vlan_tci_mask));
 
 	if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
 		printf(", mac_addr: 0x%02x, tunnel_type: 0x%01x,"
 			" tunnel_id: 0x%08x",
 			mask->mac_addr_byte_mask, mask->tunnel_type_mask,
-			mask->tunnel_id_mask);
+			rte_be_to_cpu_32(mask->tunnel_id_mask));
 	else if (fdir_conf.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
-		printf(", src_ipv4: 0x%08x, dst_ipv4: 0x%08x,"
-			" src_port: 0x%04x, dst_port: 0x%04x",
-			mask->ipv4_mask.src_ip, mask->ipv4_mask.dst_ip,
-			mask->src_port_mask, mask->dst_port_mask);
-
-		printf("\n    src_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x,"
-			" dst_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x",
-			mask->ipv6_mask.src_ip[0], mask->ipv6_mask.src_ip[1],
-			mask->ipv6_mask.src_ip[2], mask->ipv6_mask.src_ip[3],
-			mask->ipv6_mask.dst_ip[0], mask->ipv6_mask.dst_ip[1],
-			mask->ipv6_mask.dst_ip[2], mask->ipv6_mask.dst_ip[3]);
+		printf(", src_ipv4: 0x%08x, dst_ipv4: 0x%08x",
+			rte_be_to_cpu_32(mask->ipv4_mask.src_ip),
+			rte_be_to_cpu_32(mask->ipv4_mask.dst_ip));
+
+		printf("\n    src_port: 0x%04x, dst_port: 0x%04x",
+			rte_be_to_cpu_16(mask->src_port_mask),
+			rte_be_to_cpu_16(mask->dst_port_mask));
+
+		printf("\n    src_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x",
+			rte_be_to_cpu_32(mask->ipv6_mask.src_ip[0]),
+			rte_be_to_cpu_32(mask->ipv6_mask.src_ip[1]),
+			rte_be_to_cpu_32(mask->ipv6_mask.src_ip[2]),
+			rte_be_to_cpu_32(mask->ipv6_mask.src_ip[3]));
+
+		printf("\n    dst_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x",
+			rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[0]),
+			rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[1]),
+			rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[2]),
+			rte_be_to_cpu_32(mask->ipv6_mask.dst_ip[3]));
 	}
 
 	printf("\n");
-- 
1.9.0

  parent reply	other threads:[~2016-11-02 10:21 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 10:20 [dpdk-stable] patch 'examples/ipsec-secgw: check SP only when setup' " Yuanhan Liu
2016-11-02 10:20 ` [dpdk-stable] patch 'pdump: fix created directory permissions' " Yuanhan Liu
2016-11-02 10:20 ` [dpdk-stable] patch 'app/procinfo: free xstats memory upon failure' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'examples/ip_pipeline: fix plugin loading' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'examples/qos_sched: fix dequeue from ring' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'app/test: fix hash multiwriter sequence' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'app/testpmd: fix RSS hash key size' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'app/testpmd: fix DCB configuration' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'lpm: fix freeing unused sub-table on rule delete' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/bonding: validate speed after link up' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/thunderx: fix Tx checksum handling' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/enic: fix flow director' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/enic: fix crash with removed flow director filters' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/bnx2x: fix maximum PF queues' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/bnx2x: fix socket id for slowpath memory' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/ena: improve safety of string handling' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/bnxt: ensure entry length is unsigned' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/i40e: do not use VSI before NULL check' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/bnxt: fix bit shift size' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/mlx5: fix Rx function selection' " Yuanhan Liu
2016-11-02 12:44   ` Nélio Laranjeiro
2016-11-02 10:21 ` [dpdk-stable] patch 'net/ring: fix ring device creation via devargs' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/fm10k: fix Rx checksum flags' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'examples/tep_term: fix L4 length' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'examples/tep_term: fix packet length with multi-segments' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'app/testpmd: fix PF/VF check of flow director' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'mempool: fix search of maximum contiguous pages' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'ethdev: prevent duplicate event callback' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/bnx2x: fix build with icc' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/mlx5: fix hash key size retrieval' " Yuanhan Liu
2016-11-02 12:45   ` Nélio Laranjeiro
2016-11-02 10:21 ` [dpdk-stable] patch 'net/ixgbe: fix flow director mask' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'app/testpmd: " Yuanhan Liu
2016-11-02 10:21 ` Yuanhan Liu [this message]
2016-11-02 10:21 ` [dpdk-stable] patch 'net/enic: revert truncated packets counter fix' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/ixgbe: fix out of order Rx read' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/fm10k: " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/mlx5: fix link status report' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/fm10k: fix VF Tx queue initialization' " Yuanhan Liu
     [not found]   ` <8E8F16D832DEA44EAC8E3A3C70D1E0C737AB8DBD@CRSMSX101.amr.corp.intel.com>
2016-12-06  1:44     ` Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/qede/base: fix 32-bit build' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/i40e: fix hash filter on X722' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'net/i40e: fix Rx hang when disable LLDP' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'vhost: fix Windows VM hang' " Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478082097-16957-32-git-send-email-yuanhan.liu@linux.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).