/linux/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 | 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 | 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.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 | 50 u32 *indir, u8 *key, u8 *hfunc); 52 const u32 *indir, const u8 *key, const u8 *hfunc);
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/esw/ |
A D | indir_table.c | 56 struct mlx5_esw_indir_table *indir = kvzalloc(sizeof(*indir), GFP_KERNEL); in mlx5_esw_indir_table_init() local 58 if (!indir) in mlx5_esw_indir_table_init() 61 mutex_init(&indir->lock); in mlx5_esw_indir_table_init() 62 hash_init(indir->table); in mlx5_esw_indir_table_init() 63 return indir; in mlx5_esw_indir_table_init() 69 mutex_destroy(&indir->lock); in mlx5_esw_indir_table_destroy() 70 kvfree(indir); in mlx5_esw_indir_table_destroy() 465 mutex_lock(&esw->fdb_table.offloads.indir->lock); in mlx5_esw_indir_table_get() 483 mutex_unlock(&esw->fdb_table.offloads.indir->lock); in mlx5_esw_indir_table_get() 487 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); 40 mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir) in mlx5_esw_indir_table_destroy() argument
|
/linux/drivers/net/ethernet/microsoft/mana/ |
A D | mana_ethtool.c | 127 static int mana_get_rxfh(struct net_device *ndev, u32 *indir, u8 *key, in mana_get_rxfh() argument 136 if (indir) { in mana_get_rxfh() 138 indir[i] = apc->indir_table[i]; in mana_get_rxfh() 147 static int mana_set_rxfh(struct net_device *ndev, const u32 *indir, in mana_set_rxfh() argument 162 if (indir) { in mana_set_rxfh() 164 if (indir[i] >= apc->num_queues) in mana_set_rxfh() 170 apc->indir_table[i] = indir[i]; in mana_set_rxfh()
|
/linux/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 | 1177 if (indir) in efx_ethtool_get_rxfh() 1178 memcpy(indir, efx->rss_context.rx_indir_table, in efx_ethtool_get_rxfh() 1194 if (!indir && !key) in efx_ethtool_set_rxfh() 1199 if (!indir) in efx_ethtool_set_rxfh() 1200 indir = efx->rss_context.rx_indir_table; in efx_ethtool_set_rxfh() 1202 return efx->type->rx_push_rss_config(efx, true, indir, key); in efx_ethtool_set_rxfh() 1227 if (indir) in efx_ethtool_get_rxfh_context() 1228 memcpy(indir, ctx->rx_indir_table, sizeof(ctx->rx_indir_table)); in efx_ethtool_get_rxfh_context() 1237 const u32 *indir, const u8 *key, in efx_ethtool_set_rxfh_context() argument 1288 if (!indir) in efx_ethtool_set_rxfh_context() [all …]
|
/linux/drivers/net/ethernet/microchip/ |
A D | lan743x_ethtool.c | 575 u32 *indir, u8 *key, u8 *hfunc) in lan743x_ethtool_get_rxfh() argument 579 if (indir) { in lan743x_ethtool_get_rxfh() 588 indir[byte_index + 0] = in lan743x_ethtool_get_rxfh() 590 indir[byte_index + 1] = in lan743x_ethtool_get_rxfh() 592 indir[byte_index + 2] = in lan743x_ethtool_get_rxfh() 594 indir[byte_index + 3] = in lan743x_ethtool_get_rxfh() 624 const u32 *indir, const u8 *key, in lan743x_ethtool_set_rxfh() argument 632 if (indir) { in lan743x_ethtool_set_rxfh() 640 (((indir[byte_index + 0] & 0x000000FF) << 0) | in lan743x_ethtool_set_rxfh() 641 ((indir[byte_index + 1] & 0x000000FF) << 8) | in lan743x_ethtool_set_rxfh() [all …]
|
/linux/drivers/net/ethernet/intel/fm10k/ |
A D | fm10k_ethtool.c | 987 if (indir) in fm10k_write_reta() 988 n = indir[4 * i + j]; in fm10k_write_reta() 1014 if (!indir) in fm10k_get_reta() 1020 indir[0] = (reta << 24) >> 24; in fm10k_get_reta() 1021 indir[1] = (reta << 16) >> 24; in fm10k_get_reta() 1022 indir[2] = (reta << 8) >> 24; in fm10k_get_reta() 1023 indir[3] = (reta) >> 24; in fm10k_get_reta() 1035 if (!indir) in fm10k_set_reta() 1041 if (indir[i] < rss_i) in fm10k_set_reta() 1046 fm10k_write_reta(interface, indir); in fm10k_set_reta() [all …]
|
/linux/fs/freevxfs/ |
A D | vxfs_bmap.c | 89 __fs32 *indir; in vxfs_bmap_ext4() local 96 indir = (__fs32 *)buf->b_data; in vxfs_bmap_ext4() 97 bno = fs32_to_cpu(sbi, indir[(bn / indsize) % (indsize * bn)]) + in vxfs_bmap_ext4() 131 vxfs_bmap_indir(struct inode *ip, long indir, int size, long block) in vxfs_bmap_indir() argument 143 indir + (i / VXFS_TYPED_PER_BLOCK(ip->i_sb))); in vxfs_bmap_indir()
|
/linux/drivers/net/ethernet/amazon/ena/ |
A D | ena_ethtool.c | 695 const u32 *indir) in ena_indirection_table_set() argument 703 ENA_IO_RXQ_IDX(indir[i])); in ena_indirection_table_set() 720 static int ena_indirection_table_get(struct ena_adapter *adapter, u32 *indir) in ena_indirection_table_get() argument 725 if (!indir) in ena_indirection_table_get() 728 rc = ena_com_indirect_table_get(ena_dev, indir); in ena_indirection_table_get() 737 indir[i] = ENA_IO_RXQ_IDX_TO_COMBINED_IDX(indir[i]); in ena_indirection_table_get() 742 static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, in ena_get_rxfh() argument 750 rc = ena_indirection_table_get(adapter, indir); in ena_get_rxfh() 788 static int ena_set_rxfh(struct net_device *netdev, const u32 *indir, in ena_set_rxfh() argument 796 if (indir) { in ena_set_rxfh() [all …]
|
/linux/net/ethtool/ |
A D | ioctl.c | 1043 if (copy_from_user(indir, useraddr, array_size(size, sizeof(indir[0])))) in ethtool_copy_validate_indir() 1068 u32 *indir; in ethtool_get_rxfh_indir() local 1094 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_get_rxfh_indir() 1095 if (!indir) in ethtool_get_rxfh_indir() 1104 indir, dev_size * sizeof(indir[0]))) in ethtool_get_rxfh_indir() 1108 kfree(indir); in ethtool_get_rxfh_indir() 1117 u32 *indir; in ethtool_set_rxfh_indir() local 1138 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_set_rxfh_indir() 1139 if (!indir) in ethtool_set_rxfh_indir() 1170 kfree(indir); in ethtool_set_rxfh_indir() [all …]
|
A D | common.c | 500 u32 *indir; in ethtool_get_max_rxfh_channel() local 510 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_get_max_rxfh_channel() 511 if (!indir) in ethtool_get_max_rxfh_channel() 514 ret = dev->ethtool_ops->get_rxfh(dev, indir, NULL, NULL); in ethtool_get_max_rxfh_channel() 519 current_max = max(current_max, indir[dev_size]); in ethtool_get_max_rxfh_channel() 524 kfree(indir); in ethtool_get_max_rxfh_channel()
|
/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
A D | otx2_ethtool.c | 792 if (indir) { in otx2_set_rxfh_context() 795 rss_ctx->ind_tbl[idx] = indir[idx]; in otx2_set_rxfh_context() 802 static int otx2_get_rxfh_context(struct net_device *dev, u32 *indir, in otx2_get_rxfh_context() argument 815 if (!indir) in otx2_get_rxfh_context() 821 indir[idx] = ethtool_rxfh_indir_default(idx, rx_queues); in otx2_get_rxfh_context() 831 if (indir) { in otx2_get_rxfh_context() 833 indir[idx] = rss_ctx->ind_tbl[idx]; in otx2_get_rxfh_context() 842 static int otx2_get_rxfh(struct net_device *dev, u32 *indir, in otx2_get_rxfh() argument 845 return otx2_get_rxfh_context(dev, indir, hkey, hfunc, in otx2_get_rxfh() 850 static int otx2_set_rxfh(struct net_device *dev, const u32 *indir, in otx2_set_rxfh() argument [all …]
|
/linux/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/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/include/linux/ |
A D | ethtool.h | 667 int (*get_rxfh)(struct net_device *, u32 *indir, u8 *key, 669 int (*set_rxfh)(struct net_device *, const u32 *indir, 671 int (*get_rxfh_context)(struct net_device *, u32 *indir, u8 *key, 673 int (*set_rxfh_context)(struct net_device *, const u32 *indir,
|
/linux/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/drivers/net/ethernet/freescale/enetc/ |
A D | enetc_ethtool.c | 515 static int enetc_get_rxfh(struct net_device *ndev, u32 *indir, u8 *key, in enetc_get_rxfh() argument 532 if (indir) in enetc_get_rxfh() 533 err = enetc_get_rss_table(priv->si, indir, priv->si->num_rss); in enetc_get_rxfh() 546 static int enetc_set_rxfh(struct net_device *ndev, const u32 *indir, in enetc_set_rxfh() argument 558 if (indir) in enetc_set_rxfh() 559 err = enetc_set_rss_table(priv->si, indir, priv->si->num_rss); in enetc_set_rxfh()
|
/linux/drivers/net/ethernet/aquantia/atlantic/ |
A D | aq_ethtool.c | 440 static int aq_ethtool_get_rss(struct net_device *ndev, u32 *indir, u8 *key, in aq_ethtool_get_rss() argument 451 if (indir) { in aq_ethtool_get_rss() 453 indir[i] = cfg->aq_rss.indirection_table[i]; in aq_ethtool_get_rss() 462 static int aq_ethtool_set_rss(struct net_device *netdev, const u32 *indir, in aq_ethtool_set_rss() argument 478 if (indir) in aq_ethtool_set_rss() 480 cfg->aq_rss.indirection_table[i] = indir[i]; in aq_ethtool_set_rss()
|
/linux/drivers/net/ethernet/marvell/mvpp2/ |
A D | mvpp2_cls.c | 1482 mvpp22_rxfh_indir(port, table->indir[i])); in mvpp22_rss_fill_table() 1592 const u32 *indir) in mvpp22_port_rss_ctx_indir_set() argument 1601 memcpy(rss_table->indir, indir, in mvpp22_port_rss_ctx_indir_set() 1602 MVPP22_RSS_TABLE_ENTRIES * sizeof(rss_table->indir[0])); in mvpp22_port_rss_ctx_indir_set() 1610 u32 *indir) in mvpp22_port_rss_ctx_indir_get() argument 1619 memcpy(indir, rss_table->indir, in mvpp22_port_rss_ctx_indir_get() 1620 MVPP22_RSS_TABLE_ENTRIES * sizeof(rss_table->indir[0])); in mvpp22_port_rss_ctx_indir_get() 1729 table->indir[i] = ethtool_rxfh_indir_default(i, port->nrxqs); in mvpp22_port_rss_init()
|
/linux/drivers/net/ethernet/cavium/thunder/ |
A D | nicvf_ethtool.c | 652 static int nicvf_get_rxfh(struct net_device *dev, u32 *indir, u8 *hkey, in nicvf_get_rxfh() argument 659 if (indir) { in nicvf_get_rxfh() 661 indir[idx] = rss->ind_tbl[idx]; in nicvf_get_rxfh() 673 static int nicvf_set_rxfh(struct net_device *dev, const u32 *indir, in nicvf_set_rxfh() argument 689 if (indir) { in nicvf_set_rxfh() 691 rss->ind_tbl[idx] = indir[idx]; in nicvf_set_rxfh()
|