[patch net-next 8/9] mlxsw: spectrum: Validate firmware revision on init

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi Make the spectrum module check the current device firmware version, and if it is below the supported version, use the libfirmware API to request a firmware file with the supported firmware version and flash it to the device using the mlxfw module. The firmware file names are exp

[patch net-next 9/9] mlxsw: spectrum_router: Adjust RIF configuration for new firmware versions

2017-05-22 Thread Jiri Pirko
From: Ido Schimmel In new firmware versions, when configuring a {Port, VID} as a router interface, the driver is responsible for enabling the STP filter and disabling learning. Otherwise, packets are discarded. This change doesn't break existing firmware versions, but is required for newer firm

[patch net-next 2/9] mlxsw: reg: Add Management Component Query Information register

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi The MCQI register queries information about firmware components. It will be needed by the mlxfw module to query various options about the components, such as their max size, alignment and max write size. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri P

[patch net-next 7/9] mlxsw: core: Create the mlxsw_fw_rev struct

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi This struct was previously an anonymous struct defined inside the mlxsw_bus_info struct. Extract it to a struct named mlxsw_fw_rev, as it will be needed later by the spectrum driver. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/ne

[patch net-next 4/9] mlxsw: reg: Add Management Component Data Access register

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi The MCDA register allows reading and writing a firmware component. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 52 +++ 1 file changed, 52 insertions(+) diff --git a

[patch net-next 3/9] mlxsw: reg: Add Management Component Control register

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi The MCC register allows controlling and querying the firmware flash state machine (FSM). Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 83 +++ 1 file changed, 83 inser

[patch net-next 1/9] Add the mlxfw module for Mellanox firmware flash process

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi The mlxfw module is in charge of common logic needed to flash Mellanox devices firmware, which consists of: - Parse the Mellanox Firmware Archive version 2 (MFA2) format, which is the format used to store the Mellanox firmware. The MFA2 format file can hold firmware for ma

[patch net-next 5/9] mlxsw: spectrum: Add the needed callbacks for mlxfw integration

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi The mlxfw module defines several needed callbacks in order to flash the device's firmware. As the mlxfw module is shared between several different drivers, those callbacks are the glue functionality that is responsible for hardware interaction. Add those callbacks using the MCQI,

[patch net-next 6/9] mlxsw: spectrum: Implement the ethtool flash_device callback

2017-05-22 Thread Jiri Pirko
From: Yotam Gigi Add callback to the ethtool flash_device op. This callback uses the mlxfw module to flash the new firmware file to the device. As the firmware burn process takes about 20 seconds and ethtool takes the rtnl lock during the flash_device callback, release the rtnl lock at the begin

[patch net-next 0/9] mlxsw: Support firmware flash

2017-05-22 Thread Jiri Pirko
From: Jiri Pirko Add support for device firmware flash on mlxsw spectrum. The firmware files are expected to be in the Mellanox Firmware Archive version 2 (MFA2) format. The firmware flash can be triggered via "ethtool -f" or on driver initialization time if the device firmware version does not

RE: [PATCH net-next 00/10] qed/qede updates

2017-05-22 Thread Mintz, Yuval
> > - #1, #2 and #9 correct small missing ethtool functionality. > > - #3, #6 and #8 correct minor issues in driver, but those are either > >print-related or unexposed in existing code. > > - #4 adds proper support to TLB mode bonding. > > - #10 is meant to improve performance on varying c

[PATCH v2 net-next 07/11] qed: Flush slowpath tasklet on stop

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar Today, driver has a synchronization point while closing the device which synchronizes its slowpath interrupt line. However, that's insufficient as that ISR would schedule the slowpath-tasklet - so even after ISR is over it's possible the handling of the interrupt has not complet

[PATCH v2 net-next 09/11] qed: Provide MBI information in dev_info

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar Pass additional information about package installed on persistent memory so that protocol drivers would be able to log it. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 6 ++ drivers/net/ethernet/qlogic/qed/qed_ma

[PATCH v2 net-next 10/11] qede: Log probe of PCI device

2017-05-22 Thread Yuval Mintz
Replace meaningless logged print ('Ending successfully qede probe') with a single-liner containing interesting information about probed device. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qede/qede_main.c | 40 ++-- 1 file changed, 38 insertions(+), 2 delet

[PATCH v2 net-next 11/11] qed: Replace set_id() api with set_name()

2017-05-22 Thread Yuval Mintz
Current API between qed and protocol modules allows passing an additional private string - but it doesn't get utilized by qed anywhere. Clarify the API by removing it and renaming it 'set_name'. CC: Manish Rangankar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h|

[PATCH v2 net-next 04/11] qed: Log incorrectly installed board

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar In case nvram layout of board is incorrect, board may exhibit peculiar oddities. Log such a rare event. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 + drivers/net/ethernet/qlogic/qed/qed_hsi.h | 2 ++ 2 files ch

[PATCH v2 net-next 05/11] qed: Drop the 's' from num_ports_in_engines

2017-05-22 Thread Yuval Mintz
From: Tomer Tayar The parameter reflects the number of physical ports connected to a single engine, not all. Signed-off-by: Tomer Tayar Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 36 +++-

[PATCH v2 net-next 02/11] qed: Align DP_ERR style with other DP macros

2017-05-22 Thread Yuval Mintz
Signed-off-by: Yuval Mintz --- include/linux/qed/qed_if.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h index c70ac13..ff590cb 100644 --- a/include/linux/qed/qed_if.h +++ b/include/linux/qed/qed_if.h @@ -70

[PATCH v2 net-next 06/11] qed: Remove BB_A0 references

2017-05-22 Thread Yuval Mintz
A0 never went public, so no need to protect against it. Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed.h | 6 -- drivers/net/ethernet/qlogic/qed/qed_dev.c | 6 -- 2 files changed, 12 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed.h b/drivers/net/e

[PATCH v2 net-next 08/11] qed: Enable RoCE parser searching on fp init

2017-05-22 Thread Yuval Mintz
From: Michal Kalderon Since we're closing the parser searching for RDMA when stoping the fastpath, we need to re-enable it when starting the fastpath once again. Signed-off-by: Michal Kalderon Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 7 +++ 1 file changed

[PATCH v2 net-next 03/11] qed: !main_ptt for tunnel configuration

2017-05-22 Thread Yuval Mintz
From: Manish Chopra Flows configuring tunnel ports in HW use the main_ptt which should be reserved for core-functionality. Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 3 ++- drivers/net/ethernet/qlogic/qed/qed_l2.c

[PATCH v2 net-next 01/11] qede: Fix sparse warnings

2017-05-22 Thread Yuval Mintz
From: Manish Chopra Solves the following warning in qede - - Several cases of missing cpu_to_le16() conversions - Adds 'static' to one function declaration - Removes dcbnl operation that's currently getting populated twice Signed-off-by: Manish Chopra Signed-off-by: Yuval Mintz --- drivers

[PATCH v2 net-next 00/11] qed/qede: Mostly-cleanup series

2017-05-22 Thread Yuval Mintz
This series contains some cleanup of the qed and qede code: - #1 contains mostly static/endian changes in order to allow qede to pass sparse compilation cleanly. - #2, #5 and #6 are either semantic or remove dead-code from driver. - #9, #10 and #11 relate to printing and slightly change some

Re: [PATCH 0/5] net-SCTP: Adjustments for three function implementations

2017-05-22 Thread Xin Long
On Tue, May 23, 2017 at 12:35 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 18:30:45 +0200 > > A few update suggestions were taken into account > from static source code analysis. > > Markus Elfring (5): > Use kmalloc_array() in sctp_init() > Delete an error mes

[PATCH net-next] sctp: no need to check asoc_id before calling sctp_assoc_set_id

2017-05-22 Thread Xin Long
sctp_assoc_set_id has already done the asoc_id check in the beginning when processing dupcook, no need to do the same check before calling it. Signed-off-by: Xin Long --- net/sctp/associola.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/net/sctp/associola.c b/net/s

RE: [PATCH v2 netdev] net: phy: marvell: Limit errata to 88m1101

2017-05-22 Thread Harini Katakam
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Tuesday, May 23, 2017 4:59 AM > To: David Miller > Cc: Daniel Walker ; Harini Katakam > ; Florian Fainelli ; netdev > ; Andrew Lunn > Subject: [PATCH v2 netdev] net: phy: marvell: Limit errata to 88m1101 > > The 8

Re: [patch net-next 2/2] net/sched: fix filter flushing

2017-05-22 Thread Cong Wang
On Sat, May 20, 2017 at 6:01 AM, Jiri Pirko wrote: > From: Jiri Pirko > > When user instructs to remove all filters from chain, we cannot destroy > the chain as other actions may hold a reference. Also the put in errout > would try to destroy it again. So instead, just walk the chain and remove >

Re: [patch net-next 2/2] net/sched: fix filter flushing

2017-05-22 Thread Cong Wang
On Mon, May 22, 2017 at 10:17 PM, Jiri Pirko wrote: > Mon, May 22, 2017 at 11:04:58PM CEST, xiyou.wangc...@gmail.com wrote: >>On Mon, May 22, 2017 at 1:54 PM, Cong Wang wrote: >>> On Sun, May 21, 2017 at 12:19 PM, Jiri Pirko wrote: >You can't claim you really delete it as long as actions can

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 10:03 PM, Shubham Bansal wrote: > On Tue, May 23, 2017 at 9:52 AM, Kees Cook wrote: >> On Mon, May 22, 2017 at 8:34 PM, Shubham Bansal >> wrote: >>> I would post them as soon as I test them on ARMv5 and ARMv6. If you >>> can help me with that, please let me know. >> >> Pl

[PATCH 2/5] xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY

2017-05-22 Thread Steffen Klassert
From: Sabrina Dubroca When CONFIG_XFRM_SUB_POLICY=y, xfrm_dst stores a copy of the flowi for that dst. Unfortunately, the code that allocates and fills this copy doesn't care about what type of flowi (flowi, flowi4, flowi6) gets passed. In multiple code paths (from raw_sendmsg, from TCP when repl

pull request (net): ipsec 2017-05-23

2017-05-22 Thread Steffen Klassert
1) Fix wrong header offset for esp4 udpencap packets. 2) Fix a stack access out of bounds when creating a bundle with sub policies. From Sabrina Dubroca. 3) Fix slab-out-of-bounds in pfkey due to an incorrect sadb_x_sec_len calculation. 4) We checked the wrong feature flags when taking dow

[PATCH 3/5] af_key: Fix slab-out-of-bounds in pfkey_compile_policy.

2017-05-22 Thread Steffen Klassert
The sadb_x_sec_len is stored in the unit 'byte divided by eight'. So we have to multiply this value by eight before we can do size checks. Otherwise we may get a slab-out-of-bounds when we memcpy the user sec_ctx. Fixes: df71837d502 ("[LSM-IPSec]: Security association restriction.") Reported-by: A

[PATCH 4/5] xfrm: Fix NETDEV_DOWN with IPSec offload

2017-05-22 Thread Steffen Klassert
From: Ilan Tayari Upon NETDEV_DOWN event, all xfrm_state objects which are bound to the device are flushed. The condition for this is wrong, though, testing dev->hw_features instead of dev->features. If a device has non-user-modifiable NETIF_F_HW_ESP, then its xfrm_state objects are not flushed,

[PATCH 5/5] xfrm: fix state migration copy replay sequence numbers

2017-05-22 Thread Steffen Klassert
From: Antony Antony During xfrm migration copy replay and preplay sequence numbers from the previous state. Here is a tcpdump output showing the problem. 10.0.10.46 is running vanilla kernel, is the IKE/IPsec responder. After the migration it sent wrong sequence number, reset to 1. The migration

[PATCH 1/5] esp4: Fix udpencap for local TCP packets.

2017-05-22 Thread Steffen Klassert
Locally generated TCP packets are usually cloned, so we do skb_cow_data() on this packets. After that we need to reload the pointer to the esp header. On udpencap this header has an offset to skb_transport_header, so take this offset into account. Fixes: 67d349ed603 ("net/esp4: Fix invalid esph po

[PATCH net v2 2/2] net: ieee802154: fix net_device reference release too early

2017-05-22 Thread Lin Zhang
This patch fixes the kernel oops when release net_device reference in advance. In function raw_sendmsg(i think the dgram_sendmsg has the same problem), there is a race condition between dev_put and dev_queue_xmit when the device is gong that maybe lead to dev_queue_ximt to see an illegal net_device

[PATCH net 1/2] sctp: fix stream update when processing dupcookie

2017-05-22 Thread Xin Long
Since commit 3dbcc105d556 ("sctp: alloc stream info when initializing asoc"), stream and stream.out info are always alloced when creating an asoc. So it's not correct to check !asoc->stream before updating stream info when processing dupcookie, but would be better to check asoc state instead. Fix

[PATCH net 2/2] sctp: set new_asoc temp when processing dupcookie

2017-05-22 Thread Xin Long
After sctp changed to use transport hashtable, a transport would be added into global hashtable when adding the peer to an asoc, then the asoc can be got by searching the transport in the hashtbale. The problem is when processing dupcookie in sctp_sf_do_5_2_4_dupcook, a new asoc would be created.

[PATCH net 0/2] sctp: a bunch of fixes for processing dupcookie

2017-05-22 Thread Xin Long
After introducing transport hashtable and per stream info into sctp, some regressions were caused when processing dupcookie, this patchset is to fix them. Xin Long (2): sctp: fix stream update when processing dupcookie sctp: set new_asoc temp when processing dupcookie net/sctp/associola.c

[PATCH net v2 1/2] net: ieee802154: remove explicit set skb->sk

2017-05-22 Thread Lin Zhang
Explicit set skb->sk is needless, sock_alloc_send_skb is already set it. Signed-off-by: Lin Zhang Acked-by: Stefan Schmidt --- changelog: v1 -> v2: * split v1 into two patches, per Stefan Schmidt. Thanks to Stefan Schmidt for reviewing ! --- net/ieee802154/socket.c | 2 -- 1 file chan

Re: [patch net-next 2/2] net/sched: fix filter flushing

2017-05-22 Thread Jiri Pirko
Mon, May 22, 2017 at 11:04:58PM CEST, xiyou.wangc...@gmail.com wrote: >On Mon, May 22, 2017 at 1:54 PM, Cong Wang wrote: >> On Sun, May 21, 2017 at 12:19 PM, Jiri Pirko wrote: You can't claim you really delete it as long as actions can still see it and dump it. >>> >>> No, user just wants

Re: [patch net-next RFC] net: sched: cls_api: make reclassify return all the way back to the original tp

2017-05-22 Thread Jiri Pirko
Tue, May 23, 2017 at 01:57:47AM CEST, xiyou.wangc...@gmail.com wrote: >On Mon, May 22, 2017 at 8:09 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> With the introduction of chain goto action, the reclassification would >> cause the re-iteration of the actual chain. But it perhaps makes more >> se

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-05-22 Thread Shubham Bansal
Hi Kees, I already have ARMv5 and ARMv6 code written. I just haven't tested it yet. Should i send the patch with those as well ? Best, Shubham Bansal On Tue, May 23, 2017 at 9:52 AM, Kees Cook wrote: > On Mon, May 22, 2017 at 8:34 PM, Shubham Bansal > wrote: >> I would post them as soon as I

[PATCH net] ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets

2017-05-22 Thread Peter Dawson
This fix addresses two problems in the way the DSCP field is formulated on the encapsulating header of IPv6 tunnels. 1) The IPv6 tunneling code was manipulating the DSCP field of the encapsulating packet using the 32b flowlabel. Since the flowlabel is only the lower 20b it was incorrect to assu

Re: [PATCH 0/5] atm: Adjustments for some function implementations

2017-05-22 Thread Kees Cook
On Sun, May 21, 2017 at 1:12 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 21 May 2017 22:09:11 +0200 > > A few update suggestions were taken into account > from static source code analysis. > > Markus Elfring (5): > Improve a size determination in four functions > Delete a

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 7:58 PM, Shubham Bansal wrote: > On testing the eBPF JIT with CONFIG_FRAME_POINTER I got the following > crash for non jitted testcase. It's just a softlockup WARN, not a crash, and I think it'd to be expected given the large runtime test_bpf reports: > [ 72.032494] tes

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 8:34 PM, Shubham Bansal wrote: > I would post them as soon as I test them on ARMv5 and ARMv6. If you > can help me with that, please let me know. Please post what you have: it would be better to see what you've got now in case additional changes are needed so you don't hav

Re: [PATCH 00/12] Netfilter/IPVS fixes for net

2017-05-22 Thread David Miller
From: David Miller Date: Mon, 22 May 2017 19:54:44 -0400 (EDT) > From: Pablo Neira Ayuso > Date: Mon, 22 May 2017 00:25:38 +0200 > >> Could you merge net into net-next as well? I have several patches for >> net-next that need to apply on these fixes. No rush BTW. > > Sure, no problem. > > As

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-05-22 Thread Shubham Bansal
Hi Florian, >> I think it is fine to only target ARMv7. It is harder and harder to >> find devices on v5 or v6 CPUs that would want to be using BPF JIT, >> IMO. > > There are still a ton of Marvell-based routers out there (e.g: Kirkwood, > Orion5x) that are ARMv5 and that prompted Nicholas (hey th

Re: [PATCH net-next] bpf: update perf event helper function signature and documentation

2017-05-22 Thread Teng Qin
On 5/22/17, 20:08, "David Miller" wrote: From: Teng Qin Date: Tue, 23 May 2017 00:39:34 + > diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h > index 9a9c95f..a94ce42 100644 > --- a/samples/bpf/bpf_helpers.h > +++ b/samples/bpf/bpf_helpers.h

Re: Deleting a dynamic mac entry..

2017-05-22 Thread Toshiaki Makita
On 2017/05/21 11:28, Manohar Kumar wrote: > Hello, > > In 3.19 the following bridge fdb command to delete a dynamically > learned entry fails.. > > root@net-3:~# bridge fdb show | grep 02:42:0a:ff:00:06 > 02:42:0a:ff:00:06 dev vxlan0 master br0 > root@net-3:~# bridge fdb del 02:42:0a:ff:00:06 dev

Re:Re: [PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed

2017-05-22 Thread Gao Feng
At 2017-05-23 11:02:20, "David Miller" wrote: >From: gfree.w...@vip.163.com >Date: Tue, 23 May 2017 08:45:11 +0800 > >> From: Gao Feng >> >> When the new RFS table size specified by sysctl equals the old one, >> there is nothing changed actually. So it is unnecessary to reset the >> RFS table en

Re: [PATCH net-next] bpf: update perf event helper function signature and documentation

2017-05-22 Thread David Miller
From: Teng Qin Date: Tue, 23 May 2017 00:39:34 + > diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h > index 9a9c95f..a94ce42 100644 > --- a/samples/bpf/bpf_helpers.h > +++ b/samples/bpf/bpf_helpers.h > @@ -37,9 +37,8 @@ static int (*bpf_clone_redirect)(void *ctx, int ifindex

Re: [PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed

2017-05-22 Thread David Miller
From: gfree.w...@vip.163.com Date: Tue, 23 May 2017 08:45:11 +0800 > From: Gao Feng > > When the new RFS table size specified by sysctl equals the old one, > there is nothing changed actually. So it is unnecessary to reset the > RFS table entris. > > Signed-off-by: Gao Feng It seems like an i

Re: arch: arm: bpf: Converting cBPF to eBPF for arm 32 bit

2017-05-22 Thread Shubham Bansal
Hi, On testing the eBPF JIT with CONFIG_FRAME_POINTER I got the following crash for non jitted testcase. [ 72.032494] test_bpf: #267 BPF_MAXINSNS: Call heavy transformations jited:0 1112799 [ 92.304815] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [insmod:104] [ 92.305050] Modules

RE: [PATCH] net: fec: add post PHY reset delay DT property

2017-05-22 Thread Andy Duan
From: Quentin Schulz Sent: Monday, May 22, 2017 5:15 PM >Some PHY require to wait for a bit after the reset GPIO has been toggled. This >adds support for the DT property `phy-reset-post-delay` which gives the delay >in milliseconds to wait after reset. > >If the DT property is not given, no delay

Re: [PATCH] net: ieee802154: fix net_device reference release too early

2017-05-22 Thread zhanglin496
Hello. Sorry too late to reply. > > Hello. > > On Thu, 2017-05-18 at 15:14, Stefan Schmidt wrote: > > Hello. > > > > On Thu, 2017-05-18 at 15:50, linzhang wrote: > > > This patch fixes the kernel oops when release net_device reference in > > > advance. In function raw_sendmsg(i think the dgram_sen

[PATCH net-next] net: rfs: Don't reset RFS entries when nothing changed

2017-05-22 Thread gfree . wind
From: Gao Feng When the new RFS table size specified by sysctl equals the old one, there is nothing changed actually. So it is unnecessary to reset the RFS table entris. Signed-off-by: Gao Feng --- net/core/sysctl_net_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --gi

[PATCH net-next] bpf: update perf event helper function signature and documentation

2017-05-22 Thread Teng Qin
From: Teng Qin This commit updates function signature of the bpf_perf_event_output and bpf_perf_event_read helpers to match their implementation. Also updates their documentation in the header files. Signed-off-by: Teng Qin Acked-by: Alexei Starovoitov --- include/uapi/linux/bpf.h | 11

Re: [PATCH net 1/3] vlan: Fix tcp checksums offloads for Q-in-Q vlan.

2017-05-22 Thread David Miller
From: Vladislav Yasevich Date: Thu, 18 May 2017 09:31:03 -0400 > It appears that since commit 8cb65d000, Q-in-Q vlans have been > broken. The series that commit is part of enabled TSO and checksum > offloading on Q-in-Q vlans. However, most HW we support can't handle > it. To work around the i

Re: [patch net-next RFC] net: sched: cls_api: make reclassify return all the way back to the original tp

2017-05-22 Thread Cong Wang
On Mon, May 22, 2017 at 8:09 AM, Jiri Pirko wrote: > From: Jiri Pirko > > With the introduction of chain goto action, the reclassification would > cause the re-iteration of the actual chain. But it perhaps makes more > sense to restart the whole thing. Thoughts? I think reclassification is meant

Re: [PATCH 00/12] Netfilter/IPVS fixes for net

2017-05-22 Thread David Miller
From: Pablo Neira Ayuso Date: Mon, 22 May 2017 00:25:38 +0200 > Could you merge net into net-next as well? I have several patches for > net-next that need to apply on these fixes. No rush BTW. Sure, no problem. As soon as Linus takes in my pull request from today, I will do this and let you kno

Re: [kernel-hardening] [PATCH v4 next 0/3] modules: automatic module loading restrictions

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 4:38 PM, Andy Lutomirski wrote: > I think that having the un-resettable mode is unnecessary. We should > have option that disables loading modules entirely and cannot be > unset. (That means no explicit loads and not implicit loads.) Maybe > we already have this. Otherw

Re: [PATCH net-next 2/2] samples/bpf: add samples for HW_CACHE / RAW events

2017-05-22 Thread David Miller
From: Alexei Starovoitov Date: Mon, 22 May 2017 16:35:07 -0700 > yet perf_event_read() is least documented. hmm. > * u64 bpf_perf_event_read(&map, index) > * Return: Number events read or error code > > that needs to be fixed. That's exactly what I was talking about :-)

Re: [kernel-hardening] [PATCH v4 next 0/3] modules: automatic module loading restrictions

2017-05-22 Thread Andy Lutomirski
On Mon, May 22, 2017 at 4:07 PM, Kees Cook wrote: > On Mon, May 22, 2017 at 12:55 PM, Djalal Harouni wrote: >> On Mon, May 22, 2017 at 6:43 PM, Solar Designer wrote: >>> On Mon, May 22, 2017 at 03:49:15PM +0200, Djalal Harouni wrote: On Mon, May 22, 2017 at 2:08 PM, Solar Designer wrote: >

Re: [PATCH net-next 2/2] samples/bpf: add samples for HW_CACHE / RAW events

2017-05-22 Thread Alexei Starovoitov
On 5/22/17 4:26 PM, David Miller wrote: From: Alexei Starovoitov Date: Mon, 22 May 2017 15:48:40 -0700 @@ -31,7 +31,7 @@ static unsigned long long (*bpf_get_current_uid_gid)(void) = (void *) BPF_FUNC_get_current_uid_gid; static int (*bpf_get_current_comm)(void *buf, int buf_size) =

Re: [PATCH net-next 00/20] net: dsa: distribute switch events

2017-05-22 Thread David Miller
From: Florian Fainelli Date: Mon, 22 May 2017 13:01:06 -0700 > For this entire series: > > Tested-by: Florian Fainelli > > on a 7445 (bcm-sf2), normal bridging still worked, and bridging with > VLAN filtering also did, just like adding VLANs to user-facing ports > also did. > > Great job! Se

[PATCH v2 netdev] net: phy: marvell: Limit errata to 88m1101

2017-05-22 Thread Andrew Lunn
The 88m1101 has an errata when configuring autoneg. However, it was being applied to many other Marvell PHYs as well. Limit its scope to just the 88m1101. Fixes: 76884679c644 ("phylib: Add support for Marvell 88eS and 88e1145") Reported-by: Daniel Walker Signed-off-by: Andrew Lunn --- v2:

Re: [PATCH net-next 2/2] samples/bpf: add samples for HW_CACHE / RAW events

2017-05-22 Thread David Miller
From: Alexei Starovoitov Date: Mon, 22 May 2017 15:48:40 -0700 > @@ -31,7 +31,7 @@ static unsigned long long (*bpf_get_current_uid_gid)(void) = > (void *) BPF_FUNC_get_current_uid_gid; > static int (*bpf_get_current_comm)(void *buf, int buf_size) = > (void *) BPF_FUNC_get_current_com

Re: [kernel-hardening] [PATCH v4 next 0/3] modules: automatic module loading restrictions

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 12:55 PM, Djalal Harouni wrote: > On Mon, May 22, 2017 at 6:43 PM, Solar Designer wrote: >> On Mon, May 22, 2017 at 03:49:15PM +0200, Djalal Harouni wrote: >>> On Mon, May 22, 2017 at 2:08 PM, Solar Designer wrote: >>> > On Mon, May 22, 2017 at 01:57:03PM +0200, Djalal Ha

[PATCH net-next 1/2] perf, bpf: add support for HW_CACHE and RAW events

2017-05-22 Thread Alexei Starovoitov
From: Teng Qin This commit adds support for attach BPF program to RAW and HW_CACHE type events, and support for read HW_CACHE type event counters in BPF program. Existing code logic already supports them, so this commit is just update Enum value checks. Signed-off-by: Teng Qin Signed-off-by: Al

[PATCH net-next 0/2] perf, bpf: add support for HW_CACHE and RAW events

2017-05-22 Thread Alexei Starovoitov
Patch 1: add support for HW_CACHE and RAW perf events to bpf: - similar to PERF_TYPE_RAW and PERF_TYPE_HARDWARE allow PERF_TYPE_HW_CACHE events to be accessed via bpf_perf_event_read() - similar to PERF_TYPE_HARDWARE and PERF_TYPE_SOFTWARE allow bpf programs to attch to PERF_TYPE_HW_CACHE and P

[PATCH net-next 2/2] samples/bpf: add samples for HW_CACHE / RAW events

2017-05-22 Thread Alexei Starovoitov
From: Teng Qin This commit adds sample to test attach BPF to HW_CACHE and RAW type events into the trace_event sample. The test outputs a lot of things to screen, therefore make sure it aborts on error so it's easier to see if everything works. Also update clean-up logic to disable the perf event

Re: [PATCH v4 next 2/3] modules:capabilities: automatic module loading restriction

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 4:57 AM, Djalal Harouni wrote: > [...] > diff --git a/kernel/module.c b/kernel/module.c > index 4a3665f..ce7a146 100644 > --- a/kernel/module.c > +++ b/kernel/module.c > @@ -282,6 +282,8 @@ module_param(sig_enforce, bool_enable_only, 0644); > > /* Block module loading/unlo

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
> > > > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 > *vlan_table) > > > > +{ > > > > + struct ksz_device *dev = ds->priv; > > > > + u8 data; > > > > + int timeout = 1000; > > > > + > > > > + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & > > > VLAN_IN

Re: [PATCH v4 next 1/3] modules:capabilities: allow __request_module() to take a capability argument

2017-05-22 Thread Kees Cook
On Mon, May 22, 2017 at 4:57 AM, Djalal Harouni wrote: > This is a preparation patch for the module auto-load restriction feature. > > In order to restrict module auto-load operations we need to check if the > caller has CAP_SYS_MODULE capability. This allows to align security > checks of automati

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-22 Thread Florian Fainelli
On 05/22/2017 02:19 PM, Timur Tabi wrote: > On 05/22/2017 04:10 PM, Florian Fainelli wrote: >> Even a module argument would be rejected. If you need platform/SoC >> specific behavior propagated down to the PHY driver, several options exist: >> >> - pass an agreed upon value for phy_flags to of_phy_

Re: network performance degradation in virtio_net in 4.12-rc

2017-05-22 Thread Mikulas Patocka
On Mon, 22 May 2017, Michael S. Tsirkin wrote: > On Mon, May 22, 2017 at 10:25:19AM -0400, Mikulas Patocka wrote: > > Hi > > > > I see severe network performance degradation with the kernels 4.12-rc1 and > > 4.12-rc2 in the network virtio driver. Download rate drops down to about > > 100kB/s.

Re: brcmfmac firmware issue on NanoPi K2

2017-05-22 Thread Franky Lin
Hi Andreas, On Sun, May 21, 2017 at 9:20 AM, Andreas Färber wrote: > Hello, > > The NanoPi K2 has an Ampak AP6212 SDIO module. brcmfmac driver loads > brcmfmac43430-sdio.bin. > > When using the firmware file from linux-firmware.git that openSUSE ships > I get the following errors on 4.11.0 and ne

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-22 Thread Andrew Lunn
> I'll have to test this, but what do I do if I don't get another interrupt? It probably means interrupts cannot be used. Poll it. Andrew

Re: [RFC net-next PATCH 4/5] net: new XDP feature for reading HW rxhash from drivers

2017-05-22 Thread Tom Herbert
On Mon, May 22, 2017 at 1:42 PM, Jesper Dangaard Brouer wrote: > On Mon, 22 May 2017 08:39:35 +0200 > Jesper Dangaard Brouer wrote: > >> On Sun, 21 May 2017 15:10:29 -0700 >> Tom Herbert wrote: >> >> > On Sun, May 21, 2017 at 9:04 AM, Jesper Dangaard Brouer >> > wrote: >> > > On Sat, 20 May 201

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-22 Thread Timur Tabi
On 05/22/2017 04:09 PM, Andrew Lunn wrote: > Are you using interrupts? Or polling? adpt->phydev->irq = PHY_IGNORE_INTERRUPT; ret = phy_connect_direct(netdev, adpt->phydev, emac_adjust_link, PHY_INTERFACE_MODE_SGMII); Technically it's polling, except that it's my NIC's har

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 09:21:28PM +, woojung@microchip.com wrote: > Hi Andres, > > > > +static struct { > > > + int index; > > > + char string[ETH_GSTRING_LEN]; > > > > Hi Woojung > > > > Since you need to respin for the skb_put_padto(), please make this > > const. > OK. > > > > +stati

Re: [PATCH] net/core: remove explicit do_softirq() from busy_poll_stop()

2017-05-22 Thread Eric Dumazet
On Mon, May 22, 2017 at 12:26 PM, Sebastian Andrzej Siewior wrote: > Since commit 217f69743681 ("net: busy-poll: allow preemption in > sk_busy_loop()") there is an explicit do_softirq() invocation after > local_bh_enable() has been invoked. > I don't understand why we need this because local_bh_en

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
Hi Andres, > > +static struct { > > + int index; > > + char string[ETH_GSTRING_LEN]; > > Hi Woojung > > Since you need to respin for the skb_put_padto(), please make this > const. OK. > > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table) > > +{ > > + struct ksz_d

[PATCH] net: make struct request_sock_ops::obj_size unsigned

2017-05-22 Thread Alexey Dobriyan
This field is sizeof of corresponding kmem_cache so it can't be negative. Space will be saved after 32-bit kmem_cache_create() patch. Signed-off-by: Alexey Dobriyan --- include/net/request_sock.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/net/request_sock.h +++ b/i

[PATCH net-next] net: make struct inet_frags::qsize unsigned

2017-05-22 Thread Alexey Dobriyan
This field is sizeof of corresponding kmem_cache so it can't be negative. Prepare for 32-bit kmem_cache_create(). Signed-off-by: Alexey Dobriyan --- include/net/inet_frag.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-22 Thread Timur Tabi
On 05/22/2017 04:10 PM, Florian Fainelli wrote: > Even a module argument would be rejected. If you need platform/SoC > specific behavior propagated down to the PHY driver, several options exist: > > - pass an agreed upon value for phy_flags to of_phy_connect() see > drivers/net/ethernet/broadcom/t

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-22 Thread Florian Fainelli
On 05/22/2017 02:02 PM, Andrew Lunn wrote: >> 2. I'm preparing a patch that adds a command-line parameter to at803x that >> makes this code conditional. > > FYI: > > A patch with a command line argument, i think you actually mean a > module argument, is very likely to be rejected. Even a module

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 03:12:03PM -0500, Timur Tabi wrote: > On 10/24/2016 05:40 AM, Zefir Kurtisi wrote: > > This commit adds a wrapper function for at8031 > > that in case of operating in SGMII mode double > > checks SGMII link state when generic aneg_done() > > succeeds. It prints a warning on

Re: [patch net-next 2/2] net/sched: fix filter flushing

2017-05-22 Thread Cong Wang
On Mon, May 22, 2017 at 1:54 PM, Cong Wang wrote: > On Sun, May 21, 2017 at 12:19 PM, Jiri Pirko wrote: >>>You can't claim you really delete it as long as actions can still >>>see it and dump it. >> >> No, user just wants to delete all the filters. That is done. User does >> not care if the actua

Re: 4.12-RC2 BUG: scheduling while atomic: irq/47-iwlwifi

2017-05-22 Thread Johannes Berg
Hi Arend, Sorry, I forgot that the original message wasn't Cc'ed to the wireless list, only netdev. > +++ b/net/wireless/scan.c > @@ -322,9 +322,7 @@ static void cfg80211_del_sched_scan_req(struct > cfg80211_regi >  { > struct cfg80211_sched_scan_request *pos; > > -   ASSERT_RTNL();

Re: 4.12-RC2 BUG: scheduling while atomic: irq/47-iwlwifi

2017-05-22 Thread Arend Van Spriel
On 22-5-2017 14:09, Arend van Spriel wrote: > On 5/22/2017 12:57 PM, Johannes Berg wrote: >> On Mon, 2017-05-22 at 12:36 +0200, Sander Eikelenboom wrote: >>> Hi, >>> >>> I encountered this splat with 4.12-RC2. >> >> Ugh, yeah, I should've seen that in the review. >> >> Arend, please take a look a

Re: [PATCH 2/2] at803x: double check SGMII side autoneg

2017-05-22 Thread Andrew Lunn
> 2. I'm preparing a patch that adds a command-line parameter to at803x that > makes this code conditional. FYI: A patch with a command line argument, i think you actually mean a module argument, is very likely to be rejected. Andrew

Re: [PATCH 3/5] sctp: Fix a typo in a comment line in sctp_init()

2017-05-22 Thread Vlad Yasevich
On 05/22/2017 12:39 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 17:43:44 +0200 > > Add a missing character in this description. > > Signed-off-by: Markus Elfring > --- > net/sctp/protocol.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 5/5] sctp: Adjust one function call together with a variable assignment

2017-05-22 Thread Vlad Yasevich
On 05/22/2017 12:41 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 18:15:12 +0200 > > The script "checkpatch.pl" pointed information out like the following. > > ERROR: do not use assignment in if condition > > Thus fix the affected source code place. > > Signed-of

Re: [PATCH 4/5] sctp: Improve a size determination in sctp_inetaddr_event()

2017-05-22 Thread Vlad Yasevich
On 05/22/2017 12:40 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 18:08:24 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator "sizeof" to make the corresponding size > determination a bit safer accord

Re: [PATCH 2/5] sctp: Delete an error message for a failed memory allocation in sctp_init()

2017-05-22 Thread Vlad Yasevich
On 05/22/2017 12:38 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 17:28:14 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Link: > http://events.linuxfoundation.or

Re: [PATCH 1/5] sctp: Use kmalloc_array() in sctp_init()

2017-05-22 Thread Vlad Yasevich
On 05/22/2017 12:37 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 22 May 2017 17:20:11 +0200 > > * A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding function "kmalloc

Re: [patch net-next 2/2] net/sched: fix filter flushing

2017-05-22 Thread Cong Wang
On Sun, May 21, 2017 at 12:19 PM, Jiri Pirko wrote: >>You can't claim you really delete it as long as actions can still >>see it and dump it. > > No, user just wants to delete all the filters. That is done. User does > not care if the actual chain structure is there or not. > Hmm, so users see a

  1   2   3   4   >