flow_offload: move tc indirect block to flow offload
move tc indirect block to flow_offload and rename it to flow indirect block.The nf_tables can use the indr block architecture. Signed-off-by: wenxu <wenxu@ucloud.cn> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e4da910211
commit
4e481908c5
7 changed files with 293 additions and 276 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <net/flow_dissector.h>
|
||||
#include <linux/rhashtable.h>
|
||||
|
||||
struct flow_match {
|
||||
struct flow_dissector *dissector;
|
||||
|
|
@ -370,4 +371,32 @@ static inline void flow_block_init(struct flow_block *flow_block)
|
|||
INIT_LIST_HEAD(&flow_block->cb_list);
|
||||
}
|
||||
|
||||
typedef int flow_indr_block_bind_cb_t(struct net_device *dev, void *cb_priv,
|
||||
enum tc_setup_type type, void *type_data);
|
||||
|
||||
typedef void flow_indr_block_ing_cmd_t(struct net_device *dev,
|
||||
flow_indr_block_bind_cb_t *cb,
|
||||
void *cb_priv,
|
||||
enum flow_block_command command);
|
||||
|
||||
int __flow_indr_block_cb_register(struct net_device *dev, void *cb_priv,
|
||||
flow_indr_block_bind_cb_t *cb,
|
||||
void *cb_ident);
|
||||
|
||||
void __flow_indr_block_cb_unregister(struct net_device *dev,
|
||||
flow_indr_block_bind_cb_t *cb,
|
||||
void *cb_ident);
|
||||
|
||||
int flow_indr_block_cb_register(struct net_device *dev, void *cb_priv,
|
||||
flow_indr_block_bind_cb_t *cb, void *cb_ident);
|
||||
|
||||
void flow_indr_block_cb_unregister(struct net_device *dev,
|
||||
flow_indr_block_bind_cb_t *cb,
|
||||
void *cb_ident);
|
||||
|
||||
void flow_indr_block_call(struct net_device *dev,
|
||||
flow_indr_block_ing_cmd_t *cb,
|
||||
struct flow_block_offload *bo,
|
||||
enum flow_block_command command);
|
||||
|
||||
#endif /* _NET_FLOW_OFFLOAD_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue