[dpdk-stable] patch 'app/testpmd: fix PF/VF check of flow director' has been queued to stable release 16.07.2
Yuanhan Liu
yuanhan.liu at linux.intel.com
Wed Nov 2 11:21:21 CET 2016
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 26764939d00f5e21ec5224eb8e28f9b1d9d6f4ea Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu at intel.com>
Date: Wed, 19 Oct 2016 09:12:15 +0800
Subject: [PATCH] app/testpmd: fix PF/VF check of flow director
[ upstream commit 1cfde13610fe8574020999ab8ea6d8617d6773c2 ]
Parameters pf & vf are added into most of flow director
filter CLIs.
But mac-vlan and tunnel filters don't have these parameters,
the parameters should not be checked for mac-vlan and tunnel
filters.
Fixes: e6a68c013353 ("app/testpmd: extend commands for flow director in VF")
Reported-by: Frederico Cadete <frederico.cadete-ext at oneaccess-net.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
---
app/test-pmd/cmdline.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f119675..a5ab712 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8515,24 +8515,28 @@ cmd_flow_director_filter_parsed(void *parsed_result,
else
entry.action.behavior = RTE_ETH_FDIR_ACCEPT;
- if (!strcmp(res->pf_vf, "pf"))
- entry.input.flow_ext.is_vf = 0;
- else if (!strncmp(res->pf_vf, "vf", 2)) {
- struct rte_eth_dev_info dev_info;
-
- memset(&dev_info, 0, sizeof(dev_info));
- rte_eth_dev_info_get(res->port_id, &dev_info);
- errno = 0;
- vf_id = strtoul(res->pf_vf + 2, &end, 10);
- if (errno != 0 || *end != '\0' || vf_id >= dev_info.max_vfs) {
+ if (fdir_conf.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN &&
+ fdir_conf.mode != RTE_FDIR_MODE_PERFECT_TUNNEL) {
+ if (!strcmp(res->pf_vf, "pf"))
+ entry.input.flow_ext.is_vf = 0;
+ else if (!strncmp(res->pf_vf, "vf", 2)) {
+ struct rte_eth_dev_info dev_info;
+
+ memset(&dev_info, 0, sizeof(dev_info));
+ rte_eth_dev_info_get(res->port_id, &dev_info);
+ errno = 0;
+ vf_id = strtoul(res->pf_vf + 2, &end, 10);
+ if (errno != 0 || *end != '\0' ||
+ vf_id >= dev_info.max_vfs) {
+ printf("invalid parameter %s.\n", res->pf_vf);
+ return;
+ }
+ entry.input.flow_ext.is_vf = 1;
+ entry.input.flow_ext.dst_id = (uint16_t)vf_id;
+ } else {
printf("invalid parameter %s.\n", res->pf_vf);
return;
}
- entry.input.flow_ext.is_vf = 1;
- entry.input.flow_ext.dst_id = (uint16_t)vf_id;
- } else {
- printf("invalid parameter %s.\n", res->pf_vf);
- return;
}
/* set to report FD ID by default */
--
1.9.0
More information about the stable
mailing list