Re: [PATCH v2 net 5/7] net/sched: taprio: fix delayed switching to new schedule after timer expiry

Vladimir Oltean
2023-11-09T12:24:51Z

On Tue, Nov 07, 2023 at 06:20:21AM -0500, Faizal Rahim wrote:
> static void taprio_start_sched(struct Qdisc *sch,
> - ktime_t start, struct sched_gate_list *new)
> + ktime_t new_base_time,
> + struct sched_gate_list *new)
> {
> struct taprio_sched *q = qdisc_priv(sch);
> - ktime_t expires;
> + struct sched_gate_list *oper = NULL;

No point in initializing with NULL if this will be overwritten later.

> + ktime_t expires, start;
>
> if (FULL_OFFLOAD_IS_ENABLED(q->flags))
> return;
>
> + oper = rcu_dereference_protected(q->oper_sched,
> + lockdep_is_held(&q->current_entry_lock));
> +