flow_offload.h (216dcb059b767ef526499f3ed287e98b37af03c3) flow_offload.h (4e95bc268b915c3a19ec8b9110f61e4ea41a1ed0)
1#ifndef _NET_FLOW_OFFLOAD_H
2#define _NET_FLOW_OFFLOAD_H
3
4#include <linux/kernel.h>
5#include <net/flow_dissector.h>
1#ifndef _NET_FLOW_OFFLOAD_H
2#define _NET_FLOW_OFFLOAD_H
3
4#include <linux/kernel.h>
5#include <net/flow_dissector.h>
6#include <net/sch_generic.h>
6
7struct flow_match {
8 struct flow_dissector *dissector;
9 void *mask;
10 void *key;
11};
12
13struct flow_match_meta {

--- 218 unchanged lines hidden (view full) ---

232static inline void flow_stats_update(struct flow_stats *flow_stats,
233 u64 bytes, u64 pkts, u64 lastused)
234{
235 flow_stats->pkts += pkts;
236 flow_stats->bytes += bytes;
237 flow_stats->lastused = max_t(u64, flow_stats->lastused, lastused);
238}
239
7
8struct flow_match {
9 struct flow_dissector *dissector;
10 void *mask;
11 void *key;
12};
13
14struct flow_match_meta {

--- 218 unchanged lines hidden (view full) ---

233static inline void flow_stats_update(struct flow_stats *flow_stats,
234 u64 bytes, u64 pkts, u64 lastused)
235{
236 flow_stats->pkts += pkts;
237 flow_stats->bytes += bytes;
238 flow_stats->lastused = max_t(u64, flow_stats->lastused, lastused);
239}
240
241enum flow_block_command {
242 TC_BLOCK_BIND,
243 TC_BLOCK_UNBIND,
244};
245
246enum flow_block_binder_type {
247 TCF_BLOCK_BINDER_TYPE_UNSPEC,
248 TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
249 TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS,
250};
251
252struct tcf_block;
253struct netlink_ext_ack;
254
255struct flow_block_offload {
256 enum flow_block_command command;
257 enum flow_block_binder_type binder_type;
258 struct tcf_block *block;
259 struct list_head *driver_block_list;
260 struct netlink_ext_ack *extack;
261};
262
263int flow_block_cb_setup_simple(struct flow_block_offload *f,
264 struct list_head *driver_list, tc_setup_cb_t *cb,
265 void *cb_ident, void *cb_priv, bool ingress_only);
266
240#endif /* _NET_FLOW_OFFLOAD_H */
267#endif /* _NET_FLOW_OFFLOAD_H */