Lines Matching defs:arfs

144 	/* Moving to switchdev mode, fs->arfs is freed by mlx5e_nic_profile
149 * with fs->arfs nullified.
162 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(fs);
168 dest.ft = arfs->arfs_tables[i].ft.t;
172 fs_err(fs, "%s: modify ttc[%d] dest to arfs, failed err(%d)\n",
178 set_bit(MLX5E_ARFS_STATE_ENABLED, &arfs->state);
191 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(fs);
195 destroy_workqueue(arfs->wq);
197 if (!IS_ERR_OR_NULL(arfs->arfs_tables[i].ft.t))
198 arfs_destroy_table(&arfs->arfs_tables[i]);
204 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(fs);
211 kvfree(arfs);
218 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(fs);
219 struct arfs_table *arfs_t = &arfs->arfs_tables[type];
242 fs_err(fs, "%s: add rule failed, arfs type=%d\n", __func__, type);
353 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(fs);
354 struct mlx5e_flow_table *ft = &arfs->arfs_tables[type].ft;
388 struct mlx5e_arfs_tables *arfs;
395 arfs = kvzalloc(sizeof(*arfs), GFP_KERNEL);
396 if (!arfs)
399 spin_lock_init(&arfs->arfs_lock);
400 arfs->wq = create_singlethread_workqueue("mlx5e_arfs");
401 if (!arfs->wq)
404 mlx5e_fs_set_arfs(fs, arfs);
417 kvfree(arfs);
425 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(priv->fs);
433 spin_lock_bh(&arfs->arfs_lock);
434 mlx5e_for_each_arfs_rule(arfs_rule, htmp, arfs->arfs_tables, i, j) {
445 spin_unlock_bh(&arfs->arfs_lock);
458 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(fs);
465 clear_bit(MLX5E_ARFS_STATE_ENABLED, &arfs->state);
467 spin_lock_bh(&arfs->arfs_lock);
468 mlx5e_for_each_arfs_rule(rule, htmp, arfs->arfs_tables, i, j) {
472 spin_unlock_bh(&arfs->arfs_lock);
498 static struct arfs_table *arfs_get_table(struct mlx5e_arfs_tables *arfs,
502 return &arfs->arfs_tables[ARFS_IPV4_TCP];
504 return &arfs->arfs_tables[ARFS_IPV4_UDP];
506 return &arfs->arfs_tables[ARFS_IPV6_TCP];
508 return &arfs->arfs_tables[ARFS_IPV6_UDP];
516 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(priv->fs);
537 arfs_table = arfs_get_table(arfs, tuple->ip_proto, tuple->etype);
539 WARN_ONCE(1, "arfs table does not exist for etype %u and ip_proto %u\n",
635 struct mlx5e_arfs_tables *arfs;
638 arfs = mlx5e_fs_get_arfs(priv->fs);
639 if (!test_bit(MLX5E_ARFS_STATE_ENABLED, &arfs->state))
661 struct mlx5e_arfs_tables *arfs = mlx5e_fs_get_arfs(priv->fs);
691 rule->filter_id = arfs->last_filter_id++ % RPS_NO_FILTER;
735 struct mlx5e_arfs_tables *arfs;
740 arfs = mlx5e_fs_get_arfs(priv->fs);
751 arfs_t = arfs_get_table(arfs, fk.basic.ip_proto, fk.basic.n_proto);
755 spin_lock_bh(&arfs->arfs_lock);
756 if (!test_bit(MLX5E_ARFS_STATE_ENABLED, &arfs->state)) {
757 spin_unlock_bh(&arfs->arfs_lock);
764 spin_unlock_bh(&arfs->arfs_lock);
774 spin_unlock_bh(&arfs->arfs_lock);
778 queue_work(arfs->wq, &arfs_rule->arfs_work);
779 spin_unlock_bh(&arfs->arfs_lock);