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

2018-03-22 Thread Raghuram Chary J
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 not set i.e in default state,causing EEE fail. Fix: Set the register when eeprom is not p

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

2018-03-22 Thread kbuild test robot
Fixes: e3c10deef23c ("net: stmmac: dwmac-sun8i: Use regmap_field for syscon register access") Signed-off-by: Fengguang Wu --- dwmac-sun8i.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/st

Re: [PATCH net-next 06/12] net: stmmac: dwmac-sun8i: Use regmap_field for syscon register access

2018-03-22 Thread kbuild test robot
Hi Chen-Yu, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [also build test WARNING on v4.16-rc6] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

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

2018-03-22 Thread kbuild test robot
Fixes: 0e59c15b2797 ("net: stmmac: dwmac-sun8i: Add support for GMAC on Allwinner R40 SoC") Signed-off-by: Fengguang Wu --- dwmac-sun8i.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmm

Re: [PATCH net-next 09/12] net: stmmac: dwmac-sun8i: Add support for GMAC on Allwinner R40 SoC

2018-03-22 Thread kbuild test robot
Hi Chen-Yu, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [also build test WARNING on v4.16-rc6] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] ixgbe: tweak page counting for XDP_REDIRECT

2018-03-22 Thread Björn Töpel
From: Björn Töpel The current page counting scheme assumes that the reference count cannot decrease until the received frame is sent to the upper layers of the networking stack. This assumption does not hold for the XDP_REDIRECT action, since a page (pointed out by xdp_buff) can have its referenc

[PATCH net] virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS

2018-03-22 Thread Jay Vosburgh
The operstate update logic will leave an interface in the default UNKNOWN operstate if the interface carrier state never changes from the default carrier up state set at creation. This includes the case of an explicit call to netif_carrier_on, as the carrier on to on transition has no effe

[PATCH v2 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 upper layers of the netwo

[PATCH v2 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 --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2

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

2018-03-22 Thread Antoine Tenart
Hi Colin, On Wed, Mar 21, 2018 at 05:31:15PM +, Colin King wrote: > 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 CoverityScan, CID#1466113 ("Copy-paste error")

Re: [v2] vhost: add vsock compat ioctl

2018-03-22 Thread Stefan Hajnoczi
On Fri, Mar 16, 2018 at 7:30 PM, David Miller wrote: > Although the top level ioctls are probably size and layout compatible, > I do not think that the deeper ioctls can be called by compat binaries > without some translations in order for them to work. I audited the vhost ioctl code when reviewi

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 not

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

2018-03-22 Thread Ingo Molnar
* Linus Torvalds wrote: > And the real worry is things like AVX-512 etc, which is exactly when > things like "save and restore one ymm register" will quite likely > clear the upper bits of the zmm register. Yeah, I think the only valid save/restore pattern is to 100% correctly enumerate the w

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

2018-03-22 Thread Daniel Borkmann
On 03/21/2018 07:37 PM, Jiri Olsa wrote: > On Wed, Mar 21, 2018 at 05:25:33PM +, Quentin Monnet wrote: >> 2018-03-21 16:02 UTC+0100 ~ Jiri Olsa >>> We use print_bpf_insn in user space (bpftool and soon perf), >>> so it'd be nice to keep it generic and strip it off the kernel >>> struct bpf_ver

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

2018-03-22 Thread Ingo Molnar
* Andy Lutomirski wrote: > On Wed, Mar 21, 2018 at 6:32 AM, Ingo Molnar wrote: > > > > * Linus Torvalds wrote: > > > >> And even if you ignore that "maintenance problems down the line" issue > >> ("we can fix them when they happen") I don't want to see games like > >> this, because I'm pretty

Re: [PATCH V2 net-next 07/14] net/tls: Support TLS device offload with IPv6

2018-03-22 Thread Sergei Shtylyov
Hello! On 3/22/2018 12:01 AM, Saeed Mahameed wrote: From: Ilya Lesokhin Previously get_netdev_for_sock worked only with IPv4. Signed-off-by: Ilya Lesokhin Signed-off-by: Boris Pismenny Signed-off-by: Saeed Mahameed Only stylistic comments... --- net/tls/tls_device.c | 49

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

2018-03-22 Thread Daniel Borkmann
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 **regs, int *rctxp); > > +void bpf_trac

[PATCH net-next v3 1/5] net: Revert "ipv4: get rid of ip_ra_lock"

2018-03-22 Thread Kirill Tkhai
This reverts commit ba3f571d5dde. The commit was made after 1215e51edad1 "ipv4: fix a deadlock in ip_ra_control", and killed ip_ra_lock, which became useless after rtnl_lock() made used to destroy every raw ipv4 socket. This scales very bad, and next patch in series reverts 1215e51edad1. ip_ra_lock

[PATCH net-next v3 2/5] net: Move IP_ROUTER_ALERT out of lock_sock(sk)

2018-03-22 Thread Kirill Tkhai
ip_ra_control() does not need sk_lock. Who are the another users of ip_ra_chain? ip_mroute_setsockopt() doesn't take sk_lock, while parallel IP_ROUTER_ALERT syscalls are synchronized by ip_ra_lock. So, we may move this command out of sk_lock. Signed-off-by: Kirill Tkhai --- net/ipv4/ip_sockglue.

[PATCH net-next v3 3/5] net: Revert "ipv4: fix a deadlock in ip_ra_control"

2018-03-22 Thread Kirill Tkhai
This reverts commit 1215e51edad1. Since raw_close() is used on every RAW socket destruction, the changes made by 1215e51edad1 scale sadly. This clearly seen on endless unshare(CLONE_NEWNET) test, and cleanup_net() kwork spends a lot of time waiting for rtnl_lock() introduced by this commit. Previo

[PATCH net-next v3 0/5] Rework ip_ra_chain protection

2018-03-22 Thread Kirill Tkhai
Commit 1215e51edad1 "ipv4: fix a deadlock in ip_ra_control" made rtnl_lock() be used in raw_close(). This function is called on every RAW socket destruction, so that rtnl_mutex is taken every time. This scales very sadly. I observe cleanup_net() spending a lot of time in rtnl_lock() and raw_close()

[PATCH net-next v3 5/5] net: Replace ip_ra_lock with per-net mutex

2018-03-22 Thread Kirill Tkhai
Since ra_chain is per-net, we may use per-net mutexes to protect them in ip_ra_control(). This improves scalability. Signed-off-by: Kirill Tkhai --- include/net/netns/ipv4.h |1 + net/core/net_namespace.c |1 + net/ipv4/ip_sockglue.c | 15 ++- 3 files changed, 8 insertion

[PATCH net-next v3 4/5] net: Make ip_ra_chain per struct net

2018-03-22 Thread Kirill Tkhai
This is optimization, which makes ip_call_ra_chain() iterate less sockets to find the sockets it's looking for. Signed-off-by: Kirill Tkhai --- include/net/ip.h | 13 +++-- include/net/netns/ipv4.h |1 + net/ipv4/ip_input.c |5 ++--- net/ipv4/ip_sockglue.c | 15

Re: [PATCH net-next v3 0/5] Rework ip_ra_chain protection

2018-03-22 Thread Kirill Tkhai
On 22.03.2018 12:44, Kirill Tkhai wrote: > Commit 1215e51edad1 "ipv4: fix a deadlock in ip_ra_control" > made rtnl_lock() be used in raw_close(). This function is called > on every RAW socket destruction, so that rtnl_mutex is taken > every time. This scales very sadly. I observe cleanup_net() > sp

RE: DTS for our Configuration

2018-03-22 Thread Alayev Michael
Hi Andrew, >I think this is a problem with the macb driver. To me, it looks like you are >going to have to >make some changes to the driver to make this work. Normally >the MDIO bus children are >placed within a container node, often called >'mdio-bus' or simply 'mdio'. See for example >>Docum

RE: [PATCH v4 11/17] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-22 Thread Kalluru, Sudarsana
-Original Message- From: Sinan Kaya [mailto:ok...@codeaurora.org] Sent: 20 March 2018 08:12 To: netdev@vger.kernel.org; ti...@codeaurora.org; sulr...@codeaurora.org Cc: linux-arm-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; Sinan Kaya ; Elior, Ariel ; Dept-Eng Everest Linux

[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 net/netfi

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-22 Thread Jakob Unterwurzacher
On 21.03.18 21:52, John Fastabend wrote: Can you try this, diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d4907b5..1e596bd 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -30,6 +30,7 @@ struct qdisc_rate_table { enum qdisc_state_t {

Re: [PATCH 1/2] r8169: reinstate ALDPS for power saving

2018-03-22 Thread Kai-Heng Feng
Kai Heng Feng wrote: Hopefully Hayes (or Realtek) can shed more lights on the issue. Apparently ALDPS and ASPM for r8169 is enabled in different commercial products, just not in Linux mainline. Hayes and Realtek folks, How do we make this patch going forward? Do you find the root cause that

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; sd-sgentry-align = 512; brcmf:

Drop count for VLAN tagged packets when interface is in promiscuous mode

2018-03-22 Thread Mikael Arvids
Hi, I have questions regarding how packet drops are counted in net/core/dev.c. We open a raw socket (with ETH_P_ALL) in promiscuous mode to capture all packets we receive from a mirrored port on a switch, and in order to ensure that we are not missing any packets we check the rx_dropped statist

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

2018-03-22 Thread David Laight
From: Sent: 21 March 2018 18:16 > To: Ingo Molnar ... > All this to do a 32-byte PIO access, with absolutely zero data right > now on what the win is? > > Yes, yes, I can find an Intel white-paper that talks about setting WC > and then using xmm and ymm instructions to write a single 64-byte > bur

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

2018-03-22 Thread David Laight
From: Linus Torvalds > Sent: 22 March 2018 01:27 > On Tue, Mar 20, 2018 at 7:42 AM, Alexander Duyck > wrote: > > > > Instead of framing this as an enhanced version of the read/write ops > > why not look at replacing or extending something like the > > memcpy_fromio or memcpy_toio operations? > >

[patch net-next RFC 05/12] dsa: use devlink helper to generate physical port name

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Since devlink knows the info needed to generate the physical port name in a generic way for all devlink users, use the helper to do the job. Signed-off-by: Jiri Pirko --- net/dsa/slave.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/dsa/slave.c

[patch net-next RFC 02/12] devlink: extend attrs_set for setting port flavours

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Devlink ports can have specific flavour according to the purpose of use. This patch extend attrs_set so the driver can say which flavour port has. Initial flavours are: physical, pf_rep, vf_rep, cpu, dsa User can query this to see right away what is the purpose of each port. Sig

[patch net-next RFC 09/12] nfp: register devlink port for VF/PF representors

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Drivers should always register devlink port instance for all their ports. So fix nfp and register devlink port for VF and PF representors. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 8 1 file changed, 8 insertions(+) diff --git

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

2018-03-22 Thread Jiri Pirko
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 ndo_get_phys_port_name is implemented in each driver separatelly, which may lead to i

[patch net-next RFC 08/12] nfp: set eth_id for representors to avoid port index conflict

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Incorrect, need to be done differently Signed-off-by: Jiri Pirko --- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c i

[patch net-next RFC 03/12] devlink: introduce a helper to generate physical port names

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Each driver implements physical port name generation by itself. However as devlink has all needed info, it can easily do the job for all its users. So implement this helper in devlink. Signed-off-by: Jiri Pirko --- include/net/devlink.h | 9 + net/core/devlink.c|

[patch net-next RFC 07/12] nfp: flower: fix error path during representor creation

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Don't store repr pointer to reprs array until the representor is successfully created. This avoids message about "representor destruction" even when it was never created. Also it cleans-up the flow. Also, check return value after port alloc. Signed-off-by: Jiri Pirko --- drive

[patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Set the attrs and allow to expose port flavour to user via devlink. Signed-off-by: Jiri Pirko --- net/dsa/dsa2.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index adf50fbc4c13..49453690696d 100644 --- a/net/dsa/d

[patch net-next RFC 01/12] devlink: introduce devlink_port_attrs_set

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Change existing setter for split port information into more generic attrs setter. Alongside with that, allow to set port number and subport number for split ports. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 7 ++-- drivers/net/ethernet/me

[patch net-next RFC 11/12] nfp: use devlink helper to generate physical port name

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Since devlink knows the info needed to generate the physical port name in a generic way for all devlink users, use the helper to do the job. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/netronome/nfp/nfp_port.c | 30 ++- 1 file changed, 2 insertio

[patch net-next RFC 10/12] nfp: flower: create port for flower vnic

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- drivers/net/ethernet/netronome/nfp/flower/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.c b/drivers/net/ethernet/netronome/nfp/flower/main.c index aed8df0e9d41..1890af7e

[patch net-next RFC 06/12] mlxsw: use devlink helper to generate physical port name

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Since devlink knows the info needed to generate the physical port name in a generic way for all devlink users, use the helper to do the job. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 11 +++ drivers/net/ethernet/mellanox/mlxsw/core.

[patch net-next RFC 12/12] nfp: flower: set sysfs link to device for representors

2018-03-22 Thread Jiri Pirko
From: Jiri Pirko Do this so the sysfs has "device" link correctly set. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/netronome/nfp/flower/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.c b/drivers/net/ethernet/netronome/nfp/flowe

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

2018-03-22 Thread Florian Westphal
Paolo Abeni wrote: > 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: > > WA

Re: [PATCH/RFC 2/3] net/sched: act_tunnel_key: add extended ack support

2018-03-22 Thread Simon Horman
On Fri, Mar 09, 2018 at 12:22:48PM +0100, Jiri Benc wrote: > On Tue, 6 Mar 2018 18:08:04 +0100, Simon Horman wrote: > > - if (!tb[TCA_TUNNEL_KEY_PARMS]) > > + if (!tb[TCA_TUNNEL_KEY_PARMS]) { > > + NL_SET_ERR_MSG(extack, "Missing tunnel key parameter"); > > "parameters" (it's not ju

Re: [PATCH net] virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS

2018-03-22 Thread Michael S. Tsirkin
On Thu, Mar 22, 2018 at 09:05:52AM +, Jay Vosburgh wrote: > The operstate update logic will leave an interface in the > default UNKNOWN operstate if the interface carrier state never changes > from the default carrier up state set at creation. This includes the > case of an explicit call

Re: [PATCH/RFC 3/3] net/sched: add tunnel option support to act_tunnel_key

2018-03-22 Thread Simon Horman
On Fri, Mar 09, 2018 at 12:53:17PM +0100, Jiri Benc wrote: > On Tue, 6 Mar 2018 18:08:05 +0100, Simon Horman wrote: > > +static int > > +tunnel_key_copy_geneve_opt(const struct nlattr *nla, int dst_len, void > > *dst, > > + struct netlink_ext_ack *extack) > > +{ > > + struc

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

2018-03-22 Thread Pablo Neira Ayuso
On Thu, Mar 22, 2018 at 11:08:50AM +0100, Paolo Abeni wrote: > 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

Re: [PATCH v2 2/2] i40e: add support for XDP_REDIRECT

2018-03-22 Thread Jesper Dangaard Brouer
On Thu, 22 Mar 2018 10:03:07 +0100 Björn Töpel wrote: > +/** > + * i40e_xdp_xmit - Implements ndo_xdp_xmit > + * @dev: netdev > + * @xdp: XDP buffer > + * > + * Returns Zero if sent, else an error code > + **/ > +int i40e_xdp_xmit(struct net_device *dev, struct xdp_buff *xdp) > +{ The return co

Re: [PATCH net] virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS

2018-03-22 Thread Jay Vosburgh
Michael S. Tsirkin wrote: >On Thu, Mar 22, 2018 at 09:05:52AM +, Jay Vosburgh wrote: >> The operstate update logic will leave an interface in the >> default UNKNOWN operstate if the interface carrier state never changes >> from the default carrier up state set at creation. This includes

Re: [PATCH v2 2/2] i40e: add support for XDP_REDIRECT

2018-03-22 Thread Björn Töpel
2018-03-22 12:58 GMT+01:00 Jesper Dangaard Brouer : > > On Thu, 22 Mar 2018 10:03:07 +0100 Björn Töpel wrote: > >> +/** >> + * i40e_xdp_xmit - Implements ndo_xdp_xmit >> + * @dev: netdev >> + * @xdp: XDP buffer >> + * >> + * Returns Zero if sent, else an error code >> + **/ >> +int i40e_xdp_xmit(s

[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 + .../tc-testing/tc-tests/actions/police.json| 144

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-22 Thread Boris Pismenny
... Can't we move this check in tls_dev_event() and use it for all types of events? Then we avoid duplicate code. No. Not all events require this check. Also, the result is different for different events. No. You always return NOTIFY_DONE, in case of !(netdev->features & NETIF_F_HW_TLS_TX

Re: [PATCH V2 net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-22 Thread Boris Pismenny
On 3/21/2018 11:10 PM, Eric Dumazet wrote: On 03/21/2018 02:01 PM, Saeed Mahameed wrote: From: Ilya Lesokhin This patch adds a generic infrastructure to offload TLS crypto to a ... + +static inline int tls_push_record(struct sock *sk, + struct tls_contex

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

2018-03-22 Thread David Laight
From: David Laight > Sent: 22 March 2018 10:36 ... > Any code would need to be in memcpy_fromio(), not in every driver that > might benefit. > Then fallback code can be used if the registers aren't available. > > > (b) we can't guarantee that %ymm register write will show up on any > > bus as a s

Re: [PATCH net-next 06/14] net/tls: Add generic NIC offload infrastructure

2018-03-22 Thread Kirill Tkhai
On 22.03.2018 15:38, Boris Pismenny wrote: > ... Can't we move this check in tls_dev_event() and use it for all types of events? Then we avoid duplicate code. >>> >>> No. Not all events require this check. Also, the result is different for >>> different events. >> >> No.

Re: [PATCH net-next 1/1] net/ipv4: disable SMC TCP option with SYN Cookies

2018-03-22 Thread Ursula Braun
On 03/20/2018 05:43 PM, Eric Dumazet wrote: > > > On 03/20/2018 09:21 AM, Eric Dumazet wrote: >> >> >> On 03/20/2018 08:53 AM, Ursula Braun wrote: >>> From: Hans Wippel >>> >>> Currently, the SMC experimental TCP option in a SYN packet is lost on >>> the server side when SYN Cookies are active

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 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 Monnet wrote: > >> 2018-03-21 16:02 UTC+0100 ~ Jiri Olsa > >>> We use print_bpf_insn in user space (bpftool and soon perf), > >>> so it'

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

2018-03-22 Thread Steven Rostedt
On Wed, 21 Mar 2018 15:05:46 -0700 Alexei Starovoitov wrote: > Like the only reason my patch is counting till 17 is because of > trace_iwlwifi_dev_ucode_error(). > The next offenders are using 12 arguments: > trace_mc_event() > trace_mm_vmscan_lru_shrink_inactive() > > Clearly not every efficien

RE: [PATCH net 1/1] qede: Fix barrier usage after tx doorbell write.

2018-03-22 Thread Chopra, Manish
> -Original Message- > From: Elior, Ariel > Sent: Wednesday, March 21, 2018 7:10 PM > To: da...@davemloft.net > Cc: netdev@vger.kernel.org; Kalderon, Michal ; > Chopra, Manish > Subject: RE: [PATCH net 1/1] qede: Fix barrier usage after tx doorbell write. > > > Subject: [PATCH net 1/1] qe

Re: [PATCH 28/28] random: convert to ->poll_mask

2018-03-22 Thread Theodore Y. Ts'o
On Wed, Mar 21, 2018 at 08:40:32AM +0100, Christoph Hellwig wrote: > The big change is that random_read_wait and random_write_wait are merged > into a single waitqueue that uses keyed wakeups. Because wait_event_* > doesn't know about that this will lead to occassional spurious wakeups > in _rando

[RFC PATCH 5/5] net: macb: Add WOL support with ARP

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam This patch enables ARP wake event support in GEM through the following: -> WOL capability can be selected based on the SoC/GEM IP version rather than a devictree property alone. Hence add a new capability property and set device as "wakeup capable" in probe in this case. ->

[RFC PATCH 4/5] net: macb: Add support for suspend/resume with full power down

2018-03-22 Thread harinikatakamlinux
From: Harini Katakam When macb device is suspended and system is powered down, the clocks are removed and hence macb should be closed gracefully and restored upon resume. This patch does the same by switching off the net device, suspending phy and performing necessary cleanup of interrupts and BD

[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 | 3 ++- drivers/net/ethernet/caden

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 it

[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 --- drivers/net/ethernet/cadence/macb_main.c | 105 ++- 1 file changed, 90 inser

[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: Check MDIO state befor

[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 Signed-off-by: Harini Katakam --- dr

[iproute PATCH] man: ip-route.8: ssthresh parameter is NUMBER

2018-03-22 Thread Phil Sutter
Synopsis section was inconsistent with regards to help text and later description of ssthresh parameter. Signed-off-by: Phil Sutter --- man/man8/ip-route.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in index 487a87489a46a..

Re: [PATCH net] virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS

2018-03-22 Thread Michael S. Tsirkin
On Thu, Mar 22, 2018 at 12:02:10PM +, Jay Vosburgh wrote: > Michael S. Tsirkin wrote: > > >On Thu, Mar 22, 2018 at 09:05:52AM +, Jay Vosburgh wrote: > >>The operstate update logic will leave an interface in the > >> default UNKNOWN operstate if the interface carrier state never change

Re: WARNING: CPU: 3 PID: 0 at net/sched/sch_hfsc.c:1388 hfsc_dequeue+0x319/0x350 [sch_hfsc]

2018-03-22 Thread Marco Berizzi
Il 19 marzo 2018 alle 11.07 Jamal Hadi Salim ha scritto: > > On 18-03-15 08:48 PM, Cong Wang wrote: > > > On Wed, Mar 14, 2018 at 1:10 AM, Marco Berizzi wrote: > > > > > > Il 9 marzo 2018 alle 0.14 Cong Wang ha > > > > scritto: > > > > > > > > On Thu, Mar 8, 2018 at 8:02 AM, Marco Berizzi

[bpf-next V4 PATCH 00/15] XDP redirect memory return API

2018-03-22 Thread Jesper Dangaard Brouer
This patchset works towards supporting different XDP RX-ring memory allocators. As this will be needed by the AF_XDP zero-copy mode. The patchset uses mlx5 as the sample driver, which gets implemented XDP_REDIRECT RX-mode, but not ndo_xdp_xmit (as this API is subject to change thought the patchse

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

2018-03-22 Thread Jesper Dangaard Brouer
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 drivers doing XDP_REDIRECT to show how different memory models b

[bpf-next V4 PATCH 03/15] ixgbe: use xdp_return_frame API

2018-03-22 Thread Jesper Dangaard Brouer
Extend struct ixgbe_tx_buffer to store the xdp_mem_info. Signed-off-by: Jesper Dangaard Brouer --- drivers/net/ethernet/intel/ixgbe/ixgbe.h |1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |6 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ether

[bpf-next V4 PATCH 02/15] xdp: introduce xdp_return_frame API and use in cpumap

2018-03-22 Thread Jesper Dangaard Brouer
Introduce an xdp_return_frame API, and convert over cpumap as the first user, given it have queued XDP frame structure to leverage. V3: Cleanup and remove C99 style comments, pointed out by Alex Duyck. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h | 28

[bpf-next V4 PATCH 04/15] xdp: move struct xdp_buff from filter.h to xdp.h

2018-03-22 Thread Jesper Dangaard Brouer
This is done to prepare for the next patch, and it is also nice to move this XDP related struct out of filter.h. Signed-off-by: Jesper Dangaard Brouer --- include/linux/filter.h | 24 +--- include/net/xdp.h | 22 ++ 2 files changed, 23 insertions(

[bpf-next V4 PATCH 05/15] xdp: introduce a new xdp_frame type

2018-03-22 Thread Jesper Dangaard Brouer
This is needed to convert drivers tuntap and virtio_net. This is a generalization of what is done inside cpumap, which will be converted later. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h | 40 1 file changed, 40 insertions(+) diff --g

[bpf-next V4 PATCH 06/15] tun: convert to use generic xdp_frame and xdp_return_frame API

2018-03-22 Thread Jesper Dangaard Brouer
The tuntap driver invented it's own driver specific way of queuing XDP packets, by storing the xdp_buff information in the top of the XDP frame data. Convert it over to use the more generic xdp_frame structure. The main problem with the in-driver method is that the xdp_rxq_info pointer cannot be

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

2018-03-22 Thread Jesper Dangaard Brouer
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: Jesper Dangaard Brouer --- drivers/net/ethernet/mellanox/mlx5

[bpf-next V4 PATCH 14/15] xdp: transition into using xdp_frame for return API

2018-03-22 Thread Jesper Dangaard Brouer
Changing API xdp_return_frame() to take struct xdp_frame as argument, seems like a natural choice. But there are some subtle performance details here that needs extra care, which is a deliberate choice. When de-referencing xdp_frame on a remote CPU during DMA-TX completion, result in the cache-lin

[bpf-next V4 PATCH 07/15] virtio_net: convert to use generic xdp_frame and xdp_return_frame API

2018-03-22 Thread Jesper Dangaard Brouer
The virtio_net driver assumes XDP frames are always released based on page refcnt (via put_page). Thus, is only queues the XDP data pointer address and uses virt_to_head_page() to retrieve struct page. Use the XDP return API to get away from such assumptions. Instead queue an xdp_frame, which all

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

2018-03-22 Thread Jesper Dangaard Brouer
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 completion. Performance is surprisingly good. Tested DMA-TX compl

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

2018-03-22 Thread Jesper Dangaard Brouer
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 page_pool code, that was presented[1] at MM-summit 2016. Adapted page_pool code to not

[bpf-next V4 PATCH 15/15] xdp: transition into using xdp_frame for ndo_xdp_xmit

2018-03-22 Thread Jesper Dangaard Brouer
Changing API ndo_xdp_xmit to take a struct xdp_frame instead of struct xdp_buff. This brings xdp_return_frame and ndp_xdp_xmit in sync. This builds towards changing the API further to become a bulk API, because xdp_buff is not a queue-able object while xdp_frame is. V4: Adjust for commit 59655a5

[bpf-next V4 PATCH 10/15] xdp: rhashtable with allocator ID to pointer mapping

2018-03-22 Thread Jesper Dangaard Brouer
Use the IDA infrastructure for getting a cyclic increasing ID number, that is used for keeping track of each registered allocator per RX-queue xdp_rxq_info. Instead of using the IDR infrastructure, which uses a radix tree, use a dynamic rhashtable, for creating ID to pointer lookup table, because

[bpf-next V4 PATCH 12/15] xdp: allow page_pool as an allocator type in xdp_return_frame

2018-03-22 Thread Jesper Dangaard Brouer
New allocator type MEM_TYPE_PAGE_POOL for page_pool usage. The registered allocator page_pool pointer is not available directly from xdp_rxq_info, but it could be (if needed). For now, the driver should keep separate track of the page_pool pointer, which it should use for RX-ring page allocation.

[bpf-next V4 PATCH 08/15] bpf: cpumap convert to use generic xdp_frame

2018-03-22 Thread Jesper Dangaard Brouer
The generic xdp_frame format, was inspired by the cpumap own internal xdp_pkt format. It is now time to convert it over to the generic xdp_frame format. The cpumap needs one extra field dev_rx. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h |1 + kernel/bpf/cpumap.c | 100 +

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] k

[PATCH net-next 5/9] net: hns3: Add support to reset the enet/ring mgmt layer

2018-03-22 Thread Salil Mehta
After VF driver knows that hardware reset has been performed successfully, it should proceed ahead and reset the enet layer. This primarily consists of bringing down interface, clearing TX/RX rings, disassociating vectors from ring etc. Signed-off-by: Salil Mehta --- .../ethernet/hisilicon/hns3/

[PATCH net-next 7/9] net: hns3: Changes to support ARQ(Asynchronous Receive Queue)

2018-03-22 Thread Salil Mehta
Current mailbox CRQ could consists of both synchronous and async responses from the PF. Synchronous responses are time critical and should be handed over to the waiting tasks/context as quickly as possible otherwise timeout occurs. Above problem gets accentuated if CRQ consists of even single asyn

Re: [PATCH net-next 1/1] net/ipv4: disable SMC TCP option with SYN Cookies

2018-03-22 Thread Eric Dumazet
On 03/22/2018 06:23 AM, Ursula Braun wrote: > We moved the clear to cookie_v4_check()/cookie_v6_check. However, this does > not seem to > be sufficient to prevent the SYNACK from containing the SMC experimental > option. > We found that an additional check in tcp_conn_request() helps: > > ---

[PATCH net-next 9/9] net: hns3: Changes required in PF mailbox to support VF reset

2018-03-22 Thread Salil Mehta
PF needs to assert the VF reset when it receives the request to reset from VF. After receiving request PF ackknowledges the request by replying back MBX_ASSERTING_RESET message to VF. VF then goes to pending state and wait for hardware to complete the reset. This patch contains code to handle the

[PATCH net-next 8/9] net: hns3: Add *Asserting Reset* mailbox message & handling in VF

2018-03-22 Thread Salil Mehta
Reset Asserting message is forwarded by PF to inform VF about the hardware reset which is about to happen. This might be due to the earlier VF reset request received by the PF or because PF for any reason decides to undergo reset. This message results in VF to go in pending state in which it polls

[PATCH net-next 4/9] net: hns3: Add support to request VF Reset to PF

2018-03-22 Thread Salil Mehta
VF driver depends upon PF to eventually reset the hardware. This request is made using the mailbox command. This patch adds the required function to acheive above. Signed-off-by: Salil Mehta --- .../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 19 +++ 1 file changed, 19 in

[PATCH net-next 2/9] net: hns3: Add VF Reset Service Task to support event handling

2018-03-22 Thread Salil Mehta
VF reset would involve handling of different reset related events from the stack, physical function, mailbox etc. Reset service task would be used in servicing such reset event requests and later handling the hardware completions waits and initiating the stack resets. Signed-off-by: Salil Mehta -

[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 resu

[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

  1   2   3   4   >