All of lore.kernel.org
 help / color / mirror / Atom feed
From: wenxu@ucloud.cn
To: pablo@netfilter.org, paulb@mellanox.com, netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org, jiri@mellanox.com
Subject: [PATCH net-next 1/5] flow_offload: add TC_SETP_FT type in flow_indr_block_call
Date: Wed, 25 Dec 2019 17:48:19 +0800	[thread overview]
Message-ID: <1577267303-24780-2-git-send-email-wenxu@ucloud.cn> (raw)
In-Reply-To: <1577267303-24780-1-git-send-email-wenxu@ucloud.cn>

From: wenxu <wenxu@ucloud.cn>

Add TC_SETP_FT type in flow_indr_block_call for supporting indr block call
in nf_flow_table_offload

Signed-off-by: wenxu <wenxu@ucloud.cn>
---
 include/net/flow_offload.h        | 3 ++-
 net/core/flow_offload.c           | 6 +++---
 net/netfilter/nf_tables_offload.c | 2 +-
 net/sched/cls_api.c               | 2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index c6f7bd2..5cf9396 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -410,6 +410,7 @@ void flow_indr_block_cb_unregister(struct net_device *dev,
 
 void flow_indr_block_call(struct net_device *dev,
 			  struct flow_block_offload *bo,
-			  enum flow_block_command command);
+			  enum flow_block_command command,
+			  enum tc_setup_type type);
 
 #endif /* _NET_FLOW_OFFLOAD_H */
diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
index 45b6a59..c0d9223 100644
--- a/net/core/flow_offload.c
+++ b/net/core/flow_offload.c
@@ -483,7 +483,8 @@ void flow_indr_block_cb_unregister(struct net_device *dev,
 
 void flow_indr_block_call(struct net_device *dev,
 			  struct flow_block_offload *bo,
-			  enum flow_block_command command)
+			  enum flow_block_command command,
+			  enum tc_setup_type type)
 {
 	struct flow_indr_block_cb *indr_block_cb;
 	struct flow_indr_block_dev *indr_dev;
@@ -493,8 +494,7 @@ void flow_indr_block_call(struct net_device *dev,
 		return;
 
 	list_for_each_entry(indr_block_cb, &indr_dev->cb_list, list)
-		indr_block_cb->cb(dev, indr_block_cb->cb_priv, TC_SETUP_BLOCK,
-				  bo);
+		indr_block_cb->cb(dev, indr_block_cb->cb_priv, type, bo);
 }
 EXPORT_SYMBOL_GPL(flow_indr_block_call);
 
diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c
index a9ea29a..a9e71b4 100644
--- a/net/netfilter/nf_tables_offload.c
+++ b/net/netfilter/nf_tables_offload.c
@@ -313,7 +313,7 @@ static int nft_indr_block_offload_cmd(struct nft_base_chain *chain,
 
 	nft_flow_block_offload_init(&bo, dev_net(dev), cmd, chain, &extack);
 
-	flow_indr_block_call(dev, &bo, cmd);
+	flow_indr_block_call(dev, &bo, cmd, TC_SETUP_BLOCK);
 
 	if (list_empty(&bo.cb_list))
 		return -EOPNOTSUPP;
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 6a0eaca..113be4d 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -714,7 +714,7 @@ static void tc_indr_block_call(struct tcf_block *block,
 	};
 	INIT_LIST_HEAD(&bo.cb_list);
 
-	flow_indr_block_call(dev, &bo, command);
+	flow_indr_block_call(dev, &bo, command, TC_SETUP_BLOCK);
 	tcf_block_setup(block, &bo);
 }
 
-- 
1.8.3.1


  reply	other threads:[~2019-12-25  9:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25  9:48 [PATCH net-next 0/5] netfilter: add indr block setup in nf_flow_table_offload wenxu
2019-12-25  9:48 ` wenxu [this message]
2019-12-25  9:48 ` [PATCH net-next 2/5] netfilter: nf_flow_table_offload: refactor nf_flow_table_offload_setup to support indir setup wenxu
2019-12-25  9:48 ` [PATCH net-next 3/5] netfilter: nf_flow_table_offload: add indr block setup support wenxu
2019-12-25  9:48 ` [PATCH net-next 4/5] netfilter: nf_flow_table_offload: add tunnel match offload support wenxu
2019-12-25  9:48 ` [PATCH net-next 5/5] netfilter: nf_flow_table_offload: add tunnel encap/decap action " wenxu
2019-12-26  1:46 ` [PATCH net-next 0/5] netfilter: add indr block setup in nf_flow_table_offload wenxu
2019-12-26  3:50   ` David Miller
2019-12-26  5:07     ` Problem about gre tunnel route offload in mlxsw wenxu
2019-12-26  7:49       ` Ido Schimmel
2019-12-26  8:22         ` wenxu
2019-12-26  9:22           ` Ido Schimmel

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=1577267303-24780-2-git-send-email-wenxu@ucloud.cn \
    --to=wenxu@ucloud.cn \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=paulb@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.