Re: [PATCH net-next v4 6/7] net: devmem: pre-read requested rx queues during bind

From: Dragos Tatulea
Date: Thu Aug 21 2025 - 07:09:25 EST


On Wed, Aug 20, 2025 at 06:09:04PM -0700, Jakub Kicinski wrote:
> On Wed, 20 Aug 2025 20:11:57 +0300 Dragos Tatulea wrote:
> > struct nlattr *tb[ARRAY_SIZE(netdev_queue_id_nl_policy)];
> > + struct nlattr *attr;
> > + int rem, err = 0;
> > + u32 rxq_idx;
> > +
> > + nla_for_each_attr_type(attr, NETDEV_A_DMABUF_QUEUES,
> > + genlmsg_data(info->genlhdr),
> > + genlmsg_len(info->genlhdr), rem) {
> > + err = nla_parse_nested(
> > + tb, ARRAY_SIZE(netdev_queue_id_nl_policy) - 1, attr,
>
> While you're touching this line, could you perhaps clean up the line
> wrap? Save ARRAY_SIZE(netdev_queue_id_nl_policy) - 1 to a const and
> then:
>
> err = nla_parse_nested(tb, maxtype, attr,
> netdev_queue_id_nl_policy, info->extack);
>
> or some such.
Will clean up.

Thanks,
Dragos