net/sfc: fix errno if flow API RSS action parse fails
authorRoman Zhukov <roman.zhukov@oktetlabs.ru>
Wed, 16 May 2018 14:21:23 +0000 (15:21 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 17 May 2018 17:44:23 +0000 (19:44 +0200)
The value of rte_errno must be positive in case of an error.

Fixes: d77d07391d4d ("net/sfc: support flow API RSS action")
Cc: stable@dpdk.org
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc_flow.c

index ddb97f1..5613d59 100644 (file)
@@ -1572,7 +1572,7 @@ sfc_flow_parse_actions(struct sfc_adapter *sa,
 
                        rc = sfc_flow_parse_rss(sa, actions->conf, flow);
                        if (rc != 0) {
-                               rte_flow_error_set(error, rc,
+                               rte_flow_error_set(error, -rc,
                                        RTE_FLOW_ERROR_TYPE_ACTION, actions,
                                        "Bad RSS action");
                                return -rte_errno;