Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /****************************************************************************
0003  * Driver for Solarflare network controllers and boards
0004  * Copyright 2019 Solarflare Communications Inc.
0005  * Copyright 2020-2022 Xilinx Inc.
0006  *
0007  * This program is free software; you can redistribute it and/or modify it
0008  * under the terms of the GNU General Public License version 2 as published
0009  * by the Free Software Foundation, incorporated herein by reference.
0010  */
0011 
0012 #ifndef EF100_MAE_H
0013 #define EF100_MAE_H
0014 /* MCDI interface for the ef100 Match-Action Engine */
0015 
0016 #include "net_driver.h"
0017 #include "tc.h"
0018 #include "mcdi_pcol.h" /* needed for various MC_CMD_MAE_*_NULL defines */
0019 
0020 int efx_mae_allocate_mport(struct efx_nic *efx, u32 *id, u32 *label);
0021 int efx_mae_free_mport(struct efx_nic *efx, u32 id);
0022 
0023 void efx_mae_mport_wire(struct efx_nic *efx, u32 *out);
0024 void efx_mae_mport_uplink(struct efx_nic *efx, u32 *out);
0025 void efx_mae_mport_vf(struct efx_nic *efx, u32 vf_id, u32 *out);
0026 void efx_mae_mport_mport(struct efx_nic *efx, u32 mport_id, u32 *out);
0027 
0028 int efx_mae_lookup_mport(struct efx_nic *efx, u32 selector, u32 *id);
0029 
0030 int efx_mae_alloc_action_set(struct efx_nic *efx, struct efx_tc_action_set *act);
0031 int efx_mae_free_action_set(struct efx_nic *efx, u32 fw_id);
0032 
0033 int efx_mae_alloc_action_set_list(struct efx_nic *efx,
0034                   struct efx_tc_action_set_list *acts);
0035 int efx_mae_free_action_set_list(struct efx_nic *efx,
0036                  struct efx_tc_action_set_list *acts);
0037 
0038 int efx_mae_insert_rule(struct efx_nic *efx, const struct efx_tc_match *match,
0039             u32 prio, u32 acts_id, u32 *id);
0040 int efx_mae_delete_rule(struct efx_nic *efx, u32 id);
0041 
0042 #endif /* EF100_MAE_H */