linux/drivers/net/ethernet/intel/iavf/iavf_fdir.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2021, Intel Corporation. */

#ifndef _IAVF_FDIR_H_
#define _IAVF_FDIR_H_

struct iavf_adapter;

/* State of Flow Director filter
 *
 * *_REQUEST states are used to mark filter to be sent to PF driver to perform
 * an action (either add or delete filter). *_PENDING states are an indication
 * that request was sent to PF and the driver is waiting for response.
 *
 * Both DELETE and DISABLE states are being used to delete a filter in PF.
 * The difference is that after a successful response filter in DEL_PENDING
 * state is being deleted from VF driver as well and filter in DIS_PENDING state
 * is being changed to INACTIVE state.
 */
enum iavf_fdir_fltr_state_t {};

enum iavf_fdir_flow_type {};

/* Must not exceed the array element number of '__be32 data[2]' in the ethtool
 * 'struct ethtool_rx_flow_spec.m_ext.data[2]' to express the flex-byte (word).
 */
#define IAVF_FLEX_WORD_NUM

struct iavf_flex_word {};

struct iavf_ipv4_addrs {};

struct iavf_ipv6_addrs {};

struct iavf_fdir_eth {};

struct iavf_fdir_ip {};

struct iavf_fdir_extra {};

/* bookkeeping of Flow Director filters */
struct iavf_fdir_fltr {};

int iavf_validate_fdir_fltr_masks(struct iavf_adapter *adapter,
				  struct iavf_fdir_fltr *fltr);
int iavf_fill_fdir_add_msg(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr);
void iavf_print_fdir_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr);
bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr);
void iavf_fdir_list_add_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr);
struct iavf_fdir_fltr *iavf_find_fdir_fltr_by_loc(struct iavf_adapter *adapter, u32 loc);
#endif /* _IAVF_FDIR_H_ */