-
Notifications
You must be signed in to change notification settings - Fork 31
/
aq_filters.h
46 lines (38 loc) · 1.45 KB
/
aq_filters.h
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
41
42
43
44
45
46
/* SPDX-License-Identifier: GPL-2.0-only */
/* Atlantic Network Driver
*
* Copyright (C) 2014-2019 aQuantia Corporation
* Copyright (C) 2019-2020 Marvell International Ltd.
*/
/* File aq_filters.h: RX filters related functions. */
#ifndef AQ_FILTERS_H
#define AQ_FILTERS_H
#include "aq_nic.h"
#include "aq_compat.h"
enum aq_rx_filter_type {
aq_rx_filter_ethertype,
aq_rx_filter_vlan,
aq_rx_filter_l3l4
};
struct aq_rx_filter {
struct hlist_node aq_node;
enum aq_rx_filter_type type;
struct ethtool_rx_flow_spec aq_fsp;
};
u16 aq_get_rxnfc_count_all_rules(struct aq_nic_s *aq_nic);
struct aq_hw_rx_fltrs_s *aq_get_hw_rx_fltrs(struct aq_nic_s *aq_nic);
int aq_add_rxnfc_rule(struct aq_nic_s *aq_nic, const struct ethtool_rxnfc *cmd);
int aq_del_rxnfc_rule(struct aq_nic_s *aq_nic, const struct ethtool_rxnfc *cmd);
int aq_get_rxnfc_rule(struct aq_nic_s *aq_nic, struct ethtool_rxnfc *cmd);
int aq_get_rxnfc_all_rules(struct aq_nic_s *aq_nic, struct ethtool_rxnfc *cmd,
u32 *rule_locs);
int aq_del_fvlan_by_vlan(struct aq_nic_s *aq_nic, u16 vlan_id);
int aq_clear_rxnfc_all_rules(struct aq_nic_s *aq_nic);
int aq_filters_vlans_update(struct aq_nic_s *aq_nic);
int aq_filters_vlans_off(struct aq_nic_s *aq_nic);
int aq_filters_vlans_on(struct aq_nic_s *aq_nic);
int aq_apply_all_rule(struct aq_nic_s *aq_nic);
int aq_set_data_fl3l4(struct ethtool_rx_flow_spec *fsp,
struct aq_rx_filter_l3l4 *data,
int location, bool add);
#endif /* AQ_FILTERS_H */