Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-09-01 Thread Vladimir Oltean
On Tue, Sep 01, 2020 at 04:20:00PM +0200, Kurt Kanzenbach wrote: > > After giving this a bit more thought, it can be implemented by using > workqueues only. That ptp time is "cached" anyway the we could just > periodically check for the base time arrival. That should solve the > irqsave and the bei

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-09-01 Thread Kurt Kanzenbach
On Tue Aug 25 2020, Vladimir Oltean wrote: > On Tue, Aug 25, 2020 at 11:23:56AM +0200, Kurt Kanzenbach wrote: >> On Mon Aug 24 2020, Vinicius Costa Gomes wrote: >> > Hi, >> > >> > Kurt Kanzenbach writes: >> > >> [snip] >> >> + /* Setup timer for schedule switch: The IP core only allows to set a >>

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-28 Thread Kurt Kanzenbach
Hi Richard, On Thu Aug 27 2020, Richard Cochran wrote: > On Tue, Aug 25, 2020 at 11:55:37AM +0200, Kurt Kanzenbach wrote: >> >> I get your point. But how to do it? We would need a timer based on the >> PTP clock in the switch. > > Can't you use an hrtimer based on CLOCK_MONOTONIC? When the switc

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-27 Thread Richard Cochran
On Tue, Aug 25, 2020 at 11:55:37AM +0200, Kurt Kanzenbach wrote: > > I get your point. But how to do it? We would need a timer based on the > PTP clock in the switch. Can't you use an hrtimer based on CLOCK_MONOTONIC? I would expect the driver to work based solely on the device's clock. Thanks,

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-27 Thread Kurt Kanzenbach
Hi Vinicius, On Tue Aug 25 2020, Vinicius Costa Gomes wrote: > Hi Kurt, > > Kurt Kanzenbach writes: > >> I think so. As Vladimir pointed out, the driver should setup an identity >> mapping which I already did by default. >> >> Can you point me your patch? > > Just sent it for consideration: > > h

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vinicius Costa Gomes
Hi Kurt, Kurt Kanzenbach writes: > I think so. As Vladimir pointed out, the driver should setup an identity > mapping which I already did by default. > > Can you point me your patch? Just sent it for consideration: http://patchwork.ozlabs.org/project/netdev/patch/20200825174404.2727633-1-vinic

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vinicius Costa Gomes
Hi Kurt, Kurt Kanzenbach writes: > On Mon Aug 24 2020, Vinicius Costa Gomes wrote: >> Hi, >> >> Kurt Kanzenbach writes: >> > [snip] >>> + /* Setup timer for schedule switch: The IP core only allows to set a >>> +* cycle start timer 8 seconds in the future. This is why we setup the >>> +

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > Hi Vinicius, > > On Mon, Aug 24, 2020 at 04:45:50PM -0700, Vinicius Costa Gomes wrote: >> Kurt Kanzenbach writes: >> > >> > With TAPRIO traffic classes and the mapping to queues can be >> > configured. The switch can also map traffic classes. That sounded like a >> > go

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Kurt Kanzenbach
On Tue Aug 25 2020, Vladimir Oltean wrote: > Hi Vinicius, > > On Mon, Aug 24, 2020 at 04:45:50PM -0700, Vinicius Costa Gomes wrote: >> Kurt Kanzenbach writes: >> > >> > With TAPRIO traffic classes and the mapping to queues can be >> > configured. The switch can also map traffic classes. That sound

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Kurt Kanzenbach
On Tue Aug 25 2020, Vladimir Oltean wrote: > On Tue, Aug 25, 2020 at 11:33:53AM +0200, Kurt Kanzenbach wrote: >> On Tue Aug 25 2020, Vladimir Oltean wrote: >> > On Thu, Aug 20, 2020 at 10:11:15AM +0200, Kurt Kanzenbach wrote: >> > >> > Explain again how this works, please? The hrtimer measures the

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vladimir Oltean
Hi Vinicius, On Mon, Aug 24, 2020 at 04:45:50PM -0700, Vinicius Costa Gomes wrote: > Kurt Kanzenbach writes: > > > > With TAPRIO traffic classes and the mapping to queues can be > > configured. The switch can also map traffic classes. That sounded like a > > good match to me. > > The only reason

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Kurt Kanzenbach
On Mon Aug 24 2020, Vinicius Costa Gomes wrote: > Hi Kurt, > > Kurt Kanzenbach writes: > +static void hellcreek_setup_tc_mapping(struct hellcreek *hellcreek, + struct net_device *netdev) +{ + int i, j; + + /* Setup mapping between tra

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vladimir Oltean
On Tue, Aug 25, 2020 at 11:33:53AM +0200, Kurt Kanzenbach wrote: > On Tue Aug 25 2020, Vladimir Oltean wrote: > > On Thu, Aug 20, 2020 at 10:11:15AM +0200, Kurt Kanzenbach wrote: > > > > Explain again how this works, please? The hrtimer measures the CLOCK_TAI > > of the CPU, but you are offloading

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Kurt Kanzenbach
On Tue Aug 25 2020, Vladimir Oltean wrote: > On Thu, Aug 20, 2020 at 10:11:15AM +0200, Kurt Kanzenbach wrote: [snip] >> +static struct hellcreek_schedule *hellcreek_taprio_to_schedule( >> +const struct tc_taprio_qopt_offload *taprio) > > Personal indentation preference: > > static struct hellcr

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vladimir Oltean
On Tue, Aug 25, 2020 at 11:23:56AM +0200, Kurt Kanzenbach wrote: > On Mon Aug 24 2020, Vinicius Costa Gomes wrote: > > Hi, > > > > Kurt Kanzenbach writes: > > > [snip] > >> + /* Setup timer for schedule switch: The IP core only allows to set a > >> + * cycle start timer 8 seconds in the future.

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Kurt Kanzenbach
On Mon Aug 24 2020, Vinicius Costa Gomes wrote: > Hi, > > Kurt Kanzenbach writes: > [snip] >> +/* Setup timer for schedule switch: The IP core only allows to set a >> + * cycle start timer 8 seconds in the future. This is why we setup the >> + * hritmer to base_time - 5 seconds. Then,

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-24 Thread Vinicius Costa Gomes
Hi, Kurt Kanzenbach writes: > The switch has support for the 802.1Qbv Time Aware Shaper (TAS). Traffic > schedules may be configured individually on each front port. Each port has > eight > egress queues. The traffic is mapped to a traffic class respectively via the > PCP > field of a VLAN tag

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-24 Thread Vinicius Costa Gomes
Hi Kurt, Kurt Kanzenbach writes: >>> +static void hellcreek_setup_tc_mapping(struct hellcreek *hellcreek, >>> + struct net_device *netdev) >>> +{ >>> + int i, j; >>> + >>> + /* Setup mapping between traffic classes and port queues. */ >>> + for (i = 0; i <

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-24 Thread Vladimir Oltean
On Thu, Aug 20, 2020 at 10:11:15AM +0200, Kurt Kanzenbach wrote: > The switch has support for the 802.1Qbv Time Aware Shaper (TAS). Traffic > schedules may be configured individually on each front port. Each port has > eight > egress queues. The traffic is mapped to a traffic class respectively vi

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-23 Thread Kurt Kanzenbach
On Sat Aug 22 2020, Vladimir Oltean wrote: > Hi Kurt, > > On Thu, Aug 20, 2020 at 10:11:15AM +0200, Kurt Kanzenbach wrote: >> The switch has support for the 802.1Qbv Time Aware Shaper (TAS). Traffic >> schedules may be configured individually on each front port. Each port has >> eight >> egress qu

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-22 Thread Vladimir Oltean
Hi Kurt, On Thu, Aug 20, 2020 at 10:11:15AM +0200, Kurt Kanzenbach wrote: > The switch has support for the 802.1Qbv Time Aware Shaper (TAS). Traffic > schedules may be configured individually on each front port. Each port has > eight > egress queues. The traffic is mapped to a traffic class respe

[PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-20 Thread Kurt Kanzenbach
The switch has support for the 802.1Qbv Time Aware Shaper (TAS). Traffic schedules may be configured individually on each front port. Each port has eight egress queues. The traffic is mapped to a traffic class respectively via the PCP field of a VLAN tagged frame. The TAPRIO Qdisc already implemen