]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | /* SPDX-License-Identifier: BSD-3-Clause |
2 | * Copyright(c) 2018 Chelsio Communications. | |
3 | * All rights reserved. | |
4 | */ | |
5 | #ifndef _CXGBE_FLOW_H_ | |
6 | #define _CXGBE_FLOW_H_ | |
7 | ||
8 | #include <rte_flow_driver.h> | |
9 | #include "cxgbe_filter.h" | |
9f95a23c | 10 | #include "mps_tcam.h" |
11fdf7f2 TL |
11 | #include "cxgbe.h" |
12 | ||
9f95a23c TL |
13 | /* Max poll time is 100 * 100msec = 10 sec */ |
14 | #define CXGBE_FLOW_POLL_MS 100 /* 100 milliseconds */ | |
15 | #define CXGBE_FLOW_POLL_CNT 100 /* Max number of times to poll */ | |
11fdf7f2 TL |
16 | |
17 | struct chrte_fparse { | |
18 | int (*fptr)(const void *mask, /* currently supported mask */ | |
19 | const struct rte_flow_item *item, /* user input */ | |
20 | struct ch_filter_specification *fs, /* where to parse */ | |
21 | struct rte_flow_error *e); | |
22 | const void *dmask; /* Specify what is supported by chelsio by default*/ | |
23 | }; | |
24 | ||
25 | struct rte_flow { | |
26 | struct filter_entry *f; | |
27 | struct ch_filter_specification fs; /* temp, to create filter */ | |
28 | struct chrte_fparse *item_parser; | |
29 | /* | |
30 | * filter_entry doesn't store user priority. | |
31 | * Post creation of filter this will indicate the | |
32 | * flow index (fidx) for both hash and tcam filters | |
33 | */ | |
34 | unsigned int fidx; | |
35 | struct rte_eth_dev *dev; | |
36 | }; | |
37 | ||
38 | int | |
39 | cxgbe_dev_filter_ctrl(struct rte_eth_dev *dev, | |
40 | enum rte_filter_type filter_type, | |
41 | enum rte_filter_op filter_op, | |
42 | void *arg); | |
43 | ||
44 | #endif /* _CXGBE_FLOW_H_ */ |