Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Wed, 7 Nov 2018 21:39:57 -0800, Stanislav Fomichev wrote: > This commit adds support for loading/attaching/detaching flow > dissector program. The structure of the flow dissector program is > assumed to be the same as in the selftests: > > * flow_dissector section with the main entry point >

[PATCH net-next] sfc: use the new __netdev_tx_sent_queue BQL optimisation

2018-11-08 Thread Edward Cree
As added in 3e59020abf0f ("net: bql: add __netdev_tx_sent_queue()"), which see for performance rationale. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/tx.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/sfc/tx.c

Re: [PATCH mlx5-next 00/10] Collection of ODP fixes

2018-11-08 Thread Saeed Mahameed
On Thu, 2018-11-08 at 19:45 +, Jason Gunthorpe wrote: > On Thu, Nov 08, 2018 at 09:10:07PM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Hi, > > > > This is collection of fixes to mlx5_core and mlx5_ib ODP logic. > > There are two main reasons why we decided to forward it

RE: [PATCH net-next] dpaa2-eth: Introduce TX congestion management

2018-11-08 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: David Miller > Sent: Thursday, November 8, 2018 8:08 AM > To: Ioana Ciocoi Radulescu > Cc: netdev@vger.kernel.org; Ioana Ciornei > Subject: Re: [PATCH net-next] dpaa2-eth: Introduce TX congestion > management > > From: Ioana Ciocoi Radulescu > Date: Wed, 7

Re: [PATCH net-next 2/2] net/mlx5: Fix offsets of ifc reserved fields

2018-11-08 Thread Saeed Mahameed
On Wed, 2018-11-07 at 20:31 +0200, Gal Pressman wrote: > Fix wrong offsets of reserved fields in ifc file. > Issues found using pahole. > > Signed-off-by: Gal Pressman > --- Applied to mlx5-next branch will be sent later in a pull request to the netdev maintainer. Thanks, Saeed.

Re: [PATCH net-next 1/2] net: phy: use phy_id_mask value zero for exact match

2018-11-08 Thread Andrew Lunn
> > Maybe we can find a clever way with a macro to specify only the PHY OUI > > and compute a suitable mask automatically? > > > I don't think so. For Realtek each driver is specific even to a model > revision (therefore mask 0x). Same applies to intel-xway. > In broadcom.c we have masks

Re: [PATCH net-next 0/4] Remove VLAN_TAG_PRESENT from drivers

2018-11-08 Thread Leon Romanovsky
On Thu, Nov 08, 2018 at 06:44:46PM +0100, Michał Mirosław wrote: > This series removes VLAN_TAG_PRESENT use from network drivers in > preparation to removing its special meaning. Can you please give an extra explanation why it is removed? Such series come out-of-blue, for people who are not

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Quentin Monnet wrote: > 2018-11-08 10:01 UTC-0800 ~ Stanislav Fomichev > > On 11/08, Quentin Monnet wrote: > >> Hi Stanislav, thanks for the changes! More comments below. > > Thank you for another round of review! > > > >> 2018-11-07 21:39 UTC-0800 ~ Stanislav Fomichev > >>> This

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 11:16:43 +, Quentin Monnet wrote: > > - bpf_program__set_ifindex(prog, ifindex); > > if (attr.prog_type == BPF_PROG_TYPE_UNSPEC) { > > + if (!prog) { > > + p_err("can not guess program type when loading all > > programs\n"); No new lines

Re: [PATCH mlx5-next 00/10] Collection of ODP fixes

2018-11-08 Thread Jason Gunthorpe
On Thu, Nov 08, 2018 at 09:10:07PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > This is collection of fixes to mlx5_core and mlx5_ib ODP logic. > There are two main reasons why we decided to forward it to mlx5-next > and not to rdma-rc or net like our other fixes. > > 1.

Re: [Patch net-next] net: move __skb_checksum_complete*() to skbuff.c

2018-11-08 Thread Stefano Brivio
Hi, On Thu, 8 Nov 2018 11:49:49 -0800 Cong Wang wrote: > +EXPORT_SYMBOL(__skb_checksum_complete); > + > /* Both of above in one bottle. */ Maybe you should also update/drop this comment now? > __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, -- Stefano

[PATCH bpf-next] bpftool: Improve handling of ENOENT on map dumps

2018-11-08 Thread David Ahern
From: David Ahern bpftool output is not user friendly when dumping a map with only a few populated entries: $ bpftool map 1: devmap name tx_devmap flags 0x0 key 4B value 4B max_entries 64 memlock 4096B 2: array name tx_idxmap flags 0x0 key 4B value 4B

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Quentin Monnet wrote: > Hi Stanislav, thanks for the changes! More comments below. Thank you for another round of review! > 2018-11-07 21:39 UTC-0800 ~ Stanislav Fomichev > > This commit adds support for loading/attaching/detaching flow > > dissector program. The structure of the flow

RE: [RFC PATCH ethtool v2 00/23] ethtool netlink interface (userspace side) (WiP)

2018-11-08 Thread Woojung.Huh
Hi Michal, > Based on the subject you quoted, you tried to apply the patch series for > ethtool (userspace utility). Kernel patch series was sent shortly before > this one with subject "[RFC PATCH net-next v2 00/17] ethtool netlink > interface (WiP)": Oh.. You are right. I picked up wrong email

[PATCH mlx5-next 01/10] net/mlx5: Release resource on error flow

2018-11-08 Thread Leon Romanovsky
From: Moni Shoua Fix reference counting leakage when the event handler aborts due to an unsupported event for the resource type. Fixes: a14c2d4beee5 ("net/mlx5_core: Warn on unsupported events of QP/RQ/SQ") Signed-off-by: Moni Shoua Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky

[PATCH mlx5-next 04/10] net/mlx5: Enumerate page fault types

2018-11-08 Thread Leon Romanovsky
From: Moni Shoua Give meaningful names to type of WQE page faults. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky --- include/linux/mlx5/device.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index

[PATCH mlx5-next 09/10] net/mlx5: Remove unused function

2018-11-08 Thread Leon Romanovsky
From: Moni Shoua No callers to the function mlx5_core_page_fault_resume() so it is OK to delete it. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 16 include/linux/mlx5/driver.h | 4 2 files

[PATCH mlx5-next 03/10] net/mlx5: Add interface to hold and release core resources

2018-11-08 Thread Leon Romanovsky
From: Moni Shoua Sometimes upper layers may want to prevent the destruction of a core resource for a period of time while work on that resource is in progress. Add API to support this. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/qp.c

[PATCH mlx5-next 08/10] IB/mlx5: Call PAGE_FAULT_RESUME command asynchronously

2018-11-08 Thread Leon Romanovsky
From: Moni Shoua Telling the HCA that page fault handling is done and QP can resume its flow is done in the context of the page fault handler. This blocks the handling of the next work in queue without a need. Call the PAGE_FAULT_RESUME command in an asynchronous manner and free the workqueue to

[PATCH mlx5-next 00/10] Collection of ODP fixes

2018-11-08 Thread Leon Romanovsky
From: Leon Romanovsky Hi, This is collection of fixes to mlx5_core and mlx5_ib ODP logic. There are two main reasons why we decided to forward it to mlx5-next and not to rdma-rc or net like our other fixes. 1. We have large number of patches exactly in that area that are ready for submission

[PATCH mlx5-next 02/10] IB/mlx5: Avoid hangs due to a missing completion

2018-11-08 Thread Leon Romanovsky
From: Moni Shoua Fix 2 flows that may cause a process to hang on wait_for_completion(): 1. When callback for create MKEY command returns with bad status 2. When callback for create MKEY command is called before executer of command calls wait_for_completion() The following call trace might be

Re: [PATCH net-next 2/2] net: phy: realtek: remove boilerplate code from driver configs

2018-11-08 Thread Heiner Kallweit
On 08.11.2018 19:37, Andrew Lunn wrote: >> { >> .phy_id = 0x8201, >> .name = "RTL8201CP Ethernet", >> -.phy_id_mask= 0x, >> .features = PHY_BASIC_FEATURES, >> .flags =

[PATCH] net: smsc95xx: Fix MTU range

2018-11-08 Thread Stefan Wahren
The commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") introduce a common MTU handling for usbnet. But it's missing the necessary changes for smsc95xx. So set the MTU range accordingly. This patch has been tested on a Raspberry Pi 3. Fixes: f77f0aee4da4 ("net: use core

Re: [PATCH bpf-next v2 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-11-08 Thread Alexei Starovoitov
On Thu, Nov 8, 2018 at 10:21 AM Alexei Starovoitov wrote: > > On Thu, Nov 08, 2018 at 05:58:56PM +, Edward Cree wrote: > > > > > Happy to jump on the call to explain it again. > > > 10:30am pacific time works for me tomorrow. > > That works for me (that's in ~30 minutes from now if I've

Re: [PATCH net-next] sfc: use the new __netdev_tx_sent_queue BQL optimisation

2018-11-08 Thread Eric Dumazet
On 11/08/2018 11:47 AM, Edward Cree wrote: > As added in 3e59020abf0f ("net: bql: add __netdev_tx_sent_queue()"), which > see for performance rationale. > > Signed-off-by: Edward Cree > --- > drivers/net/ethernet/sfc/tx.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff

Re: [Patch net-next] net: move __skb_checksum_complete*() to skbuff.c

2018-11-08 Thread Stefano Brivio
On Thu, 8 Nov 2018 12:02:00 -0800 Cong Wang wrote: > On Thu, Nov 8, 2018 at 11:54 AM Stefano Brivio wrote: > > > > Hi, > > > > On Thu, 8 Nov 2018 11:49:49 -0800 > > Cong Wang wrote: > > > > > +EXPORT_SYMBOL(__skb_checksum_complete); > > > + > > > /* Both of above in one bottle. */ > > >

Re: [PATCH 13/20] octeontx2-af: Add FLR interrupt handler

2018-11-08 Thread Arnd Bergmann
On Thu, Nov 8, 2018 at 7:37 PM wrote: > > From: Geetha sowjanya > > All RVU PF's upon receiving a FLR will trigger an IRQ to RVU AF. > This patch enables all RVU PF's FLR interrupt and registers a > handler. Upon receiving an IRQ a workqueue is scheduled to > cleanup all RVU blocks being used by

[PATCH] net: Add trace events for all receive exit points

2018-11-08 Thread Geneviève Bastien
Trace events are already present for the receive entry points, to indicate how the reception entered the stack. This patch adds the corresponding exit trace events that will bound the reception such that all events occurring between the entry and the exit can be considered as part of the

Re: [PATCH net-next 1/2] net/mlx5e: Cleanup unused defines

2018-11-08 Thread Saeed Mahameed
On Wed, 2018-11-07 at 20:31 +0200, Gal Pressman wrote: > Remove couple of defines that are no longer used. > > Signed-off-by: Gal Pressman > Applied to mlx5-next branch will be sent later in a pull request to the netdev maintainer. Thanks, Saeed.

[PATCH bpf-next v4 09/13] tools/bpf: add support to read .BTF.ext sections

2018-11-08 Thread Yonghong Song
The .BTF section is already available to encode types. These types can be used for map pretty print. The whole .BTF will be passed to the kernel as well for which kernel can verify and return to the user space for pretty print etc. The llvm patch at https://reviews.llvm.org/D53736 will generate

[PATCH bpf-next v4 08/13] tools/bpf: extends test_btf to test load/retrieve func_type info

2018-11-08 Thread Yonghong Song
A two function bpf program is loaded with btf and func_info. After successful prog load, the bpf_get_info syscall is called to retrieve prog info to ensure the types returned from the kernel matches the types passed to the kernel from the user space. Several negative tests are also added to test

[PATCH bpf-next v4 06/13] tools/bpf: sync kernel uapi bpf.h header to tools directory

2018-11-08 Thread Yonghong Song
The kernel uapi bpf.h is synced to tools directory. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/include/uapi/linux/bpf.h | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index

[PATCH bpf-next v4 01/13] bpf: btf: Break up btf_type_is_void()

2018-11-08 Thread Yonghong Song
This patch breaks up btf_type_is_void() into btf_type_is_void() and btf_type_is_fwd(). It also adds btf_type_nosize() to better describe it is testing a type has nosize info. Signed-off-by: Martin KaFai Lau --- kernel/bpf/btf.c | 37 ++--- 1 file changed, 22

[PATCH bpf-next v4 07/13] tools/bpf: add new fields for program load in lib/bpf

2018-11-08 Thread Yonghong Song
The new fields are added for program load in lib/bpf so application uses api bpf_load_program_xattr() is able to load program with btf and func_info data. This functionality will be used in next patch by bpf selftest test_btf. Acked-by: Martin KaFai Lau Signed-off-by: Yonghong Song ---

[PATCH bpf-next v4 02/13] bpf: btf: Add BTF_KIND_FUNC

2018-11-08 Thread Yonghong Song
This patch adds BTF_KIND_FUNC support to the type section. BTF_KIND_FUNC is used to specify the signature of a defined subprogram or the pointee of a function pointer. In BTF, the function type related data structures are struct bpf_param { __u32 name_off; /* parameter name */ __u32

[PATCH bpf-next v4 12/13] tools/bpf: enhance test_btf file testing to test func info

2018-11-08 Thread Yonghong Song
Change the bpf programs test_btf_haskv.c and test_btf_nokv.c to have two sections, and enhance test_btf.c test_file feature to test btf func_info returned by the kernel. Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/test_btf.c | 117 +--

[PATCH bpf-next v4 10/13] tools/bpf: do not use pahole if clang/llvm can generate BTF sections

2018-11-08 Thread Yonghong Song
Add additional checks in tools/testing/selftests/bpf and samples/bpf such that if clang/llvm compiler can generate BTF sections, do not use pahole. Signed-off-by: Yonghong Song --- samples/bpf/Makefile | 8 tools/testing/selftests/bpf/Makefile | 8 2 files

[PATCH bpf-next v4 13/13] tools/bpf: bpftool: add support for func types

2018-11-08 Thread Yonghong Song
This patch added support to print function signature if btf func_info is available. Note that ksym now uses function name instead of prog_name as prog_name has a limit of 16 bytes including ending '\0'. The following is a sample output for selftests test_btf with file test_btf_haskv.o for

[PATCH bpf-next v4 04/13] tools/bpf: add btf func unit tests in selftest test_btf

2018-11-08 Thread Yonghong Song
Add several BTF_KIND_FUNC unit tests in bpf selftest test_btf. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/lib/bpf/btf.c| 3 + tools/testing/selftests/bpf/test_btf.c | 262 + 2 files changed, 265 insertions(+) diff --git

[PATCH bpf-next v4 11/13] tools/bpf: refactor to implement btf_get_from_id() in lib/bpf

2018-11-08 Thread Yonghong Song
The function get_btf() is implemented in tools/bpf/bpftool/map.c to get a btf structure given a map_info. This patch refactored this function to be function btf_get_from_id() in tools/lib/bpf so that it can be used later. Signed-off-by: Yonghong Song --- tools/bpf/bpftool/map.c | 68

[PATCH 16/20] octeontx2-af: Enable sriov on AF to create VFs

2018-11-08 Thread sunil . kovvuri
From: Tomasz Duszynski Enable all AF VFs during probe. Since AF's VFs work in pairs (eg: Pkts sent on VF0 are received by VF1 and viceversa), enable only even number of VFs out of totalVFs, which should again be less than number of loopback (LBK) channels. Also enable VF's mailbox interrupts.

[PATCH 15/20] octeontx2-af: Mbox communication support btw AF and it's VFs

2018-11-08 Thread sunil . kovvuri
From: Tomasz Duszynski VFs attached to PFs other than AF can not communicate with AF directly. Instead they are supposed to first send message to the PF they are residing on and PF forwards it to the AF. Responses to messages are handled in the reverse order. On the other hand if VFs are on AF

[PATCH 17/20] octeontx2-af: Configure AF VFs to talk over LBK channels

2018-11-08 Thread sunil . kovvuri
From: Tomasz Duszynski Configure AF VFs such that they are able to talk over consecutive loopback channels. If 8 VFs are attached to AF then communication will work as below: TX RX lbk0 -> lbk1 lbk1 -> lbk0 lbk2 -> lbk3 lbk3 -> lbk2 lbk4 -> lbk5 lbk5 -> lbk4 lbk6 -> lbk7 lbk7 -> lbk6

[PATCH 14/20] octeontx2-af: Teardown NPA, NIX LF upon receiving FLR

2018-11-08 Thread sunil . kovvuri
From: Geetha sowjanya Upon receiving FLR IRQ for a RVU PF, teardown or cleanup resources held by that PF_FUNC. This patch cleans up, NIX LF - Stop ingress/egress traffic - Disable NPC MCAM entries being used. - Free Tx scheduler queues - Disable RQ/SQ/CQ HW contexts NPA LF - Disable

[PATCH 18/20] octeontx2-af: Add FLR handling support for AF's VFs

2018-11-08 Thread sunil . kovvuri
From: Sunil Goutham Added support to handle FLR for AF's VFs (i.e LBK VFs). Just the FLR interrupt enable/disable, handler registration etc, actual HW resource cleanup or LFs teardown logic is already there. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c |

[PATCH 13/20] octeontx2-af: Add FLR interrupt handler

2018-11-08 Thread sunil . kovvuri
From: Geetha sowjanya All RVU PF's upon receiving a FLR will trigger an IRQ to RVU AF. This patch enables all RVU PF's FLR interrupt and registers a handler. Upon receiving an IRQ a workqueue is scheduled to cleanup all RVU blocks being used by the PF/VF which received the FLR. Signed-off-by:

Re: [Patch net-next] net: move __skb_checksum_complete*() to skbuff.c

2018-11-08 Thread Cong Wang
On Thu, Nov 8, 2018 at 12:14 PM Stefano Brivio wrote: > > On Thu, 8 Nov 2018 12:02:00 -0800 > Cong Wang wrote: > > > On Thu, Nov 8, 2018 at 11:54 AM Stefano Brivio wrote: > > > > > > Hi, > > > > > > On Thu, 8 Nov 2018 11:49:49 -0800 > > > Cong Wang wrote: > > > > > > >

Re: [PATCH] net: Add trace events for all receive exit points

2018-11-08 Thread Mathieu Desnoyers
- On Nov 8, 2018, at 2:56 PM, Geneviève Bastien gbast...@versatic.net wrote: > Trace events are already present for the receive entry points, to indicate > how the reception entered the stack. > > This patch adds the corresponding exit trace events that will bound the > reception such that

[Patch net-next] net: move __skb_checksum_complete*() to skbuff.c

2018-11-08 Thread Cong Wang
__skb_checksum_complete_head() and __skb_checksum_complete() are both declared in skbuff.h, they fit better in skbuff.c than datagram.c. Signed-off-by: Cong Wang --- net/core/datagram.c | 43 --- net/core/skbuff.c | 43

Re: [PATCH mlx5-next 08/10] IB/mlx5: Call PAGE_FAULT_RESUME command asynchronously

2018-11-08 Thread Jason Gunthorpe
On Thu, Nov 08, 2018 at 09:10:15PM +0200, Leon Romanovsky wrote: > From: Moni Shoua > > Telling the HCA that page fault handling is done and QP can resume > its flow is done in the context of the page fault handler. This blocks > the handling of the next work in queue without a need. > Call the

Re: [PATCH net-next 1/2] net: phy: use phy_id_mask value zero for exact match

2018-11-08 Thread Heiner Kallweit
On 08.11.2018 20:44, Florian Fainelli wrote: > On 11/7/18 12:53 PM, Heiner Kallweit wrote: >> A phy_id_mask value zero means every PHYID matches, therefore >> value zero isn't used. So we can safely redefine the semantics >> of value zero to mean "exact match". This allows to avoid some >>

[PATCH bpf-next v4 03/13] tools/bpf: sync kernel btf.h header

2018-11-08 Thread Yonghong Song
The kernel uapi btf.h is synced to the tools directory. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/include/uapi/linux/btf.h | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/btf.h

[PATCH bpf-next v4 05/13] bpf: get better bpf_prog ksyms based on btf func type_id

2018-11-08 Thread Yonghong Song
This patch added interface to load a program with the following additional information: . prog_btf_fd . func_info, func_info_rec_size and func_info_cnt where func_info will provide function range and type_id corresponding to each function. The func_info_rec_size is introduced in the UAPI to

[PATCH bpf-next v4 00/13] bpf: add btf func info support

2018-11-08 Thread Yonghong Song
The BTF support was added to kernel by Commit 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)"), which introduced .BTF section into ELF file and is primarily used for map pretty print. pahole is used to convert dwarf to BTF for ELF files. This patch added func info support to the kernel

Re: [PATCH 08/20] octeontx2-af: Alloc and config NPC MCAM entry at a time

2018-11-08 Thread Arnd Bergmann
On Thu, Nov 8, 2018 at 7:37 PM wrote: > @@ -666,4 +668,20 @@ struct npc_mcam_unmap_counter_req { > u8 all; /* Unmap all entries using this counter ? */ > }; > > +struct npc_mcam_alloc_and_write_entry_req { > + struct mbox_msghdr hdr; > + struct mcam_entry entry_data; > +

Re: [PATCH bpf-next v4 02/13] bpf: btf: Add BTF_KIND_FUNC

2018-11-08 Thread Edward Cree
On 08/11/18 20:36, Yonghong Song wrote: > This patch adds BTF_KIND_FUNC support to the type section. > BTF_KIND_FUNC is used to specify the signature of a > defined subprogram or the pointee of a function pointer. > > In BTF, the function type related data structures are > struct bpf_param { >

[Patch net-next v2] net: move __skb_checksum_complete*() to skbuff.c

2018-11-08 Thread Cong Wang
__skb_checksum_complete_head() and __skb_checksum_complete() are both declared in skbuff.h, they fit better in skbuff.c than datagram.c. Cc: Stefano Brivio Signed-off-by: Cong Wang --- net/core/datagram.c | 43 --- net/core/skbuff.c | 43

Re: [PATCH net-next] net: phy: improve struct phy_device member interrupts handling

2018-11-08 Thread Heiner Kallweit
On 08.11.2018 23:24, Andrew Lunn wrote: > On Thu, Nov 08, 2018 at 10:36:33PM +0100, Heiner Kallweit wrote: >> As a heritage from the very early days of phylib member interrupts is >> defined as u32 even though it's just a flag whether interrupts are >> enabled. So we can change it to a bitfield

Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine

2018-11-08 Thread David Miller
From: Florian Fainelli Date: Thu, 8 Nov 2018 15:00:01 -0800 > On 11/8/18 2:58 PM, David Miller wrote: >> From: Heiner Kallweit >> Date: Wed, 7 Nov 2018 20:41:52 +0100 >> >>> This patch series is based on two axioms: >>> >>> - During autoneg a PHY always reports the link being down >>> >>> -

Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 03:21:29PM +0800, Wang Dongsheng wrote: > Originally I just push "phy-handle" support for ACPI on the QCOM QDF2400 > platform. After some discussion and following Andrew's advice, I send > out with a generic version of ACPI. > > Current there is no clear documentation

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 13:20:12 -0800, Stanislav Fomichev wrote: > On 11/08, Jakub Kicinski wrote: > > On Thu, 8 Nov 2018 18:21:24 +, Quentin Monnet wrote: > > > >>> @@ -79,8 +82,11 @@ DESCRIPTION > > > >>> contain a dot character ('.'), which is reserved for > > > >>> future >

[Patch net] ip: fix csum_sub() with csum_block_sub()

2018-11-08 Thread Cong Wang
When subtracting the checksum of a block of data, csum_block_sub() must be used to respect the offset. We learned this lesson from both commit d55bef5059dd ("net: fix pskb_trim_rcsum_slow() with odd trim offset") and commit d48051c5b837 ("net/mlx5e: fix csum adjustments caused by RXFCS"). Fixes:

Re: [PATCH net-next 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt

2018-11-08 Thread Florian Fainelli
On 11/8/18 2:30 PM, Andrew Lunn wrote: > On Thu, Nov 08, 2018 at 10:54:50PM +0100, Heiner Kallweit wrote: >> Flag PHY_HAS_INTERRUPT is used only here for this small check. I think >> using interrupts isn't possible if a driver defines neither >> config_intr nor ack_interrupts callback. So we can

Re: [PATCH net-next 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 10:54:50PM +0100, Heiner Kallweit wrote: > Flag PHY_HAS_INTERRUPT is used only here for this small check. I think > using interrupts isn't possible if a driver defines neither > config_intr nor ack_interrupts callback. So we can replace checking > flag PHY_HAS_INTERRUPT

Re: [PATCH net-next 1/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt

2018-11-08 Thread Florian Fainelli
On 11/8/18 1:55 PM, Heiner Kallweit wrote: > Flag PHY_HAS_INTERRUPT is used only here for this small check. I think > using interrupts isn't possible if a driver defines neither > config_intr nor ack_interrupts callback. So we can replace checking > flag PHY_HAS_INTERRUPT with checking for these

Re: [PATCH net-next 1/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt

2018-11-08 Thread Heiner Kallweit
On 08.11.2018 23:33, Florian Fainelli wrote: > On 11/8/18 1:55 PM, Heiner Kallweit wrote: >> Flag PHY_HAS_INTERRUPT is used only here for this small check. I think >> using interrupts isn't possible if a driver defines neither >> config_intr nor ack_interrupts callback. So we can replace checking

Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine

2018-11-08 Thread Florian Fainelli
On 11/8/18 2:58 PM, David Miller wrote: > From: Heiner Kallweit > Date: Wed, 7 Nov 2018 20:41:52 +0100 > >> This patch series is based on two axioms: >> >> - During autoneg a PHY always reports the link being down >> >> - Info in clause 22/45 registers doesn't allow to differentiate between >>

Re: [PATCH net-next 1/2] net: phy: use phy_id_mask value zero for exact match

2018-11-08 Thread Florian Fainelli
On 11/8/18 12:53 PM, Andrew Lunn wrote: >>> Maybe we can find a clever way with a macro to specify only the PHY OUI >>> and compute a suitable mask automatically? >>> >> I don't think so. For Realtek each driver is specific even to a model >> revision (therefore mask 0x). Same applies to

Re: [PATCH net-next 0/2] net: phy: use phy_id_mask value zero for exact match

2018-11-08 Thread David Miller
From: Heiner Kallweit Date: Wed, 7 Nov 2018 21:52:31 +0100 > A phy_id_mask value zero means every PHYID matches, therefore > value zero isn't used. So we can safely redefine the semantics > of value zero to mean "exact match". This allows to avoid some > boilerplate code in PHY driver configs. >

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Jakub Kicinski wrote: > On Wed, 7 Nov 2018 21:39:57 -0800, Stanislav Fomichev wrote: > > This commit adds support for loading/attaching/detaching flow > > dissector program. The structure of the flow dissector program is > > assumed to be the same as in the selftests: > > > > *

Re: [PATCH bpf-next] bpftool: Improve handling of ENOENT on map dumps

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 13:00:07 -0800, David Ahern wrote: > From: David Ahern > > bpftool output is not user friendly when dumping a map with only a few > populated entries: > > $ bpftool map > 1: devmap name tx_devmap flags 0x0 > key 4B value 4B max_entries 64 memlock

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Jakub Kicinski wrote: > On Thu, 8 Nov 2018 11:16:43 +, Quentin Monnet wrote: > > > - bpf_program__set_ifindex(prog, ifindex); > > > if (attr.prog_type == BPF_PROG_TYPE_UNSPEC) { > > > + if (!prog) { > > > + p_err("can not guess program type when

[PATCH net-next] net: phy: improve struct phy_device member interrupts handling

2018-11-08 Thread Heiner Kallweit
As a heritage from the very early days of phylib member interrupts is defined as u32 even though it's just a flag whether interrupts are enabled. So we can change it to a bitfield member. In addition change the code dealing with this member in a way that it's clear we're dealing with a bool value.

[PATCH net-next 2/2] net: phy: realtek: remove flag PHY_HAS_INTERRUPT from driver configs

2018-11-08 Thread Heiner Kallweit
Now that flag PHY_HAS_INTERRUPT has been replaced with a check for callbacks config_intr and ack_interrupt, we can remove setting this flag from driver configs. Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 7 --- 1 file changed, 7 deletions(-) diff --git

[PATCH net-next 1/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt

2018-11-08 Thread Heiner Kallweit
Flag PHY_HAS_INTERRUPT is used only here for this small check. I think using interrupts isn't possible if a driver defines neither config_intr nor ack_interrupts callback. So we can replace checking flag PHY_HAS_INTERRUPT with checking for these callbacks. Signed-off-by: Heiner Kallweit ---

Re: [PATCH net-next] net: phy: improve struct phy_device member interrupts handling

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 10:36:33PM +0100, Heiner Kallweit wrote: > As a heritage from the very early days of phylib member interrupts is > defined as u32 even though it's just a flag whether interrupts are > enabled. So we can change it to a bitfield member. In addition change > the code dealing

Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine

2018-11-08 Thread David Miller
From: Heiner Kallweit Date: Wed, 7 Nov 2018 20:41:52 +0100 > This patch series is based on two axioms: > > - During autoneg a PHY always reports the link being down > > - Info in clause 22/45 registers doesn't allow to differentiate between > these two states: > 1. Link is physically down

Re: [net-next 06/12] i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE

2018-11-08 Thread Jeff Kirsher
On Thu, 2018-11-08 at 07:42 +0100, Michal Kubecek wrote: > On Thu, Nov 08, 2018 at 06:05:26AM +, Kevin Easton wrote: > > On Wed, Nov 07, 2018 at 02:48:24PM -0800, Jeff Kirsher wrote: > > > From: Todd Fujinaka > > > > > > There's a new flag for setting WoL filters that is only > > > enabled

[PATCH net-next 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt

2018-11-08 Thread Heiner Kallweit
Flag PHY_HAS_INTERRUPT is used only here for this small check. I think using interrupts isn't possible if a driver defines neither config_intr nor ack_interrupts callback. So we can replace checking flag PHY_HAS_INTERRUPT with checking for these callbacks. This allows to remove this flag from a

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 13:29:40 -0800, Stanislav Fomichev wrote: > On 11/08, Jakub Kicinski wrote: > > On Wed, 7 Nov 2018 21:39:57 -0800, Stanislav Fomichev wrote: > > > This commit adds support for loading/attaching/detaching flow > > > dissector program. The structure of the flow dissector

Re: [Patch net] ip: fix csum_sub() with csum_block_sub()

2018-11-08 Thread Eric Dumazet
On Thu, Nov 8, 2018 at 2:04 PM Cong Wang wrote: > > When subtracting the checksum of a block of data, > csum_block_sub() must be used to respect the offset. > > We learned this lesson from both commit d55bef5059dd > ("net: fix pskb_trim_rcsum_slow() with odd trim offset") and > commit

Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 03:00:01PM -0800, Florian Fainelli wrote: > On 11/8/18 2:58 PM, David Miller wrote: > > From: Heiner Kallweit > > Date: Wed, 7 Nov 2018 20:41:52 +0100 > > > >> This patch series is based on two axioms: > >> > >> - During autoneg a PHY always reports the link being down >

Re: [net-next PATCH v2] net: sched: cls_flower: Classify packets using port ranges

2018-11-08 Thread David Miller
From: Amritha Nambiar Date: Wed, 07 Nov 2018 13:22:42 -0800 > diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h > index 401d0c1..b63c3cf 100644 > --- a/include/uapi/linux/pkt_cls.h > +++ b/include/uapi/linux/pkt_cls.h > @@ -405,6 +405,11 @@ enum { >

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
On 11/08, Jakub Kicinski wrote: > On Thu, 8 Nov 2018 18:21:24 +, Quentin Monnet wrote: > > >>> @@ -79,8 +82,11 @@ DESCRIPTION > > >>> contain a dot character ('.'), which is reserved for > > >>> future > > >>> extensions of *bpffs*. > > >>> -

Re: [PATCH v3 bpf-next 4/4] bpftool: support loading flow dissector

2018-11-08 Thread Jakub Kicinski
On Thu, 8 Nov 2018 13:25:39 -0800, Stanislav Fomichev wrote: > > > > + goto err_close_obj; > > > > + } > > > > + > > > > const char *sec_name = bpf_program__title(prog, false); > > > > > > > > err =

Re: [PATCH net-next 0/4] Remove VLAN_TAG_PRESENT from drivers

2018-11-08 Thread Michał Mirosław
On Thu, Nov 08, 2018 at 08:50:05PM +0200, Leon Romanovsky wrote: > On Thu, Nov 08, 2018 at 06:44:46PM +0100, Michał Mirosław wrote: > > This series removes VLAN_TAG_PRESENT use from network drivers in > > preparation to removing its special meaning. > Can you please give an extra explanation why

Re: [Patch net] ip: fix csum_sub() with csum_block_sub()

2018-11-08 Thread Cong Wang
On Thu, Nov 8, 2018 at 2:17 PM Eric Dumazet wrote: > > On Thu, Nov 8, 2018 at 2:04 PM Cong Wang wrote: > > > > When subtracting the checksum of a block of data, > > csum_block_sub() must be used to respect the offset. > > > > We learned this lesson from both commit d55bef5059dd > > ("net: fix

Re: [PATCH 04/20] octeontx2-af: NPC MCAM entry alloc/free support

2018-11-08 Thread David Miller
From: sunil.kovv...@gmail.com Date: Fri, 9 Nov 2018 00:05:45 +0530 > +int rvu_mbox_handler_NPC_MCAM_ALLOC_ENTRY(struct rvu *rvu, > + struct npc_mcam_alloc_entry_req *req, > + struct npc_mcam_alloc_entry_rsp *rsp); > +int

Re: [PATCH bpf-next v2 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-11-08 Thread Edward Cree
On 08/11/18 19:42, Alexei Starovoitov wrote: > same link let's continue at 1pm PST. So, one thing we didn't really get onto was maps, and you mentioned that it  wasn't really clear what I was proposing there. What I have in mind comes in two parts: 1) map type.  A new BTF_KIND_MAP with metadata

[PATCH v4 bpf-next 1/7] selftests/bpf: rename flow dissector section to flow_dissector

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev Makes it compatible with the logic that derives program type from section name in libbpf_prog_type_by_name. Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/bpf_flow.c | 2 +- tools/testing/selftests/bpf/test_flow_dissector.sh | 2 +- 2

[PATCH v4 bpf-next 4/7] libbpf: add internal pin_name

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev pin_name is the same as section_name where '/' is replaced by '_'. bpf_object__pin_programs is converted to use pin_name to avoid the situation where section_name would require creating another subdirectory for a pin (as, for example, when calling

[PATCH v4 bpf-next 3/7] libbpf: bpf_program__pin: add special case for instances.nr == 1

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev When bpf_program has only one instance, don't create a subdirectory with per-instance pin files (/0). Instead, just create a single pin file for that single instance. This simplifies object pinning by not creating unnecessary subdirectories. This can potentially break

[PATCH v4 bpf-next 0/7] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev v4 changes: * addressed another round of comments/style issues from Jakub Kicinski & Quentin Monnet (thanks!) * implemented bpf_object__pin_maps and bpf_object__pin_programs helpers and used them in bpf_program__pin * added new pin_name to bpf_program so

[PATCH v4 bpf-next 5/7] bpftool: add loadall command

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev This patch adds new *loadall* command which slightly differs from the existing *load*. *load* command loads all programs from the obj file, but pins only the first programs. *loadall* pins all programs from the obj file under specified directory. The intended usecase is

[PATCH v4 bpf-next 6/7] bpftool: add pinmaps argument to the load/loadall

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev This new additional argument lets users pin all maps from the object at specified path. Signed-off-by: Stanislav Fomichev --- .../bpftool/Documentation/bpftool-prog.rst| 4 +++- tools/bpf/bpftool/bash-completion/bpftool | 3 ++- tools/bpf/bpftool/prog.c

Re: [PATCH net-next] net: bcmgenet: return correct value 'ret' from bcmgenet_power_down

2018-11-08 Thread David Miller
From: YueHaibing Date: Thu, 8 Nov 2018 02:08:43 + > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ethernet/broadcom/genet/bcmgenet.c: In function > 'bcmgenet_power_down': > drivers/net/ethernet/broadcom/genet/bcmgenet.c:1136:6: warning: > variable 'ret' set but not used

[PATCH v4 bpf-next 2/7] libbpf: cleanup after partial failure in bpf_object__pin

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev bpftool will use bpf_object__pin in the next commits to pin all programs and maps from the file; in case of a partial failure, we need to get back to the clean state (undo previous program/map pins). As part of a cleanup, I've added and exported separate routines to pin

[PATCH v4 bpf-next 7/7] bpftool: support loading flow dissector

2018-11-08 Thread Stanislav Fomichev
From: Stanislav Fomichev This commit adds support for loading/attaching/detaching flow dissector program. The structure of the flow dissector program is assumed to be the same as in the selftests: * flow_dissector section with the main entry point * a bunch of tail call progs * a jmp_table map

Re: [PATCH net-next 0/7] net: sched: prepare for more Qdisc offloads

2018-11-08 Thread David Miller
From: Jakub Kicinski Date: Wed, 7 Nov 2018 17:33:33 -0800 > This series refactors the "switchdev" Qdisc offloads a little. We have > a few Qdiscs which can be fully offloaded today to the forwarding plane > of switching devices. > > First patch adds a helper for handing statistic dumps, the

Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-08 Thread Timur Tabi
On 11/8/18 5:23 PM, Andrew Lunn wrote: I don't know much about ACPI. I do know DT. MDIO busses can have multiple PHYs on them. Is the following valid to list two PHYs? Device (MDIO) { Name (_DSD, Package () { ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),

<    1   2   3   >