aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/sfc_filter.h
blob: d3e1c2f9cdf4bff967c380b0f8c8c18976eb2023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* SPDX-License-Identifier: BSD-3-Clause
 *
 * Copyright (c) 2017-2018 Solarflare Communications Inc.
 * All rights reserved.
 *
 * This software was jointly developed between OKTET Labs (under contract
 * for Solarflare) and Solarflare Communications, Inc.
 */

#ifndef _SFC_FILTER_H
#define _SFC_FILTER_H

#include "efx.h"

#include "sfc_flow.h"

#ifdef __cplusplus
extern "C" {
#endif

struct sfc_filter {
	/** Number of elements in match_supported array */
	size_t				supported_match_num;
	/** Driver cache of supported filter match masks */
	uint32_t			*supported_match;
	/** List of flow rules */
	struct sfc_flow_list		flow_list;
};

struct sfc_adapter;

int sfc_filter_attach(struct sfc_adapter *sa);
void sfc_filter_detach(struct sfc_adapter *sa);

boolean_t sfc_filter_is_match_supported(struct sfc_adapter *sa, uint32_t match);

#ifdef __cplusplus
}
#endif
#endif /* _SFC_FILTER_H */