Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Thu, Aug 24, 2017 at 04:02:50AM CEST, xiyou.wangc...@gmail.com wrote: >On Wed, Aug 23, 2017 at 2:38 PM, Jiri Pirko wrote: >> I would not have to spend any time on it, if you would just follow the >> usual workflow. Clearly, you have some problem with that. I cannot >> say I

Re: [PATCH net-next] bpf: netdev is never null in __dev_map_flush

2017-08-23 Thread David Miller
From: Daniel Borkmann Date: Thu, 24 Aug 2017 03:20:11 +0200 > No need to test for it in fast-path, every dev in bpf_dtab_netdev > is guaranteed to be non-NULL, otherwise dev_map_update_elem() will > fail in the first place. > > Signed-off-by: Daniel Borkmann

Re: [PATCH net 0/3] bnxt_en: bug fixes.

2017-08-23 Thread David Miller
From: Michael Chan Date: Wed, 23 Aug 2017 19:34:02 -0400 > 3 bug fixes related to XDP ring accounting in bnxt_setup_tc(), freeing > MSIX vectors when bnxt_re unregisters, and preserving the user-administered > PF MAC address when disabling SRIOV. Series applied,

Re: [PATCH net] nfp: TX time stamp packets before HW doorbell is rung

2017-08-23 Thread David Miller
From: Jakub Kicinski Date: Wed, 23 Aug 2017 14:41:50 -0700 > TX completion may happen any time after HW queue was kicked. > We can't access the skb afterwards. Move the time stamping > before ringing the doorbell. > > Fixes: 4c3523623dc0 ("net: add driver for

Re: [PATCH net-next] bpf, doc: Add arm32 as arch supporting eBPF JIT

2017-08-23 Thread David Miller
From: Shubham Bansal Date: Wed, 23 Aug 2017 21:29:10 +0530 > As eBPF JIT support for arm32 was added recently with > commit 39c13c204bb1150d401e27d41a9d8b332be47c49, it seems appropriate to > add arm32 as arch with support for eBPF JIT in bpf and sysctl docs as well. >

Re: [PATCH v2 net-next 0/5] bpf: verifier fixes

2017-08-23 Thread David Miller
From: Edward Cree Date: Wed, 23 Aug 2017 15:07:20 +0100 > Fix a couple of bugs introduced in my recent verifier patches. > Patch #2 does slightly increase the insn count on bpf_lxc.o, but only by > about a hundred insns (i.e. 0.2%). > > v2: added test for write-marks bug

Re: [PATCH][V2][netdev-next] gre: remove duplicated assignment of iph

2017-08-23 Thread David Miller
From: Colin King Date: Wed, 23 Aug 2017 12:59:48 +0100 > From: Colin Ian King > > iph is being assigned the same value twice; remove the redundant > first assignment. (Thanks to Nikolay Aleksandrov for pointing out > that the first

Re: [PATCH net] sctp: Avoid out-of-bounds reads from address storage

2017-08-23 Thread David Miller
From: Stefano Brivio Date: Wed, 23 Aug 2017 13:27:13 +0200 > inet_diag_msg_sctp{,l}addr_fill() and sctp_get_sctp_info() copy > sizeof(sockaddr_storage) bytes to fill in sockaddr structs used > to export diagnostic information to userspace. > > However, the memory allocated

Re: [PATCH 3/3 v3] net: tipc: constify genl_ops

2017-08-23 Thread David Miller
From: Arvind Yadav Date: Wed, 23 Aug 2017 16:22:20 +0530 > genl_ops are not supposed to change at runtime. All functions > working with genl_ops provided by work with > const genl_ops. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav

Re: [PATCH 0/3] constify dsa_switch_ops

2017-08-23 Thread David Miller
From: Andrew Lunn Date: Wed, 23 Aug 2017 14:45:56 +0200 > On Wed, Aug 23, 2017 at 03:46:56PM +0530, Arvind Yadav wrote: >> dsa_switch_ops are not supposed to change at runtime. All functions >> working with dsa_switch_ops provided by work with >> const dsa_switch_ops. So mark

Re: [PATCH][net-next] net: hinic: make functions set_ctrl0 and set_ctrl1 static

2017-08-23 Thread David Miller
From: Colin King Date: Wed, 23 Aug 2017 10:59:40 +0100 > From: Colin Ian King > > The functions set_ctrl0 and set_ctrl1 are local to the source and do > not need to be in global scope, so make them static. > > Cleans up sparse warnings: >

Re: [PATCH net] net/sock: allow the user to set negative peek offset

2017-08-23 Thread David Miller
From: Paolo Abeni Date: Wed, 23 Aug 2017 11:57:51 +0200 > This is necessary to allow the user to disable peeking with > offset once it's enabled. > Unix sockets already allow the above, with this patch we > permit it for udp[6] sockets, too. > > Fixes: 627d2d6b5500 ("udp:

Re: [PATCH net 4/7] net:ethernet:aquantia: Fix for MCP state change.

2017-08-23 Thread David Miller
From: Pavel Belous Date: Wed, 23 Aug 2017 17:05:05 +0300 > diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h > b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h > index a66aee5..fc69408a 100644 > ---

Re: [PATCH net] net: dsa: use consume_skb()

2017-08-23 Thread David Miller
From: Eric Dumazet Date: Wed, 23 Aug 2017 21:40:32 -0700 > From: Eric Dumazet > > Two kfree_skb() should be consume_skb(), to be friend with drop monitor > (perf record ... -e skb:kfree_skb) > > Signed-off-by: Eric Dumazet

[PATCH net] net: dsa: use consume_skb()

2017-08-23 Thread Eric Dumazet
From: Eric Dumazet Two kfree_skb() should be consume_skb(), to be friend with drop monitor (perf record ... -e skb:kfree_skb) Signed-off-by: Eric Dumazet --- net/dsa/tag_ksz.c |2 +- net/dsa/tag_trailer.c |2 +- 2 files changed, 2

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-23 Thread Michael S. Tsirkin
On Wed, Aug 23, 2017 at 11:28:24PM -0400, Willem de Bruijn wrote: > >> > * as a generic solution, if we were to somehow overcome the safety > >> > issue, track > >> > the delay and do copy if some threshold is reached could be an answer, > >> > but it's > >> > hard for now.> * so things like the

Re: [patch net-next 0/5] mlxsw: spectrum: Introduce multichain TC offload

2017-08-23 Thread David Miller
From: Jiri Pirko Date: Wed, 23 Aug 2017 10:06:52 +0200 > From: Jiri Pirko > > This patchset introduces offloading of rules added to chain with > non-zero index, which was previously forbidden. Also, goto_chain > termination action is offloaded allowing to

Re: [PATCH net-next 0/3] net: mvpp2: software TSO support

2017-08-23 Thread David Miller
From: Antoine Tenart Date: Wed, 23 Aug 2017 09:46:53 +0200 > This series adds the s/w TSO support in the PPv2 driver, in addition to > two cosmetic commits. As stated in patch 3/3: > > Using iperf and 10G ports, using TSO shows a significant performance >

Re: [PATCH net 0/3] nfp: fix SR-IOV deadlock and representor bugs

2017-08-23 Thread David Miller
From: Jakub Kicinski Date: Tue, 22 Aug 2017 23:22:41 -0700 > This series tackles the bug I've already tried to fix in commit > 6d48ceb27af1 ("nfp: allocate a private workqueue for driver work"). > I created a separate workqueue to avoid possible deadlock, and > the

Re: [PATCH net-next] ipv4: do metrics match when looking up and deleting a route

2017-08-23 Thread David Miller
From: Xin Long Date: Wed, 23 Aug 2017 10:07:26 +0800 > Now when ipv4 route inserts a fib_info, it memcmp fib_metrics. > It means ipv4 route identifies one route also with metrics. > > But when removing a route, it tries to find the route without > caring about the metrics.

Re: [PATCH net v2 0/2] net: dsa: Fix tag_ksz.c

2017-08-23 Thread David Miller
From: Florian Fainelli Date: Tue, 22 Aug 2017 15:12:13 -0700 > This implements David's suggestion of providing low-level functions > to control whether skb_pad() and skb_put_padto() should be freeing > the passed skb. > > We make use of it to fix a double free in

Re: [PATCH v2 net-next 0/2] Add software rx timestamp for TCP.

2017-08-23 Thread David Miller
From: Mike Maloney Date: Tue, 22 Aug 2017 17:08:47 -0400 > From: Mike Maloney > > Add software rx timestamps for TCP, and a test to ensure consistency of > behavior between IP, UDP, and TCP implementation. > > Changes since v1: > -Initialize

Re: [PATCH net-next] liquidio: change manner of detecting whether or not NIC firmware is loaded

2017-08-23 Thread David Miller
From: Felix Manlunas Date: Tue, 22 Aug 2017 12:46:37 -0700 > In the NIC firmware, the 1-bit flag indicating "firmware is loaded" moved > from SLI_SCRATCH_1 to SLI_SCRATCH_2 (these are Octeon general-purpose > scratch registers). Make the PF driver conform to this

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-23 Thread Willem de Bruijn
>> > * as a generic solution, if we were to somehow overcome the safety issue, >> > track >> > the delay and do copy if some threshold is reached could be an answer, but >> > it's >> > hard for now.> * so things like the current vhost-net implementation of >> > deciding whether or not >> > to

Re: [PATCH v2] net: stmmac: socfgpa: Ensure emac bit set in sys manager for MII/GMII/SGMII.

2017-08-23 Thread David Miller
From: Stephan Gatzka Date: Tue, 22 Aug 2017 14:25:07 +0200 > When using MII/GMII/SGMII in the Altera SoC, the phy needs to be > wired through the FPGA. To ensure correct behavior, the appropriate > bit in the System Manager FPGA Interface Group register needs to be >

Re: [PATCH net-next] inet_diag: report TCP MD5 signing keys and addresses

2017-08-23 Thread Eric Dumazet
On Thu, 2017-08-24 at 03:22 +0200, Ivan Delalande wrote: > Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to > processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is > not possible to retrieve these from the kernel once they have been > configured on

Re: [PATCH net-next] bpf: netdev is never null in __dev_map_flush

2017-08-23 Thread John Fastabend
On 08/23/2017 06:25 PM, Alexei Starovoitov wrote: > On 8/23/17 6:20 PM, Daniel Borkmann wrote: >> No need to test for it in fast-path, every dev in bpf_dtab_netdev >> is guaranteed to be non-NULL, otherwise dev_map_update_elem() will >> fail in the first place. >> >> Signed-off-by: Daniel Borkmann

Re: [PATCH net-next v7 08/10] bpf: Add a Landlock sandbox example

2017-08-23 Thread Alexei Starovoitov
On Mon, Aug 21, 2017 at 02:09:31AM +0200, Mickaël Salaün wrote: > Add a basic sandbox tool to create a process isolated from some part of > the system. This sandbox create a read-only environment. It is only > allowed to write to a character device such as a TTY: > > # :> X > # echo $? > 0

Re: [PATCH net-next v7 05/10] landlock: Add LSM hooks related to filesystem

2017-08-23 Thread Alexei Starovoitov
On Mon, Aug 21, 2017 at 02:09:28AM +0200, Mickaël Salaün wrote: > Handle 33 filesystem-related LSM hooks for the Landlock filesystem > event: LANDLOCK_SUBTYPE_EVENT_FS. > > A Landlock event wrap LSM hooks for similar kernel object types (e.g. > struct file, struct path...). Multiple LSM hooks can

Re: [PATCH v2 3/4] net: phy: realtek: add disable RX internal delay mode

2017-08-23 Thread kbuild test robot
Hi Icenowy, [auto build test WARNING on net-next/master] [also build test WARNING on v4.13-rc6 next-20170823] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Icenowy-Zheng/Workaround-broken

Re: [PATCH net-next v7 03/10] bpf,landlock: Define an eBPF program type for a Landlock rule

2017-08-23 Thread Alexei Starovoitov
On Mon, Aug 21, 2017 at 02:09:26AM +0200, Mickaël Salaün wrote: > Add a new type of eBPF program used by Landlock rules. > > This new BPF program type will be registered with the Landlock LSM > initialization. > > Add an initial Landlock Kconfig. > > Signed-off-by: Mickaël Salaün

Re: [PATCH net-next v7 01/10] selftest: Enhance kselftest_harness.h with a step mechanism

2017-08-23 Thread Alexei Starovoitov
On Mon, Aug 21, 2017 at 02:09:24AM +0200, Mickaël Salaün wrote: > This step mechanism may be useful to return an information about the > error without being able to write to TH_LOG_STREAM. > > Set _metadata->no_print to true to print this counter. > > Signed-off-by: Mickaël Salaün

Re: UDP sockets oddities

2017-08-23 Thread Florian Fainelli
On 08/23/2017 05:43 PM, Eric Dumazet wrote: > On Wed, 2017-08-23 at 17:03 -0700, Florian Fainelli wrote: > >> Attached is the perf report --stdio of: >> >> # perf record -a -g -e skb:kfree_skb iperf -c 192.168.1.23 -b 800M -t 60 >> WARNING: option -b implies udp testing >>

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
On Wed, Aug 23, 2017 at 2:38 PM, Jiri Pirko wrote: > I would not have to spend any time on it, if you would just follow the > usual workflow. Clearly, you have some problem with that. I cannot > say I understand it :/ You are amazing, you still waste your time even after I said

Re: [PATCH net] sctp: Avoid out-of-bounds reads from address storage

2017-08-23 Thread Xin Long
On Wed, Aug 23, 2017 at 11:27 PM, Stefano Brivio wrote: > inet_diag_msg_sctp{,l}addr_fill() and sctp_get_sctp_info() copy > sizeof(sockaddr_storage) bytes to fill in sockaddr structs used > to export diagnostic information to userspace. > > However, the memory allocated to

Re: [PATCH net-next] bpf: netdev is never null in __dev_map_flush

2017-08-23 Thread Alexei Starovoitov
On 8/23/17 6:20 PM, Daniel Borkmann wrote: No need to test for it in fast-path, every dev in bpf_dtab_netdev is guaranteed to be non-NULL, otherwise dev_map_update_elem() will fail in the first place. Signed-off-by: Daniel Borkmann wow. interesting. I'm surprised you

Re: [PATCH net-next v7 02/10] bpf: Add eBPF program subtype and is_valid_subtype() verifier

2017-08-23 Thread Alexei Starovoitov
On Wed, Aug 23, 2017 at 09:45:24AM +0200, Mickaël Salaün wrote: > >> > >> +union bpf_prog_subtype { > >> + struct { > >> + __u32 abi; /* minimal ABI version, cf. user doc */ > > > > the concept of abi (version) sounds a bit weird to me. > > Why bother with it at all? > >

[PATCH net-next] inet_diag: report TCP MD5 signing keys and addresses

2017-08-23 Thread Ivan Delalande
Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is not possible to retrieve these from the kernel once they have been configured on sockets. Signed-off-by: Ivan Delalande ---

Re: UDP sockets oddities

2017-08-23 Thread Eric Dumazet
On Wed, 2017-08-23 at 17:03 -0700, Florian Fainelli wrote: > Attached is the perf report --stdio of: > > # perf record -a -g -e skb:kfree_skb iperf -c 192.168.1.23 -b 800M -t 60 > WARNING: option -b implies udp testing > > Client

Re: [V2 PATCH net-next 0/5] xdp: more work on xdp tracepoints

2017-08-23 Thread David Miller
From: Jesper Dangaard Brouer Date: Wed, 23 Aug 2017 13:16:42 +0200 > On Wed, 23 Aug 2017 12:15:14 +0200 > Jesper Dangaard Brouer wrote: > >> More work on streamlining the tracepoints for XDP. >> >> V2: Change trace_xdp_redirect() to align with args of

[PATCH net 2/3] bnxt_en: Free MSIX vectors when unregistering the device from bnxt_re.

2017-08-23 Thread Michael Chan
Take back ownership of the MSIX vectors when unregistering the device from bnxt_re. Fixes: a588e4580a7e ("bnxt_en: Add interface to support RDMA driver.") Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 2 ++ 1 file changed, 2

[PATCH net 3/3] bnxt_en: Do not setup MAC address in bnxt_hwrm_func_qcaps().

2017-08-23 Thread Michael Chan
bnxt_hwrm_func_qcaps() is called during probe to get all device resources and it also sets up the factory MAC address. The same function is called when SRIOV is disabled to reclaim all resources. If the MAC address has been overridden by a user administered MAC address, calling this function

[PATCH net 0/3] bnxt_en: bug fixes.

2017-08-23 Thread Michael Chan
3 bug fixes related to XDP ring accounting in bnxt_setup_tc(), freeing MSIX vectors when bnxt_re unregisters, and preserving the user-administered PF MAC address when disabling SRIOV. Michael Chan (3): bnxt_en: Fix .ndo_setup_tc() to include XDP rings. bnxt_en: Free MSIX vectors when

[PATCH net 1/3] bnxt_en: Fix .ndo_setup_tc() to include XDP rings.

2017-08-23 Thread Michael Chan
When the number of TX rings is changed in bnxt_setup_tc(), we need to include the XDP rings in the total TX ring count. Fixes: 38413406277f ("bnxt_en: Add support for XDP_TX action.") Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1

Re: [net-next 10/15] net/mlx5: Add a blank line after declarations

2017-08-23 Thread Joe Perches
On Thu, 2017-08-17 at 16:29 +0300, Saeed Mahameed wrote: > From: Or Gerlitz [] > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c > b/drivers/net/ethernet/mellanox/mlx5/core/eq.c [] > @@ -188,6 +188,7 @@ static enum mlx5_dev_event port_subtype_event(u8 subtype) >

Re: UDP sockets oddities

2017-08-23 Thread Eric Dumazet
On Wed, 2017-08-23 at 15:49 -0700, Florian Fainelli wrote: > On 08/23/2017 03:26 PM, Eric Dumazet wrote: > > On Wed, 2017-08-23 at 13:02 -0700, Florian Fainelli wrote: > >> Hi, > >> > >> On Broadcom STB chips using bcmsysport.c and bcm_sf2.c we have an out of > >> band HW mechanism (not using

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-23 Thread Michael S. Tsirkin
On Wed, Aug 23, 2017 at 11:20:45AM -0400, Willem de Bruijn wrote: > > Please let me make sure if I understand it correctly: > > * always do copy with skb_orphan_frags_rx as Willem mentioned in the earlier > > post, before the xmit_skb as opposed to my original patch, is safe but too > > costly so

Re: UDP sockets oddities

2017-08-23 Thread Florian Fainelli
On 08/23/2017 03:26 PM, Eric Dumazet wrote: > On Wed, 2017-08-23 at 13:02 -0700, Florian Fainelli wrote: >> Hi, >> >> On Broadcom STB chips using bcmsysport.c and bcm_sf2.c we have an out of >> band HW mechanism (not using per-flow pause frames) where we can have >> the integrated network switch

Re: UDP sockets oddities

2017-08-23 Thread Eric Dumazet
On Wed, 2017-08-23 at 13:02 -0700, Florian Fainelli wrote: > Hi, > > On Broadcom STB chips using bcmsysport.c and bcm_sf2.c we have an out of > band HW mechanism (not using per-flow pause frames) where we can have > the integrated network switch backpressure the CPU Ethernet controller > which

Re: [PATCH iproute2 json v2 00/27] ip: add -json support to 'ip link show'

2017-08-23 Thread Julien Fortin
On Wed, Aug 23, 2017 at 2:51 PM, Jiri Pirko wrote: > Thu, Aug 17, 2017 at 07:35:47PM CEST, jul...@cumulusnetworks.com wrote: >>From: Julien Fortin >> >>This patch series adds json support to 'ip [-details] link show [dev DEV]' >>Each patch describes

Re: [PATCH iproute2 json v2 00/27] ip: add -json support to 'ip link show'

2017-08-23 Thread Jiri Pirko
Thu, Aug 17, 2017 at 07:35:47PM CEST, jul...@cumulusnetworks.com wrote: >From: Julien Fortin > >This patch series adds json support to 'ip [-details] link show [dev DEV]' >Each patch describes the json schema it adds and provides some examples. Any plans to jsonify tc

RE: DSA support for Micrel KSZ8895

2017-08-23 Thread Woojung.Huh
Pavel, > > I'll forward your email to our support. > > AFAIK, KSZ8895 has different register mapping from KSZ9477, > > it will be more than ID changes in current driver. > > More than ID changes, indeed. As layout is completely different, it > looks like different source file will be needed for

RE: [PATCH net v2 1/2] net: core: Specify skb_pad()/skb_put_padto() SKB freeing

2017-08-23 Thread Woojung.Huh
> Cc: da...@davemloft.net; vivien.dide...@savoirfairelinux.com; Woojung > Huh - C21699; UNGLinuxDriver; Florian Fainelli > Subject: [PATCH net v2 1/2] net: core: Specify skb_pad()/skb_put_padto() > SKB freeing > > Rename skb_pad() into __skb_pad() and make it take a third argument: >

RE: [PATCH net v2 2/2] net: dsa: skb_put_padto() already frees nskb

2017-08-23 Thread Woojung.Huh
> The first call of skb_put_padto() will free up the SKB on error, but we > return NULL which tells dsa_slave_xmit() that the original SKB should be > freed so this would lead to a double free here. > > The second skb_put_padto() already frees the passed sk_buff reference > upon error, so calling

[PATCH net] nfp: TX time stamp packets before HW doorbell is rung

2017-08-23 Thread Jakub Kicinski
TX completion may happen any time after HW queue was kicked. We can't access the skb afterwards. Move the time stamping before ringing the doorbell. Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") Signed-off-by: Jakub Kicinski

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Wed, Aug 23, 2017 at 11:31:23PM CEST, xiyou.wangc...@gmail.com wrote: >On Wed, Aug 23, 2017 at 2:20 PM, Jiri Pirko wrote: >> Wed, Aug 23, 2017 at 11:14:15PM CEST, xiyou.wangc...@gmail.com wrote: >>>On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote:

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
On Wed, Aug 23, 2017 at 2:20 PM, Jiri Pirko wrote: > Wed, Aug 23, 2017 at 11:14:15PM CEST, xiyou.wangc...@gmail.com wrote: >>On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote: +static struct hlist_head *tc_u_common_hash; >>> >>> Why not use rhashtable? >>>

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Wed, Aug 23, 2017 at 11:14:15PM CEST, xiyou.wangc...@gmail.com wrote: >On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote: >>>+static struct hlist_head *tc_u_common_hash; >> >> Why not use rhashtable? >> > >It doesn't have to be so complicated, it is not fast path and >we don't

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote: >>+static struct hlist_head *tc_u_common_hash; > > Why not use rhashtable? > It doesn't have to be so complicated, it is not fast path and we don't have so many qdisc's and u32 filters in system relatively. >>+

Re: [EXT] Re: [PATCH net-next 10/18] net: mvpp2: use the GoP interrupt for link status changes

2017-08-23 Thread Marcin Wojtas
Hi Antoine, 2017-08-23 18:04 GMT+02:00 Antoine Tenart : > On Wed, Aug 23, 2017 at 03:24:55PM +, Stefan Chulski wrote: >> > When the cable is connected (there is signal) and the serdes is in sync >> > and AN >> > succeeded. >> > >> > > With SFF/SFP ports,

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Wed, Aug 23, 2017 at 07:58:54PM CEST, xiyou.wangc...@gmail.com wrote: >It is ugly to hide a u32-filter-specific pointer inside Qdisc, >this breaks the TC layers: > >1. Qdisc is a generic representation, should not have any specific > data of any type > >2. Qdisc layer is above filter layer,

UDP sockets oddities

2017-08-23 Thread Florian Fainelli
Hi, On Broadcom STB chips using bcmsysport.c and bcm_sf2.c we have an out of band HW mechanism (not using per-flow pause frames) where we can have the integrated network switch backpressure the CPU Ethernet controller which translates in completing TX packets interrupts at the appropriate pace

Re: [PATCH net-next 3/3] samples/bpf: extend test_tunnel_bpf.sh with ERSPAN

2017-08-23 Thread Alexei Starovoitov
On Wed, Aug 23, 2017 at 07:55:57AM -0700, William Tu wrote: > Extend existing tests for vxlan, gre, geneve, ipip to > include ERSPAN tunnel. > > Signed-off-by: William Tu the test looks fine, hence Acked-by: Alexei Starovoitov cannot properly review patches

Re: [PATCH][netdev-next] gre: remove duplicated assignment of iph

2017-08-23 Thread David Miller
From: Colin King Date: Wed, 23 Aug 2017 12:13:05 +0100 > From: Colin Ian King > > iph is being assigned the same value twice; remove the redundant > second assignment. > > Fixes warning: > net/ipv4/ip_gre.c:265:2: warning: Value stored to

Re: [PATCH][net-next] net: hinic: make functions set_ctrl0 and set_ctrl1 static

2017-08-23 Thread David Miller
From: "Aviad Krawczyk (A)" Date: Wed, 23 Aug 2017 10:08:58 + > Thanks Please do not top-post. Especially quoting the original message in the way that you did. As a result of how you replied to this, this patch will show up twice in my patchwork queue making more

Re: Stable apply request [was: Bluetooth: bnep: fix possible might sleep error in bnep_session]

2017-08-23 Thread Marcel Holtmann
Hi Jiri, >>> It looks like bnep_session has same pattern as the issue reported in >>> old rfcomm: >>> >>> while (1) { >>> set_current_state(TASK_INTERRUPTIBLE); >>> if (condition) >>> break; >>> // may call might_sleep here >>>

Re: Stable apply request

2017-08-23 Thread David Miller
From: Jiri Slaby Date: Wed, 23 Aug 2017 09:29:44 +0200 > On 06/27/2017, 07:32 PM, Marcel Holtmann wrote: >>> It looks like bnep_session has same pattern as the issue reported in >>> old rfcomm: >>> >>> while (1) { >>> set_current_state(TASK_INTERRUPTIBLE); >>>

[Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
It is ugly to hide a u32-filter-specific pointer inside Qdisc, this breaks the TC layers: 1. Qdisc is a generic representation, should not have any specific data of any type 2. Qdisc layer is above filter layer, should only save filters in the list of struct tcf_proto. This pointer is

Re: [PATCH 0/2] net: Fix crashes due to activity during suspend

2017-08-23 Thread Florian Fainelli
On 08/23/2017 04:45 AM, Geert Uytterhoeven wrote: > Hi Florian, > > On Tue, Aug 22, 2017 at 8:49 PM, Florian Fainelli > wrote: >> On 08/22/2017 11:37 AM, Geert Uytterhoeven wrote: >>> If an Ethernet device is used while the device is suspended, the system may >>> crash.

Re: [PATCH net] sctp: Avoid out-of-bounds reads from address storage

2017-08-23 Thread Marcelo Ricardo Leitner
On Wed, Aug 23, 2017 at 01:27:13PM +0200, Stefano Brivio wrote: > inet_diag_msg_sctp{,l}addr_fill() and sctp_get_sctp_info() copy > sizeof(sockaddr_storage) bytes to fill in sockaddr structs used > to export diagnostic information to userspace. > > However, the memory allocated to store sockaddr

Re: [PATCH net-next] bpf, doc: Add arm32 as arch supporting eBPF JIT

2017-08-23 Thread Daniel Borkmann
On 08/23/2017 05:59 PM, Shubham Bansal wrote: As eBPF JIT support for arm32 was added recently with commit 39c13c204bb1150d401e27d41a9d8b332be47c49, it seems appropriate to add arm32 as arch with support for eBPF JIT in bpf and sysctl docs as well. Signed-off-by: Shubham Bansal

Re: [PATCH net] net: xfrm: don't double-hold dst when sk_policy in use.

2017-08-23 Thread Wei Wang
> While removing dst_entry garbage collection, commit 52df157f17e5 > ("xfrm: take refcnt of dst when creating struct xfrm_dst bundle") > changed xfrm_resolve_and_create_bundle so it returns an xdst with > a refcount of 1 instead of 0. > > However, it did not delete the dst_hold performed by

Re: [PATCH net-next] bpf, doc: Add arm32 as arch supporting eBPF JIT

2017-08-23 Thread Alexei Starovoitov
On 8/23/17 8:59 AM, Shubham Bansal wrote: As eBPF JIT support for arm32 was added recently with commit 39c13c204bb1150d401e27d41a9d8b332be47c49, it seems appropriate to add arm32 as arch with support for eBPF JIT in bpf and sysctl docs as well. Signed-off-by: Shubham Bansal

Re: [PATCH v3] net: stmmac: Delete dead code for MDIO registration

2017-08-23 Thread Florian Fainelli
On 08/23/2017 01:50 AM, Romain Perier wrote: > This code is no longer used, the logging function was changed by commit > fbca164776e4 ("net: stmmac: Use the right logging functi"). It was > previously showing information about the type if the IRQ, if it's polled, > ignored or a normal interrupt.

Re: [PATCH net-next 1/8] bpf: Recursively apply cgroup sock filters

2017-08-23 Thread David Ahern
On 8/22/17 6:40 PM, Alexei Starovoitov wrote: >> diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c >> index df2e0f14a95d..7480cebab073 100644 >> --- a/kernel/cgroup/cgroup.c >> +++ b/kernel/cgroup/cgroup.c >> @@ -5186,4 +5186,22 @@ int cgroup_bpf_update(struct cgroup *cgrp, struct >>

Re: [PATCH v3 3/4] net: stmmac: register parent MDIO node for sun8i-h3-emac

2017-08-23 Thread Florian Fainelli
On 08/23/2017 12:49 AM, Maxime Ripard wrote: > Hi Florian, > > On Tue, Aug 22, 2017 at 11:35:01AM -0700, Florian Fainelli wrote: > So I think what you are saying is either impossible or engineering-wise > a very stupid design, like using an external MAC with a discrete PHY > connected

Re: [RFC PATCH] dt-binding: net: sfp binding documentation

2017-08-23 Thread Rob Herring
On Wed, Aug 23, 2017 at 8:57 AM, Russell King - ARM Linux wrote: > On Mon, Aug 21, 2017 at 02:12:42PM -0500, Rob Herring wrote: >> On Mon, Aug 21, 2017 at 10:06 AM, Baruch Siach wrote: >> > Hi Russell, >> > >> > On Mon, Aug 21, 2017 at 01:53:17PM +0100,

Re: [EXT] Re: [PATCH net-next 10/18] net: mvpp2: use the GoP interrupt for link status changes

2017-08-23 Thread Antoine Tenart
On Wed, Aug 23, 2017 at 03:24:55PM +, Stefan Chulski wrote: > > When the cable is connected (there is signal) and the serdes is in sync and > > AN > > succeeded. > > > > > With SFF/SFP ports, you generally need a gpio line the fibre module > > > can use to indicate if it has link. Fixed-phy

[PATCH] e1000e: changed some expensive calls of udelay to usleep_range

2017-08-23 Thread Matthew Tan
Calls to udelay are not preemtable by userspace so userspace applications experience a large (~200us) latency when running on core 0. Instead usleep_range can be used to be more friendly to userspace since it is preemtable. This is due to udelay using busy-wait loops while

[PATCH net-next] bpf, doc: Add arm32 as arch supporting eBPF JIT

2017-08-23 Thread Shubham Bansal
As eBPF JIT support for arm32 was added recently with commit 39c13c204bb1150d401e27d41a9d8b332be47c49, it seems appropriate to add arm32 as arch with support for eBPF JIT in bpf and sysctl docs as well. Signed-off-by: Shubham Bansal ---

[PATCH][next] net: hinic: fix comparison of a uint16_t type with -1

2017-08-23 Thread Colin King
From: Colin Ian King The comparison of hw_ioctxt.rx_buf_sz_idx == -1 is always false because rx_buf_sz_idx is a uint16_t. Fix this by explicitly casting -1 to uint16_t. Detected by CoverityScan, CID#1454559 ("Operands don't affect result") Signed-off-by: Colin Ian

[PATCH net-next 5/5] ipv6: sr: implement additional seg6local actions

2017-08-23 Thread David Lebrun
This patch implements the following seg6local actions. - SEG6_LOCAL_ACTION_END_T: regular SRH processing and forward to the next-hop looked up in the specified routing table. - SEG6_LOCAL_ACTION_END_DX2: decapsulate an L2 frame and forward it to the specified network interface. -

[PATCH net-next 4/5] ipv6: sr: add helper functions for seg6local

2017-08-23 Thread David Lebrun
This patch adds three helper functions to be used with the seg6local packet processing actions. The decap_and_validate() function will be used by the End.D* actions, that decapsulate an SR-enabled packet. The advance_nextseg() function applies the fundamental operations to update an SRH for the

[PATCH net-next 2/5] ipv6: sr: add support for encapsulation of L2 frames

2017-08-23 Thread David Lebrun
This patch implements the L2 frame encapsulation mechanism, referred to as T.Encaps.L2 in the SRv6 specifications [1]. A new type of SRv6 tunnel mode is added (SEG6_IPTUN_MODE_L2ENCAP). It only accepts packets with an existing MAC header (i.e., it will not work for locally generated packets). The

[PATCH net-next 0/5] net: updates for IPv6 Segment Routing

2017-08-23 Thread David Lebrun
This patch series provides several updates for the SRv6 implementation. The first patch leverages the existing infrastructure to support encapsulation of IPv4 packets. The second patch implements the T.Encaps.L2 SR function, enabling to encapsulate an L2 Ethernet frame within an IPv6+SRH packet.

[PATCH net-next 1/5] ipv6: sr: add support for ip4ip6 encapsulation

2017-08-23 Thread David Lebrun
This patch enables the SRv6 encapsulation mode to carry an IPv4 payload. All the infrastructure was already present, I just had to add a parameter to seg6_do_srh_encap() to specify the inner packet protocol, and perform some additional checks. Usage example: ip route add 1.2.3.4 encap seg6 mode

[PATCH net-next 3/5] ipv6: sr: enforce IPv6 packets for seg6local lwt

2017-08-23 Thread David Lebrun
This patch ensures that the seg6local lightweight tunnel is used solely with IPv6 routes and processes only IPv6 packets. Signed-off-by: David Lebrun --- net/ipv6/seg6_local.c | 8 1 file changed, 8 insertions(+) diff --git a/net/ipv6/seg6_local.c

RE: [PATCH net-next v4] openvswitch: enable NSH support

2017-08-23 Thread David Laight
From: Ben Pfaff > Sent: 22 August 2017 18:35 ... > We solved the alignment problem in OVS userspace a different way, by > defining our versions of the network protocol headers so that they only > need 16-bit alignment. In turn, we did that by defining a > ovs_16aligned_be32 type as a pair of

RE: [EXT] Re: [PATCH net-next 10/18] net: mvpp2: use the GoP interrupt for link status changes

2017-08-23 Thread Stefan Chulski
> When the cable is connected (there is signal) and the serdes is in sync and AN > succeeded. > > > With SFF/SFP ports, you generally need a gpio line the fibre module > > can use to indicate if it has link. Fixed-phy has such support, and > > your link_change function will get called when the

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-23 Thread Willem de Bruijn
> Please let me make sure if I understand it correctly: > * always do copy with skb_orphan_frags_rx as Willem mentioned in the earlier > post, before the xmit_skb as opposed to my original patch, is safe but too > costly so cannot be adopted. One more point about msg_zerocopy in the guest. This

Re: [PATCH v2 net-next 2/5] bpf/verifier: when pruning a branch, ignore its write marks

2017-08-23 Thread Daniel Borkmann
On 08/23/2017 04:10 PM, Edward Cree wrote: The fact that writes occurred in reaching the continuation state does not screen off its reads from us, because we're not really its parent. So detect 'not really the parent' in do_propagate_liveness, and ignore write marks in that case. Fixes:

Re: [PATCH v2 net-next 5/5] bpf/verifier: document liveness analysis

2017-08-23 Thread Daniel Borkmann
On 08/23/2017 04:11 PM, Edward Cree wrote: The liveness tracking algorithm is quite subtle; add comments to explain it. Signed-off-by: Edward Cree Acked-by: Daniel Borkmann

[PATCH net-next 1/3] gre: refactor the gre_fb_xmit

2017-08-23 Thread William Tu
The patch refactors the gre_fb_xmit function, by creating prepare_fb_xmit function for later ERSPAN collect_md mode patch. Signed-off-by: William Tu --- net/ipv4/ip_gre.c | 55 --- 1 file changed, 40 insertions(+), 15

[PATCH net-next 3/3] samples/bpf: extend test_tunnel_bpf.sh with ERSPAN

2017-08-23 Thread William Tu
Extend existing tests for vxlan, gre, geneve, ipip to include ERSPAN tunnel. Signed-off-by: William Tu --- samples/bpf/tcbpf2_kern.c | 63 +- samples/bpf/test_tunnel_bpf.sh | 29 +++ 2 files changed, 91

[PATCH net-next 2/3] gre: add collect_md mode to ERSPAN tunnel

2017-08-23 Thread William Tu
Similar to gre, vxlan, geneve, ipip tunnels, allow ERSPAN tunnels to operate in 'collect metadata' mode. bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away. OVS can use it as well in the future. Signed-off-by: William Tu --- include/net/ip_tunnels.h | 4 +-

Re: XDP redirect measurements, gotchas and tracepoints

2017-08-23 Thread Alexander Duyck
On Tue, Aug 22, 2017 at 11:59 PM, Michael Chan wrote: > On Tue, Aug 22, 2017 at 6:06 PM, Alexander Duyck > wrote: >> On Tue, Aug 22, 2017 at 1:04 PM, Michael Chan >> wrote: >>> >>> Right, but it's conceivable to

Re: [PATCH v2] at76c50x-usb: check memory allocation failure

2017-08-23 Thread Kalle Valo
Himanshu Jha writes: > Check memory allocation failure and return -ENOMEM rather than just > retuning void. > > Signed-off-by: Himanshu Jha [...] > -static void at76_dump_mib_mac_addr(struct at76_priv *priv) > +static int

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-23 Thread Koichiro Den
On Wed, 2017-08-23 at 23:28 +0900, Koichiro Den wrote: > On Tue, 2017-08-22 at 20:55 +0300, Michael S. Tsirkin wrote: > > On Tue, Aug 22, 2017 at 10:50:41AM +0800, Jason Wang wrote: > > > > Perhaps the descriptor pool should also be > > > > revised to allow out of order completions. Then there is

Re: [PATCH v2 net-next 4/5] bpf/verifier: remove varlen_map_value_access flag

2017-08-23 Thread Daniel Borkmann
On 08/23/2017 04:10 PM, Edward Cree wrote: The optimisation it does is broken when the 'new' register value has a variable offset and the 'old' was constant. I broke it with my pointer types unification (see Fixes tag below), before which the 'new' value would have type

Re: [PATCH v2 net-next 3/5] selftests/bpf: add a test for a pruning bug in the verifier

2017-08-23 Thread Daniel Borkmann
On 08/23/2017 04:10 PM, Edward Cree wrote: From: Alexei Starovoitov The test makes a read through a map value pointer, then considers pruning a branch where the register holds an adjusted map value pointer. It should not prune, but currently it does. Signed-off-by: Alexei

  1   2   3   >