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,

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

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.

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

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]

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) >> +

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

[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

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

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

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:

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

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"

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;

[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()

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

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.

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

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

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

[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

[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

[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

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

[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

[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

[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

[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

[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()

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

[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

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

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() ->

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

[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

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,

[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

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

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

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

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.

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

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

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 >

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

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"

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

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

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

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

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), > +

[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

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,

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

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

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 */ >> +

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 >

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,

[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

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

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

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

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,

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

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,

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():

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

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)

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

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

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

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), >

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 >

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

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 >

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

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

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

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

Re: [PATCH resend 3/4] uapi glibc compat: Do not check for __USE_MISC

2017-04-17 Thread David Miller
From: Hauke Mehrtens Date: Wed, 12 Apr 2017 22:31:02 +0200 > __USE_MISC is glibc specific and not available in musl libc. Only do > this check when glibc is used. This fixes a problem with musl libc. > > Acked-by: Mikko Rapeli > Signed-off-by: Hauke

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

2017-04-17 Thread Jamal Hadi Salim
On 17-04-13 12:13 PM, Jiri Pirko wrote: 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 Acked-by: Jamal Hadi Salim

Re: [Patch net] ipv4: fix a deadlock in ip_ra_control

2017-04-17 Thread David Miller
From: Cong Wang Date: Wed, 12 Apr 2017 12:32:13 -0700 > Similar to commit 87e9f0315952 > ("ipv4: fix a potential deadlock in mcast getsockopt() path"), > there is a deadlock scenario for IP_ROUTER_ALERT too: > >CPU0CPU1 >

Re: [PATCH net-next] net: ipv6: send unsolicited NA on admin up

2017-04-17 Thread David Miller
From: David Ahern Date: Wed, 12 Apr 2017 11:49:04 -0700 > ndisc_notify is the ipv6 equivalent to arp_notify. When arp_notify is > set to 1, gratuitous arp requests are sent when the device is brought up. > The same is expected when ndisc_notify is set to 1 (per

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

2017-04-17 Thread Jamal Hadi Salim
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 big waste" sounds to me really silly. What is couple of bytes?Please do

Re: [RFC PATCH linux 0/2] net sched actions: access to uninitialized data and error handling

2017-04-17 Thread Jamal Hadi Salim
On 17-04-17 10:59 AM, David Miller wrote: Jamal please review this. Waiting for Wolfgang to submit a new patch. cheers, jamal

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

2017-04-17 Thread Jamal Hadi Salim
On 17-04-17 10:58 AM, Eric Dumazet wrote: [..] Very often, pads are there because of ABI constraints. We 'name' them to make clear to developers that they are there, and avoid security issues, because of say few bytes from kernel stack are copied to user space. struct foo { __u32 a; __u16

Re: Use of skb_unclone in drivers

2017-04-17 Thread Eric Dumazet
On Mon, 2017-04-17 at 16:02 +0100, James Hughes wrote: > Netdevs, > > We have recently got to the bottom of an issue which we have been > encountering on a Raspberry Pi being used as an access point, and we > need a bit of advice on the correct way of fixing the issue. > > The set up is a

[PATCH 25/25] sky2: Use seq_puts() in sky2_debug_show()

2017-04-17 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 17 Apr 2017 16:15:12 +0200 A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software.

[PATCH 24/25] skge: Adjust a null pointer check in skge_down()

2017-04-17 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 17 Apr 2017 16:08:39 +0200 The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written "!skge->mem". Thus fix the affected source code place. Signed-off-by: Markus Elfring

[PATCH 23/25] skge: Use seq_puts() in skge_debug_show()

2017-04-17 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 17 Apr 2017 15:43:08 +0200 A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software.

  1   2   >