[PATCH net-next 3/9] net: hns3: Add VF Reset device state and its handling

2018-03-22 Thread Salil Mehta
This introduces the hclge device reset states of "requested" and "pending" and also its handling in context to Reset Service Task. Device gets into requested state because of any VF reset request asserted from upper layers, for example due to watchdog timeout expiration. Requested state would

[PATCH net-next 1/9] net: hns3: Changes to make enet watchdog timeout func common for PF/VF

2018-03-22 Thread Salil Mehta
HNS3 drivers enet layer, used for the ring management and stack interaction, is common to both VF and PF. PF already supports reset functionality to handle the network stack watchdog timeout trigger but the existing code is not generic enough to be used to support VF reset as well. This patch does

Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation

2018-03-22 Thread Roopa Prabhu
On Thu, Mar 22, 2018 at 3:55 AM, Jiri Pirko wrote: > From: Jiri Pirko > > This patchset resolves 2 issues we have right now: > 1) There are many netdevices / ports in the system, for port, pf, vf >represenatation but the user has no way to see which is

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-22 Thread Kees Cook
On Tue, Mar 20, 2018 at 4:23 PM, Linus Torvalds wrote: > On Sat, Mar 17, 2018 at 1:07 PM, Kees Cook wrote: >> >> No luck! :( gcc 4.4 refuses to play along. And, hilariously, not only >> does it not change the complaint about

Re: [PATCH net-next 1/2 v4] net: add uevent socket member

2018-03-22 Thread David Miller
From: Christian Brauner Date: Mon, 19 Mar 2018 13:17:30 +0100 > This commit adds struct uevent_sock to struct net. Since struct uevent_sock > records the position of the uevent socket in the uevent socket list we can > trivially remove it from the uevent socket list

[PATCH v2 8/8] page_frag: Account allocations

2018-03-22 Thread Matthew Wilcox
From: Matthew Wilcox Note the number of pages currently used in page_frag allocations. This may help diagnose leaks in page_frag users. Signed-off-by: Matthew Wilcox --- include/linux/mmzone.h | 3 ++- mm/page_alloc.c| 10 +++--- 2

[PATCH v2 3/8] page_frag_cache: Rename 'nc' to 'pfc'

2018-03-22 Thread Matthew Wilcox
From: Matthew Wilcox This name was a legacy from the 'netdev_alloc_cache' days. Signed-off-by: Matthew Wilcox --- mm/page_alloc.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git

[PATCH v2 5/8] page_frag_cache: Save memory on small machines

2018-03-22 Thread Matthew Wilcox
From: Matthew Wilcox Only allocate a single page if CONFIG_BASE_SMALL is set. Signed-off-by: Matthew Wilcox --- include/linux/mm_types.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h

Re: [PATCH net 1/3] lan78xx: Set ASD in MAC_CR when EEE is enabled.

2018-03-22 Thread Sergei Shtylyov
Hello! Only stylistic comments. On 3/22/2018 10:41 AM, Raghuram Chary J wrote: Description: EEE does not work with lan7800 when AutoSpeed is not set. (This can happen when EEPROM is not populated or configured incorrectly) Root-Cause: When EEE is enabled, the mac config register ASD is

[PATCH nf] netfilter: drop template ct when conntrack is skipped.

2018-03-22 Thread Paolo Abeni
The ipv4 nf_ct code currently skips the nf_conntrak_in() call for fragmented packets. As a results later matches/target can end up manipulating template ct entry instead of 'real' ones. Exploiting the above, syzbot found a way to trigger the following splat: WARNING: CPU: 1 PID: 4242 at

Re: [PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac

2018-03-22 Thread Ulf Hansson
On 20 March 2018 at 10:55, Kalle Valo wrote: > Arend van Spriel writes: > If I get it right, you mean something like this: mmc3: mmc@1c12000 { ... broken-sg-support; sd-head-align = 4;

[RESEND PATCH net-next 1/1] tc-testing: updated police, mirred, skbedit and skbmod with more tests

2018-03-22 Thread Roman Mashak
Added extra test cases for control actions (reclassify, pipe etc.), cookies, max index value and police args sanity check. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/mirred.json| 192 +

Re: [PATCH net-next 0/4] r8169: series with smaller improvements w/o functional changes

2018-03-22 Thread David Miller
From: Heiner Kallweit Date: Tue, 20 Mar 2018 07:38:44 +0100 > This series includes smaller improvements w/o intended functional changes. Series applied to net-next, thank you.

Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access

2018-03-22 Thread Linus Torvalds
On Thu, Mar 22, 2018 at 5:48 AM, David Laight wrote: > > So if we needed to do PIO reads using the AVX2 (or better AVX-512) > registers would make a significant difference. > Fortunately we can 'dma' most of the data we need to transfer. I think this is the really

[PATCH v5 5/5] bnxt_en: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Create a new wrapper function with relaxed write operator. Use the new wrapper when a write is

[PATCH v5 0/5] netdev: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to

[PATCH v5 4/5] net: qlge: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Create a new wrapper function with relaxed write operator. Use the new wrapper when a write is

[PATCH v5 2/5] qlcnic: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed().

[PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed().

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-22 Thread Alexei Starovoitov
On 3/22/18 2:43 AM, Daniel Borkmann wrote: On 03/21/2018 07:54 PM, Alexei Starovoitov wrote: [...] @@ -546,6 +556,53 @@ extern void ftrace_profile_free_filter(struct perf_event *event); void perf_trace_buf_update(void *record, u16 type); void *perf_trace_buf_alloc(int size, struct pt_regs

[PATCH v5 1/2] ixgbevf: keep writel() closer to wmb()

2018-03-22 Thread Sinan Kaya
Remove ixgbevf_write_tail() in favor of moving writel() close to wmb(). Signed-off-by: Sinan Kaya --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 - drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-)

Re: [RFC PATCH] net: phy: Added device tree binding for dev-addr and dev-addr code check-up and usage

2018-03-22 Thread Andrew Lunn
> Just to make sure I understand. Do you want me to change the > signature of all of_mdiobus_register_phy(), get_phy_device(), > get_phy_id() and get_phy_c45_ids() and include the dev_addr > parameter obtained from the device tree? (a propagation of this > parameter across all functions all the

Re: [PATCH v2 0/3] net: phy: Add general dummy stubs for MMD register access

2018-03-22 Thread David Miller
From: Kevin Hao Date: Tue, 20 Mar 2018 09:44:51 +0800 > v2: > As suggested by Andrew: > - Add general dummy stubs > - Also use that for the micrel phy > > This patch series fix the Ethernet broken on the mpc8315erdb board introduced > by commit b6b5e8a69118 ("gianfar:

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-22 Thread Jiri Olsa
On Thu, Mar 22, 2018 at 03:35:42PM +, Quentin Monnet wrote: > 2018-03-22 14:32 UTC+0100 ~ Jiri Olsa > > On Thu, Mar 22, 2018 at 10:34:18AM +0100, Daniel Borkmann wrote: > >> On 03/21/2018 07:37 PM, Jiri Olsa wrote: > >>> On Wed, Mar 21, 2018 at 05:25:33PM +, Quentin

Re: [PATCH v2 1/8] page_frag_cache: Remove pfmemalloc bool

2018-03-22 Thread Alexander Duyck
On Thu, Mar 22, 2018 at 8:31 AM, Matthew Wilcox wrote: > From: Matthew Wilcox > > Save 4/8 bytes by moving the pfmemalloc indicator from its own bool > to the top bit of pagecnt_bias. This has no effect on the fastpath > of the allocator since the

Re: [PATCH v5 0/2] Remove false-positive VLAs when using max()

2018-03-22 Thread Linus Torvalds
On Thu, Mar 22, 2018 at 8:01 AM, Kees Cook wrote: > > Seems like it doesn't like void * arguments: Yeah, that was discussed separately, I just didn't realize we had any such users. As David said, just adding a (long) cast to it should be fine, ie #define

Re: [PATCH net-next 0/2] mlxsw: Update supported firmware version

2018-03-22 Thread David Miller
From: Ido Schimmel Date: Wed, 21 Mar 2018 09:34:04 +0200 > The first patch bumps the firmware version supported by the driver. The > second patch enables a feature introduced in the new version, > auto-negotiation disable. Series applied, thank you.

Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation

2018-03-22 Thread Roopa Prabhu
On Thu, Mar 22, 2018 at 8:34 AM, David Ahern wrote: > On 3/22/18 4:55 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This patchset resolves 2 issues we have right now: >> 1) There are many netdevices / ports in the system, for port, pf, vf >>

Re: [PATCH v3 net-next 0/5] Add support for RDMA enhancements in cxgb4

2018-03-22 Thread David Miller
From: Raju Rangoju Date: Tue, 20 Mar 2018 15:41:37 +0530 > Allocates the HW-resources and provide the necessary routines for the > upper layer driver (rdma/iw_cxgb4) to enable the RDMA SRQ support for Chelsio > adapters. > > Advertise support for write with immediate work

Re: [PATCH v2 net 0/7] Aquantia atlantic hot fixes 03-2018

2018-03-22 Thread David Miller
From: Igor Russkikh Date: Tue, 20 Mar 2018 14:40:30 +0300 > This is a set of atlantic driver hot fixes for various areas: > > Some issues with hardware reset covered, > Fixed napi_poll flood happening on some traffic conditions, > Allow system to change MAC address

Re: [PATCH v2 bpf-next 4/8] tracepoint: compute num_args at build time

2018-03-22 Thread Steven Rostedt
On Thu, 22 Mar 2018 08:51:16 -0700 Alexei Starovoitov wrote: > So I definitely support the idea of build time warn for large > number of args. I'm more for a build time error for large number of args. -- Steve

Re: [PATCH v3 net-next] selftests: Add multipath tests for onlink flag

2018-03-22 Thread David Miller
From: David Ahern Date: Tue, 20 Mar 2018 10:04:30 -0700 > Add multipath tests for onlink flag: one test with onlink added to > both nexthops, then tests with onlink added to only 1 nexthop. > > Signed-off-by: David Ahern > --- > v3 > - no change; resend

Re: [bpf-next V4 PATCH 09/15] mlx5: register a memory model when XDP is enabled

2018-03-22 Thread Tariq Toukan
On 22/03/2018 4:21 PM, Jesper Dangaard Brouer wrote: Now all the users of ndo_xdp_xmit have been converted to use xdp_return_frame. This enable a different memory model, thus activating another code path in the xdp_return_frame API. V2: Fixed issues pointed out by Tariq. Signed-off-by:

Re: [PATCH v2 6/8] page_frag_cache: Use a mask instead of offset

2018-03-22 Thread Matthew Wilcox
On Thu, Mar 22, 2018 at 09:22:31AM -0700, Alexander Duyck wrote: > On Thu, Mar 22, 2018 at 8:31 AM, Matthew Wilcox wrote: > > By combining 'va' and 'offset' into 'addr' and using a mask instead, > > we can save a compare-and-branch in the fast-path of the allocator. > > This

Re: [bpf-next V4 PATCH 11/15] page_pool: refurbish version of page_pool code

2018-03-22 Thread Alexei Starovoitov
On Thu, Mar 22, 2018 at 03:22:04PM +0100, Jesper Dangaard Brouer wrote: > Need a fast page recycle mechanism for ndo_xdp_xmit API for returning > pages on DMA-TX completion time, which have good cross CPU > performance, given DMA-TX completion time can happen on a remote CPU. > > Refurbish my

[PATCH v5 2/2] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
Code includes wmb() followed by writel() in multiple places. writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to

Re: [PATCH 1/2] bpf: Remove struct bpf_verifier_env argument from print_bpf_insn

2018-03-22 Thread Daniel Borkmann
On 03/22/2018 04:57 PM, Jiri Olsa wrote: > On Thu, Mar 22, 2018 at 03:35:42PM +, Quentin Monnet wrote: >> 2018-03-22 14:32 UTC+0100 ~ Jiri Olsa >>> On Thu, Mar 22, 2018 at 10:34:18AM +0100, Daniel Borkmann wrote: On 03/21/2018 07:37 PM, Jiri Olsa wrote: > On Wed,

Re: [PATCH net-next] fib_rules: rename FRA_PROTOCOL to FRA_ORIGINATOR

2018-03-22 Thread David Miller
From: Nicolas Dichtel Date: Tue, 20 Mar 2018 18:04:53 +0100 > As the comment said, this attribute defines the originator of the rule, > it's not really a (network) protocol. > Let's rename it accordingly to avoid confusion (difference between > FRA_PROTOCOL and

Re: [bpf-next V4 PATCH 13/15] mlx5: use page_pool for xdp_return_frame call

2018-03-22 Thread Tariq Toukan
On 22/03/2018 4:22 PM, Jesper Dangaard Brouer wrote: This patch shows how it is possible to have both the driver local page cache, which uses elevated refcnt for "catching"/avoiding SKB put_page. And at the same time, have pages getting returned to the page_pool from ndp_xdp_xmit DMA

Re: [PATCH v3 net] net/ipv6: Handle onlink flag with multipath routes

2018-03-22 Thread David Miller
From: David Ahern Date: Tue, 20 Mar 2018 10:06:59 -0700 > For multipath routes the ONLINK flag can be specified per nexthop in > rtnh_flags or globally in rtm_flags. Update ip6_route_multipath_add > to consider the ONLINK setting coming from rtnh_flags. Each loop over >

Re: [PATCH PATCH net 0/4] hv_netvsc: fix races during shutdown and changes

2018-03-22 Thread David Miller
From: Stephen Hemminger Date: Tue, 20 Mar 2018 15:03:01 -0700 > This set of patches fixes issues identified by Vitaly Kuznetsov and > Mohammed Gamal related to state changes in Hyper-v network driver. > > A lot of the issues are because setting up the netvsc device

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-22 Thread Al Viro
On Wed, Mar 21, 2018 at 08:40:10AM +0100, Christoph Hellwig wrote: > Simple one-shot poll through the io_submit() interface. To poll for > a file descriptor the application should submit an iocb of type > IOCB_CMD_POLL. It will poll the fd for the events specified in the > the first 32 bits of

Re: [PATCH net] net: dsa: Fix functional dsa-loop dependency on FIXED_PHY

2018-03-22 Thread David Miller
From: Florian Fainelli Date: Tue, 20 Mar 2018 17:31:10 -0700 > We have a functional dependency on the FIXED_PHY MDIO bus because we register > fixed PHY devices "the old way" which only works if the code that does this > has > had a chance to run before the fixed MDIO bus

[net-next v2] intel: add SPDX identifiers to all the Intel drivers

2018-03-22 Thread Jeff Kirsher
Add the SPDX identifiers to all the Intel wired LAN driver files, as outlined in Documentation/process/license-rules.rst. Signed-off-by: Jeff Kirsher Tested-by: Aaron Brown --- v2: based on community feedback, went back to the v2.6 version

Re: [PATCH v2 1/8] page_frag_cache: Remove pfmemalloc bool

2018-03-22 Thread Matthew Wilcox
On Thu, Mar 22, 2018 at 09:39:40AM -0700, Alexander Duyck wrote: > So I was just thinking about this and it would probably make more > sense to look at addressing this after you take care of your > conversion from size/offset to a mask. One thing with the mask is that > it should never reach 64K

Re: [PATCH net-next] devlink: Remove top_hierarchy arg to devlink_resource_register

2018-03-22 Thread David Miller
From: David Ahern Date: Tue, 20 Mar 2018 19:31:14 -0700 > top_hierarchy arg can be determined by comparing parent_resource_id to > DEVLINK_RESOURCE_ID_PARENT_TOP so it does not need to be a separate > argument. > > Signed-off-by: David Ahern Applied,

Re: [PATCH net-next 00/11] fix some bugs for HNS3 driver

2018-03-22 Thread David Miller
From: Peng Li Date: Wed, 21 Mar 2018 15:49:19 +0800 > This patchset fixes some bugs for HNS3 driver: > [Patch 1/11 - 5/11] fix various bugs reported by hisilicon test team. > [Patch 6/11 - 7/11] fix bugs about interrupt coalescing self-adaptive > function. > [Patch 8/11 -

Re: [RFC PATCH 2/3] x86/io: implement 256-bit IO read and write

2018-03-22 Thread Linus Torvalds
On Thu, Mar 22, 2018 at 3:48 AM, David Laight wrote: > From: Linus Torvalds >> >> Note that we definitely have seen hardware that *depends* on the >> regular memcpy_fromio()" not doing big reads. I don't know how >> hardware people screw it up, but it's clearly possible.

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-22 Thread Christoph Hellwig
On Thu, Mar 22, 2018 at 04:52:55PM +, Al Viro wrote: > On Wed, Mar 21, 2018 at 08:40:10AM +0100, Christoph Hellwig wrote: > > Simple one-shot poll through the io_submit() interface. To poll for > > a file descriptor the application should submit an iocb of type > > IOCB_CMD_POLL. It will

[RFC PATCH 2/5] net: macb: Support clock management for tsu_clk

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam TSU clock needs to be enabled/disabled as per support in devicetree and it should also be controlled during suspend/resume (WOL has no dependency on this clock). Signed-off-by: Harini Katakam --- drivers/net/ethernet/cadence/macb.h

Re: DTS for our Configuration

2018-03-22 Thread Andrew Lunn
> As you understand, I prefer not to change the driver. Actually, i don't understand why you prefer not to change the driver. > Is there a way for me to bypass this issue? > Can I use other property than 'fixed-link'? My quick look at the driver makes me think you are going to have to change

[RFC PATCH 3/5] net: macb: Add pm runtime support

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam Add runtime pm functions and move clock handling there. Enable clocks in mdio read/write functions. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Harini Katakam ---

[RFC PATCH 1/5] net: macb: Check MDIO state before read/write and use timeouts

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam Replace the while loop in MDIO read/write functions with a timeout. In addition, add a check for MDIO bus busy before initiating a new operation as well to make sure there is no ongoing MDIO operation. Signed-off-by: Shubhrajyoti Datta

[RFC PATCH 0/5] Macb power management support for ZynqMP

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam This series adds support for macb suspend/resume with system power down and wake on LAN with ARP packets. In relation to the above, this series also updates mdio_read/write function for PM and adds tsu clock management. Harini Katakam (5): net: macb:

Re: Fwd: Kernel panic when using KVM and mlx4_en driver (when bonding and sriov enabled)

2018-03-22 Thread Tariq Toukan
On 20/03/2018 10:14 PM, kvaps wrote: Hello, I have one bug with new HPE ProLiant m710x Server Cartridges, there is Mellanox Technologies MT27520 Family [ConnectX-3 Pro] Ethernet controller. When I use bonding + VFs and KVM I have stacked kernel with these messages on console: [ 1011.070739]

Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation

2018-03-22 Thread Jiri Pirko
Thu, Mar 22, 2018 at 03:40:02PM CET, ro...@cumulusnetworks.com wrote: >On Thu, Mar 22, 2018 at 3:55 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This patchset resolves 2 issues we have right now: >> 1) There are many netdevices / ports in the system, for

[PATCH v3 2/2] i40e: add support for XDP_REDIRECT

2018-03-22 Thread Björn Töpel
From: Björn Töpel The driver now acts upon the XDP_REDIRECT return action. Two new ndos are implemented, ndo_xdp_xmit and ndo_xdp_flush. XDP_REDIRECT action enables XDP program to redirect frames to other netdevs. Signed-off-by: Björn Töpel ---

[PATCH v3 1/2] i40e: tweak page counting for XDP_REDIRECT

2018-03-22 Thread Björn Töpel
From: Björn Töpel This commit tweaks the page counting for XDP_REDIRECT to function properly. XDP_REDIRECT support will be added in a future commit. The current page counting scheme assumes that the reference count cannot decrease until the received frame is sent to the

Re: [PATCH net-next] net: Convert can_pernet_ops

2018-03-22 Thread David Miller
From: Kirill Tkhai Date: Mon, 19 Mar 2018 14:39:05 +0300 > These pernet_operations create and destroy /proc entries > and cancel per-net timer. > > Also, there are unneed iterations over empty list of net > devices, since all net devices must be already moved > to init_net

Re: [PATCH net-next 2/2 v4] netns: send uevent messages

2018-03-22 Thread David Miller
From: Christian Brauner Date: Mon, 19 Mar 2018 13:17:31 +0100 > This patch adds a receive method to NETLINK_KOBJECT_UEVENT netlink sockets > to allow sending uevent messages into the network namespace the socket > belongs to. > > Currently non-initial network

Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation

2018-03-22 Thread David Ahern
On 3/22/18 4:55 AM, Jiri Pirko wrote: > From: Jiri Pirko > > This patchset resolves 2 issues we have right now: > 1) There are many netdevices / ports in the system, for port, pf, vf >represenatation but the user has no way to see which is which > 2) The

Re: [PATCH v2 6/8] page_frag_cache: Use a mask instead of offset

2018-03-22 Thread Alexander Duyck
On Thu, Mar 22, 2018 at 8:31 AM, Matthew Wilcox wrote: > From: Matthew Wilcox > > By combining 'va' and 'offset' into 'addr' and using a mask instead, > we can save a compare-and-branch in the fast-path of the allocator. > This removes 4 instructions

Re: [PATCH net] ipv6: sr: fix scheduling in RCU when creating seg6 lwtunnel state

2018-03-22 Thread David Miller
From: Eric Dumazet Date: Tue, 20 Mar 2018 10:20:15 -0700 > > > On 03/20/2018 10:11 AM, David Lebrun wrote: >> On 20/03/18 15:07, Eric Dumazet wrote: >>> This is not the proper fix. >>> >>> Control path holds RTNL and can sleeep if needed. >>> >>> RCU should be avoided

Re: [PATCH net] ppp: avoid loop in xmit recursion detection code

2018-03-22 Thread David Miller
From: Guillaume Nault Date: Tue, 20 Mar 2018 16:49:26 +0100 > We already detect situations where a PPP channel sends packets back to > its upper PPP device. While this is enough to avoid deadlocking on xmit > locks, this doesn't prevent packets from looping between the

Re: [bpf-next V4 PATCH 01/15] mlx5: basic XDP_REDIRECT forward support

2018-03-22 Thread Tariq Toukan
On 22/03/2018 4:21 PM, Jesper Dangaard Brouer wrote: This implements basic XDP redirect support in mlx5 driver. Notice that the ndo_xdp_xmit() is NOT implemented, because that API need some changes that this patchset is working towards. The main purpose of this patch is have different

[PATCH v2 net-next 5/6] tls: RX path for ktls

2018-03-22 Thread Dave Watson
Add rx path for tls software implementation. recvmsg, splice_read, and poll implemented. An additional sockopt TLS_RX is added, with the same interface as TLS_TX. Either TLX_RX or TLX_TX may be provided separately, or together (with two different setsockopt calls with appropriate keys).

[PATCH v2 net-next 1/6] tls: Generalize zerocopy_from_iter

2018-03-22 Thread Dave Watson
Refactor zerocopy_from_iter to take arguments for pages and size, such that it can be used for both tx and rx. RX will also support zerocopy direct to output iter, as long as the full message can be copied at once (a large enough userspace buffer was provided). Signed-off-by: Dave Watson

[PATCH v2 net-next 4/6] tls: Refactor variable names

2018-03-22 Thread Dave Watson
Several config variables are prefixed with tx, drop the prefix since these will be used for both tx and rx. Signed-off-by: Dave Watson --- include/net/tls.h | 2 +- net/tls/tls_main.c | 26 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff

[PATCH v2 net-next 2/6] tls: Move cipher info to a separate struct

2018-03-22 Thread Dave Watson
Separate tx crypto parameters to a separate cipher_context struct. The same parameters will be used for rx using the same struct. tls_advance_record_sn is modified to only take the cipher info. Signed-off-by: Dave Watson --- include/net/tls.h | 26 +---

[PATCH v5 1/5] net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Sinan Kaya
Code includes wmb() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Since code already has an explicit barrier call, changing writel() to writel_relaxed().

[PATCH v2 net-next 0/6] TLS Rx

2018-03-22 Thread Dave Watson
TLS tcp socket RX implementation, to match existing TX code. This patchset completes the software TLS socket, allowing full bi-directional communication over TLS using normal socket syscalls, after the handshake has been done in userspace. Only the symmetric encryption is done in the kernel.

[PATCH v2 net-next 6/6] tls: Add receive path documentation

2018-03-22 Thread Dave Watson
Add documentation on rx path setup and cmsg interface. Signed-off-by: Dave Watson --- Documentation/networking/tls.txt | 66 ++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/tls.txt

[PATCH v2 net-next 3/6] tls: Pass error code explicitly to tls_err_abort

2018-03-22 Thread Dave Watson
Pass EBADMSG explicitly to tls_err_abort. Receive path will pass additional codes - EMSGSIZE if framing is larger than max TLS record size, EINVAL if TLS version mismatch. Signed-off-by: Dave Watson --- include/net/tls.h | 6 +++--- net/tls/tls_sw.c | 2 +- 2 files

Re: pull-request: mac80211 2018-03-21

2018-03-22 Thread David Miller
From: Johannes Berg Date: Wed, 21 Mar 2018 13:06:54 +0100 > Another few fixes - one for hwsim, so not really all that interesting, > and two patches to work around an ath9k_htc problem. > > Note that I pulled your net tree today, so you may need to be careful > to not

Re: [PATCH v2 6/8] page_frag_cache: Use a mask instead of offset

2018-03-22 Thread Alexander Duyck
On Thu, Mar 22, 2018 at 9:41 AM, Matthew Wilcox wrote: > On Thu, Mar 22, 2018 at 09:22:31AM -0700, Alexander Duyck wrote: >> On Thu, Mar 22, 2018 at 8:31 AM, Matthew Wilcox wrote: >> > By combining 'va' and 'offset' into 'addr' and using a mask instead,

Re: [PATCH v3 bpf-next 01/10] treewide: remove struct-pass-by-value from tracepoints arguments

2018-03-22 Thread Steven Rostedt
On Thu, 22 Mar 2018 11:01:48 -0700 Alexei Starovoitov wrote: > From: Alexei Starovoitov > > Fix all tracepoint arguments to pass structures (large and small) by reference > instead of by value. > Avoiding passing large structs by value is a good coding style. >

Re: [RFC PATCH] etherdevice.h: net/core: Add ether_addrs.c and global ether__addr

2018-03-22 Thread David Miller
From: Joe Perches Date: Wed, 21 Mar 2018 02:03:37 -0700 > There are multiple instances of static const arrays for broadcast > and zero ethernet addresses used for various purposes. > > Add const u8 ether__addr[ETH_ALEN] globals to consolidate these uses. > > Miscellanea: > >

Re: [PATCH][next] gre: fix TUNNEL_SEQ bit check on sequence numbering

2018-03-22 Thread David Miller
From: Colin King Date: Wed, 21 Mar 2018 19:34:58 + > From: Colin Ian King > > The current logic of flags | TUNNEL_SEQ is always non-zero and hence > sequence numbers are always incremented no matter the setting of the > TUNNEL_SEQ bit.

Re: [PATCH v2 6/8] page_frag_cache: Use a mask instead of offset

2018-03-22 Thread Matthew Wilcox
On Thu, Mar 22, 2018 at 09:41:57AM -0700, Matthew Wilcox wrote: > On Thu, Mar 22, 2018 at 09:22:31AM -0700, Alexander Duyck wrote: > > You could just use the pfc->mask here instead of size - 1 just to > > avoid having to do the subtraction more than once assuming the > > compiler doesn't optimize

Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access

2018-03-22 Thread Alexei Starovoitov
On Thu, Mar 22, 2018 at 10:33:43AM +0100, Ingo Molnar wrote: > > - I think the BPF JIT, whose byte code machine languge is used by an >increasing number of kernel subsystems, could benefit from having vector > ops. >It would possibly allow the handling of floating point types. this is

[PATCH v3 bpf-next 09/10] samples/bpf: raw tracepoint test

2018-03-22 Thread Alexei Starovoitov
From: Alexei Starovoitov add empty raw_tracepoint bpf program to test overhead similar to kprobe and traditional tracepoint tests Signed-off-by: Alexei Starovoitov --- samples/bpf/Makefile| 1 + samples/bpf/bpf_load.c |

[PATCH v3 bpf-next 04/10] net/wireless/iwlwifi: fix iwlwifi_dev_ucode_error tracepoint

2018-03-22 Thread Alexei Starovoitov
From: Alexei Starovoitov fix iwlwifi_dev_ucode_error tracepoint to pass pointer to a table instead of all 17 arguments by value. dvm/main.c and mvm/utils.c have 'struct iwl_error_event_table' defined with very similar yet subtly different fields and offsets. tracepoint is still

[PATCH v3 bpf-next 03/10] net/mac802154: disambiguate mac80215 vs mac802154 trace events

2018-03-22 Thread Alexei Starovoitov
From: Alexei Starovoitov two trace events defined with the same name and both unused. They conflict in allyesconfig build. Rename one of them. Signed-off-by: Alexei Starovoitov --- net/mac802154/trace.h | 8 1 file changed, 4 insertions(+), 4

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-22 Thread Al Viro
On Thu, Mar 22, 2018 at 06:24:10PM +0100, Christoph Hellwig wrote: > -static void aio_complete(struct aio_kiocb *iocb, long res, long res2) > +static bool aio_complete(struct aio_kiocb *iocb, long res, long res2, > + unsigned complete_flags) Looks like all callers are following that

[PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free

2018-03-22 Thread Gustavo A. R. Silva
_rule_ is being freed and then dereferenced by accessing rule->ctx Fix this by copying the value returned by PTR_ERR(rule->ctx) into a local variable for its safe use after freeing _rule_ Addresses-Coverity-ID: 1466041 ("Read from pointer after free") Fixes: 05564d0ae075 ("net/mlx5: Add

Re: [PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free

2018-03-22 Thread Yuval Shaia
On Thu, Mar 22, 2018 at 01:03:42PM -0500, Gustavo A. R. Silva wrote: > _rule_ is being freed and then dereferenced by accessing rule->ctx > > Fix this by copying the value returned by PTR_ERR(rule->ctx) into a local > variable for its safe use after freeing _rule_ > > Addresses-Coverity-ID:

Re: [PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free

2018-03-22 Thread Gustavo A. R. Silva
Hi Yuval, On 03/22/2018 01:32 PM, Yuval Shaia wrote: On Thu, Mar 22, 2018 at 01:03:42PM -0500, Gustavo A. R. Silva wrote: _rule_ is being freed and then dereferenced by accessing rule->ctx Fix this by copying the value returned by PTR_ERR(rule->ctx) into a local variable for its safe use

Re: [PATCH net-next v2] net: mvpp2: Don't use dynamic allocs for local variables

2018-03-22 Thread David Miller
From: Maxime Chevallier Date: Wed, 21 Mar 2018 16:14:00 +0100 > diff --git a/drivers/net/ethernet/marvell/mvpp2.c > b/drivers/net/ethernet/marvell/mvpp2.c > index 9bd35f2291d6..28e33e139178 100644 > --- a/drivers/net/ethernet/marvell/mvpp2.c > +++

Re: [PATCH][next] net: mvpp2: use correct index on array mvpp2_pools

2018-03-22 Thread David Miller
From: Colin King Date: Wed, 21 Mar 2018 17:31:15 + > From: Colin Ian King > > Array mvpp2_pools is being indexed by long_log_pool, however this > looks like a cut-n-paste bug and in fact should be short_log_pool. > > Detected by

Re: [PATCH net-next 1/1] tc-testing: Correct compound statements for namespace execution

2018-03-22 Thread David Miller
From: Lucas Bates Date: Wed, 21 Mar 2018 11:49:40 -0400 > } > -] > \ No newline at end of file > +] > -- > 2.7.4 Please fix this.

Re: [RFC PATCH] net: stmmac: dwmac-sun8i: sun8i_syscon_reg_field can be static

2018-03-22 Thread David Miller
From: kbuild test robot Date: Thu, 22 Mar 2018 15:42:18 +0800 > > Fixes: e3c10deef23c ("net: stmmac: dwmac-sun8i: Use regmap_field for syscon > register access") > Signed-off-by: Fengguang Wu This commit ID and this symbol are both not present in any

Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access

2018-03-22 Thread Andy Lutomirski
On Thu, Mar 22, 2018 at 5:40 PM, Alexei Starovoitov wrote: > On Thu, Mar 22, 2018 at 10:33:43AM +0100, Ingo Molnar wrote: >> >> - I think the BPF JIT, whose byte code machine languge is used by an >>increasing number of kernel subsystems, could benefit from

Re: [patch net-next RFC 00/12] devlink: introduce port flavours and common phys_port_name generation

2018-03-22 Thread Jiri Pirko
Thu, Mar 22, 2018 at 04:34:07PM CET, dsah...@gmail.com wrote: >On 3/22/18 4:55 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> This patchset resolves 2 issues we have right now: >> 1) There are many netdevices / ports in the system, for port, pf, vf >>represenatation but

[PATCH v3 bpf-next 02/10] net/mediatek: disambiguate mt76 vs mt7601u trace events

2018-03-22 Thread Alexei Starovoitov
From: Alexei Starovoitov two trace events defined with the same name and both unused. They conflict in allyesconfig build. Rename one of them. Signed-off-by: Alexei Starovoitov --- drivers/net/wireless/mediatek/mt7601u/trace.h | 6 +++--- 1 file changed, 3

[PATCH v3 bpf-next 07/10] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-22 Thread Alexei Starovoitov
From: Alexei Starovoitov Introduce BPF_PROG_TYPE_RAW_TRACEPOINT bpf program type to access kernel internal arguments of the tracepoints in their raw form. >From bpf program point of view the access to the arguments look like: struct bpf_raw_tracepoint_args { __u64

Re: [PATCH] macsec: missing dev_put() on error in macsec_newlink()

2018-03-22 Thread David Miller
From: Dan Carpenter Date: Wed, 21 Mar 2018 11:09:01 +0300 > We moved the dev_hold(real_dev); call earlier in the function but forgot > to update the error paths. > > Fixes: 0759e552bce7 ("macsec: fix negative refcnt on parent link") > Signed-off-by: Dan Carpenter

[PATCH net-next 2/2] net: Convert rxrpc_net_ops

2018-03-22 Thread Kirill Tkhai
These pernet_operations modifies rxrpc_net_id-pointed per-net entities. There is external link to AF_RXRPC in fs/afs/Kconfig, but it seems there is no other pernet_operations interested in that per-net entities. Signed-off-by: Kirill Tkhai Acked-by: David Howells

[PATCH net-next 0/2] Converting pernet_operations (part #11)

2018-03-22 Thread Kirill Tkhai
Hi, this series continues to review and to convert pernet_operations to make them possible to be executed in parallel for several net namespaces at the same time. I thought last series was last, but there is one new pernet_operations came to kernel. This is udp_sysctl_ops, and here we convert

[PATCH net-next 1/2] net: Convert udp_sysctl_ops

2018-03-22 Thread Kirill Tkhai
These pernet_operations just initialize udp4 defaults. Signed-off-by: Kirill Tkhai --- net/ipv4/udp.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 908fc02fb4f8..c6dc019bc64b 100644 --- a/net/ipv4/udp.c +++

Re: [PATCH net-next V2] Documentation/networking: Add net DIM documentation

2018-03-22 Thread David Miller
From: Tal Gilboa Date: Wed, 21 Mar 2018 20:33:45 +0200 > Net DIM is a generic algorithm, purposed for dynamically > optimizing network devices interrupt moderation. This > document describes how it works and how to use it. > > Signed-off-by: Tal Gilboa

<    1   2   3   4   >