DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH] net/ixgbe: delete useless function declaration
Date: Wed,  8 Mar 2017 14:58:49 +0800	[thread overview]
Message-ID: <1488956329-13193-1-git-send-email-wei.zhao1@intel.com> (raw)

delete useless function declarations in file ixgbe_flow.c and
adjust function defination position to aviod compile error.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 142 ++++++++---------------------------------
 1 file changed, 26 insertions(+), 116 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 546c592..48a06a6 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -75,104 +75,6 @@
 #include "base/ixgbe_phy.h"
 #include "rte_pmd_ixgbe.h"
 
-static int ixgbe_flow_flush(struct rte_eth_dev *dev,
-		struct rte_flow_error *error);
-static int
-cons_parse_ntuple_filter(const struct rte_flow_attr *attr,
-					const struct rte_flow_item pattern[],
-					const struct rte_flow_action actions[],
-					struct rte_eth_ntuple_filter *filter,
-					struct rte_flow_error *error);
-static int
-ixgbe_parse_ntuple_filter(const struct rte_flow_attr *attr,
-					const struct rte_flow_item pattern[],
-					const struct rte_flow_action actions[],
-					struct rte_eth_ntuple_filter *filter,
-					struct rte_flow_error *error);
-static int
-cons_parse_ethertype_filter(const struct rte_flow_attr *attr,
-			    const struct rte_flow_item *pattern,
-			    const struct rte_flow_action *actions,
-			    struct rte_eth_ethertype_filter *filter,
-			    struct rte_flow_error *error);
-static int
-ixgbe_parse_ethertype_filter(const struct rte_flow_attr *attr,
-				const struct rte_flow_item pattern[],
-				const struct rte_flow_action actions[],
-				struct rte_eth_ethertype_filter *filter,
-				struct rte_flow_error *error);
-static int
-cons_parse_syn_filter(const struct rte_flow_attr *attr,
-		const struct rte_flow_item pattern[],
-		const struct rte_flow_action actions[],
-		struct rte_eth_syn_filter *filter,
-		struct rte_flow_error *error);
-static int
-ixgbe_parse_syn_filter(const struct rte_flow_attr *attr,
-				const struct rte_flow_item pattern[],
-				const struct rte_flow_action actions[],
-				struct rte_eth_syn_filter *filter,
-				struct rte_flow_error *error);
-static int
-cons_parse_l2_tn_filter(const struct rte_flow_attr *attr,
-		const struct rte_flow_item pattern[],
-		const struct rte_flow_action actions[],
-		struct rte_eth_l2_tunnel_conf *filter,
-		struct rte_flow_error *error);
-static int
-ixgbe_validate_l2_tn_filter(struct rte_eth_dev *dev,
-			const struct rte_flow_attr *attr,
-			const struct rte_flow_item pattern[],
-			const struct rte_flow_action actions[],
-			struct rte_eth_l2_tunnel_conf *rule,
-			struct rte_flow_error *error);
-static int
-ixgbe_validate_fdir_filter(struct rte_eth_dev *dev,
-			const struct rte_flow_attr *attr,
-			const struct rte_flow_item pattern[],
-			const struct rte_flow_action actions[],
-			struct ixgbe_fdir_rule *rule,
-			struct rte_flow_error *error);
-static int
-ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr,
-		const struct rte_flow_item pattern[],
-		const struct rte_flow_action actions[],
-		struct ixgbe_fdir_rule *rule,
-		struct rte_flow_error *error);
-static int
-ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
-		const struct rte_flow_item pattern[],
-		const struct rte_flow_action actions[],
-		struct ixgbe_fdir_rule *rule,
-		struct rte_flow_error *error);
-static int
-ixgbe_parse_fdir_filter(const struct rte_flow_attr *attr,
-		const struct rte_flow_item pattern[],
-		const struct rte_flow_action actions[],
-		struct ixgbe_fdir_rule *rule,
-		struct rte_flow_error *error);
-static int
-ixgbe_flow_validate(__rte_unused struct rte_eth_dev *dev,
-		const struct rte_flow_attr *attr,
-		const struct rte_flow_item pattern[],
-		const struct rte_flow_action actions[],
-		struct rte_flow_error *error);
-static struct rte_flow *ixgbe_flow_create(struct rte_eth_dev *dev,
-		const struct rte_flow_attr *attr,
-		const struct rte_flow_item pattern[],
-		const struct rte_flow_action actions[],
-		struct rte_flow_error *error);
-static int ixgbe_flow_destroy(struct rte_eth_dev *dev,
-		struct rte_flow *flow,
-		struct rte_flow_error *error);
-
-const struct rte_flow_ops ixgbe_flow_ops = {
-	ixgbe_flow_validate,
-	ixgbe_flow_create,
-	ixgbe_flow_destroy,
-	ixgbe_flow_flush,
-	NULL,
-};
 
 #define IXGBE_MIN_N_TUPLE_PRIO 1
 #define IXGBE_MAX_N_TUPLE_PRIO 7
@@ -2404,45 +2306,45 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 }
 
 static int
-ixgbe_validate_fdir_filter(struct rte_eth_dev *dev,
-			const struct rte_flow_attr *attr,
+ixgbe_parse_fdir_filter(const struct rte_flow_attr *attr,
 			const struct rte_flow_item pattern[],
 			const struct rte_flow_action actions[],
 			struct ixgbe_fdir_rule *rule,
 			struct rte_flow_error *error)
 {
-	int ret = 0;
-
-	enum rte_fdir_mode fdir_mode = dev->data->dev_conf.fdir_conf.mode;
+	int ret;
 
-	ixgbe_parse_fdir_filter(attr, pattern, actions,
-				rule, error);
+	ret = ixgbe_parse_fdir_filter_normal(attr, pattern,
+					actions, rule, error);
 
+	if (!ret)
+		return 0;
 
-	if (fdir_mode == RTE_FDIR_MODE_NONE ||
-	    fdir_mode != rule->mode)
-		return -ENOTSUP;
+	ret = ixgbe_parse_fdir_filter_tunnel(attr, pattern,
+					actions, rule, error);
 
 	return ret;
 }
 
 static int
-ixgbe_parse_fdir_filter(const struct rte_flow_attr *attr,
+ixgbe_validate_fdir_filter(struct rte_eth_dev *dev,
+			const struct rte_flow_attr *attr,
 			const struct rte_flow_item pattern[],
 			const struct rte_flow_action actions[],
 			struct ixgbe_fdir_rule *rule,
 			struct rte_flow_error *error)
 {
-	int ret;
+	int ret = 0;
 
-	ret = ixgbe_parse_fdir_filter_normal(attr, pattern,
-					actions, rule, error);
+	enum rte_fdir_mode fdir_mode = dev->data->dev_conf.fdir_conf.mode;
 
-	if (!ret)
-		return 0;
+	ixgbe_parse_fdir_filter(attr, pattern, actions,
+				rule, error);
 
-	ret = ixgbe_parse_fdir_filter_tunnel(attr, pattern,
-					actions, rule, error);
+
+	if (fdir_mode == RTE_FDIR_MODE_NONE ||
+	    fdir_mode != rule->mode)
+		return -ENOTSUP;
 
 	return ret;
 }
@@ -2879,3 +2781,11 @@ ixgbe_flow_flush(struct rte_eth_dev *dev,
 
 	return 0;
 }
+
+const struct rte_flow_ops ixgbe_flow_ops = {
+	ixgbe_flow_validate,
+	ixgbe_flow_create,
+	ixgbe_flow_destroy,
+	ixgbe_flow_flush,
+	NULL,
+};
-- 
2.9.3

             reply	other threads:[~2017-03-08  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08  6:58 Wei Zhao [this message]
2017-03-08 10:42 ` Ferruh Yigit

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=1488956329-13193-1-git-send-email-wei.zhao1@intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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).