[PATCH v3 net-next 3/8] net/ncsi: Enforce failover on link monitor timeout

2017-04-17 Thread Gavin Shan
The NCSI channel has been configured to provide service if its link monitor timer is enabled, regardless of its state (inactive or active). So the timeout event on the link monitor indicates the out-of-service on that channel, for which a failover is needed. This sets NCSI_DEV_RESHUFFLE flag to en

[PATCH v3 net-next 1/8] net/ncsi: Disable HWA mode when no channels are found

2017-04-17 Thread Gavin Shan
When there are no NCSI channels probed, HWA (Hardware Arbitration) mode is enabled. It's not correct because HWA depends on the fact: NCSI channels exist and all of them support HWA mode. This disables HWA when no channels are probed. Signed-off-by: Gavin Shan --- net/ncsi/ncsi-manage.c | 12 +++

[PATCH v3 net-next 8/8] net/ncsi: Fix length of GVI response packet

2017-04-17 Thread Gavin Shan
The length of GVI (GetVersionInfo) response packet should be 40 instead of 36. This issue was found from /sys/kernel/debug/ncsi/eth0/stats. # cat /sys/kernel/debug/ncsi/eth0/stats : RSP OK TIMEOUT ERROR === GVI 002

[PATCH v3 net-next 0/8] net/ncsi: Add debugging functionality

2017-04-17 Thread Gavin Shan
This series supports NCSI debugging infrastructure by adding several debugfs files. It was inspired by the reported issues: No available package and channel are probed successfully. Obviously, we don't have a debugging infrastructure for NCSI stack yet. The first 3 patches, fixing some issues, are

[PATCH v3 net-next 2/8] net/ncsi: Properly track channel monitor timer state

2017-04-17 Thread Gavin Shan
The field @monitor.enabled in the NCSI channel descriptor is used to track the state of channel monitor timer. It indicates the timer's state (pending or not). We could not start the timer again in its handler. In that case, We missed to update @monitor.enabled to false. It leads to below warning p

[PATCH v3 net-next 7/8] net/ncsi: No error report on DP response to non-existing package

2017-04-17 Thread Gavin Shan
The issue was found from /sys/kernel/debug/ncsi/eth0/stats. The first step in NCSI package/channel enumeration is deselect all packages by sending DP (Deselect Package) commands. The remote NIC replies with response while the corresponding package isn't populated yet and it is treated as an error w

[PATCH v3 net-next 6/8] net/ncsi: Support NCSI packet generation

2017-04-17 Thread Gavin Shan
This introduces /sys/kernel/debug/ncsi/eth0/pkt. The debugfs entry can accept parameters to produce NCSI command packet. The received NCSI response packet is dumped on read. Below is an example to send CIS command and dump its response. # echo CIS,0,0 > /sys/kernel/debug/ncsi/eth0/pkt # cat

[PATCH v3 net-next 4/8] net/ncsi: Add debugging infrastructurre

2017-04-17 Thread Gavin Shan
This creates debugfs directories as NCSI debugging infrastructure. With the patch applied, We will see below debugfs directories. Every NCSI package and channel has one corresponding directory. Other than presenting the NCSI topology, No real function has been achieved through these debugfs directo

[PATCH v3 net-next 5/8] net/ncsi: Dump NCSI packet statistics

2017-04-17 Thread Gavin Shan
This creates /sys/kernel/debug/ncsi//stats to dump the NCSI packets sent and received over all packages and channels. It's useful to diagnose NCSI problems, especially when NCSI packages and channels aren't probed properly. The statistics can be gained from debugfs file as below: # cat /sys/kerne

Re: [PATCH 05/22] drm/i915: Make use of the new sg_map helper function

2017-04-17 Thread Daniel Vetter
On Thu, Apr 13, 2017 at 04:05:18PM -0600, Logan Gunthorpe wrote: > This is a single straightforward conversion from kmap to sg_map. > > Signed-off-by: Logan Gunthorpe Acked-by: Daniel Vetter Probably makes sense to merge through some other tree, but please be aware of the considerable churn ra

[PATCH] net/mlx4: suppress 'may be used uninitialized' warning

2017-04-17 Thread Greg Thelen
gcc 4.8.4 complains that mlx4_SW2HW_MPT_wrapper() uses an uninitialized 'mpt' variable: drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'mlx4_SW2HW_MPT_wrapper': drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2802:12: warning: 'mpt' may be used uninitialized in this

Re: [PATCH RFC] sparc64: eBPF JIT

2017-04-17 Thread Alexei Starovoitov
On Mon, Apr 17, 2017 at 06:12:45PM -0700, David Miller wrote: > > > >> + if (insn->src_reg == BPF_REG_FP || insn->dst_reg == BPF_REG_FP) { > >> + ctx->saw_frame_pointer = true; > >> + if (BPF_CLASS(code) == BPF_ALU || > >> + BPF_CLASS(code) == BPF_ALU64) { > >> +

Re: [PATCH RFC] ptr_ring: add ptr_ring_unconsume

2017-04-17 Thread Jason Wang
On 2017年04月17日 07:19, Michael S. Tsirkin wrote: Applications that consume a batch of entries in one go can benefit from ability to return some of them back into the ring. Add an API for that - assuming there's space. If there's no space naturally we can't do this and have to drop entries, but

linux-next: build failure after merge of the block tree

2017-04-17 Thread Stephen Rothwell
Hi all, After merging the block tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: drivers/block/nbd.c: In function 'nbd_genl_connect': drivers/block/nbd.c:1662:10: error: too few arguments to function 'nla_parse_nested' ret = nla_parse_nested(socks, NBD_SOCK_MAX, att

Re: [PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions

2017-04-17 Thread Jason Wang
On 2017年04月16日 00:38, Vladislav Yasevich wrote: Curreclty virtion net header is fixed size and adding things to it is rather difficult to do. This series attempt to add the infrastructure as well as some extensions that try to resolve some deficiencies we currently have. First, vnet header on

Re: [PATCH RFC (resend) net-next 5/6] virtio-net: Add support for vlan acceleration vnet header extension.

2017-04-17 Thread Jason Wang
On 2017年04月16日 00:38, Vladislav Yasevich wrote: This extension allows us to pass vlan ID and vlan protocol data to the host hypervisor as part of the vnet header and lets us take advantage of HW accelerated vlan tagging in the host. It requires support in the host to negotiate the feature. Wh

Re: [PATCH RFC (resend) net-next 3/6] virtio_net: Add basic skeleton for handling vnet header extensions.

2017-04-17 Thread Jason Wang
On 2017年04月16日 00:38, Vladislav Yasevich wrote: This is the basic sceleton which will be fleshed out by individiual extensions. Signed-off-by: Vladislav Yasevich --- drivers/net/virtio_net.c| 21 + include/linux/virtio_net.h | 12 include/uapi

RE: [Intel-wired-lan] [PATCH] net: igbvf: Use net_device_stats from struct net_device

2017-04-17 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Tobias Klauser > Sent: Wednesday, April 5, 2017 11:45 PM > To: Kirsher, Jeffrey T > Cc: netdev@vger.kernel.org; intel-wired-...@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH] net: igbvf: Use net_device_

Re: [PATCH RFC] sparc64: eBPF JIT

2017-04-17 Thread David Miller
From: Alexei Starovoitov Date: Mon, 17 Apr 2017 16:27:42 -0700 > On Sun, Apr 16, 2017 at 11:38:25PM -0400, David Miller wrote: >> +static void build_prologue(struct jit_ctx *ctx) >> +{ >> +s32 stack_needed = 176; >> + >> +if (ctx->saw_frame_pointer) >> +stack_needed += MAX_BPF

Re: [PATCH net-next v2] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread Subash Abhinov Kasiviswanathan
+ break; I think break here should remove ? Hi Yuan This is similar to __udp4_lib_demux_lookup where we need to check if the first socket is an exact match or break since chains maybe long. -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux

[PATCH net-next] ravb: Fix ravb_ptp_interrupt clear interrupt all status

2017-04-17 Thread Simon Horman
From: Tsutomu Izawa This patch fixes ravb_ptp_interrupt clears GIS register of all interrupts status. It corrects to clear PTCF bit or PTMF bit. Also it fixes returned value to IRQ_HANDLED or IRQ_NONE. Signed-off-by: Tsutomu Izawa Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon Horman --

Corrupted SKB

2017-04-17 Thread Michael Ma
Hi - We've implemented a "glue" qdisc similar to mqprio which can associate one qdisc to multiple txqs as the root qdisc. Reference count of the child qdiscs have been adjusted properly in this case so that it represents the number of txqs it has been attached to. However when sending packets we s

Re: linux-next: manual merge of the net-next tree with the net tree

2017-04-17 Thread Daniel Borkmann
On 04/18/2017 02:18 AM, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the net-next tree got a conflict in: kernel/bpf/syscall.c between commits: 6b1bb01bcc5b ("bpf: fix cb access in socket filter programs on tail calls") c2002f983767 ("bpf: fix checking xdp_adjust_head

Re: [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics

2017-04-17 Thread Gavin Shan
On Thu, Apr 13, 2017 at 07:30:45PM -0700, Joe Perches wrote: >On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote: >> This creates /sys/kernel/debug/ncsi//stats to dump the NCSI >> packets sent and received over all packages and channels. It's useful >> to diagnose NCSI problems, especially when NC

linux-next: manual merge of the net-next tree with the net tree

2017-04-17 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: kernel/bpf/syscall.c between commits: 6b1bb01bcc5b ("bpf: fix cb access in socket filter programs on tail calls") c2002f983767 ("bpf: fix checking xdp_adjust_head on tail calls") from the net tree and commit: e24

Re: [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics

2017-04-17 Thread Gavin Shan
On Thu, Apr 13, 2017 at 06:50:42PM -0700, Jakub Kicinski wrote: >On Thu, 13 Apr 2017 17:48:18 +1000, Gavin Shan wrote: >> This creates /sys/kernel/debug/ncsi//stats to dump the NCSI >> packets sent and received over all packages and channels. It's useful >> to diagnose NCSI problems, especially whe

Re: [PATCH] net/ncsi: fix checksum validation in response packet

2017-04-17 Thread Gavin Shan
On Mon, Apr 17, 2017 at 01:36:19PM -0400, David Miller wrote: >From: Cédric Le Goater >Date: Fri, 14 Apr 2017 10:56:37 +0200 > >> htonl was used instead of ntohl. Surely a typo. >> >> Signed-off-by: Cédric Le Goater > >I don't think so, "checksum" is of type "u32" thus is in host byte >order. T

RE: [PATCH net-next v2] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Subash Abhinov Kasiviswanathan > Sent: Tuesday, April 18, 2017 7:25 AM > To: d...@cumulusnetworks.com; da...@davemloft.net; > netdev@vger.kernel.org; rshea...@brocade.com; eric.d

[PATCH v2 net-next] drivers: net: xgene-v2: Extend ethtool statistics

2017-04-17 Thread Iyappan Subramanian
This patch adds extended statistics reporting to ethtool. In summary, this patch, - adds ethtool.h with the statistics register definitions - adds 'struct xge_gstrings_extd_stats' to gather extended stats - modifies xge_get_strings(), get_sset_count() and get_ethtool_stats() accordi

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-17 Thread Daniel Borkmann
On 04/18/2017 01:04 AM, Alexei Starovoitov wrote: On Mon, Apr 17, 2017 at 03:49:55PM -0400, David Miller wrote: From: Jesper Dangaard Brouer Date: Sun, 16 Apr 2017 22:26:01 +0200 The bpf tail-call use-case is a very good example of why the verifier cannot deduct the needed HEADROOM upfront.

Re: [PATCH RFC] sparc64: eBPF JIT

2017-04-17 Thread Alexei Starovoitov
On Sun, Apr 16, 2017 at 11:38:25PM -0400, David Miller wrote: > > There are a bunch of things I want to do still, and I know that I have > to attend to sparc32 more cleanly, but I wanted to post this now that > I have it passing the BPF testsuite completely: > > [24174.315421] test_bpf: Summary:

[PATCH net-next v2] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread Subash Abhinov Kasiviswanathan
David Ahern reported that 5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast") breaks udp_l3mdev_accept=0 since early demux for IPv6 UDP was doing a generic socket lookup which does not require an exact match. Fix this by making UDPv6 early demux match connected sockets only. v1->v

Re: [PATCH v2 net-next 5/8] net/ncsi: Dump NCSI packet statistics

2017-04-17 Thread Gavin Shan
On Thu, Apr 13, 2017 at 03:50:40AM -0700, Joe Perches wrote: >On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote: >> This creates /sys/kernel/debug/ncsi//stats to dump the NCSI >> packets sent and received over all packages and channels. It's useful >> to diagnose NCSI problems, especially when NC

Re: [PATCH v2 net-next 4/8] net/ncsi: Add debugging infrastructurre

2017-04-17 Thread Gavin Shan
On Thu, Apr 13, 2017 at 03:41:46AM -0700, Joe Perches wrote: >On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote: >> This creates debugfs directories as NCSI debugging infrastructure. >> With the patch applied, We will see below debugfs directories. Every >> NCSI package and channel has one corres

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-17 Thread Alexei Starovoitov
On Mon, Apr 17, 2017 at 03:49:55PM -0400, David Miller wrote: > From: Jesper Dangaard Brouer > Date: Sun, 16 Apr 2017 22:26:01 +0200 > > > The bpf tail-call use-case is a very good example of why the > > verifier cannot deduct the needed HEADROOM upfront. > > This brings up a very interesting qu

[PATCH] nl80211: Fix enum type of variable in nl80211_put_sta_rate()

2017-04-17 Thread Matthias Kaehlcke
rate_flg is of type 'enum nl80211_attrs', however it is assigned with 'enum nl80211_rate_info' values. Change the type of rate_flg accordingly. Signed-off-by: Matthias Kaehlcke --- net/wireless/nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b

[PATCH v3 6/9] ftgmac100: Allow configuration of phy interface via device-tree

2017-04-17 Thread Benjamin Herrenschmidt
This uses the standard phy-mode property Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 42 +--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/farad

[PATCH v3 8/9] ftgmac100: Fix potential ordering issue in NAPI poll

2017-04-17 Thread Benjamin Herrenschmidt
We need to ensure the loads from the descriptor are done after the MMIO store clearing the interrupts has completed, otherwise we might still miss work. A read back from the MMIO register will "push" the posted store and ioread32 has a barrier on weakly aordered architectures that will order subse

[PATCH v3 7/9] ftgmac100: Display the discovered PHY device info

2017-04-17 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 7721c2a..45b8267 100644 --- a/drivers/net/ethernet/faraday/ftgmac100

[PATCH v3 9/9] ftgmac100: Document device-tree binding

2017-04-17 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt -- v3. - Update supported values for phy-mode --- .../devicetree/bindings/net/ftgmac100.txt | 37 ++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ftgmac100.txt diff --git a/Documenta

[PATCH v3 5/9] ftgmac100: Add netpoll support

2017-04-17 Thread Benjamin Herrenschmidt
Just call the interrupt handler with interrupts locally disabled Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac1

[PATCH v3 3/9] ftgmac100: Add ndo_set_rx_mode() and support for multicast & promisc

2017-04-17 Thread Benjamin Herrenschmidt
This adds the ndo_set_rx_mode() callback to configure the multicast filters, promisc and allmulti options. Signed-off-by: Benjamin Herrenschmidt -- v3. - Rebase to fix conflict with #include changes --- drivers/net/ethernet/faraday/ftgmac100.c | 52 1 file chang

[PATCH v3 4/9] ftgmac100: Add vlan HW offload

2017-04-17 Thread Benjamin Herrenschmidt
The chip supports HW vlan tag insertion and extraction. Add support for it. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 46 +++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/faraday/ftgmac1

[PATCH v3 1/9] ftgmac100: Add ethtool n-way reset call

2017-04-17 Thread Benjamin Herrenschmidt
A non-wired up implementation accidentally made its way in a previous patch (Make ring sizes configurable via ethtool). This removes it and wires up the generic phy_ethtool_nway_reset instead. Signed-off-by: Benjamin Herrenschmidt -- v2. - Use phy_ethtool_nway_reset() instead of custom implemen

[PATCH v3 2/9] ftgmac100: Add pause frames configuration and support

2017-04-17 Thread Benjamin Herrenschmidt
Hopefully my understanding of how the hardware works is correct, as the documentation isn't completely clear. So far I have seen no obvious issue. Pause seem to also work with NC-SI. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 96 +

[PATCH v3 0/9] ftgmac100: Rework batch 5 - Features

2017-04-17 Thread Benjamin Herrenschmidt
This is the third spin of the fifth and last batch of updates to the ftgmac100 driver. This contains a few additional "features" such as: - Support for ethtool n-way reset - Multicast filtering & promisc support - Vlan offload - netpoll And a couple of misc bits. This also adds the device-tr

Re: [PATCH net-next] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread Eric Dumazet
On Mon, 2017-04-17 at 15:11 -0600, Subash Abhinov Kasiviswanathan wrote: > David Ahern reported that 5425077d73e0c ("net: ipv6: Add early demux > handler for UDP unicast") breaks udp_l3mdev_accept=0 since early > demux for IPv6 UDP was doing a generic socket lookup which does not > require an exact

Re: IGMP on IPv6

2017-04-17 Thread Cong Wang
Hello, On Thu, Apr 13, 2017 at 9:36 AM, Murali Karicheri wrote: > On 03/22/2017 11:04 AM, Murali Karicheri wrote: >> This is going directly to the slave Ethernet interface. >> >> When I put a WARN_ONCE, I found this is coming directly from >> mld_ifc_timer_expire() -> mld_sendpack() -> ip6_output

[PATCH net-next] net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0

2017-04-17 Thread Subash Abhinov Kasiviswanathan
David Ahern reported that 5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast") breaks udp_l3mdev_accept=0 since early demux for IPv6 UDP was doing a generic socket lookup which does not require an exact match. Fix this by making UDPv6 early demux match connected sockets only. Fixes

[PATCH] mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss()

2017-04-17 Thread Matthias Kaehlcke
cfg80211_chandef_create() expects an 'enum nl80211_channel_type' as channel type however in ieee80211_sta_join_ibss() NL80211_CHAN_WIDTH_20_NOHT is passed in two occasions, which is of the enum type 'nl80211_chan_width'. Change the value to NL80211_CHAN_NO_HT (20 MHz, non-HT channel) of the channel

Re: [PATCH RFC] sparc64: eBPF JIT

2017-04-17 Thread Daniel Borkmann
On 04/17/2017 09:03 PM, David Miller wrote: From: Daniel Borkmann Date: Mon, 17 Apr 2017 20:44:35 +0200 On 04/17/2017 05:38 AM, David Miller wrote: +/* Map BPF registers to SPARC registers */ +static const int bpf2sparc[] = { + /* return value from in-kernel function, and exit value from eBPF

[PATCH v2] net: cx89x0: move attribute declaration before struct keyword

2017-04-17 Thread Stefan Agner
The attribute declaration is typically before the definition. Move the __maybe_unused attribute declaration before the struct keyword. Signed-off-by: Stefan Agner --- Changes in v2: - Move __maybe_unused after the complete type drivers/net/ethernet/cirrus/cs89x0.c | 2 +- 1 file changed, 1 inse

Re: [PATCH] net: cx89x0: move attribute declaration before struct keyword

2017-04-17 Thread David Miller
From: Stefan Agner Date: Mon, 17 Apr 2017 13:31:28 -0700 > Given that, can you reconsider? Please put the attribute after the compete type. Thanks.

Re: [PATCH v2 0/9] ftgmac100: Rework batch 5 - Features

2017-04-17 Thread Benjamin Herrenschmidt
On Mon, 2017-04-17 at 11:11 -0400, David Miller wrote: > From: Benjamin Herrenschmidt > Date: Thu, 13 Apr 2017 14:39:07 +1000 > > > This is the second spin of the fifth and last batch of > > updates to the ftgmac100 driver. > > This series doesn't apply cleanly to net-next, please respin. Sure,

Re: [PATCH] net: cx89x0: move attribute declaration before struct keyword

2017-04-17 Thread Stefan Agner
On 2017-04-17 13:09, David Miller wrote: > From: Stefan Agner > Date: Sun, 16 Apr 2017 23:20:32 -0700 > >> The attribute declaration is typically before the definition. Move >> the __maybe_unused attribute declaration before the struct keyword. >> >> Signed-off-by: Stefan Agner > I did catch t

Re: [PATCH RFC] sparc64: eBPF JIT

2017-04-17 Thread David Miller
From: Daniel Borkmann Date: Mon, 17 Apr 2017 20:44:35 +0200 > On a quick initial glance, you also need to map BPF_REG_AX. If > I understand the convention correctly, you could use L7 for that. > > You can test for it through tools/testing/selftests/bpf/test_kmod.sh > which exercises the test_bpf

Re: [PATCH v3 3/4] bluetooth: hci_uart: add LL protocol serdev driver support

2017-04-17 Thread Adam Ford
On Thu, Apr 13, 2017 at 10:03 AM, Rob Herring wrote: > Turns out that the LL protocol and the TI-ST are the same thing AFAICT. > The TI-ST adds firmware loading, GPIO control, and shared access for > NFC, FM radio, etc. For now, we're only implementing what is needed for > BT. This mirrors other d

Re: [PATCH v2] sh_eth: unmap DMA buffers when freeing rings

2017-04-17 Thread David Miller
From: Sergei Shtylyov Date: Mon, 17 Apr 2017 15:55:22 +0300 > The DMA API debugging (when enabled) causes: > > WARNING: CPU: 0 PID: 1445 at lib/dma-debug.c:519 add_dma_entry+0xe0/0x12c > DMA-API: exceeded 7 overlapping mappings of cacheline 0x01b2974d > > to be printed after repeated initializ

Re: [PATCH] net: cx89x0: move attribute declaration before struct keyword

2017-04-17 Thread David Miller
From: Stefan Agner Date: Sun, 16 Apr 2017 23:20:32 -0700 > The attribute declaration is typically before the definition. Move > the __maybe_unused attribute declaration before the struct keyword. > > Signed-off-by: Stefan Agner Well, I see if just as often after the variable name too: net/ird

Re: [PATCH net 0/2] Two BPF fixes

2017-04-17 Thread David Miller
From: Daniel Borkmann Date: Mon, 17 Apr 2017 03:12:05 +0200 > The set fixes cb_access and xdp_adjust_head bits in struct bpf_prog, > that are used for requirement checks on the program rather than f.e. > heuristics. Thus, for tail calls, we cannot make any assumptions and > are forced to set them

Re: [PATCH v3 net-next RFC] Generic XDP

2017-04-17 Thread David Miller
From: Jesper Dangaard Brouer Date: Sun, 16 Apr 2017 22:26:01 +0200 > The bpf tail-call use-case is a very good example of why the > verifier cannot deduct the needed HEADROOM upfront. This brings up a very interesting question for me. I notice that tail calls are implemented by JITs largely by

Re: [PATCH net-next v2] bonding: deliver link-local packets with skb->dev set to link that packets arrived on

2017-04-17 Thread David Miller
From: Chonggang Li Date: Sun, 16 Apr 2017 12:02:18 -0700 > Bonding driver changes the skb->dev to the bonding-master before > passing the packet to stack for further processing. This, however > does not make sense for the link-local packets and it looses "the > link info" once its skb->dev is cha

Re: [PATCH net-next] net: rtnetlink: plumb extended ack to doit function

2017-04-17 Thread David Miller
From: David Ahern Date: Sun, 16 Apr 2017 09:48:24 -0700 > Add netlink_ext_ack arg to rtnl_doit_func. Pass extack arg to nlmsg_parse > for doit functions that call it directly. > > This is the first step to using extended error reporting in rtnetlink. > From here individual subsystems can be upda

Re: [PATCH net-next 1/1] ipv6: sr: fix BUG due to headroom too small after SRH push

2017-04-17 Thread David Miller
From: David Lebrun Date: Sun, 16 Apr 2017 12:27:14 +0200 > When a locally generated packet receives an SRH with two or more segments, > the remaining headroom is too small to push an ethernet header. This patch > ensures that the headroom is large enough after SRH push. > > The BUG generated the

Re: [PATCH] gso: Validate assumption of frag_list segementation

2017-04-17 Thread David Miller
From: Date: Sun, 16 Apr 2017 11:00:07 +0300 > From: Ilan Tayari > > Commit 07b26c9454a2 ("gso: Support partial splitting at the frag_list > pointer") assumes that all SKBs in a frag_list (except maybe the last > one) contain the same amount of GSO payload. > > This assumption is not always cor

Re: [PATCH net-next v2] Add uid and cookie bpf helper to cg_skb_func_proto

2017-04-17 Thread David Miller
From: Chenbo Feng Date: Fri, 14 Apr 2017 18:25:26 -0700 > From: Chenbo Feng > > BPF helper functions get_socket_cookie and get_socket_uid can be > used for network traffic classifications, among others. Expose > them also to programs of type BPF_PROG_TYPE_CGROUP_SKB. As of > commit 8f917bba0042

Re: [PATCH net-next] drivers: net: xgene-v2: Extend ethtool statistics

2017-04-17 Thread David Miller
From: Iyappan Subramanian Date: Fri, 14 Apr 2017 16:48:18 -0700 > + XGE_EXTD_STAT(rx_byte_cntr, RBYT), > + XGE_EXTD_STAT(rx_pkt_cntr, RPKT), > + XGE_EXTD_STAT(rx_fcs_error_cntr, RFCS), > + XGE_EXTD_STAT(rx_multicast_pkt_cntr, RMCA), > + XGE_EXTD_STAT(rx_broadcast_pkt_cntr, RBC

[PATCH net-next v3] bonding: deliver link-local packets with skb->dev set to link that packets arrived on

2017-04-17 Thread Chonggang Li
Bonding driver changes the skb->dev to the bonding-master before passing the packet to stack for further processing. This, however does not make sense for the link-local packets and it loses "the link info" once its skb->dev is changed to bonding-master. This patch changes this behavior for link-l

Re: [PATCH] net: natsemi: ns83820: add checks for dma mapping error

2017-04-17 Thread David Miller
From: Alexey Khoroshilov Date: Sat, 15 Apr 2017 01:50:50 +0300 > @@ -1136,6 +1141,10 @@ static netdev_tx_t ns83820_hard_start_xmit(struct > sk_buff *skb, > if (nr_frags) > len -= skb->data_len; > buf = pci_map_single(dev->pci_dev, skb->data, len, PCI_DMA_TODEVICE); > +

Re: [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats

2017-04-17 Thread David Miller
Both patches applied but you may want to use more consistent Subject line subsystem prefixes in the future.

Re: [PATCH -next] net: phy: test the right variable in phy_write_mmd()

2017-04-17 Thread David Miller
From: Dan Carpenter Date: Fri, 14 Apr 2017 22:10:41 +0300 > This is a copy and paste buglet. We meant to test for ->write_mmd but > we test for ->read_mmd. > > Fixes: 1ee6b9bc6206 ("net: phy: make phy_(read|write)_mmd() generic MMD > accessors") > Signed-off-by: Dan Carpenter Applied, thanks

Re: [PATCH net] ipv6: drop non loopback packets claiming to originate from ::1

2017-04-17 Thread David Miller
From: Florian Westphal Date: Fri, 14 Apr 2017 20:22:43 +0200 > We lack a saddr check for ::1. This causes security issues e.g. with acls > permitting connections from ::1 because of assumption that these originate > from local machine. > > Assuming a source address of ::1 is local seems reasonab

Re: [PATCH RFC] sparc64: eBPF JIT

2017-04-17 Thread David Miller
From: Daniel Borkmann Date: Mon, 17 Apr 2017 20:44:35 +0200 > On 04/17/2017 05:38 AM, David Miller wrote: >> +/* Map BPF registers to SPARC registers */ >> +static const int bpf2sparc[] = { >> + /* return value from in-kernel function, and exit value from eBPF */ >> +[BPF_REG_0] = I5, >> + >>

Re: pull request: bluetooth-next 2017-04-14

2017-04-17 Thread David Miller
From: Johan Hedberg Date: Fri, 14 Apr 2017 21:12:12 +0300 > Here's the main batch of Bluetooth & 802.15.4 patches for the 4.12 > kernel. > > - Many fixes to 6LoWPAN, in particular for BLE > - New CA8210 IEEE 802.15.4 device driver (accounting for most of the >lines of code added in this pu

Re: [PATCH RFC] sparc64: eBPF JIT

2017-04-17 Thread Daniel Borkmann
On 04/17/2017 05:38 AM, David Miller wrote: There are a bunch of things I want to do still, and I know that I have to attend to sparc32 more cleanly, but I wanted to post this now that I have it passing the BPF testsuite completely: [24174.315421] test_bpf: Summary: 305 PASSED, 0 FAILED, [297/2

[Patch net-next v3] net_sched: move the empty tp check from ->destroy() to ->delete()

2017-04-17 Thread Cong Wang
Roi reported we could have a race condition where in ->classify() path we dereference tp->root and meanwhile a parallel ->destroy() makes it a NULL. This is possible because ->destroy() could be called when deleting a filter to check if we are the last one in tp, this tp is still linked and visibl

Re: [PATCH net-next v2] bonding: deliver link-local packets with skb->dev set to link that packets arrived on

2017-04-17 Thread Jay Vosburgh
Chonggang Li wrote: >Bonding driver changes the skb->dev to the bonding-master before >passing the packet to stack for further processing. This, however >does not make sense for the link-local packets and it looses "the >link info" once its skb->dev is changed to bonding-master. This >patch chan

Re: [PATCH linux 2/2] net sched actions: fix refcount decrement on error

2017-04-17 Thread Cong Wang
On Sat, Apr 15, 2017 at 11:48 AM, Wolfgang Bumiller wrote: > >> On April 15, 2017 at 8:20 PM Cong Wang wrote: >> >> >> On Fri, Apr 14, 2017 at 2:08 AM, Wolfgang Bumiller >> wrote: >> > Before I do that - trying to wrap my head around the interdependencies >> > here better to be thorough - I noti

bluetooth 6lowpan interfaces are not virtual anymore

2017-04-17 Thread Alexander Aring
Hi, bluetooth-next contains patches which introduces a queue for bluetooth 6LoWPAN interfaces. [0] At first, the current behaviour is now that 802.15.4 6LoWPAN interfaces are virtual and bluetooth 6LoWPAN interfaces are not virtual anymore. To have a different handling in both subsystems is _defi

Re: [PATCH net-next 0/6] bpf: LRU performance and test-program improvements

2017-04-17 Thread David Miller
From: Martin KaFai Lau Date: Fri, 14 Apr 2017 10:30:24 -0700 > The first 4 patches make a few improvements to the LRU tests. > > Patch 5/6 is to improve the performance of BPF_F_NO_COMMON_LRU map. > > Patch 6/6 adds an example in using LRU map with map-in-map. Series applied, thank you.

Re: [PATCH net-next 1/1] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-04-17 Thread Roman Mashak
Eric Dumazet writes: > On Mon, 2017-04-17 at 12:46 -0400, Jamal Hadi Salim wrote: > >> Of course it is trivial to add this as attributes and 32 bits >> for this case is not a big deal because it is done once. I want to talk >> about the pads instead ;-> What do you suggest we do with pads? > > We

Re: [PATCH net-next] ibmvnic: Report errors when failing to release sub-crqs

2017-04-17 Thread David Miller
Please do not submit a set of changes to the same driver like this. Instead, submit a proper patch series which is numbered (so that the dependencies betweeen changes, if any, are explciit) and also with a proper "[PATCH 0/N] ..." header posting which describes what the patch series is doing, how

Re: [PATCH net-next] net: mvneta: fix failed to suspend if WOL is enabled

2017-04-17 Thread David Miller
From: Jisheng Zhang Date: Fri, 14 Apr 2017 19:07:32 +0800 > Recently, suspend/resume and WOL support are added into mvneta driver. > If we enable WOL, then we get some error as below on Marvell BG4CT > platforms during suspend: > > [ 184.149723] dpm_run_callback(): mdio_bus_suspend+0x0/0x50 ret

Re: [PATCH net-next] net: bridge: notify on hw fdb takeover

2017-04-17 Thread David Miller
From: Nikolay Aleksandrov Date: Fri, 14 Apr 2017 13:49:34 +0300 > Recently we added support for SW fdbs to take over HW ones, but that > results in changing a user-visible fdb flag thus we need to send a > notification, also it's consistent with how HW takes over SW entries. > > Signed-off-by: N

Re: [PATCH] net/ncsi: fix checksum validation in response packet

2017-04-17 Thread David Miller
From: Cédric Le Goater Date: Fri, 14 Apr 2017 10:56:37 +0200 > htonl was used instead of ntohl. Surely a typo. > > Signed-off-by: Cédric Le Goater I don't think so, "checksum" is of type "u32" thus is in host byte order. Therefore "htonl()" is correct.

Re: [PATCH v2 net 0/2] Fix crash caused by reporting inconsistent skb->len to BQL

2017-04-17 Thread David Miller
From: Date: Fri, 14 Apr 2017 11:19:10 +0800 > From: Sean Wang > > Changes since v1: > - fix inconsistent enumeration which easily causes the potential bug Series applied, thanks.

Re: [PATCH v3] net: phy: micrel: fix crash when statistic requested for KSZ9031 phy

2017-04-17 Thread David Miller
From: Grygorii Strashko Date: Thu, 13 Apr 2017 14:11:27 -0500 > Now the command: > ethtool --phy-statistics eth0 > will cause system crash with meassage "Unable to handle kernel NULL pointer > dereference at virtual address 0010" from: > > (kszphy_get_stats) from [] (ethtool_get_phy_s

Re: [Patch net-next] kcm: remove a useless copy_from_user()

2017-04-17 Thread David Miller
From: Cong Wang Date: Thu, 13 Apr 2017 11:38:02 -0700 > struct kcm_clone only contains fd, and kcm_clone() only > writes this struct, so there is no need to copy it from user. > > Cc: Tom Herbert > Signed-off-by: Cong Wang Applied.

Re: [PATCH net] net: vrf: Fix setting NLM_F_EXCL flag when adding l3mdev rule

2017-04-17 Thread David Miller
From: David Ahern Date: Thu, 13 Apr 2017 10:57:15 -0600 > Only need 1 l3mdev FIB rule. Fix setting NLM_F_EXCL in the nlmsghdr. > > Fixes: 1aa6c4f6b8cd8 ("net: vrf: Add l3mdev rules on first device create") > Signed-off-by: David Ahern Applied and queued up for -stable, thanks.

Re: [patch net-next] MAINTAINERS: rename TC entry and add couple of header files

2017-04-17 Thread David Miller
From: Jiri Pirko Date: Thu, 13 Apr 2017 18:13:51 +0200 > From: Jiri Pirko > > The section is not specific only to "TC classifiers", but applies to the > whole TC subsystem. Also, add couple of forgotten headers. > > Signed-off-by: Jiri Pirko Applied.

Re: [PATCH 2/2] net: phy: simplify phy_supported_speeds()

2017-04-17 Thread David Miller
From: Russell King Date: Thu, 13 Apr 2017 16:49:20 +0100 > Simplify the loop in phy_supported_speeds(). > > Signed-off-by: Russell King Also applied to net-next, thanks.

Re: [PATCH 1/2] net: phy: improve phylib correctness for non-autoneg settings

2017-04-17 Thread David Miller
From: Russell King Date: Thu, 13 Apr 2017 16:49:15 +0100 > phylib has some undesirable behaviour when forcing a link mode through > ethtool. phylib uses this code: > > idx = phy_find_valid(phy_find_setting(phydev->speed, phydev->duplex), > features); > > to find an

Re: [PATCH net-next v2] Subject: net: allow configuring default qdisc

2017-04-17 Thread David Miller
From: Stephen Hemminger Date: Thu, 13 Apr 2017 08:40:53 -0700 > Since 3.12 it has been possible to configure the default queuing > discipline via sysctl. This patch adds ability to configure the > default queue discipline in kernel configuration. This is useful for > environments where configurin

Re: [PATCH net-next 1/1] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-04-17 Thread Eric Dumazet
On Mon, 2017-04-17 at 12:46 -0400, Jamal Hadi Salim wrote: > Of course it is trivial to add this as attributes and 32 bits > for this case is not a big deal because it is done once. I want to talk > about the pads instead ;-> What do you suggest we do with pads? We do nothing with pads. Just leav

Re: [PATCH net-next 0/2] qed/qede: aRFS support

2017-04-17 Thread David Miller
From: Manish Chopra Date: Thu, 13 Apr 2017 04:54:43 -0700 > This series adds support for Accelerated Flow Steering > in qede driver for TCP/UDP over IPv4/IPv6 protocols. > > Please consider applying this series to "net-next" Series applied, thanks.

Re: [PATCH v4] smsc95xx: Add comments to the registers definition

2017-04-17 Thread David Miller
From: Martin Wetterwald Date: Thu, 13 Apr 2017 10:08:44 +0200 > This chip is used by a lot of embedded devices and also by the Raspberry > Pi 1, 2 & 3 which were created to promote the study of computer > sciences. Students wanting to learn kernel / network device driver > programming through tho

Re: [PATCH net-next 1/1] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-04-17 Thread Jiri Pirko
Mon, Apr 17, 2017 at 06:46:17PM CEST, j...@mojatatu.com wrote: >On 17-04-17 11:31 AM, Jiri Pirko wrote: >> Mon, Apr 17, 2017 at 03:10:59PM CEST, eric.duma...@gmail.com wrote: >> > On Mon, 2017-04-17 at 07:01 -0400, Jamal Hadi Salim wrote: > >> Agreed. >> >> Plus the argument that attributes are "a

Re: [PATCH] net: thunderx: Fix set_max_bgx_per_node for 81xx rgx

2017-04-17 Thread David Miller
From: George Cherian Date: Thu, 13 Apr 2017 07:25:01 + > Add the PCI_SUBSYS_DEVID_81XX_RGX and use the same to set > the max bgx per node count. > > This fixes the issue intoduced by following commit > 78aacb6f6 net: thunderx: Fix invalid mac addresses for node1 interfaces > With this commit

Re: [PATCH net-next] l2tp: device MTU setup, tunnel socket needs a lock

2017-04-17 Thread David Miller
From: "R. Parameswaran" Date: Wed, 12 Apr 2017 18:31:04 -0700 (PDT) > > The MTU overhead calculation in L2TP device set-up > merged via commit b784e7ebfce8cfb16c6f95e14e8532d0768ab7ff > needs to be adjusted to lock the tunnel socket while > referencing the sub-data structures to derive the > soc

Re: [PATCH net] net-timestamp: avoid use-after-free in ip_recv_error

2017-04-17 Thread David Miller
From: Willem de Bruijn Date: Wed, 12 Apr 2017 19:24:35 -0400 > From: Willem de Bruijn > > Syzkaller reported a use-after-free in ip_recv_error at line > > info->ipi_ifindex = skb->dev->ifindex; > > This function is called on dequeue from the error queue, at which > point the device pointe

  1   2   >