[Intel-wired-lan] [PATCH v5 net-next 02/12] net-shapers: implement NL get operation
Jakub Kicinski
kuba at kernel.org
Thu Aug 29 23:28:38 UTC 2024
On Thu, 29 Aug 2024 17:16:55 +0200 Paolo Abeni wrote:
> + xa_for_each_range(&data->shapers, index, shaper, ctx->start_index,
> + U32_MAX) {
> + net_shaper_index_to_handle(index, &handle);
> + ret = net_shaper_fill_one(skb, binding, &handle, shaper, info);
> + if (ret)
> + return ret;
> +
> + ctx->start_index = index;
75% sure this should say index + 1, or the xa_for_each.. should use
start_index + 1. start position is inclusive.
XA iterators are hard to get right in netlink, I'd suggest using the
same form of iteration as for_each_netdev_dump()..
More information about the Intel-wired-lan
mailing list