On Tue, 15 Dec 2020 09:42:11 +0200 Maxim Mikityanskiy wrote:
> +     q->offload = nla_get_flag(tb[TCA_HTB_OFFLOAD]);
> +
> +     if (q->offload) {
> +             if (!tc_can_offload(dev) || !dev->netdev_ops->ndo_setup_tc)
> +                     return -EOPNOTSUPP;

Is there a check somewhere making sure this is the root?

> +             q->num_direct_qdiscs = dev->real_num_tx_queues;

Why real_num_tx_queues? How do you handle queue count changes?

> +             q->direct_qdiscs = kcalloc(q->num_direct_qdiscs,
> +                                        sizeof(*q->direct_qdiscs),
> +                                        GFP_KERNEL);
> +             if (!q->direct_qdiscs)
> +                     return -ENOMEM;
> +     }

I can't quite parse after 20 minutes of staring at this code what the
relationship between the device queues and classes is. Is there any
relationship between real_num_tx_queues and classes?

Reply via email to