DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type
@ 2015-03-06  9:36 Jingjing Wu
  2015-03-06  9:36 ` [dpdk-dev] [PATCH 1/2] ixgbe: correct the flow types supported Jingjing Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jingjing Wu @ 2015-03-06  9:36 UTC (permalink / raw)
  To: dev

Due the unified flow type changes, this patchset updates the commands for flow director
and correct the flow types ixgbe supported.

Jingjing Wu (2):
  ixgbe: correct the flow types supported
  doc: update flow director commands

 app/test-pmd/cmdline.c                      | 18 +++++++++++++++---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 19 ++++++++++---------
 lib/librte_pmd_ixgbe/ixgbe_fdir.c           |  8 +++-----
 3 files changed, 28 insertions(+), 17 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 1/2] ixgbe: correct the flow types supported
  2015-03-06  9:36 [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type Jingjing Wu
@ 2015-03-06  9:36 ` Jingjing Wu
  2015-03-06  9:36 ` [dpdk-dev] [PATCH 2/2] doc: update flow director commands Jingjing Wu
  2015-03-10 15:49 ` [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Jingjing Wu @ 2015-03-06  9:36 UTC (permalink / raw)
  To: dev

Ixgbe doesn't support the ipv4-frag and ipv6-frag flow types, remove them.
Ixgbe doesn't support configure flex mask on each kind of flow type, this
patch uses RTE_ETH_FLOW_UNKNOWN to specify global flex mask setting.
This patch also changes the string "raw" to "none" to indicate flex mask
setting unrelated with flow type in testpmd for ixgbe.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/cmdline.c            | 18 +++++++++++++++---
 lib/librte_pmd_ixgbe/ixgbe_fdir.c |  8 +++-----
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c8312be..dce6e4b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -661,8 +661,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    Set flow director mask.\n\n"
 
 			"flow_director_flex_mask (port_id)"
-			" flow (raw|ip4|ip4-frag|tcp4|udp4|sctp4|ip6|ip6-frag|tcp6|udp6|sctp6|all)"
-			" flow (raw|ipv4-other|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|"
+			" flow (none|ipv4-other|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|"
 			"ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|all)"
 			" (mask)\n"
 			"    Configure mask of flex payload.\n\n"
@@ -8198,6 +8197,19 @@ cmd_flow_director_flex_mask_parsed(void *parsed_result,
 		return;
 	}
 
+	if (!strcmp(res->flow_type, "none")) {
+		/* means don't specify the flow type */
+		flex_mask.flow_type = RTE_ETH_FLOW_UNKNOWN;
+		for (i = 0; i < RTE_ETH_FLOW_MAX; i++)
+			memset(&port->dev_conf.fdir_conf.flex_conf.flex_mask[i],
+			       0, sizeof(struct rte_eth_fdir_flex_mask));
+		port->dev_conf.fdir_conf.flex_conf.nb_flexmasks = 1;
+		(void)rte_memcpy(&port->dev_conf.fdir_conf.flex_conf.flex_mask[0],
+				 &flex_mask,
+				 sizeof(struct rte_eth_fdir_flex_mask));
+		cmd_reconfig_device_queue(res->port_id, 1, 1);
+		return;
+	}
 	flow_type_mask = fdir_info.flow_types_mask[0];
 	if (!strcmp(res->flow_type, "all")) {
 		if (!flow_type_mask) {
@@ -8235,7 +8247,7 @@ cmdline_parse_token_string_t cmd_flow_director_flexmask_flow =
 				 flow, "flow");
 cmdline_parse_token_string_t cmd_flow_director_flexmask_flow_type =
 	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,
-		flow_type, "raw#ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
+		flow_type, "none#ipv4-other#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
 		"ipv6-other#ipv6-frag#ipv6-tcp#ipv6-udp#ipv6-sctp#all");
 cmdline_parse_token_string_t cmd_flow_director_flexmask_mask =
 	TOKEN_STRING_INITIALIZER(struct cmd_flow_director_flex_mask_result,
diff --git a/lib/librte_pmd_ixgbe/ixgbe_fdir.c b/lib/librte_pmd_ixgbe/ixgbe_fdir.c
index bab1bc9..afc53cb 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_fdir.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_fdir.c
@@ -69,12 +69,10 @@
 #define IXGBE_FDIRCMD_CMD_INTERVAL_US   10
 
 #define IXGBE_FDIR_FLOW_TYPES ( \
-	(1 << RTE_ETH_FLOW_FRAG_IPV4) | \
 	(1 << RTE_ETH_FLOW_NONFRAG_IPV4_UDP) | \
 	(1 << RTE_ETH_FLOW_NONFRAG_IPV4_TCP) | \
 	(1 << RTE_ETH_FLOW_NONFRAG_IPV4_SCTP) | \
 	(1 << RTE_ETH_FLOW_NONFRAG_IPV4_OTHER) | \
-	(1 << RTE_ETH_FLOW_FRAG_IPV4) | \
 	(1 << RTE_ETH_FLOW_NONFRAG_IPV6_UDP) | \
 	(1 << RTE_ETH_FLOW_NONFRAG_IPV6_TCP) | \
 	(1 << RTE_ETH_FLOW_NONFRAG_IPV6_SCTP) | \
@@ -410,8 +408,8 @@ ixgbe_set_fdir_flex_conf(struct rte_eth_dev *dev,
 
 	for (i = 0; i < conf->nb_flexmasks; i++) {
 		flex_mask = &conf->flex_mask[i];
-		if (flex_mask->flow_type != RTE_ETH_FLOW_RAW) {
-			PMD_DRV_LOG(ERR, "unsupported flow type.");
+		if (flex_mask->flow_type != RTE_ETH_FLOW_UNKNOWN) {
+			PMD_DRV_LOG(ERR, "flexmask should be set globally.");
 			return -EINVAL;
 		}
 		flexbytes = (uint16_t)(((flex_mask->mask[0] << 8) & 0xFF00) |
@@ -1030,7 +1028,7 @@ ixgbe_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir_info
 	fdir_info->flex_conf.flex_set[0].src_offset[0] = offset;
 	fdir_info->flex_conf.flex_set[0].src_offset[1] = offset + 1;
 	fdir_info->flex_conf.nb_flexmasks = 1;
-	fdir_info->flex_conf.flex_mask[0].flow_type = RTE_ETH_FLOW_RAW;
+	fdir_info->flex_conf.flex_mask[0].flow_type = RTE_ETH_FLOW_UNKNOWN;
 	fdir_info->flex_conf.flex_mask[0].mask[0] =
 			(uint8_t)(info->mask.flex_bytes_mask & 0x00FF);
 	fdir_info->flex_conf.flex_mask[0].mask[1] =
-- 
1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/2] doc: update flow director commands
  2015-03-06  9:36 [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type Jingjing Wu
  2015-03-06  9:36 ` [dpdk-dev] [PATCH 1/2] ixgbe: correct the flow types supported Jingjing Wu
@ 2015-03-06  9:36 ` Jingjing Wu
  2015-03-10 15:49 ` [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Jingjing Wu @ 2015-03-06  9:36 UTC (permalink / raw)
  To: dev

Because of the changing of unified flow type, commands for flow
director need to be updated.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index b6dd5bd..f10352d 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1441,29 +1441,29 @@ Different NICs may have different capabilities, command show port fdir (port_id)
 
 # Commands to add flow director filters of different flow types.
 
-flow_director_filter (port_id) (add|del|update) flow (ip4|ip4-frag|ip6|ip6-frag)
+flow_director_filter (port_id) (add|del|update) flow (ipv4-other|ipv4-frag|ipv6-other|ipv6-frag)
 src (src_ip_address) dst (dst_ip_address) vlan (vlan_value) flexbytes (flexbytes_value)
 (drop|fwd) queue (queue_id) fd_id (fd_id_value)
 
-flow_director_filter (port_id) (add|del|update) flow (udp4|tcp4|udp6|tcp6)
+flow_director_filter (port_id) (add|del|update) flow (ipv4-tcp|ipv4-udp|ipv6-tcp|ipv6-udp)
 src (src_ip_address) (src_port) dst (dst_ip_address) (dst_port) vlan (vlan_value)
 flexbytes (flexbytes_value) (drop|fwd) queue (queue_id) fd_id (fd_id_value)
 
-flow_director_filter (port_id) (add|del|update) flow (sctp4|sctp6)
+flow_director_filter (port_id) (add|del|update) flow (ipv4-sctp|ipv6-sctp)
 src (src_ip_address) (src_port) dst (dst_ip_address) (dst_port) tag (verification_tag)
 vlan (vlan_value) flexbytes (flexbytes_value) (drop|fwd) queue (queue_id) fd_id (fd_id_value)
 
-For example, to add an udp flow type filter:
+For example, to add an ipv4-udp flow type filter:
 
 .. code-block:: console
 
-    testpmd> flow_director_filter 0 add flow udp4 src 2.2.2.3 32 dst 2.2.2.5 33 vlan 0x1 flexbytes (0x88,0x48) fwd queue 1 fd_id 1
+    testpmd> flow_director_filter 0 add flow ipv4-udp src 2.2.2.3 32 dst 2.2.2.5 33 vlan 0x1 flexbytes (0x88,0x48) fwd queue 1 fd_id 1
 
-For example, add an ip4 flow type filter:
+For example, add an ipv4-other flow type filter:
 
 .. code-block:: console
 
-    testpmd> flow_director_filter 0 add flow ip4 src 2.2.2.3 dst 2.2.2.5 vlan 0x1 flexbytes (0x88,0x48) fwd queue 1 fd_id 1
+    testpmd> flow_director_filter 0 add flow ipv4-other src 2.2.2.3 dst 2.2.2.5 vlan 0x1 flexbytes (0x88,0x48) fwd queue 1 fd_id 1
 
 flush_flow_director
 ~~~~~~~~~~~~~~~~~~~
@@ -1497,9 +1497,10 @@ flow_director_flex_mask
 
 set masks of flow director's flexible payload based on certain flow type:
 
-flow_director_flex_mask (port_id) flow (raw|ip4|ip4-frag|tcp4|udp4|sctp4|ip6|ip6-frag|tcp6|udp6|sctp6|all) (mask)
+flow_director_flex_mask (port_id) flow (none|ipv4-other|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|
+ipv6-other|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|all) (mask)
 
-Example, to set flow director's udpv4 flex mask on port 0:
+Example, to set flow director's flex mask for all flow type on port 0:
 
 .. code-block:: console
 
-- 
1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type
  2015-03-06  9:36 [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type Jingjing Wu
  2015-03-06  9:36 ` [dpdk-dev] [PATCH 1/2] ixgbe: correct the flow types supported Jingjing Wu
  2015-03-06  9:36 ` [dpdk-dev] [PATCH 2/2] doc: update flow director commands Jingjing Wu
@ 2015-03-10 15:49 ` Thomas Monjalon
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-03-10 15:49 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: dev

> Due the unified flow type changes, this patchset updates the commands for flow director
> and correct the flow types ixgbe supported.
> 
> Jingjing Wu (2):
>   ixgbe: correct the flow types supported
>   doc: update flow director commands

Applied, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-10 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06  9:36 [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type Jingjing Wu
2015-03-06  9:36 ` [dpdk-dev] [PATCH 1/2] ixgbe: correct the flow types supported Jingjing Wu
2015-03-06  9:36 ` [dpdk-dev] [PATCH 2/2] doc: update flow director commands Jingjing Wu
2015-03-10 15:49 ` [dpdk-dev] [PATCH 0/2] correct the flow director based on unified flow type Thomas Monjalon

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).