Re: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers

2017-09-19 Thread Vinicius Costa Gomes
Hi Richard, Richard Cochran <richardcoch...@gmail.com> writes: > On Mon, Sep 18, 2017 at 04:06:28PM -0700, Vinicius Costa Gomes wrote: >> That's the point, the application does not need to know that, and asking >> that would be stupid. > > On the contrary, th

Re: [RFC net-next 2/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-09-13 Thread Vinicius Costa Gomes
Hi Henrik, Henrik Austad <hen...@austad.us> writes: > On Thu, Aug 31, 2017 at 06:26:22PM -0700, Vinicius Costa Gomes wrote: >> This queueing discipline implements the shaper algorithm defined by >> the 802.1Q-2014 Section 8.6.8.2 and detailed in Annex L. >> >> It

Re: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers

2017-09-18 Thread Vinicius Costa Gomes
Hi Richard, Richard Cochran <richardcoch...@gmail.com> writes: > On Thu, Aug 31, 2017 at 06:26:20PM -0700, Vinicius Costa Gomes wrote: >> * Time-aware shaper (802.1Qbv): > > I just posted a working alternative showing how to handle 802.1Qbv and > many ot

RE: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-16 Thread Vinicius Costa Gomes
Hi David, David Laight writes: [...] >> > index 099bf5528fed..41e349df4bf4 100644 >> > --- a/include/uapi/linux/pkt_sched.h >> > +++ b/include/uapi/linux/pkt_sched.h >> > @@ -871,4 +871,22 @@ struct tc_pie_xstats { >> >__u32 maxq; /* maximum queue size

Re: [next-queue PATCH v8 0/6] TSN: Add qdisc based config interface for CBS

2017-10-16 Thread Vinicius Costa Gomes
Hi David, David Miller writes: > I'm fine with this patch set. I see it's against Jeff's next-queue, so > where exactly do you want this to be merged? My net-next tree? I think it going through Jeff's next-queue makes more sense. Anyway, I will send a v9 later today

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
Hi, Eric Dumazet writes: [...] > > Your mixing of s64 and u64 is disturbing. > > do_div() handles u64, not s64. > > div64_s64() might be needed in place of do_div() I wasn't very comfortable about the signal juggling either. Didn't know about div64_s64(), looks much

[next-queue PATCH v8 1/6] net/sched: Check for null dev_queue on create flow

2017-10-13 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v8 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
software implementation is added for now. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> --- include/uapi/linux/pkt_sched.h | 18 +++ net/sched/Kconfig | 11 ++ net/sched/Makefile

[next-queue PATCH v8 6/6] igb: Add support for CBS offload

2017-10-13 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v8 2/6] net/sched: Change behavior of mq select_queue()

2017-10-13 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia Currently, the class_ops select_queue() implementation on sch_mq returns a pointer to netdev_queue #0 when it receives and invalid qdisc id. That can be misleading since all of mq's inner qdiscs are attached to a valid netdev_queue.

[next-queue PATCH v8 0/6] TSN: Add qdisc based config interface for CBS

2017-10-13 Thread Vinicius Costa Gomes
S offload Jesus Sanchez-Palencia (3): net/sched: Check for null dev_queue on create flow net/sched: Change behavior of mq select_queue() net/sched: Add select_queue() class_ops for mqprio Vinicius Costa Gomes (2): net/sched: Introduce Credit Based Shaper (CBS) qdisc net/sched: Add support f

[next-queue PATCH v8 5/6] net/sched: Add support for HW offloading for CBS

2017-10-13 Thread Vinicius Costa Gomes
This adds support for offloading the CBS algorithm to the controller, if supported. Drivers wanting to support CBS offload must implement the .ndo_setup_tc callback and handle the TC_SETUP_CBS (introduced here) type. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- i

[next-queue PATCH v8 3/6] net/sched: Add select_queue() class_ops for mqprio

2017-10-13 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
Hi, Ivan Khoronzhuk writes: [...] >> + >> +static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch) >> +{ >> +struct cbs_sched_data *q = qdisc_priv(sch); >> + >> +if (sch->q.qlen == 0 && q->credits > 0) { >> +/* We need to stop

[next-queue PATCH v9 5/6] net/sched: Add support for HW offloading for CBS

2017-10-16 Thread Vinicius Costa Gomes
This adds support for offloading the CBS algorithm to the controller, if supported. Drivers wanting to support CBS offload must implement the .ndo_setup_tc callback and handle the TC_SETUP_CBS (introduced here) type. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- i

[next-queue PATCH v9 0/6] TSN: Add qdisc based config interface for CBS

2017-10-16 Thread Vinicius Costa Gomes
en...@intel.com> - Vinicius Gomes <vinicius.go...@intel.com> Andre Guedes (1): igb: Add support for CBS offload Jesus Sanchez-Palencia (3): net/sched: Check for null dev_queue on create flow net/sched: Change behavior of mq select_queue() net/sched: Add select_queue() class_ops for mqpr

[next-queue PATCH v9 1/6] net/sched: Check for null dev_queue on create flow

2017-10-16 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v9 3/6] net/sched: Add select_queue() class_ops for mqprio

2017-10-16 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

[next-queue PATCH v9 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-16 Thread Vinicius Costa Gomes
software implementation is added for now. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> --- include/uapi/linux/pkt_sched.h | 19 +++ net/sched/Kconfig | 11 ++ net/sched/Makefile

[next-queue PATCH v9 6/6] igb: Add support for CBS offload

2017-10-16 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v9 2/6] net/sched: Change behavior of mq select_queue()

2017-10-16 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia Currently, the class_ops select_queue() implementation on sch_mq returns a pointer to netdev_queue #0 when it receives and invalid qdisc id. That can be misleading since all of mq's inner qdiscs are attached to a valid netdev_queue.

Re: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers

2017-09-07 Thread Vinicius Costa Gomes
Henrik Austad <hen...@austad.us> writes: > On Thu, Aug 31, 2017 at 06:26:20PM -0700, Vinicius Costa Gomes wrote: >> Hi, >> >> This patchset is an RFC on a proposal of how the Traffic Control subsystem >> can >> be used to offload the configuration

[iproute2 net-next 1/3] update headers with CBS API

2017-09-26 Thread Vinicius Costa Gomes
Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- include/linux/pkt_sched.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 099bf552..27c849c0 100644 --- a/include/linux/pkt_sched.h +++ b/i

[iproute2 net-next 3/3] man: Add initial manpage for tc-cbs(8)

2017-09-26 Thread Vinicius Costa Gomes
Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- man/man8/tc-cbs.8 | 100 ++ 1 file changed, 100 insertions(+) create mode 100644 man/man8/tc-cbs.8 diff --git a/man/man8/tc-cbs.8 b/man/man8/tc-cbs.8 new file mode 100644

[next-queue PATCH 3/3] igb: Add support for CBS offload

2017-09-26 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH 2/3] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-09-26 Thread Vinicius Costa Gomes
supports offloading the traffic shaping work to supporting controllers. Later, when a software implementation is added, the current dependency on being installed "under" mqprio can be lifted. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus

[iproute2 net-next 2/3] tc: Add support for the CBS qdisc

2017-09-26 Thread Vinicius Costa Gomes
idleslope (The order is not important) Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- tc/Makefile | 1 + tc/q_cbs.c | 134 2 files changed, 135 insertions(+) create mode 100644 tc/q_cbs.c diff --gi

[next-queue PATCH 1/3] net/sched: Introduce the user API for the CBS shaper

2017-09-26 Thread Vinicius Costa Gomes
Export the API necessary for configuring the CBS shaper (implemented in the next patch) via the tc tool. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- include/uapi/linux/pkt_sched.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/uapi

[next-queue PATCH 0/3] TSN: Add qdisc based config interface for CBS

2017-09-26 Thread Vinicius Costa Gomes
icius.go...@intel.com> Andre Guedes (1): igb: Add support for CBS offload Vinicius Costa Gomes (2): net/sched: Introduce the user API for the CBS shaper net/sched: Introduce Credit Based Shaper (CBS) qdisc drivers/net/ethernet/intel/igb/e1000_defines.h | 23 ++ drivers/net/ethernet/intel/i

Re: [next-queue PATCH 2/3] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-09-28 Thread Vinicius Costa Gomes
Hi, Cong Wang writes: [...] >>> >>> I am not sure how we can solve this elegantly, perhaps you should >>> extend mqprio rather than add a new one? >> >> Is the alternative hinted in the FIXME worse? Instead of passing the >> index of the hardware queue to the driver

Re: [next-queue PATCH v2 3/5] net/sched: Introduce the user API for the CBS shaper

2017-10-02 Thread Vinicius Costa Gomes
Hi, Cong Wang <xiyou.wangc...@gmail.com> writes: > On Fri, Sep 29, 2017 at 5:26 PM, Vinicius Costa Gomes > <vinicius.go...@intel.com> wrote: >> Export the API necessary for configuring the CBS shaper (implemented >> in the next patch) via the tc tool. > > T

[next-queue PATCH v2 4/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-09-29 Thread Vinicius Costa Gomes
supports offloading the traffic shaping work to supporting controllers. Later, when a software implementation is added, the current dependency on being installed "under" mqprio can be lifted. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus

[next-queue PATCH v2 0/5] TSN: Add qdisc based config interface for CBS

2017-09-29 Thread Vinicius Costa Gomes
=== - Andre Guedes <andre.gue...@intel.com> - Ivan Briano <ivan.bri...@intel.com> - Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> - Vinicius Gomes <vinicius.go...@intel.com> Andre Guedes (1): igb: Add support for CBS offload Vinicius Costa Gomes (2): net/s

[next-queue PATCH v2 1/5] mqprio: Implement select_queue class_ops

2017-09-29 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

[next-queue PATCH v2 2/5] net/sched: Fix accessing invalid dev_queue

2017-09-29 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v2 3/5] net/sched: Introduce the user API for the CBS shaper

2017-09-29 Thread Vinicius Costa Gomes
Export the API necessary for configuring the CBS shaper (implemented in the next patch) via the tc tool. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- include/uapi/linux/pkt_sched.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/uapi

[next-queue PATCH v2 5/5] igb: Add support for CBS offload

2017-09-29 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

Re: [next-queue PATCH 2/3] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-09-27 Thread Vinicius Costa Gomes
Hi, Cong Wang <xiyou.wangc...@gmail.com> writes: > On Tue, Sep 26, 2017 at 4:39 PM, Vinicius Costa Gomes > <vinicius.go...@intel.com> wrote: >> +static int cbs_init(struct Qdisc *sch, struct nlattr *opt) >> +{ >> + struct cbs_sched_data *q = qdisc_pri

[RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers

2017-08-31 Thread Vinicius Costa Gomes
> - Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> - Vinicius Gomes <vinicius.go...@intel.com> Andre Guedes (2): igb: Add support for CBS offload samples/tsn: Add script for calculating CBS config Jesus Sanchez-Palencia (1): sample: Add TSN Talker and List

[RFC net-next 1/5] net/sched: Introduce the user API for the CBS shaper

2017-08-31 Thread Vinicius Costa Gomes
Export the API necessary for configuring the CBS shaper (implemented in the next patch) via the tc tool. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- include/uapi/linux/pkt_sched.h | 29 + 1 file changed, 29 insertions(+) diff --git a/i

[RFC net-next 2/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-08-31 Thread Vinicius Costa Gomes
supports offloading the traffic shaping work to supporting controllers. Later, when a software implementation is added, the current dependency on being installed "under" mqprio can be lifted. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus

[RFC net-next 3/5] igb: Add support for CBS offload

2017-08-31 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[RFC net-next 5/5] samples/tsn: Add script for calculating CBS config

2017-08-31 Thread Vinicius Costa Gomes
From: Andre Guedes Add a script that takes as input the parameters of the Credit-based shaper used on FQTSS - link rate, max frame size of best effort traffic, idleslope and maximum frame size of the time-sensitive traffic class - for SR classes A and B, and calculates

[RFC net-next 4/5] sample: Add TSN Talker and Listener examples

2017-08-31 Thread Vinicius Costa Gomes
l print the rate of packets reception after every 1 second. This makes it easier to verify if the bandwidth configured for a traffic class is being respected or not. Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.

[RFC iproute2 1/2] update headers with CBS API [RFC]

2017-08-31 Thread Vinicius Costa Gomes
Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- include/linux/pkt_sched.h | 29 + 1 file changed, 29 insertions(+) diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 099bf552..ba6c9a54 100644 --- a/include/linux/pkt_s

[RFC iproute2 2/2] tc: Add support for the CBS qdisc

2017-08-31 Thread Vinicius Costa Gomes
-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- tc/Makefile | 1 + tc/q_cbs.c | 134 2 files changed, 135 insertions(+) create mode 100644 tc/q_cbs.c diff --git a/tc/Makefile b/tc/Makefile index a9b4b8e6..f0091217

Re: [next-queue PATCH v4 3/4] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-05 Thread Vinicius Costa Gomes
when a software implementation is added, the current dependency >>on being installed "under" mqprio can be lifted. >> >>Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> >>Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel

[next-queue PATCH v2 3/5] net/sched: Introduce the user API for the CBS shaper

2017-10-03 Thread Vinicius Costa Gomes
Export the API necessary for configuring the CBS shaper (implemented in the next patch) via the tc tool. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- include/uapi/linux/pkt_sched.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/uapi

[next-queue PATCH v3 2/4] net/sched: Fix accessing invalid dev_queue

2017-10-03 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v3 0/4] TSN: Add qdisc based config interface for CBS

2017-10-03 Thread Vinicius Costa Gomes
gt; - Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> - Vinicius Gomes <vinicius.go...@intel.com> Andre Guedes (1): igb: Add support for CBS offload Jesus Sanchez-Palencia (2): mqprio: Implement select_queue class_ops net/sched: Fix accessing invalid dev_queue

[next-queue PATCH v2 4/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-03 Thread Vinicius Costa Gomes
supports offloading the traffic shaping work to supporting controllers. Later, when a software implementation is added, the current dependency on being installed "under" mqprio can be lifted. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus

[next-queue PATCH v2 5/5] igb: Add support for CBS offload

2017-10-03 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v3 3/4] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-03 Thread Vinicius Costa Gomes
supports offloading the traffic shaping work to supporting controllers. Later, when a software implementation is added, the current dependency on being installed "under" mqprio can be lifted. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus

[next-queue PATCH v3 1/4] mqprio: Implement select_queue class_ops

2017-10-03 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

[next-queue PATCH v3 4/4] igb: Add support for CBS offload

2017-10-03 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v4 4/4] igb: Add support for CBS offload

2017-10-03 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v4 3/4] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-03 Thread Vinicius Costa Gomes
supports offloading the traffic shaping work to supporting controllers. Later, when a software implementation is added, the current dependency on being installed "under" mqprio can be lifted. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus

[next-queue PATCH v4 0/4] TSN: Add qdisc based config interface for CBS

2017-10-03 Thread Vinicius Costa Gomes
t select_queue class_ops net/sched: Fix accessing invalid dev_queue Vinicius Costa Gomes (1): net/sched: Introduce Credit Based Shaper (CBS) qdisc drivers/net/ethernet/intel/igb/e1000_defines.h | 23 ++ drivers/net/ethernet/intel/igb/e1000_regs.h| 8 + drivers/net/ethernet/intel/i

[next-queue PATCH v4 2/4] net/sched: Fix accessing invalid dev_queue

2017-10-03 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

Re: [next-queue PATCH v2 3/5] net/sched: Introduce the user API for the CBS shaper

2017-10-03 Thread Vinicius Costa Gomes
Vinicius Costa Gomes <vinicius.go...@intel.com> writes: > Export the API necessary for configuring the CBS shaper (implemented > in the next patch) via the tc tool. > > Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> > --- I forgot to clean old patches

[next-queue PATCH v4 1/4] mqprio: Implement select_queue class_ops

2017-10-03 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

Re: [next-queue PATCH v5 3/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-11 Thread Vinicius Costa Gomes
Jiri Pirko writes: [...] >>+struct tc_cbs_qopt_offload { >>+ u8 enable; >>+ s32 queue; >>+ s32 hicredit; >>+ s32 locredit; >>+ s32 idleslope; >>+ s32 sendslope; > > Please introduce the qdisc in one patch, then offload it in second. That > is what I

Re: [next-queue PATCH v5 4/5] net/sched: Add support for HW offloading for CBS

2017-10-11 Thread Vinicius Costa Gomes
Jiri Pirko writes: [...] >>+static void disable_cbs_offload(struct net_device *dev, >>+ struct cbs_sched_data *q) >>+{ >>+ struct tc_cbs_qopt_offload cbs = { }; >>+ const struct net_device_ops *ops; >>+ int err; >>+ >>+ if

[next-queue PATCH v6 3/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-11 Thread Vinicius Costa Gomes
software implementation is added for now. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> --- include/uapi/linux/pkt_sched.h | 18 +++ net/sched/Kconfig | 11 ++ net/sched/Makefile

[next-queue PATCH v6 2/5] mqprio: Implement select_queue class_ops

2017-10-11 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

[next-queue PATCH v6 0/5] TSN: Add qdisc based config interface for CBS

2017-10-11 Thread Vinicius Costa Gomes
Gomes <vinicius.go...@intel.com> Andre Guedes (1): igb: Add support for CBS offload Jesus Sanchez-Palencia (2): net/sched: Check for null dev_queue on create flow mqprio: Implement select_queue class_ops Vinicius Costa Gomes (2): net/sched: Introduce Credit Based Shaper (CBS) qdisc net/s

[next-queue PATCH v6 5/5] igb: Add support for CBS offload

2017-10-11 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v6 4/5] net/sched: Add support for HW offloading for CBS

2017-10-11 Thread Vinicius Costa Gomes
This adds support for offloading the CBS algorithm to the controller, if supported. Drivers wanting to support CBS offload must implement the .ndo_setup_tc callback and handle the TC_SETUP_CBS (introduced here) type. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- i

[next-queue PATCH v6 1/5] net/sched: Check for null dev_queue on create flow

2017-10-11 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v5 1/5] net/sched: Check for null dev_queue on create flow

2017-10-10 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v5 2/5] mqprio: Implement select_queue class_ops

2017-10-10 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

[next-queue PATCH v5 4/5] net/sched: Add support for HW offloading for CBS

2017-10-10 Thread Vinicius Costa Gomes
This adds support for offloading the CBS algorithm to the controller, if supported. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- net/sched/sch_cbs.c | 92 ++--- 1 file changed, 81 insertions(+), 11 deletions(-) diff

[next-queue PATCH v5 5/5] igb: Add support for CBS offload

2017-10-10 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v5 3/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-10 Thread Vinicius Costa Gomes
software implementation is added for now. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> --- include/linux/netdevice.h | 1 + include/net/pkt_sched.h| 9 ++ include/uapi/linux/pkt_s

[next-queue PATCH v5 0/5] TSN: Add qdisc based config interface for CBS

2017-10-10 Thread Vinicius Costa Gomes
igb: Add support for CBS offload Jesus Sanchez-Palencia (2): net/sched: Check for null dev_queue on create flow mqprio: Implement select_queue class_ops Vinicius Costa Gomes (2): net/sched: Introduce Credit Based Shaper (CBS) qdisc net/sched: Add support for HW offloading for CBS driver

[iproute2 net-next v2 1/3] update headers with CBS API [ONLY FOR TESTING]

2017-10-10 Thread Vinicius Costa Gomes
The headers will be updated when iproute2 fetches the headers from net-next, this patch is only to ease testing. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- include/linux/pkt_sched.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include

[iproute2 net-next v2 3/3] man: Add initial manpage for tc-cbs(8)

2017-10-10 Thread Vinicius Costa Gomes
Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- man/man8/tc-cbs.8 | 112 ++ 1 file changed, 112 insertions(+) create mode 100644 man/man8/tc-cbs.8 diff --git a/man/man8/tc-cbs.8 b/man/man8/tc-cbs.8 new file mode 100644

[iproute2 net-next v2 2/3] tc: Add support for the CBS qdisc

2017-10-10 Thread Vinicius Costa Gomes
idleslope (The order is not important) Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- tc/Makefile | 1 + tc/q_cbs.c | 142 2 files changed, 143 insertions(+) create mode 100644 tc/q_cbs.c diff --gi

Re: [next-queue PATCH v6 3/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-12 Thread Vinicius Costa Gomes
Hi, Eric Dumazet <eric.duma...@gmail.com> writes: > On Wed, 2017-10-11 at 17:54 -0700, Vinicius Costa Gomes wrote: >> This queueing discipline implements the shaper algorithm defined by >> the 802.1Q-2014 Section 8.6.8.2 and detailed in Annex L. > > ... > >>

[next-queue PATCH v7 6/6] igb: Add support for CBS offload

2017-10-12 Thread Vinicius Costa Gomes
From: Andre Guedes This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the

[next-queue PATCH v7 0/6] TSN: Add qdisc based config interface for CBS

2017-10-12 Thread Vinicius Costa Gomes
create flow net/sched: Change behavior of mq select_queue() net/sched: Add select_queue() class_ops for mqprio Vinicius Costa Gomes (2): net/sched: Introduce Credit Based Shaper (CBS) qdisc net/sched: Add support for HW offloading for CBS drivers/net/ethernet/intel/igb/e1000_defines

[next-queue PATCH v7 1/6] net/sched: Check for null dev_queue on create flow

2017-10-12 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc

[next-queue PATCH v7 5/6] net/sched: Add support for HW offloading for CBS

2017-10-12 Thread Vinicius Costa Gomes
This adds support for offloading the CBS algorithm to the controller, if supported. Drivers wanting to support CBS offload must implement the .ndo_setup_tc callback and handle the TC_SETUP_CBS (introduced here) type. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- i

[next-queue PATCH v7 2/6] net/sched: Change behavior of mq select_queue()

2017-10-12 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia Currently, the class_ops select_queue() implementation on sch_mq returns a pointer to netdev_queue #0 when it receives and invalid qdisc id. That can be misleading since all of mq's inner qdiscs are attached to a valid netdev_queue.

[next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-12 Thread Vinicius Costa Gomes
software implementation is added for now. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palen...@intel.com> --- include/uapi/linux/pkt_sched.h | 18 +++ net/sched/Kconfig | 11 ++ net/sched/Makefile

[next-queue PATCH v7 3/6] net/sched: Add select_queue() class_ops for mqprio

2017-10-12 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel

[next-queue PATCH] net/sched/sch_cbs: Fix compilation on 32bit architectures

2017-10-18 Thread Vinicius Costa Gomes
There was still a couple of divisions of 64bit quantities happening, which can fail to compile if there aren't instructions to handle that kind of division. It will fail with a message like this: ERROR: "__aeabi_ldivmod" [net/sched/sch_cbs.ko] undefined! Signed-off-by: Vinicius C

Re: [patch net-next 3/9] net_sch: cbs: Change TC_SETUP_CBS to TC_SETUP_QDISC_CBS

2017-11-07 Thread Vinicius Costa Gomes
anox.com> > --- > drivers/net/ethernet/intel/igb/igb_main.c | 2 +- > include/linux/netdevice.h | 2 +- > net/sched/sch_cbs.c | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > Acked-by: Vinicius Costa Gomes <vinicius.go...@intel.com> Cheers, -- Vinicius

Re: [PATCH RFC V1 net-next 0/6] Time based packet transmission

2017-12-05 Thread Vinicius Costa Gomes
Hi David, David Miller writes: > From: Richard Cochran > Date: Mon, 18 Sep 2017 09:41:15 +0200 > >> - The driver does not handle out of order packets. If user space >> sends a packet with an earlier Tx time, then the code should stop >>

Re: [Intel-wired-lan] [RFC v2 net-next 01/10] net: Add a new socket option for a future transmit time.

2018-01-24 Thread Vinicius Costa Gomes
Hi Richard, Richard Cochran <richardcoch...@gmail.com> writes: > On Tue, Jan 23, 2018 at 01:22:37PM -0800, Vinicius Costa Gomes wrote: >> What I think would be the ideal scenario would be if the clockid >> parameter to the TBS Qdisc would not be necessary (if offload was &g

[next-queue PATCH 1/8] igb: Fix not adding filter elements to the list

2018-02-23 Thread Vinicius Costa Gomes
on") Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 606e676

[next-queue PATCH 4/8] igb: Add support for MAC address filters specifying source addresses

2018-02-23 Thread Vinicius Costa Gomes
Makes it possible to direct packets to queues based on their source address. Documents the expected usage of the 'flags' parameter. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- drivers/net/ethernet/intel/igb/e1000_defines.h | 1 + drivers/net/ethernet/intel/igb

[next-queue PATCH 5/8] igb: Add support for ethtool MAC address filters

2018-02-23 Thread Vinicius Costa Gomes
(this will direct packets with destination address "aa:aa:aa:aa:aa:aa" to the RX queue 0) $ ethtool -N eth0 flow-type ether src 44:44:44:44:44:44 action 3 (this will direct packets with destination address "44:44:44:44:44:44" to the RX queue 3) Signed-off-by: Vinicius Cost

[next-queue PATCH 7/8] igb: Add support for adding offloaded clsflower filters

2018-02-23 Thread Vinicius Costa Gomes
via tc-flower. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- drivers/net/ethernet/intel/igb/igb.h | 5 + drivers/net/ethernet/intel/igb/igb_ethtool.c | 13 ++- drivers/net/ethernet/intel/igb/igb_main.c| 140 ++- 3 files change

[next-queue PATCH 3/8] igb: Enable the hardware traffic class feature bit for igb models

2018-02-23 Thread Vinicius Costa Gomes
This will allow functionality depending on the hardware being traffic class aware to work. In particular the tc-flower offloading checks verifies that this bit is set. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- drivers/net/ethernet/intel/igb/igb_main.c | 6 --

[next-queue PATCH 2/8] igb: Fix queue selection on MAC filters on i210 and i211

2018-02-23 Thread Vinicius Costa Gomes
e previous behaviour was having no effect for i210 and i211 based controllers because the QSEL bit of the RAH register wasn't being set. This patch separates the condition in discrete cases, so the different handling is clearer. Fixes: 83c21335c876 ("igb: improve MAC filter handling") Signe

[next-queue PATCH 0/8] igb: offloading of receive filters

2018-02-23 Thread Vinicius Costa Gomes
now. Open question: - igb is initialized with the number of traffic classes as 1, if we want to use multiple traffic classes we need to increase this value, the only way I could find is to use mqprio (for example). Should igb be initialized with, say, the number of queues as its "num_tc&quo

[next-queue PATCH 8/8] igb: Add support for removing offloaded tc-flower filters

2018-02-23 Thread Vinicius Costa Gomes
This allows tc-flower filters that were offloaded to be removed. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- drivers/net/ethernet/intel/igb/igb_main.c | 32 ++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/net/et

[next-queue PATCH 6/8] igb: Add the skeletons for tc-flower offloading

2018-02-23 Thread Vinicius Costa Gomes
This adds basic functions needed to implement offloading for filters created by tc-flower. Signed-off-by: Vinicius Costa Gomes <vinicius.go...@intel.com> --- drivers/net/ethernet/intel/igb/igb_main.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/drive

Re: [next-queue PATCH 5/8] igb: Add support for ethtool MAC address filters

2018-02-26 Thread Vinicius Costa Gomes
Hi, Florian Fainelli <f.faine...@gmail.com> writes: > On February 23, 2018 5:20:33 PM PST, Vinicius Costa Gomes > <vinicius.go...@intel.com> wrote: >>This adds the capability of configuring the queue steering of arriving >>packets based on their source

  1   2   3   >