Re: [PATCH net-next 12/13] net/core: Add reading VF statistics through the PF netdevice

2015-06-10 Thread John Fastabend
(skb, IFLA_VF_STATS, sizeof(vf_stats), + vf_stats)) goto nla_put_failure; nla_nest_end(skb, vf); } -- John Fastabend Intel Corporation -- To unsubscribe from this list: send the line

Re: [PATCH net v2] switchdev: don't abort hardware ipv4 fib offload on failure to program fib entry in hardware

2015-05-30 Thread John Fastabend
that does this so we don't end up with a bunch of policy blobs in the kernel. The 6 above is a good start but over time we more policy blobs will surely pop up. I would for example put 'optimize for throughput' on the list. .John -- John Fastabend Intel Corporation -- To unsubscribe from

Re: [net-next 01/14] ethtool: Add helper routines to pass vf to rx_flow_spec

2015-05-28 Thread John Fastabend
On 05/28/2015 06:18 AM, Or Gerlitz wrote: On Thu, May 28, 2015 at 2:25 PM, Jeff Kirsher jeffrey.t.kirs...@intel.com wrote: From: John Fastabend john.r.fastab...@intel.com The ring_cookie is 64 bits wide which is much larger than can be used for actual queue index values. So provide some helper

Re: Drops in qdisc on ifb interface

2015-05-28 Thread John Fastabend
but sorry haven't had time yet to test it out myself. .John -- John Fastabend Intel Corporation -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net v2] switchdev: don't abort hardware ipv4 fib offload on failure to program fib entry in hardware

2015-05-28 Thread John Fastabend
the operation or it is out of resources. Both can be learned if the hardware exports a model of its capabilities and resources. Thanks, John -- John Fastabend Intel Corporation -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord

Re: [PATCH net v2] switchdev: don't abort hardware ipv4 fib offload on failure to program fib entry in hardware

2015-05-28 Thread John Fastabend
! Jiri -- John Fastabend Intel Corporation -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next 6/6] net_sched: act: remove spinlock in fast path

2015-07-03 Thread John Fastabend
On 15-07-03 05:08 AM, Eric Dumazet wrote: On Fri, 2015-07-03 at 07:25 -0400, Jamal Hadi Salim wrote: On 07/02/15 16:59, Eric Dumazet wrote: On Thu, 2015-07-02 at 09:35 -0700, John Fastabend wrote: Point is to not dirty cache line for every packet ? Doing the test means we attempt dirtying

Re: [PATCH net-next 2/6] net: sched: add percpu stats to actions

2015-07-02 Thread John Fastabend
: Alexei Starovoitov a...@plumgrid.com Cc: Jamal Hadi Salim j...@mojatatu.com Cc: John Fastabend john.fastab...@gmail.com --- include/net/act_api.h| 4 +++- net/sched/act_api.c | 44 ++-- net/sched/act_bpf.c | 2 +- net/sched

Re: [PATCH net-next 3/6] net_sched: act: make tcfg_pval non zero

2015-07-02 Thread John Fastabend
: Jamal Hadi Salim j...@mojatatu.com Cc: John Fastabend john.fastab...@gmail.com --- net/sched/act_gact.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index a4f8af29ee30..42284aad77dd 100644 --- a/net/sched/act_gact.c

Re: [PATCH net-next 4/6] net_sched: act: use a separate packet counters for gact_determ()

2015-07-02 Thread John Fastabend
-off-by: Eric Dumazet eduma...@google.com Cc: Alexei Starovoitov a...@plumgrid.com Cc: Jamal Hadi Salim j...@mojatatu.com Cc: John Fastabend john.fastab...@gmail.com --- Acked-by: John Fastabend john.r.fastab...@intel.com -- To unsubscribe from this list: send the line unsubscribe netdev

Re: [PATCH net-next 1/6] net: sched: extend percpu stats helpers

2015-07-02 Thread John Fastabend
() qdisc_qstats_drop_cpu() is renamed to qdisc_qstats_cpu_drop() Signed-off-by: Eric Dumazet eduma...@google.com Cc: Alexei Starovoitov a...@plumgrid.com Cc: Jamal Hadi Salim j...@mojatatu.com Cc: John Fastabend john.fastab...@gmail.com --- Acked-by: John Fastabend john.r.fastab...@intel.com stupid nit

Re: [PATCH net-next 5/6] net_sched: act: read tcfg_ptype once

2015-07-02 Thread John Fastabend
...@mojatatu.com Cc: John Fastabend john.fastab...@gmail.com --- net/sched/act_gact.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index e968290e8378..7c7e72e95943 100644 --- a/net/sched/act_gact.c +++ b/net/sched

Re: [PATCH net-next 6/6] net_sched: act: remove spinlock in fast path

2015-07-02 Thread John Fastabend
a...@plumgrid.com Cc: Jamal Hadi Salim j...@mojatatu.com Cc: John Fastabend john.fastab...@gmail.com --- net/sched/act_gact.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) [...] @@ -121,9 +121,8 @@ static int tcf_gact(struct sk_buff *skb, const struct tc_action

Re: [PATCH net-next] rocker: forward packets to CPU when port is joined to openvswitch

2015-07-16 Thread John Fastabend
On 15-07-16 01:14 AM, Jiri Pirko wrote: Thu, Jul 16, 2015 at 09:09:39AM CEST, sfel...@gmail.com wrote: On Wed, Jul 15, 2015 at 11:58 PM, Jiri Pirko j...@resnulli.us wrote: Thu, Jul 16, 2015 at 08:40:31AM CEST, sfel...@gmail.com wrote: On Wed, Jul 15, 2015 at 6:39 PM, Simon Horman

Re: [PATCH net-next] tc: fix tc actions in case of shared skb

2015-07-14 Thread John Fastabend
On 15-07-14 04:08 PM, Alexei Starovoitov wrote: On 7/14/15 3:34 PM, David Miller wrote: 1 get rid of burst hack for both RX and TX in pktgen (kills performance) #1 is a serious consideration if you don't come up with better ideas, since an optimization is for nothing if it knowingly breaks

Re: [PATCH net 0/3] Couple of classifier fixes

2015-07-17 Thread John Fastabend
On 15-07-17 01:41 PM, Daniel Borkmann wrote: On 07/17/2015 10:38 PM, Daniel Borkmann wrote: This fixes a couple of panics in the form of (analogous for cls_flow{,er}): [ Also putting John into Cc for these fixes as it has to do with all the RCU conversion, sorry just realized that after

Re: [PATCH net 1/3] sched: cls_bpf: fix panic on filter replace

2015-07-17 Thread John Fastabend
cls_bpf) Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- Thanks Daniel. Apparently I got this right in cls_basic but botched it here and in cls_flow. FWIW, Acked-by: John Fastabend john.r.fastab...@intel.com net/sched/cls_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] bonding: Offloading bonds to hardware

2015-11-14 Thread John Fastabend
On 15-11-14 01:39 AM, Jiri Pirko wrote: > Thu, Nov 12, 2015 at 05:02:18PM CET, pjonn...@broadcom.com wrote: >> Packet forwarding to/from bond interfaces is done in software. >> >> This patch enables certain platforms to bridge traffic to/from >> bond interfaces in hardware. Notifications are sent

Re: Hardware capabilities and bonding offload

2015-11-16 Thread John Fastabend
On 15-11-16 07:30 AM, Jiri Pirko wrote: > Mon, Nov 16, 2015 at 10:29:12AM CET, pjonn...@broadcom.com wrote: >> Hello, >> >> I am looking to offload bond interfaces to hardware for forwarding. Linux >> allows for configuring >> a variety of parameters on bonds or slave interfaces. Not all >>

Re: [PATCH] bonding: Offloading bonds to hardware

2015-11-16 Thread John Fastabend
On 15-11-15 01:01 AM, Jiri Pirko wrote: > Sun, Nov 15, 2015 at 06:51:28AM CET, john.fastab...@gmail.com wrote: >> On 15-11-14 01:39 AM, Jiri Pirko wrote: >>> Thu, Nov 12, 2015 at 05:02:18PM CET, pjonn...@broadcom.com wrote: Packet forwarding to/from bond interfaces is done in software.

Re: AF_PACKET mmap() v4...

2015-11-07 Thread John Fastabend
On 15-11-07 06:19 PM, Alexei Starovoitov wrote: > On Thu, Nov 05, 2015 at 10:39:15AM +0100, Daniel Borkmann wrote: >> On 11/05/2015 10:07 AM, Arnd Bergmann wrote: >>> On Thursday 05 November 2015 00:04:14 David Miller wrote: As part of fixing y2038 problems, Arnd is going to have to make a

Re: [patch net-next v5 3/8] switchdev: allow caller to explicitly request attr_set as deferred

2015-10-15 Thread John Fastabend
On 15-10-14 10:40 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Caller should know if he can call attr_set directly (when holding RTNL) > or if he has to defer the att_set processing for later. > > This also allows drivers to sleep inside attr_set and report operation > status

Re: [patch net-next v5 3/8] switchdev: allow caller to explicitly request attr_set as deferred

2015-10-16 Thread John Fastabend
On 15-10-16 01:23 AM, Jiri Pirko wrote: > Thu, Oct 15, 2015 at 05:21:22PM CEST, john.fastab...@gmail.com wrote: >> On 15-10-14 10:40 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Caller should know if he can call attr_set directly (when holding RTNL) >>> or if he has to

Re: HW communication debugging interface - ideas?

2015-10-06 Thread John Fastabend
On 15-10-06 01:14 AM, Jiri Pirko wrote: > Mon, Oct 05, 2015 at 05:47:09PM CEST, john.fastab...@gmail.com wrote: >> On 15-10-05 08:35 AM, Jiri Pirko wrote: >>> Mon, Oct 05, 2015 at 05:29:09PM CEST, john.fastab...@gmail.com wrote: On 15-10-05 08:18 AM, Jiri Pirko wrote: > Mon, Oct 05, 2015

Re: [patch net-next 09/14] rocker: add rtnl ops for port mode [gs]etting

2015-10-05 Thread John Fastabend
On 15-10-05 10:24 AM, Jiri Pirko wrote: > Mon, Oct 05, 2015 at 07:07:30PM CEST, john.fastab...@gmail.com wrote: > > > >>> >>> Again, to make this clear, worlds are not just a rehash of tables. >>> >> >> what are they then? Lets model those bits and let users configure them >> at runtime. >> >>

Re: [patch net-next 00/14] rocker: add support for multiple worlds

2015-10-05 Thread John Fastabend
[...] >> I think your underestimating the flexibility of hardware. And >> completely missing the hardware that is based on FPGAs and/or cell >> architectures. This hardware is available today and could support >> topology changes like this. But even less exotic hardware can/will >> support parser

Re: [patch net-next v3 06/14] rocker: introduce worlds infrastructure

2015-10-07 Thread John Fastabend
On 15-10-06 11:14 PM, Jiri Pirko wrote: > Wed, Oct 07, 2015 at 03:50:08AM CEST, sfel...@gmail.com wrote: > > > >> >>> Also I wonder how this works when a pkt ingresses a port in mode A and >>> egresses a port in mode B? What fib/fdb tables does it cross when this >>> happens? It seems easier to

Re: [patch net-next 00/14] rocker: add support for multiple worlds

2015-10-06 Thread John Fastabend
[...] >> >> Its related in that if you expose your device model you do not need >> opaque strings to do wholesale reconfiguration of the device. Instead >> if the parts of the device that are configurable are exposed to the >> user they can build the "world" they want. > > The disconnect here, I

Re: [patch net-next v3 06/14] rocker: introduce worlds infrastructure

2015-10-06 Thread John Fastabend
[...] >>> >>> Using void * in these ops is unacceptable, I can't agree to this patch. >>> >>> There is a much cleaner way to architect this. If you look at the ops >>> defined, they're mostly duplicates of the already defined >>> switchdev_ops. It would be much cleaner to: >>> >>> 0) set port

Re: [patch net-next v4 3/7] switchdev: remove pointers from switchdev objects

2015-10-12 Thread John Fastabend
es because the memory they point at may be already >> used by someone else. So rather do local copy of the value. >> >> Signed-off-by: Jiri Pirko <j...@mellanox.com> > > Acked-by: Scott Feldman <sfel...@gmail.com> > also fwiw Reviewed-by: John Fastaben

Re: [patch net-next v4 2/7] switchdev: allow caller to explicitly request attr_set as deferred

2015-10-13 Thread John Fastabend
On 15-10-12 10:44 PM, Jiri Pirko wrote: > Tue, Oct 13, 2015 at 04:52:42AM CEST, sfel...@gmail.com wrote: >> On Mon, Oct 12, 2015 at 11:03 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Caller should know if he can call attr_set directly (when holding

Re: [patch net-next v4 5/7] bridge: defer switchdev fdb del call in fdb_del_external_learn

2015-10-12 Thread John Fastabend
On 15-10-12 08:28 PM, Scott Feldman wrote: > On Mon, Oct 12, 2015 at 11:03 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Since spinlock is held here, defer the switchdev operation. >> >> Signed-off-by: Jiri Pirko >> --- >>

Re: [patch net-next v4 2/7] switchdev: allow caller to explicitly request attr_set as deferred

2015-10-12 Thread John Fastabend
On 15-10-12 07:52 PM, Scott Feldman wrote: > On Mon, Oct 12, 2015 at 11:03 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Caller should know if he can call attr_set directly (when holding RTNL) >> or if he has to defer the att_set processing for later. >> >>

Re: [patch net-next v4 5/7] bridge: defer switchdev fdb del call in fdb_del_external_learn

2015-10-12 Thread John Fastabend
On 15-10-12 09:19 PM, Scott Feldman wrote: > On Mon, Oct 12, 2015 at 8:31 PM, John Fastabend > <john.fastab...@gmail.com> wrote: >> On 15-10-12 08:28 PM, Scott Feldman wrote: >>> On Mon, Oct 12, 2015 at 11:03 AM, Jiri Pirko <j...@resnulli.us> wrote: >>

Re: [patch net-next v4 2/7] switchdev: allow caller to explicitly request attr_set as deferred

2015-10-12 Thread John Fastabend
On 15-10-12 10:45 PM, Jiri Pirko wrote: > Tue, Oct 13, 2015 at 06:40:25AM CEST, john.fastab...@gmail.com wrote: >> On 15-10-12 07:52 PM, Scott Feldman wrote: >>> On Mon, Oct 12, 2015 at 11:03 AM, Jiri Pirko wrote: From: Jiri Pirko Caller should

Re: [PATCH/RFC net-next] rocker: forward packets to CPU when a port in promiscuous mode

2015-07-08 Thread John Fastabend
On 15-07-08 09:25 PM, Simon Horman wrote: This change allows the CPU to see all packets seen by a port when the netdev associated with the port is in promiscuous mode. This change was previously posted as part of a larger patch and in turn patchset which also aimed to allow rocker interfaces

Re: Hardware capabilities and bonding offload

2015-11-17 Thread John Fastabend
On 15-11-17 02:03 PM, Simon Horman wrote: > On Mon, Nov 16, 2015 at 08:10:27AM -0800, John Fastabend wrote: >> On 15-11-16 07:30 AM, Jiri Pirko wrote: >>> Mon, Nov 16, 2015 at 10:29:12AM CET, pjonn...@broadcom.com wrote: >>>> Hello, >>>> >>>&g

Re: [RFC PATCH net-next 0/2] Add new switchdev device class

2015-08-27 Thread John Fastabend
On 15-08-27 12:16 AM, sfel...@gmail.com wrote: From: Scott Feldman sfel...@gmail.com In the switchdev model, we use netdevs to represent switchdev ports, but we have no representation for the switch itself. So, introduce a new switchdev device class so we can define semantics and

Re: [RFC PATCH net-next 0/2] Add new switchdev device class

2015-08-27 Thread John Fastabend
On 15-08-27 12:27 AM, Jiri Pirko wrote: Thu, Aug 27, 2015 at 09:16:44AM CEST, sfel...@gmail.com wrote: From: Scott Feldman sfel...@gmail.com In the switchdev model, we use netdevs to represent switchdev ports, but we have no representation for the switch itself. So, introduce a new switchdev

Re: [RFC PATCH net-next 0/2] Add new switchdev device class

2015-08-27 Thread John Fastabend
On 15-08-27 12:51 AM, Jiri Pirko wrote: Thu, Aug 27, 2015 at 09:43:54AM CEST, john.fastab...@gmail.com wrote: On 15-08-27 12:27 AM, Jiri Pirko wrote: Thu, Aug 27, 2015 at 09:16:44AM CEST, sfel...@gmail.com wrote: From: Scott Feldman sfel...@gmail.com In the switchdev model, we use netdevs to

Re: [RFC PATCH net-next 0/2] Add new switchdev device class

2015-08-27 Thread John Fastabend
[...] The structure I used previously which looks like your prototype I think, (https://github.com/jrfastab/rocker-net-next/blob/master/include/uapi/linux/if_flow.h) * [NFL_TABLE_IDENTIFIER_TYPE] * [NFL_TABLE_IDENTIFIER] * [NFL_TABLE_TABLES] * [NFL_TABLE] * [NFL_TABLE_ATTR_NAME]

Re: [PATCH net-next 2/2] bpf: add bpf_redirect() helper

2015-09-15 Thread John Fastabend
On 15-09-15 06:51 PM, Alexei Starovoitov wrote: > Existing bpf_clone_redirect() helper clones skb before redirecting > it to RX or TX of destination netdev. > Introduce bpf_redirect() helper that does that without cloning. > > Benchmarked with two hosts using 10G ixgbe NICs. > One host is doing

Re: [PATCH net-next 2/2] bpf: add bpf_redirect() helper

2015-09-15 Thread John Fastabend
On 15-09-15 09:11 PM, Alexei Starovoitov wrote: > On 9/15/15 8:10 PM, John Fastabend wrote: >> Nice, I like this. But just to be sure I read this correctly this will >> only work on the ingress qdisc for now right? To get the tx side working >> will require a bit mo

Re: [PATCH v2 net-next 2/2] bpf: add bpf_redirect() helper

2015-09-16 Thread John Fastabend
++ > net/sched/act_bpf.c |1 + > net/sched/cls_bpf.c |1 + > samples/bpf/bpf_helpers.h |4 > samples/bpf/tcbpf1_kern.c| 24 ++- > 9 files changed, 91 insertions(+), 1 deletion(-) > Acked-by: John Fastabend <john

Re: [PATCH] net-sysfs: get_netdev_queue_index() cleanup

2015-09-11 Thread John Fastabend
b2ebfff8e9b3d006086c527738a7ca00cd0 > Cc: Or Gerlitz <ogerl...@mellanox.com> > Cc: John Fastabend <john.r.fastab...@intel.com> > Cc: Eric Dumazet <eduma...@google.com> > --- > > Not sure what is the best way to credit Eric Dumazet here. I assume he w

Re: [patch net-next v3 06/14] rocker: introduce worlds infrastructure

2015-10-06 Thread John Fastabend
On 15-10-06 09:06 AM, Scott Feldman wrote: > On Tue, Oct 6, 2015 at 12:51 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This is another step on the way to per-world clean cut. Introduce world >> ops hooks which each world can implement in world-specific

Re: [patch net-next 00/14] rocker: add support for multiple worlds

2015-10-05 Thread John Fastabend
On 15-10-05 09:30 AM, Jiri Pirko wrote: > Mon, Oct 05, 2015 at 05:41:38PM CEST, john.fastab...@gmail.com wrote: >> On 15-10-04 02:25 PM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> This patchset allows new rocker worlds to be easily added in future (like >>> eBPF >>> based

Re: [patch net-next 09/14] rocker: add rtnl ops for port mode [gs]etting

2015-10-05 Thread John Fastabend
[...] >>> Does this mean there is going to be a "ip link set dev DEV type rocker >>> mode MODE" command option? >>> >>> It doesn't seem right to be adding driver-specific IFLA_'s here. I >>> think this sets bad precedence for other drivers to add their own >>> knobs without thinking about a

Re: [patch net-next 00/14] rocker: add support for multiple worlds

2015-10-05 Thread John Fastabend
On 15-10-04 02:25 PM, Jiri Pirko wrote: > From: Jiri Pirko > > This patchset allows new rocker worlds to be easily added in future (like eBPF > based one I have been working on). The main part of the patchset is the OF-DPA > carve-out. It resuts in OF-DPA specific file. Clean

Re: HW communication debugging interface - ideas?

2015-10-05 Thread John Fastabend
On 15-10-05 08:35 AM, Jiri Pirko wrote: > Mon, Oct 05, 2015 at 05:29:09PM CEST, john.fastab...@gmail.com wrote: >> On 15-10-05 08:18 AM, Jiri Pirko wrote: >>> Mon, Oct 05, 2015 at 04:58:42PM CEST, and...@lunn.ch wrote: On Mon, Oct 05, 2015 at 04:55:42PM +0200, Jiri Pirko wrote: > Mon, Oct

Re: [patch net-next 09/14] rocker: add rtnl ops for port mode [gs]etting

2015-10-05 Thread John Fastabend
On 15-10-05 08:41 AM, Scott Feldman wrote: > On Sun, Oct 4, 2015 at 2:25 PM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Introduce a stub for allowing user to change rocker port world/mode. >> This is implemented using rtnl changelink op. >> >> Signed-off-by:

Re: HW communication debugging interface - ideas?

2015-10-05 Thread John Fastabend
On 15-10-05 08:18 AM, Jiri Pirko wrote: > Mon, Oct 05, 2015 at 04:58:42PM CEST, and...@lunn.ch wrote: >> On Mon, Oct 05, 2015 at 04:55:42PM +0200, Jiri Pirko wrote: >>> Mon, Oct 05, 2015 at 04:49:41PM CEST, and...@lunn.ch wrote: >> Are you referring here to messages of the EMAD protocol ?

Re: [PATCH v1 1/6] net: Generalize udp based tunnel offload

2015-12-07 Thread John Fastabend
On 15-12-02 04:15 PM, Tom Herbert wrote: > On Wed, Dec 2, 2015 at 3:35 PM, John Fastabend <john.fastab...@gmail.com> > wrote: >> [...] >> >>>> >>>> I wonder why we need protocol generic offloads? I know there are >>>> currently a

Re: [PATCH v1 1/6] net: Generalize udp based tunnel offload

2015-12-04 Thread John Fastabend
[...] Please provide a sketch up for a protocol generic api that can tell hardware where a inner protocol header starts that supports vxlan, vxlan-gpe, geneve and ipv6 extension headers and knows which protocol is starting at that point. >>> BPF. Implementing protocol

Re: [patch net-next v2 01/28] net: dev: Check CHANGEUPPER notifier return value

2015-12-02 Thread John Fastabend
On 15-12-02 12:07 PM, Jiri Pirko wrote: > From: Ido Schimmel > > switchdev drivers reflect the newly requested topology to hardware when > CHANGEUPPER is received, after software links were already formed. > However, the operation can fail and user will not be notified, as

Re: [PATCH v1 1/6] net: Generalize udp based tunnel offload

2015-12-02 Thread John Fastabend
[...] >> >> I wonder why we need protocol generic offloads? I know there are >> currently a lot of overlay encapsulation protocols. Are there many more >> coming? >> > Yes, and assume that there are more coming with an unbounded limit > (for instance I just noticed today that there is a netdev1.1

[PATCH] net: sched: fix missing free per cpu on qstats

2016-01-05 Thread John Fastabend
When a qdisc is using per cpu stats (currently just the ingress qdisc) only the bstats are being freed. This also free's the qstats. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- net/sched/sch_generic.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[RFC PATCH 06/12] net: sched: support qdisc_reset on NOLOCK qdisc

2015-12-30 Thread John Fastabend
not get another call to activate the qdisc while the skb lists are being free'd. Finally, fix qdisc_reset to handle the per cpu stats and skb lists. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- net/sched/sch_generic.c | 42

[RFC PATCH 07/12] net: sched: qdisc_qlen for per cpu logic

2015-12-30 Thread John Fastabend
bit need to have some sort of per cpu enqueue/dequeue data structure that maps to the per cpu qlen value. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/sch_generic.h |8 1 file changed, 8 insertions(+) diff --git a/include/net/sch_generic.h b/in

[RFC PATCH 05/12] net: sched: per cpu gso handlers

2015-12-30 Thread John Fastabend
be resolved. Note at this point the skb has already been popped off the qdisc so it has to be handled by the infrastructure. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/sch_generic.h | 36 net/sched/sch_generic.c

[RFC PATCH 04/12] net: sched: provide per cpu qstat helpers

2015-12-30 Thread John Fastabend
The per cpu qstats support was added with per cpu bstat support which is currently used by the ingress qdisc. This patch adds a set of helpers needed to make other qdiscs that use qstats per cpu as well. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/sch_gen

[RFC PATCH 08/12] net: sched: a dflt qdisc may be used with per cpu stats

2015-12-30 Thread John Fastabend
Enable dflt qdisc support for per cpu stats before this patch a dflt qdisc was required to use the global statistics qstats and bstats. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- net/sched/sch_generic.c | 24 1 file changed, 20 insertions

[RFC PATCH 03/12] net: sched: allow qdiscs to handle locking

2015-12-30 Thread John Fastabend
. For now use a conditional if statement. Later we could be more aggressive if it proves worthwhile and use a static key or wrap this in a likely(). Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/sch_generic.h |1 + net/core/dev.c

[RFC PATCH 02/12] net: sched: free per cpu bstats

2015-12-30 Thread John Fastabend
When a qdisc is using per cpu stats only the bstats are being freed. This also free's the qstats. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- net/sched/sch_generic.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/sched/sch_generic.c b/net

Re: [RFC PATCH 12/12] net: sched: pfifo_fast new option to deque multiple pkts

2015-12-30 Thread John Fastabend
On 15-12-30 09:55 AM, John Fastabend wrote: > Now that pfifo_fast is using the alf_queue data structures we can > dequeue multiple skbs and save some overhead. > > This works because the bulk dequeue logic accepts skb lists already. > > Signed-off-by: John Fastabend <john.

[RFC PATCH 00/12] drop the qdisc lock for pfifo_fast/mq

2015-12-30 Thread John Fastabend
bit tricky so I dropped it for now. --- John Fastabend (12): lib: array based lock free queue net: sched: free per cpu bstats net: sched: allow qdiscs to handle locking net: sched: provide per cpu qstat helpers net: sched: per cpu gso handlers net: sche

[RFC PATCH 01/12] lib: array based lock free queue

2015-12-30 Thread John Fastabend
can be furthered optimized and improved but it is a good base implementation. Signed-off-by: Jesper Dangaard Brouer <bro...@redhat.com> Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/linux/alf_queue.h | 368 +

[RFC PATCH 10/12] net: sched: helper to sum qlen

2015-12-30 Thread John Fastabend
Reporting qlen when qlen is per cpu requires aggregating the per cpu counters. This adds a helper routine for this. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/sch_generic.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/inclu

[RFC PATCH 09/12] net: sched: pfifo_fast use alf_queue

2015-12-30 Thread John Fastabend
clever but seems to work for now. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- net/sched/sch_generic.c | 120 +-- 1 file changed, 65 insertions(+), 55 deletions(-) diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c

[RFC PATCH 11/12] net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mq

2015-12-30 Thread John Fastabend
To handle this case add a check when calculating stats and aggregate the per cpu stats if needed. Also exports __gnet_stats_copy_queue() to use as a helper function. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/gen_stats.h |3 +++ net/core/gen_stats.c|

[RFC PATCH 12/12] net: sched: pfifo_fast new option to deque multiple pkts

2015-12-30 Thread John Fastabend
Now that pfifo_fast is using the alf_queue data structures we can dequeue multiple skbs and save some overhead. This works because the bulk dequeue logic accepts skb lists already. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/sch_generic.h |2 +- net

Re: [RFC PATCH 05/12] net: sched: per cpu gso handlers

2015-12-30 Thread John Fastabend
On 15-12-30 12:26 PM, Jesper Dangaard Brouer wrote: > On Wed, 30 Dec 2015 09:52:49 -0800 > John Fastabend <john.fastab...@gmail.com> wrote: > >> The net sched infrastructure has a gso ptr that points to skb structs >> that have failed to be enqueued by the device driver

Re: [RFC PATCH 02/12] net: sched: free per cpu bstats

2016-01-04 Thread John Fastabend
On 16-01-04 09:32 AM, Eric Dumazet wrote: > On Mon, 2016-01-04 at 16:21 +0100, Daniel Borkmann wrote: >> On 12/30/2015 06:51 PM, John Fastabend wrote: >>> When a qdisc is using per cpu stats only the bstats are being >>> freed. This also free's the qstats. >>&g

Re: [RFC PATCH 06/12] net: sched: support qdisc_reset on NOLOCK qdisc

2016-01-03 Thread John Fastabend
On 15-12-31 06:30 PM, Alexei Starovoitov wrote: > On Wed, Dec 30, 2015 at 09:53:13AM -0800, John Fastabend wrote: >> The qdisc_reset operation depends on the qdisc lock at the moment >> to halt any additions to gso_skb and statistics while the list is >> free'd and the stats

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-23 Thread John Fastabend
On 15-11-23 11:12 AM, Hannes Frederic Sowa wrote: > On Mon, Nov 23, 2015, at 20:09, John Fastabend wrote: >> On 15-11-23 10:03 AM, Alexei Starovoitov wrote: >>> On Mon, Nov 23, 2015 at 05:11:58PM +0100, Hannes Frederic Sowa wrote: >>>> >>>> Actually,

Re: [PATCH net-next] bpf: add show_fdinfo handler for maps

2015-11-23 Thread John Fastabend
On 15-11-23 10:03 AM, Alexei Starovoitov wrote: > On Mon, Nov 23, 2015 at 05:11:58PM +0100, Hannes Frederic Sowa wrote: >> >> Actually, that is the reason why I mentioned it, so *the admin* can see >> something is going on. Do you want to protect ebpf from root? Skynet? ;) > > correct. To me both

Re: [PATCH net] net: sched: fix tc_should_offload for specific clsact classes

2016-06-07 Thread John Fastabend
> Fixes: a1b7c5fd7fe9 ("net: sched: add cls_u32 offload hooks for netdevs") > Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> > --- Looks good to me. Thanks! Acked-by: John Fastabend <john.r.fastab...@intel.com>

Re: [PATCH net-next] net/sched: cls_flower: Introduce support in SKIP SW flag

2016-06-07 Thread John Fastabend
Looks good to me. Although we need to do the same error propagation in flower that Jakub just added to cls_u32. Acked-by: John Fastabend <john.r.fastab...@intel.com>

Re: [PATCHv2 net 2/2] net: cls_u32: be more strict about skip-sw flag

2016-06-07 Thread John Fastabend
On 16-06-07 03:46 AM, Jakub Kicinski wrote: > Return an error if user requested skip-sw and the underlaying > hardware cannot handle tc offloads (or offloads are disabled). > > Signed-off-by: Jakub Kicinski > Reviewed-by: Dinan Gunawardena

Re: [PATCHv2 net 1/2] net: cls_u32: fix error code for invalid flags

2016-06-07 Thread John Fastabend
); > if (!tc_flags_valid(flags)) > - return err; > + return -EINVAL; > } > > n = (struct tc_u_knode *)*arg; > Acking the v2 now -- seems nice to throw an error in this case. Acked-by: John Fastabend <john.r.fastab...@intel.com>

Re: [PATCH net 1/2] net: cls_u32: fix error code for invalid flags

2016-06-07 Thread John Fastabend
if (tb[TCA_U32_FLAGS]) { > flags = nla_get_u32(tb[TCA_U32_FLAGS]); > if (!tc_flags_valid(flags)) > - return err; > + return -EINVAL; > } > > n = (struct tc_u_knode *)*arg; > Yep, I agree it is

Re: [PATCH net] fq_codel: return non zero qlen in class dumps

2016-06-07 Thread John Fastabend
: 640158536632 ("net: sched: restrict use of qstats qlen") > Signed-off-by: Eric Dumazet <eduma...@google.com> > Cc: John Fastabend <john.r.fastab...@intel.com> > --- > net/sched/sch_fq_codel.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [very-RFC 0/8] TSN driver for the kernel

2016-06-13 Thread John Fastabend
On 16-06-13 04:47 AM, Richard Cochran wrote: > Henrik, > > On Sun, Jun 12, 2016 at 01:01:28AM +0200, Henrik Austad wrote: >> There are at least one AVB-driver (the AV-part of TSN) in the kernel >> already, > > Which driver is that? > >> however this driver aims to solve a wider scope as TSN can

Re: [RFC 05/12] nfp: add BPF to NFP code translator

2016-06-02 Thread John Fastabend
On 16-06-01 01:15 PM, Alexei Starovoitov wrote: > On Wed, Jun 01, 2016 at 10:03:04PM +0200, Daniel Borkmann wrote: >> On 06/01/2016 06:50 PM, Jakub Kicinski wrote: >>> Add translator for JITing eBPF to operations which >>> can be executed on NFP's programmable engines. >>> >>> Signed-off-by: Jakub

Re: [RFC 03/12] net: cls_bpf: limit hardware offload by software-only flag

2016-06-01 Thread John Fastabend
. Adding support for the SKIP_SW flag as well would be helpful. It looks like you could do this fairly easily by checking the offload boolean. Anyways that is another patch of course. Acked-by: John Fastabend <john.r.fastab...@intel.com>

Re: [RFC 03/12] net: cls_bpf: limit hardware offload by software-only flag

2016-06-01 Thread John Fastabend
flags are ignored and not reported upon dump. > > Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> > Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> > Reviewed-by: Simon Horman <simon.hor...@netronome.com> > --- Seems reasonable to me. Acked-by: John Fastabend <john.r.fastab...@intel.com>

Re: [RFC 02/12] net: cls_bpf: add hardware offload

2016-06-01 Thread John Fastabend
On 16-06-01 09:50 AM, Jakub Kicinski wrote: > This patch adds hardware offload capability to cls_bpf classifier, > similar to what have been done with U32 and flower. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Dinan Gunawardena >

Re: [RFC 08/12] net: cls_bpf: allow offloaded filters to update stats

2016-06-01 Thread John Fastabend
On 16-06-01 09:50 AM, Jakub Kicinski wrote: > Call into offloaded filters to update stats. > > Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> > Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> > Reviewed-by: Simon Horman <simon.hor...@netrono

Re: [RFC 04/12] net: cls_bpf: add support for marking filters as hardware-only

2016-06-01 Thread John Fastabend
<simon.hor...@netronome.com> > --- Looks good to me. Glad to see this worked out without too much pain on the classifier side at least. Acked-by: John Fastabend <john.r.fastab...@intel.com>

Re: [RFC 05/12] nfp: add BPF to NFP code translator

2016-06-01 Thread John Fastabend
On 16-06-01 01:03 PM, Daniel Borkmann wrote: > On 06/01/2016 06:50 PM, Jakub Kicinski wrote: >> Add translator for JITing eBPF to operations which >> can be executed on NFP's programmable engines. >> >> Signed-off-by: Jakub Kicinski >> Reviewed-by: Dinan Gunawardena

Re: [RFC 06/12] nfp: add hardware cls_bpf offload

2016-06-01 Thread John Fastabend
On 16-06-01 01:52 PM, Alexei Starovoitov wrote: > On Wed, Jun 01, 2016 at 10:20:54PM +0200, Daniel Borkmann wrote: >> On 06/01/2016 06:50 PM, Jakub Kicinski wrote: >>> Add hardware cls_bpf offload on our smart NICs. Detect if >>> capable firmware is loaded and use it to load the code JITed >>>

Re: [PATCH net-next 12/18] IB/mlx5: Add kernel offload flow-tag

2016-06-17 Thread John Fastabend
>> to steer traffic to the correct queues. I don't believe >> this needs to be changed it seems to be a good mechanism >> for driving ddma. >> >> (3) Not supporting timestamps or priv space yet >> >> (4) Not support

Re: [PATCH net-next 08/16] net/devlink: Add E-Switch mode control

2016-06-27 Thread John Fastabend
On 16-06-27 09:07 AM, Saeed Mahameed wrote: > From: Or Gerlitz > > Add the commands to set and show the mode of SRIOV E-Switch, > two modes are supported: > > * legacy : operating in the "old" L2 based mode (DMAC --> VF vport) > * offloads : offloading SW rules/policy

Re: [RFC net-next 6/9] net/cls_flower: Introduce hardware offloading

2016-02-01 Thread John Fastabend
On 16-02-01 02:43 AM, Amir Vadai wrote: > On Mon, Feb 01, 2016 at 01:31:17AM -0800, John Fastabend wrote: >> On 16-02-01 12:34 AM, Amir Vadai wrote: >>> During initialization, tcf_exts_offload_init() is called to initialize >>> the list of actions description. later on,

Re: [RFC net-next 0/9] TC filter HW offloads

2016-02-01 Thread John Fastabend
On 16-02-01 06:37 AM, Amir Vadai wrote: > On Mon, Feb 01, 2016 at 01:21:36AM -0800, John Fastabend wrote: >> On 16-02-01 12:34 AM, Amir Vadai wrote: >>> Hi, >>> >>> So... just before sending that, I noted Jonh's series that >>> deals with tc and u32

Re: [PATCH iproute2 -master 2/4] tc, bpf: improve verifier logging

2016-02-01 Thread John Fastabend
> > Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> > --- > tc/tc_bpf.c | 156 > ++-- Acked-by: John Fastabend <john.r.fastab...@intel.com> Thanks! I've been hacking around this for a while now but never got around to fixing it.

[RFC PATCH 4/7] net: add tc offload feature flag

2016-01-31 Thread John Fastabend
Its useful to turn off the qdisc offload feature at a per device level. This gives us a big hammer to enable/disable offloading. More fine grained control (i.e. per rule) may be supported later. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/linux/netdev_features.h

[RFC PATCH 3/7] net: sched: add cls_u32 offload hooks for netdevs

2016-01-31 Thread John Fastabend
This patch allows netdev drivers to consume cls_u32 offloads via the ndo_setup_tc ndo op. This works aligns with how network drivers have been doing qdisc offloads for mqprio. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/linux/netdevice.h |6 +++- inclu

[RFC PATCH 6/7] net: ixgbe: add minimal parser details for ixgbe

2016-01-31 Thread John Fastabend
, and tcp fields without having to hardcode them as enumerations or use other identifiers. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- drivers/net/ethernet/intel/ixgbe/ixgbe_model.h | 110 1 file changed, 110 insertions(+) create mode 100644 d

[RFC PATCH 5/7] net: tc: helper functions to query action types

2016-01-31 Thread John Fastabend
This is a helper function drivers can use to learn if the action type is a drop action. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> --- include/net/tc_act/tc_gact.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/net/tc_act/tc_gact.h b/inclu

  1   2   3   4   5   6   7   8   9   10   >