/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
A D | indir_table.c | 49 struct mlx5_esw_indir_table *indir = kvzalloc(sizeof(*indir), GFP_KERNEL); in mlx5_esw_indir_table_init() local 51 if (!indir) in mlx5_esw_indir_table_init() 54 mutex_init(&indir->lock); in mlx5_esw_indir_table_init() 55 hash_init(indir->table); in mlx5_esw_indir_table_init() 56 return indir; in mlx5_esw_indir_table_init() 62 mutex_destroy(&indir->lock); in mlx5_esw_indir_table_destroy() 63 kvfree(indir); in mlx5_esw_indir_table_destroy() 330 mutex_lock(&esw->fdb_table.offloads.indir->lock); in mlx5_esw_indir_table_get() 348 mutex_unlock(&esw->fdb_table.offloads.indir->lock); in mlx5_esw_indir_table_get() 352 mutex_unlock(&esw->fdb_table.offloads.indir->lock); in mlx5_esw_indir_table_get() [all …]
|
A D | indir_table.h | 12 mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir); 38 mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir) in mlx5_esw_indir_table_destroy() argument
|
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlx5/core/en/ |
A D | rqt.c | 7 void mlx5e_rss_params_indir_init_uniform(struct mlx5e_rss_params_indir *indir, in mlx5e_rss_params_indir_init_uniform() argument 13 indir->table[i] = i % num_channels; in mlx5e_rss_params_indir_init_uniform() 67 u8 hfunc, struct mlx5e_rss_params_indir *indir) in mlx5e_calc_indir_rqns() argument 77 ix = indir->table[ix]; in mlx5e_calc_indir_rqns() 92 u8 hfunc, struct mlx5e_rss_params_indir *indir) in mlx5e_rqt_init_indir() argument 101 err = mlx5e_calc_indir_rqns(rss_rqns, rqns, num_rqns, hfunc, indir); in mlx5e_rqt_init_indir() 149 u8 hfunc, struct mlx5e_rss_params_indir *indir) in mlx5e_rqt_redirect_indir() argument 161 err = mlx5e_calc_indir_rqns(rss_rqns, rqns, num_rqns, hfunc, indir); in mlx5e_rqt_redirect_indir()
|
A D | rqt.h | 17 void mlx5e_rss_params_indir_init_uniform(struct mlx5e_rss_params_indir *indir, 30 u8 hfunc, struct mlx5e_rss_params_indir *indir); 40 u8 hfunc, struct mlx5e_rss_params_indir *indir);
|
A D | rss.c | 72 struct mlx5e_rss_params_indir indir; member 398 err = mlx5e_rqt_redirect_indir(&rss->rqt, rqns, num_rqns, rss->hash.hfunc, &rss->indir); in mlx5e_rss_apply() 471 int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc) in mlx5e_rss_get_rxfh() argument 475 if (indir) in mlx5e_rss_get_rxfh() 477 indir[i] = rss->indir.table[i]; in mlx5e_rss_get_rxfh() 489 int mlx5e_rss_set_rxfh(struct mlx5e_rss *rss, const u32 *indir, in mlx5e_rss_set_rxfh() argument 525 if (indir) { in mlx5e_rss_set_rxfh() 531 rss->indir.table[i] = indir[i]; in mlx5e_rss_set_rxfh() 605 mlx5e_rss_params_indir_init_uniform(&rss->indir, nch); in mlx5e_rss_set_indir_uniform()
|
A D | rss.h | 41 int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc); 42 int mlx5e_rss_set_rxfh(struct mlx5e_rss *rss, const u32 *indir,
|
A D | rx_res.h | 47 u32 *indir, u8 *key, u8 *hfunc); 49 const u32 *indir, const u8 *key, const u8 *hfunc);
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/siena/ |
A D | ethtool_common.h | 44 int efx_siena_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key, 47 const u32 *indir, const u8 *key, const u8 hfunc); 48 int efx_siena_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir, 51 const u32 *indir, const u8 *key,
|
A D | ethtool_common.c | 1179 if (indir) in efx_siena_ethtool_get_rxfh() 1180 memcpy(indir, efx->rss_context.rx_indir_table, in efx_siena_ethtool_get_rxfh() 1196 if (!indir && !key) in efx_siena_ethtool_set_rxfh() 1201 if (!indir) in efx_siena_ethtool_set_rxfh() 1202 indir = efx->rss_context.rx_indir_table; in efx_siena_ethtool_set_rxfh() 1204 return efx->type->rx_push_rss_config(efx, true, indir, key); in efx_siena_ethtool_set_rxfh() 1229 if (indir) in efx_siena_ethtool_get_rxfh_context() 1230 memcpy(indir, ctx->rx_indir_table, sizeof(ctx->rx_indir_table)); in efx_siena_ethtool_get_rxfh_context() 1239 const u32 *indir, const u8 *key, in efx_siena_ethtool_set_rxfh_context() argument 1290 if (!indir) in efx_siena_ethtool_set_rxfh_context() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/sfc/ |
A D | ethtool_common.h | 47 int efx_ethtool_get_rxfh(struct net_device *net_dev, u32 *indir, u8 *key, 50 const u32 *indir, const u8 *key, const u8 hfunc); 51 int efx_ethtool_get_rxfh_context(struct net_device *net_dev, u32 *indir, 54 const u32 *indir, const u8 *key,
|
A D | ethtool_common.c | 1178 if (indir) in efx_ethtool_get_rxfh() 1179 memcpy(indir, efx->rss_context.rx_indir_table, in efx_ethtool_get_rxfh() 1195 if (!indir && !key) in efx_ethtool_set_rxfh() 1200 if (!indir) in efx_ethtool_set_rxfh() 1201 indir = efx->rss_context.rx_indir_table; in efx_ethtool_set_rxfh() 1203 return efx->type->rx_push_rss_config(efx, true, indir, key); in efx_ethtool_set_rxfh() 1228 if (indir) in efx_ethtool_get_rxfh_context() 1229 memcpy(indir, ctx->rx_indir_table, sizeof(ctx->rx_indir_table)); in efx_ethtool_get_rxfh_context() 1238 const u32 *indir, const u8 *key, in efx_ethtool_set_rxfh_context() argument 1289 if (!indir) in efx_ethtool_set_rxfh_context() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/microsoft/mana/ |
A D | mana_ethtool.c | 148 static int mana_get_rxfh(struct net_device *ndev, u32 *indir, u8 *key, in mana_get_rxfh() argument 157 if (indir) { in mana_get_rxfh() 159 indir[i] = apc->indir_table[i]; in mana_get_rxfh() 168 static int mana_set_rxfh(struct net_device *ndev, const u32 *indir, in mana_set_rxfh() argument 183 if (indir) { in mana_set_rxfh() 185 if (indir[i] >= apc->num_queues) in mana_set_rxfh() 191 apc->indir_table[i] = indir[i]; in mana_set_rxfh()
|
/linux-6.3-rc2/fs/freevxfs/ |
A D | vxfs_bmap.c | 65 __fs32 *indir; in vxfs_bmap_ext4() local 72 indir = (__fs32 *)buf->b_data; in vxfs_bmap_ext4() 73 bno = fs32_to_cpu(sbi, indir[(bn / indsize) % (indsize * bn)]) + in vxfs_bmap_ext4() 107 vxfs_bmap_indir(struct inode *ip, long indir, int size, long block) in vxfs_bmap_indir() argument 119 indir + (i / VXFS_TYPED_PER_BLOCK(ip->i_sb))); in vxfs_bmap_indir()
|
/linux-6.3-rc2/drivers/net/ethernet/intel/fm10k/ |
A D | fm10k_ethtool.c | 991 if (indir) in fm10k_write_reta() 992 n = indir[4 * i + j]; in fm10k_write_reta() 1018 if (!indir) in fm10k_get_reta() 1024 indir[0] = (reta << 24) >> 24; in fm10k_get_reta() 1025 indir[1] = (reta << 16) >> 24; in fm10k_get_reta() 1026 indir[2] = (reta << 8) >> 24; in fm10k_get_reta() 1027 indir[3] = (reta) >> 24; in fm10k_get_reta() 1039 if (!indir) in fm10k_set_reta() 1045 if (indir[i] < rss_i) in fm10k_set_reta() 1050 fm10k_write_reta(interface, indir); in fm10k_set_reta() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/amazon/ena/ |
A D | ena_ethtool.c | 702 const u32 *indir) in ena_indirection_table_set() argument 710 ENA_IO_RXQ_IDX(indir[i])); in ena_indirection_table_set() 727 static int ena_indirection_table_get(struct ena_adapter *adapter, u32 *indir) in ena_indirection_table_get() argument 732 if (!indir) in ena_indirection_table_get() 735 rc = ena_com_indirect_table_get(ena_dev, indir); in ena_indirection_table_get() 744 indir[i] = ENA_IO_RXQ_IDX_TO_COMBINED_IDX(indir[i]); in ena_indirection_table_get() 749 static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, in ena_get_rxfh() argument 757 rc = ena_indirection_table_get(adapter, indir); in ena_get_rxfh() 795 static int ena_set_rxfh(struct net_device *netdev, const u32 *indir, in ena_set_rxfh() argument 803 if (indir) { in ena_set_rxfh() [all …]
|
/linux-6.3-rc2/net/ethtool/ |
A D | ioctl.c | 1035 if (copy_from_user(indir, useraddr, array_size(size, sizeof(indir[0])))) in ethtool_copy_validate_indir() 1060 u32 *indir; in ethtool_get_rxfh_indir() local 1086 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_get_rxfh_indir() 1087 if (!indir) in ethtool_get_rxfh_indir() 1096 indir, dev_size * sizeof(indir[0]))) in ethtool_get_rxfh_indir() 1100 kfree(indir); in ethtool_get_rxfh_indir() 1109 u32 *indir; in ethtool_set_rxfh_indir() local 1130 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_set_rxfh_indir() 1131 if (!indir) in ethtool_set_rxfh_indir() 1162 kfree(indir); in ethtool_set_rxfh_indir() [all …]
|
A D | common.c | 593 u32 *indir; in ethtool_get_max_rxfh_channel() local 603 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_get_max_rxfh_channel() 604 if (!indir) in ethtool_get_max_rxfh_channel() 607 ret = dev->ethtool_ops->get_rxfh(dev, indir, NULL, NULL); in ethtool_get_max_rxfh_channel() 612 current_max = max(current_max, indir[dev_size]); in ethtool_get_max_rxfh_channel() 617 kfree(indir); in ethtool_get_max_rxfh_channel()
|
/linux-6.3-rc2/drivers/net/ethernet/microchip/ |
A D | lan743x_ethtool.c | 937 u32 *indir, u8 *key, u8 *hfunc) in lan743x_ethtool_get_rxfh() argument 941 if (indir) { in lan743x_ethtool_get_rxfh() 950 indir[byte_index + 0] = in lan743x_ethtool_get_rxfh() 952 indir[byte_index + 1] = in lan743x_ethtool_get_rxfh() 954 indir[byte_index + 2] = in lan743x_ethtool_get_rxfh() 956 indir[byte_index + 3] = in lan743x_ethtool_get_rxfh() 986 const u32 *indir, const u8 *key, in lan743x_ethtool_set_rxfh() argument 994 if (indir) { in lan743x_ethtool_set_rxfh() 1002 (((indir[byte_index + 0] & 0x000000FF) << 0) | in lan743x_ethtool_set_rxfh() 1003 ((indir[byte_index + 1] & 0x000000FF) << 8) | in lan743x_ethtool_set_rxfh() [all …]
|
/linux-6.3-rc2/drivers/net/dsa/ |
A D | bcm_sf2.h | 152 u32 indir, dir; \ 155 indir = reg_readl(priv, REG_DIR_DATA_READ); \ 157 return (u64)indir << 32 | dir; \
|
/linux-6.3-rc2/drivers/net/ethernet/marvell/octeontx2/nic/ |
A D | otx2_ethtool.c | 858 if (indir) { in otx2_set_rxfh_context() 861 rss_ctx->ind_tbl[idx] = indir[idx]; in otx2_set_rxfh_context() 868 static int otx2_get_rxfh_context(struct net_device *dev, u32 *indir, in otx2_get_rxfh_context() argument 881 if (!indir) in otx2_get_rxfh_context() 887 indir[idx] = ethtool_rxfh_indir_default(idx, rx_queues); in otx2_get_rxfh_context() 897 if (indir) { in otx2_get_rxfh_context() 899 indir[idx] = rss_ctx->ind_tbl[idx]; in otx2_get_rxfh_context() 908 static int otx2_get_rxfh(struct net_device *dev, u32 *indir, in otx2_get_rxfh() argument 911 return otx2_get_rxfh_context(dev, indir, hkey, hfunc, in otx2_get_rxfh() 916 static int otx2_set_rxfh(struct net_device *dev, const u32 *indir, in otx2_set_rxfh() argument [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/hisilicon/hns3/hns3_common/ |
A D | hclge_comm_rss.c | 269 struct hclge_comm_hw *hw, const u16 *indir) in hclge_comm_set_rss_indir_table() argument 293 qid = indir[i * HCLGE_COMM_RSS_CFG_TBL_SIZE + j]; in hclge_comm_set_rss_indir_table() 361 u32 *indir, u16 rss_ind_tbl_size) in hclge_comm_get_rss_indir_tbl() argument 365 if (!indir) in hclge_comm_get_rss_indir_tbl() 369 indir[i] = rss_cfg->rss_indirection_tbl[i]; in hclge_comm_get_rss_indir_tbl()
|
A D | hclge_comm_rss.h | 107 u32 *indir, u16 rss_ind_tbl_size); 119 struct hclge_comm_hw *hw, const u16 *indir);
|
/linux-6.3-rc2/drivers/net/ethernet/hisilicon/hns/ |
A D | hns_ae_adapt.c | 887 static int hns_ae_get_rss(struct hnae_handle *handle, u32 *indir, u8 *key, in hns_ae_get_rss() argument 901 if (indir) in hns_ae_get_rss() 902 memcpy(indir, ppe_cb->rss_indir_table, in hns_ae_get_rss() 903 HNS_PPEV2_RSS_IND_TBL_SIZE * sizeof(*indir)); in hns_ae_get_rss() 908 static int hns_ae_set_rss(struct hnae_handle *handle, const u32 *indir, in hns_ae_set_rss() argument 919 if (indir) { in hns_ae_set_rss() 921 memcpy(ppe_cb->rss_indir_table, indir, in hns_ae_set_rss() 922 HNS_PPEV2_RSS_IND_TBL_SIZE * sizeof(*indir)); in hns_ae_set_rss()
|
/linux-6.3-rc2/drivers/net/ethernet/amd/xgbe/ |
A D | xgbe-ethtool.c | 525 static int xgbe_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, in xgbe_get_rxfh() argument 531 if (indir) { in xgbe_get_rxfh() 533 indir[i] = XGMAC_GET_BITS(pdata->rss_table[i], in xgbe_get_rxfh() 546 static int xgbe_set_rxfh(struct net_device *netdev, const u32 *indir, in xgbe_set_rxfh() argument 558 if (indir) { in xgbe_set_rxfh() 559 ret = hw_if->set_rss_lookup_table(pdata, indir); in xgbe_set_rxfh()
|
/linux-6.3-rc2/include/linux/ |
A D | ethtool.h | 840 int (*get_rxfh)(struct net_device *, u32 *indir, u8 *key, 842 int (*set_rxfh)(struct net_device *, const u32 *indir, 844 int (*get_rxfh_context)(struct net_device *, u32 *indir, u8 *key, 846 int (*set_rxfh_context)(struct net_device *, const u32 *indir,
|