Re: [PATCH bpf-next v2 05/11] bpf: add hashtab support for bpf_for_each_map_elem() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 17, 2021 at 10:18:08AM -0800, Yonghong Song wrote:
> +			ret = BPF_CAST_CALL(callback_fn)((u64)(long)map,
> +					(u64)(long)key, (u64)(long)val,
> +					(u64)(long)callback_ctx, 0);
> +			if (ret) {
> +				rcu_read_unlock();
> +				ret = (ret == 1) ? 0 : -EINVAL;
> +				goto out;

There is a tnum(0,1) check in patch 4.
I'm missing the purpose of this additional check.

> +			}
> +		}
> +		rcu_read_unlock();
> +	}
> +out:
> +	migrate_enable();
> +	return ret ?: num_calls;
> +}



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux