Allow the user to set the symmetric Toeplitz hash function via: # ethtool -X eth0 hfunc toeplitz symmetric-xor All existing RSS configurations will be converted to symmetric unless they have a non-symmetric field (other than IP src/dst and L4 src/dst ports) used for hashing. The driver will reject a new RSS configuration if such a field is requested. The hash function in the E800 NICs is set per-VSI and a specific AQ command is needed to modify the hash function. Use the AQ command to enable setting the symmetric Toeplitz RSS hash function for any VSI in the new ice_set_rss_hfunc(). When the Symmetric Toeplitz hash function is used, the hardware sets the input set of the RSS (Toeplitz) algorithm to be the XOR of the fields index by HSYMM and the fields index by the INSET registers. We use this to create a symmetric hash by setting the HSYMM registers to point to their counterparts in the INSET registers: HSYMM [src_fv] = dst_fv; HSYMM [dst_fv] = src_fv; where src_fv and dst_fv are the indexes of the protocol's src and dst fields. Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: Jeff Guo <jia.guo@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Co-developed-by: Ahmed Zaki <ahmed.zaki@intel.com> Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com> Link: https://lore.kernel.org/r/20231213003321.605376-8-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
68 lines
2.6 KiB
C
68 lines
2.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2019, Intel Corporation. */
|
|
|
|
#ifndef _ICE_FLEX_PIPE_H_
|
|
#define _ICE_FLEX_PIPE_H_
|
|
|
|
#include "ice_type.h"
|
|
|
|
int
|
|
ice_acquire_change_lock(struct ice_hw *hw, enum ice_aq_res_access_type access);
|
|
void ice_release_change_lock(struct ice_hw *hw);
|
|
int
|
|
ice_find_prot_off(struct ice_hw *hw, enum ice_block blk, u8 prof, u16 fv_idx,
|
|
u8 *prot, u16 *off);
|
|
void
|
|
ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type type,
|
|
unsigned long *bm);
|
|
void
|
|
ice_init_prof_result_bm(struct ice_hw *hw);
|
|
int
|
|
ice_get_sw_fv_list(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups,
|
|
unsigned long *bm, struct list_head *fv_list);
|
|
int
|
|
ice_pkg_buf_unreserve_section(struct ice_buf_build *bld, u16 count);
|
|
u16 ice_pkg_buf_get_free_space(struct ice_buf_build *bld);
|
|
int
|
|
ice_aq_upload_section(struct ice_hw *hw, struct ice_buf_hdr *pkg_buf,
|
|
u16 buf_size, struct ice_sq_cd *cd);
|
|
bool
|
|
ice_get_open_tunnel_port(struct ice_hw *hw, u16 *port,
|
|
enum ice_tunnel_type type);
|
|
int ice_udp_tunnel_set_port(struct net_device *netdev, unsigned int table,
|
|
unsigned int idx, struct udp_tunnel_info *ti);
|
|
int ice_udp_tunnel_unset_port(struct net_device *netdev, unsigned int table,
|
|
unsigned int idx, struct udp_tunnel_info *ti);
|
|
int ice_set_dvm_boost_entries(struct ice_hw *hw);
|
|
|
|
/* Rx parser PTYPE functions */
|
|
bool ice_hw_ptype_ena(struct ice_hw *hw, u16 ptype);
|
|
|
|
/* XLT2/VSI group functions */
|
|
int
|
|
ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
|
|
const struct ice_ptype_attributes *attr, u16 attr_cnt,
|
|
struct ice_fv_word *es, u16 *masks, bool symm);
|
|
struct ice_prof_map *
|
|
ice_search_prof_id(struct ice_hw *hw, enum ice_block blk, u64 id);
|
|
int
|
|
ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);
|
|
int
|
|
ice_rem_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl);
|
|
enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buff, u32 len);
|
|
enum ice_ddp_state
|
|
ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf, u32 len);
|
|
bool ice_is_init_pkg_successful(enum ice_ddp_state state);
|
|
int ice_init_hw_tbls(struct ice_hw *hw);
|
|
void ice_free_seg(struct ice_hw *hw);
|
|
void ice_fill_blk_tbls(struct ice_hw *hw);
|
|
void ice_clear_hw_tbls(struct ice_hw *hw);
|
|
void ice_free_hw_tbls(struct ice_hw *hw);
|
|
int ice_rem_prof(struct ice_hw *hw, enum ice_block blk, u64 id);
|
|
struct ice_buf_build *
|
|
ice_pkg_buf_alloc_single_section(struct ice_hw *hw, u32 type, u16 size,
|
|
void **section);
|
|
struct ice_buf *ice_pkg_buf(struct ice_buf_build *bld);
|
|
void ice_pkg_buf_free(struct ice_hw *hw, struct ice_buf_build *bld);
|
|
|
|
#endif /* _ICE_FLEX_PIPE_H_ */
|