]> git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/dpdk/drivers/net/sfc/sfc_filter.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / drivers / net / sfc / sfc_filter.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright (c) 2017-2018 Solarflare Communications Inc.
4 * All rights reserved.
5 *
6 * This software was jointly developed between OKTET Labs (under contract
7 * for Solarflare) and Solarflare Communications, Inc.
8 */
9
10 #ifndef _SFC_FILTER_H
11 #define _SFC_FILTER_H
12
13 #include "efx.h"
14
15 #include "sfc_flow.h"
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 struct sfc_filter {
22 /** Number of elements in match_supported array */
23 size_t supported_match_num;
24 /** Driver cache of supported filter match masks */
25 uint32_t *supported_match;
26 /** List of flow rules */
27 struct sfc_flow_list flow_list;
28 /**
29 * Supports any of ip_proto, remote host or local host
30 * filters. This flag is used for filter match exceptions
31 */
32 boolean_t supports_ip_proto_or_addr_filter;
33 /**
34 * Supports any of remote port or local port filters.
35 * This flag is used for filter match exceptions
36 */
37 boolean_t supports_rem_or_local_port_filter;
38 };
39
40 struct sfc_adapter;
41
42 int sfc_filter_attach(struct sfc_adapter *sa);
43 void sfc_filter_detach(struct sfc_adapter *sa);
44
45 boolean_t sfc_filter_is_match_supported(struct sfc_adapter *sa, uint32_t match);
46
47 #ifdef __cplusplus
48 }
49 #endif
50 #endif /* _SFC_FILTER_H */