mbox series

[v2,net,0/7] qbv cycle time extension/truncation

Message ID 20231107112023.676016-1-faizal.abdul.rahim@linux.intel.com (mailing list archive)
Headers show
Series qbv cycle time extension/truncation | expand

Message

Abdul Rahim, Faizal Nov. 7, 2023, 11:20 a.m. UTC
According to IEEE Std. 802.1Q-2018 section Q.5 CycleTimeExtension,
the Cycle Time Extension variable allows this extension of the last old
cycle to be done in a defined way. If the last complete old cycle would
normally end less than OperCycleTimeExtension nanoseconds before the new
base time, then the last complete cycle before AdminBaseTime is reached
is extended so that it ends at AdminBaseTime.

Changes in v2:

- Added 's64 cycle_time_correction' in 'sched_gate_list struct'.
- Removed sched_changed created in v1 since the new cycle_time_correction
  field can also serve to indicate the need for a schedule change.
- Added 'bool correction_active' in 'struct sched_entry' to represent
  the correction state from the entry's perspective and return corrected
  interval value when active.
- Fix cycle time correction logics for the next entry in advance_sched()
- Fix and implement proper cycle time correction logics for current
  entry in taprio_start_sched()

v1 at:
https://lore.kernel.org/lkml/20230530082541.495-1-muhammad.husaini.zulkifli@intel.com/

Faizal Rahim (7):
  net/sched: taprio: fix too early schedules switching
  net/sched: taprio: fix cycle time adjustment for next entry
  net/sched: taprio: update impacted fields during cycle time adjustment
  net/sched: taprio: get corrected value of cycle_time and interval
  net/sched: taprio: fix delayed switching to new schedule after timer
    expiry
  net/sched: taprio: fix q->current_entry is NULL before its expiry
  net/sched: taprio: enable cycle time adjustment for current entry

 net/sched/sch_taprio.c | 263 ++++++++++++++++++++++++++++++++---------
 1 file changed, 209 insertions(+), 54 deletions(-)

Comments

Vladimir Oltean Nov. 8, 2023, 3:51 p.m. UTC | #1
Hi Faizal,

On Tue, Nov 07, 2023 at 06:20:16AM -0500, Faizal Rahim wrote:
> According to IEEE Std. 802.1Q-2018 section Q.5 CycleTimeExtension,
> the Cycle Time Extension variable allows this extension of the last old
> cycle to be done in a defined way. If the last complete old cycle would
> normally end less than OperCycleTimeExtension nanoseconds before the new
> base time, then the last complete cycle before AdminBaseTime is reached
> is extended so that it ends at AdminBaseTime.
> 
> Changes in v2:
> 
> - Added 's64 cycle_time_correction' in 'sched_gate_list struct'.
> - Removed sched_changed created in v1 since the new cycle_time_correction
>   field can also serve to indicate the need for a schedule change.
> - Added 'bool correction_active' in 'struct sched_entry' to represent
>   the correction state from the entry's perspective and return corrected
>   interval value when active.
> - Fix cycle time correction logics for the next entry in advance_sched()
> - Fix and implement proper cycle time correction logics for current
>   entry in taprio_start_sched()
> 
> v1 at:
> https://lore.kernel.org/lkml/20230530082541.495-1-muhammad.husaini.zulkifli@intel.com/

I like what came of this patch series. Thanks for following up and
taking over. I have some comments on individual patches.
Abdul Rahim, Faizal Nov. 10, 2023, 11:06 a.m. UTC | #2
On 8/11/2023 11:51 pm, Vladimir Oltean wrote:
> Hi Faizal,
> 
> On Tue, Nov 07, 2023 at 06:20:16AM -0500, Faizal Rahim wrote:
>> According to IEEE Std. 802.1Q-2018 section Q.5 CycleTimeExtension,
>> the Cycle Time Extension variable allows this extension of the last old
>> cycle to be done in a defined way. If the last complete old cycle would
>> normally end less than OperCycleTimeExtension nanoseconds before the new
>> base time, then the last complete cycle before AdminBaseTime is reached
>> is extended so that it ends at AdminBaseTime.
>>
>> Changes in v2:
>>
>> - Added 's64 cycle_time_correction' in 'sched_gate_list struct'.
>> - Removed sched_changed created in v1 since the new cycle_time_correction
>>    field can also serve to indicate the need for a schedule change.
>> - Added 'bool correction_active' in 'struct sched_entry' to represent
>>    the correction state from the entry's perspective and return corrected
>>    interval value when active.
>> - Fix cycle time correction logics for the next entry in advance_sched()
>> - Fix and implement proper cycle time correction logics for current
>>    entry in taprio_start_sched()
>>
>> v1 at:
>> https://lore.kernel.org/lkml/20230530082541.495-1-muhammad.husaini.zulkifli@intel.com/
> 
> I like what came of this patch series. Thanks for following up and
> taking over. I have some comments on individual patches.
> 

Hi Vladimir,

Thanks a bunch for your review and your patience with some of my basic 
mistakes.
Appreciate the time and effort you put into it.
I'll take a bit to double-check the code and retest some stuff.

Will loop back with you soon.

Cheers.