Lines Matching refs:indir
1018 static int ethtool_copy_validate_indir(u32 *indir, void __user *useraddr, in ethtool_copy_validate_indir() argument
1024 if (copy_from_user(indir, useraddr, size * sizeof(indir[0]))) in ethtool_copy_validate_indir()
1029 if (indir[i] >= rx_rings->data) in ethtool_copy_validate_indir()
1049 u32 *indir; in ethtool_get_rxfh_indir() local
1075 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_get_rxfh_indir()
1076 if (!indir) in ethtool_get_rxfh_indir()
1079 ret = dev->ethtool_ops->get_rxfh(dev, indir, NULL, NULL); in ethtool_get_rxfh_indir()
1085 indir, dev_size * sizeof(indir[0]))) in ethtool_get_rxfh_indir()
1089 kfree(indir); in ethtool_get_rxfh_indir()
1098 u32 *indir; in ethtool_set_rxfh_indir() local
1119 indir = kcalloc(dev_size, sizeof(indir[0]), GFP_USER); in ethtool_set_rxfh_indir()
1120 if (!indir) in ethtool_set_rxfh_indir()
1130 indir[i] = ethtool_rxfh_indir_default(i, rx_rings.data); in ethtool_set_rxfh_indir()
1132 ret = ethtool_copy_validate_indir(indir, in ethtool_set_rxfh_indir()
1140 ret = ops->set_rxfh(dev, indir, NULL, ETH_RSS_HASH_NO_CHANGE); in ethtool_set_rxfh_indir()
1151 kfree(indir); in ethtool_set_rxfh_indir()
1165 u32 *indir = NULL; in ethtool_get_rxfh() local
1199 indir_bytes = user_indir_size * sizeof(indir[0]); in ethtool_get_rxfh()
1206 indir = (u32 *)rss_config; in ethtool_get_rxfh()
1212 ret = dev->ethtool_ops->get_rxfh_context(dev, indir, hkey, in ethtool_get_rxfh()
1216 ret = dev->ethtool_ops->get_rxfh(dev, indir, hkey, &dev_hfunc); in ethtool_get_rxfh()
1242 u32 *indir = NULL, indir_bytes = 0; in ethtool_set_rxfh() local
1278 indir_bytes = dev_indir_size * sizeof(indir[0]); in ethtool_set_rxfh()
1295 indir = (u32 *)rss_config; in ethtool_set_rxfh()
1296 ret = ethtool_copy_validate_indir(indir, in ethtool_set_rxfh()
1304 indir = (u32 *)rss_config; in ethtool_set_rxfh()
1306 indir[i] = ethtool_rxfh_indir_default(i, rx_rings.data); in ethtool_set_rxfh()
1323 ret = ops->set_rxfh_context(dev, indir, hkey, rxfh.hfunc, in ethtool_set_rxfh()
1326 ret = ops->set_rxfh(dev, indir, hkey, rxfh.hfunc); in ethtool_set_rxfh()