X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fqede%2Fbase%2Fecore_l2_api.h;h=bebf412edb8f54572328f136bd2e2f4a3f6311b7;hb=8716f9942a408a79a114ac0496e4e7d55bc9944c;hp=af316d303db48767f8e24c4bab2a2a39df7aca01;hpb=a55e422e4e685805fc39068fabe4e2f61c161466;p=dpdk.git diff --git a/drivers/net/qede/base/ecore_l2_api.h b/drivers/net/qede/base/ecore_l2_api.h index af316d303d..bebf412edb 100644 --- a/drivers/net/qede/base/ecore_l2_api.h +++ b/drivers/net/qede/base/ecore_l2_api.h @@ -1,9 +1,7 @@ -/* - * Copyright (c) 2016 QLogic Corporation. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2016 - 2018 Cavium Inc. * All rights reserved. - * www.qlogic.com - * - * See LICENSE.qede_pmd for copyright and licensing details. + * www.cavium.com */ #ifndef __ECORE_L2_API_H__ @@ -11,6 +9,7 @@ #include "ecore_status.h" #include "ecore_sp_api.h" +#include "ecore_int_api.h" #ifndef __EXTRACT__LINUX__ enum ecore_rss_caps { @@ -35,8 +34,7 @@ struct ecore_queue_start_common_params { /* Relative, but relevant only for PFs */ u8 stats_id; - /* These are always absolute */ - u16 sb; + struct ecore_sb_info *p_sb; u8 sb_idx; }; @@ -59,7 +57,9 @@ struct ecore_rss_params { u8 update_rss_key; u8 rss_caps; u8 rss_table_size_log; /* The table size is 2 ^ rss_table_size_log */ - u16 rss_ind_table[ECORE_RSS_IND_TABLE_SIZE]; + + /* Indirection table consist of rx queue handles */ + void *rss_ind_table[ECORE_RSS_IND_TABLE_SIZE]; u32 rss_key[ECORE_RSS_KEY_SIZE]; }; @@ -137,6 +137,24 @@ struct ecore_filter_accept_flags { #define ECORE_ACCEPT_MCAST_MATCHED 0x08 #define ECORE_ACCEPT_MCAST_UNMATCHED 0x10 #define ECORE_ACCEPT_BCAST 0x20 +#define ECORE_ACCEPT_ANY_VNI 0x40 +}; + +enum ecore_filter_config_mode { + ECORE_FILTER_CONFIG_MODE_DISABLE, + ECORE_FILTER_CONFIG_MODE_5_TUPLE, + ECORE_FILTER_CONFIG_MODE_L4_PORT, + ECORE_FILTER_CONFIG_MODE_IP_DEST, + ECORE_FILTER_CONFIG_MODE_TUNN_TYPE, + ECORE_FILTER_CONFIG_MODE_IP_SRC, +}; + +struct ecore_arfs_config_params { + bool tcp; + bool udp; + bool ipv4; + bool ipv6; + enum ecore_filter_config_mode mode; }; /* Add / remove / move / remove-all unicast MAC-VLAN filters. @@ -284,6 +302,8 @@ struct ecore_sp_vport_start_params { bool b_err_big_pkt; bool b_err_anti_spoof; bool b_err_ctrl_frame; + bool b_en_rgfs; + bool b_en_tgfs; }; /** @@ -322,14 +342,17 @@ struct ecore_sp_vport_update_params { u8 anti_spoofing_en; u8 update_accept_any_vlan_flg; u8 accept_any_vlan; - unsigned long bins[8]; + u32 bins[8]; struct ecore_rss_params *rss_params; struct ecore_filter_accept_flags accept_flags; struct ecore_sge_tpa_params *sge_tpa_params; /* MTU change - notice this requires the vport to be disabled. * If non-zero, value would be used. */ - u16 mtu; + u16 mtu; + u8 update_ctl_frame_check; + u8 mac_chk_en; + u8 ethtype_chk_en; }; /** @@ -412,4 +435,83 @@ void ecore_get_vport_stats(struct ecore_dev *p_dev, void ecore_reset_vport_stats(struct ecore_dev *p_dev); +/** + *@brief ecore_arfs_mode_configure - + * + *Enable or disable rfs mode. It must accept atleast one of tcp or udp true + *and atleast one of ipv4 or ipv6 true to enable rfs mode. + * + *@param p_hwfn + *@param p_ptt + *@param p_cfg_params arfs mode configuration parameters. + * + */ +void ecore_arfs_mode_configure(struct ecore_hwfn *p_hwfn, + struct ecore_ptt *p_ptt, + struct ecore_arfs_config_params *p_cfg_params); + +struct ecore_ntuple_filter_params { + /* Physically mapped address containing header of buffer to be used + * as filter. + */ + dma_addr_t addr; + + /* Length of header in bytes */ + u16 length; + + /* Relative queue-id to receive classified packet */ + #define ECORE_RFS_NTUPLE_QID_RSS ((u16)-1) + u16 qid; + + /* Identifier can either be according to vport-id or vfid */ + bool b_is_vf; + u8 vport_id; + u8 vf_id; + + /* true if this filter is to be added. Else to be removed */ + bool b_is_add; + + /* If packet needs to be dropped */ + bool b_is_drop; +}; + +/** + * @brief - ecore_configure_rfs_ntuple_filter + * + * This ramrod should be used to add or remove arfs hw filter + * + * @params p_hwfn + * @params p_cb Used for ECORE_SPQ_MODE_CB,where client would initialize + * it with cookie and callback function address, if not + * using this mode then client must pass NULL. + * @params p_params + */ +enum _ecore_status_t +ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn, + struct ecore_spq_comp_cb *p_cb, + struct ecore_ntuple_filter_params *p_params); + +/** + * @brief - ecore_update_eth_rss_ind_table_entry + * + * This function being used to update RSS indirection table entry to FW RAM + * instead of using the SP vport update ramrod with rss params. + * + * Notice: + * This function supports only one outstanding command per engine. Ecore + * clients which use this function should call ecore_mcp_ind_table_lock() prior + * to it and ecore_mcp_ind_table_unlock() after it. + * + * @params p_hwfn + * @params vport_id + * @params ind_table_index + * @params ind_table_value + * + * @return enum _ecore_status_t + */ +enum _ecore_status_t +ecore_update_eth_rss_ind_table_entry(struct ecore_hwfn *p_hwfn, + u8 vport_id, + u8 ind_table_index, + u16 ind_table_value); #endif