Re: [PATCH] can: mcp251x: not correct register address

2015-05-30 Thread Jakub Kicinski
On Mon, 25 May 2015 08:57:48 +0200, Tomas Krcka wrote: This patch corrects addresses of acceptance filters. These registers are not in use, but values should be correct. Tested with MCP2515 and am3352 and also checked datasheets for MCP2515 and MCP2510. Signed-off-by: Tomas Krcka

[PATCH 2/3] gianfar: correct list membership accounting

2015-08-10 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl At a cost of one line let's make sure .count is correct when calling gfar_process_filer_changes(). Signed-off-by: Jakub Kicinski kubak...@wp.pl --- drivers/net/ethernet/freescale/gianfar_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 3/3] gianfar: remove faulty filer optimizer

2015-08-10 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl Current filer rule optimization is broken in several ways: (1) It destroys rule ordering. (2) It performs reads/writes beyond end of allocated tables. (3) It breaks badly for rules with more than 2 specifiers (e.g. matching ip, port, tos). (4) We

[PATCH 1/3] gianfar: correct filer table writing

2015-08-10 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl MAX_FILER_IDX is the last usable index. Using less-than will already guarantee that one entry for catch-all rule will be left, no need to subtract 1 here. Signed-off-by: Jakub Kicinski kubak...@wp.pl --- drivers/net/ethernet/freescale/gianfar_ethtool.c | 5

[PATCH 0/3] gianfar: filer changes

2015-08-10 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl Hi, I've been working with the gianfar filer code recently and got some code to offer. Well, maybe not that much code to offer actually: two small fixes and removal of the current optimizer. I'm not sure what your feelings on patch 3 will be. It would

[PATCHv2 2/3] gianfar: correct list membership accounting

2015-08-11 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl At a cost of one line let's make sure .count is correct when calling gfar_process_filer_changes(). Signed-off-by: Jakub Kicinski kubak...@wp.pl --- v2: no change --- drivers/net/ethernet/freescale/gianfar_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCHv2 1/3] gianfar: correct filer table writing

2015-08-11 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl MAX_FILER_IDX is the last usable index. Using less-than will already guarantee that one entry for catch-all rule will be left, no need to subtract 1 here. Signed-off-by: Jakub Kicinski kubak...@wp.pl --- v2: no change --- drivers/net/ethernet/freescale

[PATCHv2 3/3] gianfar: remove faulty filer optimizer

2015-08-11 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl Current filer rule optimization is broken in several ways: (1) Can perform reads/writes beyond end of allocated tables. (gianfar_ethtool.c:1326). (2) It breaks badly for rules with more than 2 specifiers (e.g. matching ip, port, tos). Example

[PATCHv2 0/3] gianfar: filer changes

2015-08-11 Thread Jakub Kicinski
From: Jakub Kicinski kubak...@wp.pl Hi, respinning with examples as requested. Jakub Kicinski (3): gianfar: correct filer table writing gianfar: correct list membership accounting gianfar: remove faulty filer optimizer drivers/net/ethernet/freescale/gianfar_ethtool.c | 345

[PATCH 0/2] Netronome NFP4000/NFP6000 NIC VF driver

2015-10-23 Thread Jakub Kicinski
This patchset adds support for VFs of Netronome's NFP-4000 and NFP-6000 based NICs. We are currently also preparing the submission for the PF driver, but it is not quite ready yet. The PF driver can be found on GitHub: https://github.com/Netronome/nfp-drv-kmods Jakub Kicinski (2): pci_ids: add

[PATCH 1/2] pci_ids: add Netronome Systems vendor

2015-10-23 Thread Jakub Kicinski
Add PCI vendor id for Netronome Systems. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Signed-off-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci_ids.h b/include/lin

Re: [PATCH 2/2] net: add driver for Netronome NFP4000/NFP6000 NIC VFs

2015-10-27 Thread Jakub Kicinski
On Mon, 26 Oct 2015 18:23:07 -0700 (PDT), David Miller wrote: > From: Jakub Kicinski <jakub.kicin...@netronome.com> > Date: Fri, 23 Oct 2015 19:58:11 +0100 > > > +struct nfp_net_tx_buf { > > + struct sk_buff *skb; > > + dma_addr_t dma_addr; > >

[PATCHv2 1/2] pci_ids: add Netronome Systems vendor

2015-10-27 Thread Jakub Kicinski
Add PCI vendor id for Netronome Systems. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Signed-off-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci_ids.h b/include/lin

[PATCHv2 0/2] Netronome NFP4000/NFP6000 NIC VF driver

2015-10-27 Thread Jakub Kicinski
struct nfp_net_r_vector Jakub Kicinski (2): pci_ids: add Netronome Systems vendor net: add driver for Netronome NFP4000/NFP6000 NIC VFs MAINTAINERS|7 + drivers/net/ethernet/Kconfig |1 + drivers/net/ethernet/Makefile

[PATCH net-next] nfp: clear ring delayed kick counters

2015-12-16 Thread Jakub Kicinski
We need to clear delayed kick counters when we free rings otherwise after ndo_close()/ndo_open() we could kick HW by more entries than actually written to rings. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rolf.neugeba...@netronome.com>

[PATCH net-next] nfp: call netif_carrier_off() during init

2015-12-17 Thread Jakub Kicinski
Netdevs default to carrier on, we should call netif_carrier_off() during initialization since we handle carrier state changes in the driver. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- drivers/

Question regarding {G,S}CHANNELS API

2016-01-07 Thread Jakub Kicinski
Hi! I'm trying to understand how number of "separate" rx/tx vs combined channels should be configured. I'd like to express asymmetric but mostly combined queue configuration (i.e. min(rx, tx) is combined the rest is separate). Since default number of RX queues is just 8 it is tempting to

[PATCHv2 net-next 3/4] nfp: correct RX buffer length calculation

2016-01-05 Thread Jakub Kicinski
When calculating the RX buffer length we need to account for up to 2 VLAN tags and up to 8 MPLS labels. Rounding up to 1k is an relic of a distant past and can be removed. While at it also remove trivial print statement. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Re

[PATCHv2 net-next 1/4] nfp: return error if MTU change fails

2016-01-05 Thread Jakub Kicinski
When reopening device fails after MTU change, let the userspace know. MTU remains changed even though error is returned, this is what all ethernet devices are doing. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rolf.neugeba...@netronome.com&

[PATCHv2 net-next 4/4] nfp: fix RX buffer length validation

2016-01-05 Thread Jakub Kicinski
while we should also account for meta_len. Let's adjust the values of data_len and meta_len to their natural meaning and simplify the logic. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- drivers/net/ethern

[PATCHv2 net-next 0/4] MTU changes and other fixes

2016-01-05 Thread Jakub Kicinski
length validation on RX. v2: - add first patch (return error on fail). Jakub Kicinski (4): nfp: return error if MTU change fails nfp: free buffers before changing MTU nfp: correct RX buffer length calculation nfp: fix RX buffer length validation .../net/ethernet/netronome/nfp

[PATCHv2 net-next 2/4] nfp: free buffers before changing MTU

2016-01-05 Thread Jakub Kicinski
For freeing DMA buffers we depend on nfp_net.fl_bufsz having the same value as during allocation therefore in .ndo_change_mtu we must first free the buffers and then change the setting. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rol

[PATCH net-next 1/3] nfp: free buffers before changing MTU

2016-01-04 Thread Jakub Kicinski
For freeing DMA buffers we depend on nfp_net.fl_bufsz having the same value as during allocation therefore in .ndo_change_mtu we must first free the buffers and then change the setting. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rol

[PATCH net-next 0/3] nfp: MTU changes and other fixes

2016-01-04 Thread Jakub Kicinski
Hi! Three small fixes around RX buffer sizing. First one corrects the length used for unmapping DMA buffers when MTU is changed, second makes sure buffers are big enough to meet FW's expectations. Third change corrects packet length validation on RX. Jakub Kicinski (3): nfp: free buffers

[PATCH net-next 3/3] nfp: fix RX buffer length validation

2016-01-04 Thread Jakub Kicinski
while we should also account for meta_len. Let's adjust the values of data_len and meta_len to their natural meaning and simplify the logic. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- drivers/net/ethern

[PATCH net-next 2/3] nfp: correct RX buffer length calculation

2016-01-04 Thread Jakub Kicinski
When calculating the RX buffer length we need to account for up to 2 VLAN tags and up to 8 MPLS labels. Rounding up to 1k is an relic of a distant past and can be removed. While at it also remove trivial print statement. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Re

Re: [PATCH net-next v3 2/2] net: add driver for Netronome NFP4000/NFP6000 NIC VFs

2015-11-24 Thread Jakub Kicinski
On Tue, 24 Nov 2015 14:25:31 -0500 (EST), David Miller wrote: > From: Jakub Kicinski <jakub.kicin...@netronome.com> > Date: Mon, 23 Nov 2015 11:04:57 + > > > +#ifdef CONFIG_NFP_NET_DEBUG > > +#define DEBUG > > +#endif > > Do not design ad-hoc debug lo

[PATCH net-next v4 0/2] Netronome NFP4000/NFP6000 NIC VF driver

2015-11-25 Thread Jakub Kicinski
This patchset adds support for VFs of Netronome's NFP-4000 and NFP-6000 based NICs. We are currently also preparing the submission for the PF driver, but it is not quite ready yet. The PF driver can be found on GitHub: https://github.com/Netronome/nfp-drv-kmods Jakub Kicinski (2): pci_ids

[PATCH net-next v4 1/2] pci_ids: add Netronome Systems vendor

2015-11-25 Thread Jakub Kicinski
Add PCI vendor id for Netronome Systems. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Signed-off-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci_ids.h b/include/lin

[PATCH net-next v5 1/2] pci_ids: add Netronome Systems vendor

2015-12-01 Thread Jakub Kicinski
Add PCI vendor id for Netronome Systems. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Signed-off-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci_ids.h b/include/lin

[PATCH net-next v5 0/2] Netronome NFP4000/NFP6000 NIC VF driver

2015-12-01 Thread Jakub Kicinski
This patchset adds support for VFs of Netronome's NFP-4000 and NFP-6000 based NICs. We are currently also preparing the submission for the PF driver, but it is not quite ready yet. The PF driver can be found on GitHub: https://github.com/Netronome/nfp-drv-kmods Jakub Kicinski (2): pci_ids

Re: [PATCH v2 23/27] rt2x00: move under ralink vendor directory

2015-11-19 Thread Jakub Kicinski
On Wed, 18 Nov 2015 16:46:02 +0200, Kalle Valo wrote: > Part of reorganising wireless drivers directory and Kconfig. > > Signed-off-by: Kalle Valo For Ralink you could probably drop the rt2x00 directory. RaLink Tech. doesn't exist any more and rt2x00 contains drivers for

[PATCH net-next v3 0/2] Netronome NFP4000/NFP6000 NIC VF driver

2015-11-23 Thread Jakub Kicinski
was based on 16ecade76a89 ("nfp_net_main: Correct some minor issues") in the GitHub repo, this is based on HEAD. Jakub Kicinski (2): pci_ids: add Netronome Systems vendor net: add driver for Netronome NFP4000/NFP6000 NIC VFs MAINTAINERS|7

[PATCH net-next v3 1/2] pci_ids: add Netronome Systems vendor

2015-11-23 Thread Jakub Kicinski
Add PCI vendor id for Netronome Systems. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Signed-off-by: Rolf Neugebauer <rolf.neugeba...@netronome.com> --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci_ids.h b/include/lin

[PATCH net 1/2] net: cls_u32: catch all hardware offload errors

2016-06-08 Thread Jakub Kicinski
Errors reported by u32_replace_hw_hnode() were not propagated. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Acked-by: Sridhar Samudrala <sridhar.samudr...@intel.com> --- net/sched/cls_u32.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH net 0/2] incremental cls_u32 hardware offload fixes

2016-06-08 Thread Jakub Kicinski
These are incremental changes from v1 of cls_u32 fixes. First patch is reposted in its entirety, patch 2 is an incremental change from patch 2 of the original series. Jakub Kicinski (2): net: cls_u32: catch all hardware offload errors net: cls_u32: be more strict about skip-sw flag (knode

[PATCH net 2/2] net: cls_u32: be more strict about skip-sw flag for knodes

2016-06-08 Thread Jakub Kicinski
Return an error if user requested skip-sw and the underlaying hardware cannot handle tc offloads (or offloads are disabled). This patch fixes the knode handling. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- net/sched/cls_u32.c | 37 +++---

Re: [PATCH net 0/2] cls_u32 hardware offload fixes

2016-06-08 Thread Jakub Kicinski
On Wed, 08 Jun 2016 11:09:36 -0700 (PDT), David Miller wrote: > From: Jakub Kicinski <jakub.kicin...@netronome.com> > Date: Wed, 8 Jun 2016 11:18:30 +0100 > > > On Tue, 07 Jun 2016 16:27:31 -0700 (PDT), David Miller wrote: > >> From: Jakub Kicinski <jakub.kicin

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

2016-06-07 Thread Jakub Kicinski
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 <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horma

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

2016-06-07 Thread Jakub Kicinski
'err' variable is not set in this test, we would return whatever previous test set 'err' to. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dinan.gunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com>

[PATCHv2 net 0/2] cls_u32 hardware offload fixes

2016-06-07 Thread Jakub Kicinski
Hi! This set fixes two small issues with error codes I noticed in cls_u32. Second patch could be viewed as user space API change but that portion of API is not part of any release, yet. Compile tested only. Jakub Kicinski (2): net: cls_u32: fix error code for invalid flags net: cls_u32

Re: [PATCH net 0/2] cls_u32 hardware offload fixes

2016-06-08 Thread Jakub Kicinski
On Tue, 07 Jun 2016 16:27:31 -0700 (PDT), David Miller wrote: > From: Jakub Kicinski <jakub.kicin...@netronome.com> > Date: Mon, 6 Jun 2016 16:16:46 +0100 > > > This set fixes two small issues with error codes I noticed > > in cls_u32. Second patch could be viewed a

[PATCHv3 net 3/3] net: cls_u32: catch all hardware offload errors

2016-06-07 Thread Jakub Kicinski
Errors reported by u32_replace_hw_hnode() were not propagated. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> --- v3: - new patch net/sched/cls_u32.c | 8 +++- 1 file changed, 7 insertions(+), 1 delet

[PATCHv3 net 0/3] cls_u32 hardware offload fixes

2016-06-07 Thread Jakub Kicinski
Hi! This set fixes three small issues with error codes I noticed in cls_u32. Second patch could be viewed as user space API change but that portion of API is not part of any release, yet. Very lightly tested. Jakub Kicinski (3): net: cls_u32: fix error code for invalid flags net: cls_u32

[PATCHv3 net 1/3] net: cls_u32: fix error code for invalid flags

2016-06-07 Thread Jakub Kicinski
'err' variable is not set in this test, we would return whatever previous test set 'err' to. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dinan.gunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com>

[PATCHv3 net 2/3] net: cls_u32: be more strict about skip-sw flag

2016-06-07 Thread Jakub Kicinski
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 <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horma

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

2016-06-06 Thread Jakub Kicinski
'err' variable is not set in this test, we would return whatever previous test set 'err' to. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- net/sched/cls_u32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c

[PATCH net 0/2] cls_u32 hardware offload fixes

2016-06-06 Thread Jakub Kicinski
Hi! This set fixes two small issues with error codes I noticed in cls_u32. Second patch could be viewed as user space API change but that portion of API is not part of any release, yet. Compile tested only. Jakub Kicinski (2): net: cls_u32: fix error code for invalid flags net: cls_u32

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

2016-06-06 Thread Jakub Kicinski
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 <jakub.kicin...@netronome.com> --- net/sched/cls_u32.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-)

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

2016-06-07 Thread Jakub Kicinski
On Tue, 7 Jun 2016 08:53:35 -0700, John Fastabend wrote: > 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:

[PATCH 1/2] add basic register-field manipulation macros

2016-06-13 Thread Jakub Kicinski
s standard Linux and GCC functions such as is_power_of_2() and __builtin_ffsll(). Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- include/linux/bitfield.h | 58 include/linux/log2.h | 6 + 2 files changed, 64 inserti

[PATCH 0/2] register-field manipulation macros

2016-06-13 Thread Jakub Kicinski
ew and advise on improvements. If accepted I think would be best to push this through Kalle's tree, since the only existing user is in drivers/net/wireless/. Jakub Kicinski (2): add basic register-field manipulation macros mt7601u: use linux/bitfield.h drivers/net/wireless/mediatek/mt7601u/d

[PATCHv2 1/2] add basic register-field manipulation macros

2016-06-14 Thread Jakub Kicinski
s standard Linux and GCC functions such as is_power_of_2() and __builtin_ffsll(). Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- v2: - change Felix's email address. include/linux/bitfield.h | 58 include/linux/log2.h |

[PATCHv2 2/2] mt7601u: use linux/bitfield.h

2016-06-14 Thread Jakub Kicinski
Use the newly added linux/bitfield.h. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/wireless/mediatek/mt7601u/dma.h | 2 - drivers/net/wireless/mediatek/mt7601u/mt7601u.h | 5 +- drivers/net/wireless/mediatek/mt7601u/util.h

[PATCHv2 0/2] register-field manipulation macros

2016-06-14 Thread Jakub Kicinski
ew and advise on improvements. If accepted I think would be best to push this through Kalle's tree, since the only existing user is in drivers/net/wireless/. v2: - change Felix's email address. Jakub Kicinski (2): add basic register-field manipulation macros mt7601u: use linux/bitfield.h drivers

[PATCH 2/2] mt7601u: use linux/bitfield.h

2016-06-13 Thread Jakub Kicinski
Use the newly added linux/bitfield.h. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/wireless/mediatek/mt7601u/dma.h | 2 - drivers/net/wireless/mediatek/mt7601u/mt7601u.h | 5 +- drivers/net/wireless/mediatek/mt7601u/util.h

Re: [PATCHv2 1/2] add basic register-field manipulation macros

2016-06-14 Thread Jakub Kicinski
On Tue, 14 Jun 2016 20:53:28 +0200, Arend van Spriel wrote: > On 14-06-16 13:44, Jakub Kicinski wrote: > > +#ifndef _LINUX_BITFIELD_H > > +#define _LINUX_BITFIELD_H > > + > > +#include > > +#include > > +#include > > + > > +#define _bf

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

2016-06-02 Thread Jakub Kicinski
On Thu, 2 Jun 2016 09:17:15 +0200, Jiri Pirko wrote: > >+static void cls_bpf_stop_offload(struct tcf_proto *tp, > >+ struct cls_bpf_prog *prog) > >+{ > >+struct net_device *dev = tp->q->dev_queue->dev; > >+ > >+if (!prog->offloaded) > >+return; > >+

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

2016-06-02 Thread Jakub Kicinski
On Thu, 2 Jun 2016 08:57:48 +0200, Jiri Pirko wrote: > Wed, Jun 01, 2016 at 11:36:48PM CEST, john.fastab...@gmail.com wrote: > >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

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

2016-06-01 Thread Jakub Kicinski
Add hardware cls_bpf offload on our smart NICs. Detect if capable firmware is loaded and use it to load the code JITed with just added translator onto programmable engines. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netr

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

2016-06-01 Thread Jakub Kicinski
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...@netronome.com> --- include/net/pkt_cls.h | 1 + net/sched/cls_bpf.c |

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

2016-06-01 Thread Jakub Kicinski
Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_SW flag. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- net/sc

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

2016-06-01 Thread Jakub Kicinski
Add cls_bpf support for the TCA_CLS_FLAGS_SKIP_HW flag. Unlike U32 and flower cls_bpf already has some netlink flags defined. I chose to create a new attribute to be able to use the same flag values as the above. Unknown flags are ignored and not reported upon dump. Signed-off-by: Jakub

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

2016-06-01 Thread Jakub Kicinski
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 <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor..

[RFC 11/12] nfp: bpf: add register rename

2016-06-01 Thread Jakub Kicinski
If we use resources more wisely we may be able to use programmable engines in a denser fashion. Try to squeeze used registers together. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horma

[RFC 01/12] add basic register-field manipulation macros

2016-06-01 Thread Jakub Kicinski
- dropped the UL specifier from 1 in _bf_low_bits, - renamed the FIELD_SET to FIELD_PUT; - added 64bit versions. CC: Ivo van Doorn <ivdo...@gmail.com> CC: Felix Fietkau <n...@openwrt.org> Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawar

[RFC 12/12] nfp: bpf: add denser mode of execution

2016-06-01 Thread Jakub Kicinski
If BPF uses less than 7 registers programmable engines can process twice as many packets in parallel. Signal this denser mode of operation to FW by setting the lowest bit in DMA address of the machine code buffer. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by:

[RFC 09/12] nfp: report statistics of offloaded filters

2016-06-01 Thread Jakub Kicinski
Periodically read filter drop counts from the bar and report them to appropriate action on user request. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com>

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

2016-06-01 Thread Jakub Kicinski
Add translator for JITing eBPF to operations which can be executed on NFP's programmable engines. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com>

[RFC 00/12] BPF hardware offload via cls_bpf

2016-06-01 Thread Jakub Kicinski
xff) return 0; return ~0U; } tcpdump generated filters, for instance: dst 10.1.255.255 and \ tcp and \ (port 90 or port 91) and \ tcp[tcpflags] & tcp-syn != 0 First patch is not really related but others depend on it, I hope to post it separately soon.

[RFC 10/12] nfp: bpf: optimize register init

2016-06-01 Thread Jakub Kicinski
We can skip move of skb pointer to R6 since this pointer has no meaning on the card. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- drivers/net/

[RFC 07/12] nfp: add skb mark support to the bpf offload

2016-06-01 Thread Jakub Kicinski
Skb marking should be set in designated register, FW will prepend it to the packet for us. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Dinan Gunawardena <dgunaward...@netronome.com> Reviewed-by: Simon Horman <simon.hor...@netronome.com> --- dr

Re: [RFC 12/12] nfp: bpf: add denser mode of execution

2016-06-01 Thread Jakub Kicinski
On Wed, 1 Jun 2016 15:01:16 -0700, Alexei Starovoitov wrote: > On Wed, Jun 01, 2016 at 05:50:14PM +0100, Jakub Kicinski wrote: > > If BPF uses less than 7 registers programmable engines > > can process twice as many packets in parallel. Signal > > this denser mode of opera

Re: [RFC 01/12] add basic register-field manipulation macros

2016-06-01 Thread Jakub Kicinski
On Wed, 01 Jun 2016 22:15:36 +0200, Hannes Frederic Sowa wrote: > Hello, > > On Wed, Jun 1, 2016, at 18:50, Jakub Kicinski wrote: > > C bitfields are problematic and best avoided. Developers > > interacting with hardware registers find themselves searching > > f

Re: [RFC 07/12] nfp: add skb mark support to the bpf offload

2016-06-01 Thread Jakub Kicinski
On Wed, 1 Jun 2016 14:56:26 -0700, Alexei Starovoitov wrote: > On Wed, Jun 01, 2016 at 05:50:09PM +0100, Jakub Kicinski wrote: > > Skb marking should be set in designated register, FW will > > prepend it to the packet for us. > > > > Signed-off-by: Jakub Kicinski &l

Re: [RFC 07/12] nfp: add skb mark support to the bpf offload

2016-06-01 Thread Jakub Kicinski
On Thu, 02 Jun 2016 00:30:07 +0200, Daniel Borkmann wrote: > On 06/02/2016 12:19 AM, Jakub Kicinski wrote: > > On Wed, 1 Jun 2016 14:56:26 -0700, Alexei Starovoitov wrote: > >> On Wed, Jun 01, 2016 at 05:50:09PM +0100, Jakub Kicinski wrote: > >>> Skb marki

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

2016-06-01 Thread Jakub Kicinski
On Wed, 01 Jun 2016 21:40:23 +0200, Daniel Borkmann wrote: > > diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h > > index f4297c8a42fe..93a86edf3bd8 100644 > > --- a/include/uapi/linux/pkt_cls.h > > +++ b/include/uapi/linux/pkt_cls.h > > @@ -395,6 +395,7 @@ enum { > >

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

2016-06-01 Thread Jakub Kicinski
On Wed, 1 Jun 2016 13:15:48 -0700, 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

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

2016-06-01 Thread Jakub Kicinski
On Wed, 1 Jun 2016 10:13:48 -0700, John Fastabend wrote: > > +static void cls_bpf_stop_offload(struct tcf_proto *tp, > > +struct cls_bpf_prog *prog) > > +{ > > + struct net_device *dev = tp->q->dev_queue->dev; > > + > > + if (!prog->offloaded) > > +

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

2016-06-01 Thread Jakub Kicinski
On Wed, 1 Jun 2016 13:52:01 -0700, 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 i

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

2016-06-01 Thread Jakub Kicinski
On Wed, 01 Jun 2016 23:21:40 +0200, Daniel Borkmann wrote: > On 06/01/2016 11:05 PM, Jakub Kicinski wrote: > > On Wed, 01 Jun 2016 21:40:23 +0200, Daniel Borkmann wrote: > [...] > >>> @@ -400,8 +406,11 @@ static int cls_bpf_modify_existing(struct net *net, &g

[PATCH net] nfp: use correct index to mask link state irq

2016-06-16 Thread Jakub Kicinski
with the 31st RX/TX interrupt. Fixes: 0ba40af963f0 ("nfp: move link state interrupt request/free calls") Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --g

Re: [PATCH 2/2] fm10k: correctly report error when changing number of channels

2016-02-08 Thread Jakub Kicinski
Hi Jacob! First of all thanks for putting your time into sorting this out, figuring out what to do with user-set RSS table when queues are reconfigured was a head scratcher for me as well. On Fri, 5 Feb 2016 12:30:21 -0800, Jacob Keller wrote: > +#define FM10K_FLAG_RETA_TABLE_CONFIGURED

Re: [PATCH 3/4] ethtool: can't set combined and tx/rx channel counts at the same time

2016-02-08 Thread Jakub Kicinski
On Mon, 8 Feb 2016 12:06:04 -0800, Jacob Keller wrote: > + /* can't set combined and separate channels at the same time */ > + if ((channels.combined_count && > + (channels.rx_count || channels.tx_count)) > + return -EINVAL; > + > /* ensure the new Rx count fits

Re: [PATCH 1/4] ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH}

2016-02-08 Thread Jakub Kicinski
Build bot seems upset so let me throw few stones as well. On Mon, 8 Feb 2016 12:06:02 -0800, Jacob Keller wrote: > > +static inline int ethool_get_max_rxfh_channel(struct net_device *dev, u32 > *max) static inline in C sources is frowned upon. > + u32 dev_size, current_max = 0; > +

[RFC (v3) 10/19] nfp: cleanup tx ring flush and rename to reset

2016-02-03 Thread Jakub Kicinski
Since we never used flush without freeing the ring later the functionality of the two operations is mixed. Rename flush to ring reset and move there all the things which have to be done after FW ring state is cleared. While at it do some clean-ups. Signed-off-by: Jakub Kicinski <jakub.ki

[RFC (v3) 05/19] nfp: don't trust netif_running() in debug code

2016-02-03 Thread Jakub Kicinski
Since change_mtu() can fail and leave us with netif_running() returning true even though all rings were freed - we should look at NFP_NET_CFG_CTRL_ENABLE flag to determine if device is really opened. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/net

[RFC (v3) 19/19] nfp: allow ring size reconfiguration at runtime

2016-02-03 Thread Jakub Kicinski
Since much of the required changes have already been made for changing MTU at runtime let's use it for ring size changes as well. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 + .../net/ethernet/netrono

[RFC (v3) 17/19] nfp: convert .ndo_change_mtu() to prepare/commit paradigm

2016-02-03 Thread Jakub Kicinski
to the size of buffers. Operation can still fail midway through if FW communication times out. In that case we retry with old rings and if fail persists there is little we can do, we just free all resources and leave device in fully closed state. Signed-off-by: Jakub Kicinski <jakub.ki

[RFC (v3) 16/19] nfp: propagate list buffer size in struct rx_ring

2016-02-03 Thread Jakub Kicinski
Free list buffer size needs to be propagated to few functions as a parameter and added to struct nfp_net_rx_ring since soon some of the functions will be reused to manage rings with buffers of size different than nn->fl_bufsz. Signed-off-by: Jakub Kicinski <jakub.kicin...@netrono

[RFC (v3) 18/19] nfp: pass ring count as function parameter

2016-02-03 Thread Jakub Kicinski
Soon ring resize will call this functions with values different than the current configuration we need to explicitly pass the ring count as parameter. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_common.c

[RFC (v3) 02/19] nfp: free buffers before changing MTU

2016-02-03 Thread Jakub Kicinski
For freeing DMA buffers we depend on nfp_net.fl_bufsz having the same value as during allocation therefore in .ndo_change_mtu we must first free the buffers and then change the setting. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rol

[RFC (v3) 01/19] nfp: return error if MTU change fails

2016-02-03 Thread Jakub Kicinski
When reopening device fails after MTU change, let the userspace know. MTU remains changed even though error is returned, this is what all ethernet devices are doing. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Reviewed-by: Rolf Neugebauer <rolf.neugeba...@netr

[RFC (v3) 14/19] nfp: slice .ndo_open() and .ndo_stop() up

2016-02-03 Thread Jakub Kicinski
Divide .ndo_open() and .ndo_stop() into logical, callable chunks. No functional changes. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 213 + 1 file changed, 131 insertions(+), 82 deletions(-)

[RFC (v3) 07/19] nfp: break up nfp_net_{alloc|free}_rings

2016-02-03 Thread Jakub Kicinski
nfp_net_{alloc|free}_rings contained strange mix of allocations and vector initialization. Remove it, declare vector init as a separate function and handle allocations explicitly. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_co

[RFC (v3) 08/19] nfp: make *x_ring_init do all the init

2016-02-03 Thread Jakub Kicinski
nfp_net_[rt]x_ring_init functions used to be called from probe path only and some of their functionality was spilled to the call site. In order to reuse them for ring reconfiguration we need them to do all the init. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .

[RFC (v3) 09/19] nfp: allocate ring SW structs dynamically

2016-02-03 Thread Jakub Kicinski
To be able to switch rings more easily on config changes allocate them dynamically, separately from nfp_net structure. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- drivers/net/ethernet/netronome/nfp/nfp_net.h | 6 ++--- .../net/ethernet/netronome/nfp/nfp_net_co

[RFC (v3) 06/19] nfp: move link state interrupt request/free calls

2016-02-03 Thread Jakub Kicinski
on. Since the IRQ can't be freed early in .ndo_stop(), it is disabled instead. Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> --- .../net/ethernet/netronome/nfp/nfp_net_common.c| 23 +++--- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/driv

[RFC (v3) 13/19] nfp: move filling ring information to FW config

2016-02-03 Thread Jakub Kicinski
nfp_net_[rt]x_ring_{alloc,free} should only allocate or free ring resources without touching the device. Move setting parameters in the BAR to separate functions. This will make it possible to reuse alloc/free functions to allocate new rings while the device is running. Signed-off-by: Jakub

[RFC (v3) 00/19] MTU changes and other fixes

2016-02-03 Thread Jakub Kicinski
and it seems quite solid. Please let me know if 1-5/6-19 split makes sense to you or if you prefer to take them all into one tree (and I should squash #1 and #2 into proper rework (#17)). Thanks! Jakub Kicinski (19): nfp: return error if MTU change fails nfp: free buffers before changing

  1   2   3   4   5   6   7   8   9   10   >