summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorwenxu <wenxu@ucloud.cn>2020-06-18 15:49:08 +0300
committerDavid S. Miller <davem@davemloft.net>2020-06-20 06:12:58 +0300
commit26f2eb27d081081dbea6d3c11602c9ece36f4d9c (patch)
tree9dd88deea54a6d30fe8d6340818aef992e2dce09 /include
parent56c09de347e40804fc8dad155272fb9609e0a97b (diff)
downloadlinux-26f2eb27d081081dbea6d3c11602c9ece36f4d9c.tar.xz
flow_offload: add flow_indr_block_cb_alloc/remove function
Add flow_indr_block_cb_alloc/remove function for next fix patch. Signed-off-by: wenxu <wenxu@ucloud.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/flow_offload.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index f2c8311a0433..bf4343042956 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -467,6 +467,12 @@ struct flow_block_cb {
struct flow_block_cb *flow_block_cb_alloc(flow_setup_cb_t *cb,
void *cb_ident, void *cb_priv,
void (*release)(void *cb_priv));
+struct flow_block_cb *flow_indr_block_cb_alloc(flow_setup_cb_t *cb,
+ void *cb_ident, void *cb_priv,
+ void (*release)(void *cb_priv),
+ struct flow_block_offload *bo,
+ struct net_device *dev, void *data,
+ void (*cleanup)(struct flow_block_cb *block_cb));
void flow_block_cb_free(struct flow_block_cb *block_cb);
struct flow_block_cb *flow_block_cb_lookup(struct flow_block *block,
@@ -488,6 +494,13 @@ static inline void flow_block_cb_remove(struct flow_block_cb *block_cb,
list_move(&block_cb->list, &offload->cb_list);
}
+static inline void flow_indr_block_cb_remove(struct flow_block_cb *block_cb,
+ struct flow_block_offload *offload)
+{
+ list_del(&block_cb->indr.list);
+ list_move(&block_cb->list, &offload->cb_list);
+}
+
bool flow_block_cb_is_busy(flow_setup_cb_t *cb, void *cb_ident,
struct list_head *driver_block_list);