Re: [PATCH v2 4/6] net: ethernet: bgmac: convert to feature flags

2016-08-17 Thread Rafał Miłecki
On 8 July 2016 at 01:08, Jon Mason wrote: > mode = (bgmac_read(bgmac, BGMAC_DEV_STATUS) & BGMAC_DS_MM_MASK) >> > BGMAC_DS_MM_SHIFT; > - if (ci->id != BCMA_CHIP_ID_BCM47162 || mode != 0) > + if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST

Re: [PATCH net] sctp: fix a success return may hide an error

2016-08-17 Thread Xin Long
>> > If letting the application see ENOMEM errors, and sctp has to drop this >> > chunk, instead of retransmiting the ENOMEM chunk, but the ENOMEM >> > chunk may not be the chunk from current msg, as it flush all the queue. >> > even if users get an ENOMEM error, they may re-send a chunk that is

[PATCH net-next V2 0/5] net_sched, flow_dissector, flower: Introduce vlan tag support

2016-08-17 Thread Hadar Hen Zion
This patchset introduce vlan tag support to the flower classifier and the flow dissector. In addition to adding vlan priority to act vlan. The first 2 patches are dealing with flow-dissector: - The first patch is a fix, in case the vlan was already stripped from the skb, take it from

[PATCH net-next V2 4/5] net_sched: flower: Add vlan support

2016-08-17 Thread Hadar Hen Zion
Enhance flower to support 802.1Q vlan protocol classification. Currently, the supported fields are vlan_id and vlan_priority. Example: # add a flower filter with vlan id and priority classification tc filter add dev ens4f0 protocol 802.1Q parent : \ flower \

[PATCH net-next V2 5/5] net_sched: act_vlan: Add priority option

2016-08-17 Thread Hadar Hen Zion
The current vlan push action supports only vid and protocol options. Add priority option. Example script that adds vlan push action with vid and priority: tc filter add dev veth0 protocol ip parent : \ flower \ indev veth0 \ action vlan push id 100

[PATCH net-next V2 2/5] flow_dissector: Get vlan priority in addition to vlan id

2016-08-17 Thread Hadar Hen Zion
Add vlan priority check to the flow dissector by adding new flow dissector struct, flow_dissector_key_vlan which includes vlan tag fields. vlan_id and flow_label fields were under the same struct (flow_dissector_key_tags). It was a convenient setting since struct flow_dissector_key_tags is used

[PATCH net-next V2 3/5] net_sched: flower: Avoid dissection of unmasked keys

2016-08-17 Thread Hadar Hen Zion
The current flower implementation checks the mask range and set all the keys included in that range as "used_keys", even if a specific key in the range has a zero mask. This behavior can cause a false positive return value of dissector_uses_key function and unnecessary dissection in

[PATCH net-next V2 1/5] flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

2016-08-17 Thread Hadar Hen Zion
Early in the datapath skb_vlan_untag function is called, stripped the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields. The current dissection doesn't handle stripped vlan packets correctly. In some flows, vlan doesn't exist in skb->data anymore when applying flow dissection on

Re: [PATCH net-next V2 1/5] flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

2016-08-17 Thread Jiri Pirko
Wed, Aug 17, 2016 at 12:36:10PM CEST, had...@mellanox.com wrote: >Early in the datapath skb_vlan_untag function is called, stripped >the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields. > >The current dissection doesn't handle stripped vlan packets correctly. >In some flows,

[PATCH net-next 1/2] net: bridge: consolidate bridge and port linkxstats calls

2016-08-17 Thread Nikolay Aleksandrov
In the bridge driver we usually have the same function working for both port and bridge. In order to follow that logic and also avoid code duplication, consolidate the bridge_ and brport_ linkxstats calls into one since they share most of their code. As a side effect this allows us to dump the

[PATCH net-next 2/2] net: bridge: export vlan flags with the stats

2016-08-17 Thread Nikolay Aleksandrov
Use one of the vlan xstats padding fields to export the vlan flags. This is needed in order to be able to distinguish between master (bridge) and port vlan entries in user-space when dumping the bridge vlan stats. Signed-off-by: Nikolay Aleksandrov ---

[PATCH net-next 0/2] net: bridge: export vlan stats per-port with flags

2016-08-17 Thread Nikolay Aleksandrov
Hi, This set adds the ability to export vlan stats per-port. Patch 01 makes that possible by consolidating the bridge and port linkxstats calls. Then patch 02 allows to dump the vlan entry flags in order to be able to distinguish between bridge and port vlan entries when dumping the master device

Re: [PATCH net-next V2 1/5] flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

2016-08-17 Thread Hadar Hen Zion
On Wed, Aug 17, 2016 at 1:46 PM, Jiri Pirko wrote: > Wed, Aug 17, 2016 at 12:36:10PM CEST, had...@mellanox.com wrote: >>Early in the datapath skb_vlan_untag function is called, stripped >>the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields. >> >>The current

Re: 4.6.3, pppoe + shaper workload, skb_panic / skb_push / ppp_start_xmit

2016-08-17 Thread Denys Fedoryshchenko
On 2016-08-09 00:05, Guillaume Nault wrote: On Mon, Aug 08, 2016 at 02:25:00PM +0300, Denys Fedoryshchenko wrote: On 2016-08-01 23:59, Guillaume Nault wrote: > Do you still have the vmlinux file with debug symbols that generated > this panic? Sorry for delay, i didn't had same image on all

[PATCH] i40e: Remove XSTRINGIFY macro definitions and uses

2016-08-17 Thread Joe Perches
Use __stringify instead. Signed-off-by: Joe Perches --- drivers/net/ethernet/intel/i40e/i40e.h| 4 drivers/net/ethernet/intel/i40e/i40e_client.h | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e.h

[PATCH iproute2 1/1] tc classifiers: Modernize tcindex classifier

2016-08-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim --- tc/f_tcindex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/f_tcindex.c b/tc/f_tcindex.c index 280d1d4..0a73784 100644 --- a/tc/f_tcindex.c +++ b/tc/f_tcindex.c @@ -99,7

Re: Fw: Linux tcp_xmit_retransmit_queue use after free on 4.8-rc1 / master]

2016-08-17 Thread Marco Grassi
Hello, I'm fuzzing with your patch applied, and I don't see the issue triggering anymore, (or other related) I will keep you updated if something pops up, so we can fix before pushing Marco On Wed, Aug 17, 2016 at 4:32 AM, Cong Wang wrote: > On Tue, Aug 16, 2016 at

Failing to get link up with ENC28J60 + Beaglebone

2016-08-17 Thread Jonatan Magnusson
Hi I’m evaluating ENC28J60 for a new design, so I’ve got myself a module from ebay and verified that it works perfectly with Raspberry Pi. Now I’m trying to get it to work on a Beaglebone (Beaglebone Green Wireless). After some struggles the device tree seems right and I’ve checked all

[PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread Mike Manning
If DAD fails with accept_dad set to 2, global addresses and host routes are incorrectly left in place. Even though disable_ipv6 is set, contrary to documentation, the addresses are not dynamically deleted from the interface. It is only on a subsequent link down/up that these are removed. The fix

[RFC PATCH 00/13] Series short description

2016-08-17 Thread John Fastabend
I've been working on this for a bit now figured its time for a v2 RFC. As usual any comments, suggestions, observations, musings, etc are appreciated. Latest round of lockless qdisc patch set with performance metric primarily using pktgen to inject pkts into the qdisc layer. Some simple netperf

Re: [RFC PATCH 10/13] net: sched: lockless support for netif_schedule

2016-08-17 Thread John Fastabend
On 16-08-17 12:37 PM, John Fastabend wrote: > netif_schedule uses a bit QDISC_STATE_SCHED to tell the qdisc layer > if a run of the qdisc has been scheduler. This is important when > tearing down qdisc instances. We can rcu_free an instance for example > if its possible that we might have

Re: [RFC PATCH 12/13] net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mq

2016-08-17 Thread John Fastabend
On 16-08-17 12:38 PM, John Fastabend wrote: > The sch_mq qdisc creates a sub-qdisc per tx queue which are then > called independently for enqueue and dequeue operations. However > statistics are aggregated and pushed up to the "master" qdisc. > > This patch adds support for any of the sub-qdiscs

Re: [PATCH] [v8] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Florian Fainelli
On 08/17/2016 12:38 PM, Timur Tabi wrote: >> If this is an external PHY, the expectation is that it will be hanging >> off a MDIO bus controller, either the MDIO bus internal to the MAC, or >> an external MDIO bus (separate register range). > > So for starters, I forgot to delete the 'compatible'

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Florian Fainelli
On 08/16/2016 02:37 PM, Timur Tabi wrote: > Al Stone wrote: >> Does the ACPI portion of the driver*have* to know about the PHY? In >> general, >> the ACPI assumption on ARM [**] is that those have all been set up >> before we >> get to the kernel. So, does it need to be visible to the ACPI part

Re: [PATCH 2/2] kaweth: fix oops upon failed memory allocation

2016-08-17 Thread Oliver Neukum
On Wed, 2016-08-17 at 15:15 +0200, Bjørn Mork wrote: > Oliver Neukum writes: > Eh, that should be "goto err_free_netdev;", shouldn't it? Right, thanks. Fixed version coming up. Regards Oliver

[PATCH net] net: bgmac: fix reversed check for MII registration error

2016-08-17 Thread Rafał Miłecki
From: Rafał Miłecki It was failing on successful registration returning meaningless errors. Signed-off-by: Rafał Miłecki Fixes: 55954f3bfdac ("net: ethernet: bgmac: move BCMA MDIO Phy code into a separate file") --- This fix is intendent for net repository

Re: [PATCH net] tcp: fix use after free in tcp_xmit_retransmit_queue()

2016-08-17 Thread Neal Cardwell
On Wed, Aug 17, 2016 at 8:56 AM, Eric Dumazet wrote: > > From: Eric Dumazet > > When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the > tail of the write queue using tcp_add_write_queue_tail() > > Then it attempts to copy user data

Re: [Patch-V2 2/3] chcr: Support for Chelsio's Crypto Hardware

2016-08-17 Thread Hariprasad Shenai
On Tue, Jul 19, 2016 at 09:15:22PM -0700, David Miller wrote: > From: Yeshaswi M R Gowda > Date: Mon, 18 Jul 2016 22:42:14 -0700 > > > +config CRYPTO_DEV_CHELSIO > > + tristate "Chelsio Crypto Co-processor Driver" > > + depends on PCI && NETDEVICES && ETHERNET > > +

Re: [PATCH v3 5/5] net: ethernet: ti: cpsw: add ethtool channels support

2016-08-17 Thread ivan.khoronzhuk
On 17.08.16 09:22, Mugunthan V N wrote: On Tuesday 16 August 2016 04:55 AM, Ivan Khoronzhuk wrote: These ops allow to control number of channels driver is allowed to work with at cpdma level. The maximum number of channels is 8 for rx and 8 for tx. In dual_emac mode the h/w channels are

regression in xgene-enet in 4.8-rc series, oops from xgene_enet_probe

2016-08-17 Thread Riku Voipio
On 26 July 2016 at 03:12, Iyappan Subramanian wrote: > When the driver is configured as kernel module and when it gets > unloaded and reloaded, kernel crash was observed. This patch > addresses the software cleanup by doing the following, > > - Moved register_netdev call

[PATCH v2 2/2] kaweth: fix oops upon failed memory allocation

2016-08-17 Thread Oliver Neukum
Just return an error upon failure. Signed-off-by: Oliver Neukum --- drivers/net/usb/kaweth.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 37bf715..528b9c9 100644 ---

[PATCH v2 0/2]fixes to kaweth in response to Umap2 testing

2016-08-17 Thread Oliver Neukum
These patches fix an oops in firmware downloading and an oops due to a memory allocation failure

[RFC PATCH 5/5] samples: bpf: add userspace example for attaching eBPF programs to cgroups

2016-08-17 Thread Daniel Mack
Add a simple userpace program to demonstrate the new API to attach eBPF programs to cgroups. This is what it does: * Create arraymap in kernel with 4 byte keys and 8 byte values * Load eBPF program The eBPF program accesses the map passed in to store two pieces of information. The

[RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-17 Thread Daniel Mack
This patch set allows eBPF programs for network filtering and accounting to be attached to cgroups, so that they apply to all sockets of all tasks placed in that cgroup. The logic also allows to be extendeded for other cgroup-based eBPF logic. In short, the patch set adds the following: * A new

[RFC PATCH 1/5] bpf: add new prog type for cgroup socket filtering

2016-08-17 Thread Daniel Mack
For now, this program type is equivalent to BPF_PROG_TYPE_SOCKET_FILTER in terms of checks during the verification process. It may access the skb as well. Programs of this type will be attached to cgroups for network filtering and accounting. Signed-off-by: Daniel Mack ---

Re: [RFC PATCH 2/5] cgroup: add bpf_{e,in}gress pointers

2016-08-17 Thread Tejun Heo
Hello, On Wed, Aug 17, 2016 at 04:00:45PM +0200, Daniel Mack wrote: > @@ -5461,6 +5462,14 @@ static int cgroup_destroy_locked(struct cgroup *cgrp) > for_each_css(css, ssid, cgrp) > kill_css(css); > > +#ifdef CONFIG_CGROUP_BPF > + if (cgrp->bpf_ingress) > +

[RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Daniel Mack
If CONFIG_CGROUP_BPF is enabled, and the cgroup associated with the receiving socket has an eBPF programs installed, run them from sk_filter_trim_cap(). eBPF programs used in this context are expected to either return 1 to let the packet pass, or != 1 to drop them. The programs have access to the

[RFC PATCH 2/5] cgroup: add bpf_{e,in}gress pointers

2016-08-17 Thread Daniel Mack
Add two pointers for eBPF programs to struct cgroup. These will be used to store programs for ingress and egress for accounting and filtering. This new feature is guarded by CONFIG_CGROUP_BPF. Signed-off-by: Daniel Mack --- include/linux/cgroup-defs.h | 6 ++

[RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Daniel Mack
Extend the bpf(2) syscall by two new commands, BPF_PROG_ATTACH and BPF_PROG_DETACH which allow attaching eBPF programs to a target. On the API level, the target could be anything that has an fd in userspace, hence the name of the field in union bpf_attr is called 'target_fd'. When called with

Re: [PATCH net-next V2 1/5] flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

2016-08-17 Thread Jiri Pirko
Wed, Aug 17, 2016 at 01:05:33PM CEST, had...@dev.mellanox.co.il wrote: >On Wed, Aug 17, 2016 at 1:46 PM, Jiri Pirko wrote: >> Wed, Aug 17, 2016 at 12:36:10PM CEST, had...@mellanox.com wrote: >>>Early in the datapath skb_vlan_untag function is called, stripped >>>the vlan from

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread kbuild test robot
Hi Mike, [auto build test WARNING on net/master] [also build test WARNING on v4.8-rc2 next-20160817] [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/Mike-Manning/net-ipv6-Remove-addresses

Re: [RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Tejun Heo
On Wed, Aug 17, 2016 at 04:00:47PM +0200, Daniel Mack wrote: > @@ -78,6 +116,12 @@ int sk_filter_trim_cap(struct sock *sk, struct sk_buff > *skb, unsigned int cap) > if (skb_pfmemalloc(skb) && !sock_flag(sk, SOCK_MEMALLOC)) > return -ENOMEM; > > +#ifdef CONFIG_CGROUP_BPF > +

[PATCH net] tcp: fix use after free in tcp_xmit_retransmit_queue()

2016-08-17 Thread Eric Dumazet
From: Eric Dumazet When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb.

Re: [PATCH 2/2] kaweth: fix oops upon failed memory allocation

2016-08-17 Thread Bjørn Mork
Oliver Neukum writes: > Just return an error upon failure. > > Signed-off-by: Oliver Neukum > --- > drivers/net/usb/kaweth.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c > index

[PATCH v2 1/2] kaweth: fix firmware download

2016-08-17 Thread Oliver Neukum
This fixes the oops discovered by the Umap2 project and Alan Stern. The intf member needs to be set before the firmware is downloaded. Signed-off-by: Oliver Neukum --- drivers/net/usb/kaweth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH net-next] sfc: avoid division by zero

2016-08-17 Thread Edward Cree
The division is already being done properly in efx_ef10_get_timer_config which returns zero-on-success, unlike the old efx_ef10_get_sysclk_freq. Fixes: d95e329a55ba ("sfc: get timer configuration from adapter") Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Tejun Heo
Hello, On Wed, Aug 17, 2016 at 04:35:24PM +0200, Daniel Mack wrote: > > Wouldn't it make sense to update the descendants to point to the > > programs directly so that there's no need to traverse the tree on each > > packet? It's more state to maintain but I think it would make total > > sense

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread Hannes Frederic Sowa
On 17.08.2016 12:28, Mike Manning wrote: > +static void dev_disable_change(struct inet6_dev *idev); > > /* > * Configured unicast address hash table > @@ -1945,6 +1946,12 @@ lock_errdad: > > pr_info("%s: IPv6 being disabled!\n", >

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Daniel Mack
Hi Tejun, On 08/17/2016 04:20 PM, Tejun Heo wrote: > On Wed, Aug 17, 2016 at 04:00:46PM +0200, Daniel Mack wrote: >> The current implementation walks the tree from the passed cgroup up >> to the root. If there is any program of the given type installed in >> any of the ancestors, the installation

[patch net v2 09/10] mlxsw: spectrum: Unmap 802.1Q FID before destroying it

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel Before destroying the 802.1Q FID we should first remove the VID-to-FID mapping. This makes mlxsw_sp_fid_destroy() symmetric with regards to mlxsw_sp_fid_create(). Fixes: 14d39461b3f4 ("mlxsw: spectrum: Use per-FID struct for the VLAN-aware bridge")

[patch net v2 01/10] mlxsw: spectrum: Don't return upon error in removal path

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel When removing a VLAN filter from the device we shouldn't return upon the first error we encounter, as otherwise we'll have resources that will never be freed nor used. Instead, we should keep trying to free as much resources as possible in a best effort

[PATCH] phy, leds: add support for led triggers on phy link state change

2016-08-17 Thread Zach Brown
From: Josh Cartwright This introduces an option CONFIG_LED_TRIGGER_PHY (default n), which will create a set of led triggers for each instantiated PHY device. There is one LED trigger per link-speed, per-phy. This allows for a user to configure their system to allow a

[patch net v2 06/10] mlxsw: spectrum: Trap loop-backed packets

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel One of the conditions to generate an ICMP Redirect Message is that "the packet is being forwarded out the same physical interface that it was received from" (RFC 1812). Therefore, we need to be able to trap such packets and let the kernel decide what to

kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Denys Fedoryshchenko
Hi! Tried to run squid on latest kernel, and hit a panic Sometimes it just shows warning in dmesg (but doesnt work properly) [ 75.701666] IPv4: Attempt to release TCP socket in state 10 88102d430780 [ 83.866974] squid (2700) used greatest stack depth: 12912 bytes left [ 87.506644]

Re: [RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Tejun Heo
On Wed, Aug 17, 2016 at 04:36:02PM +0200, Daniel Mack wrote: > On 08/17/2016 04:23 PM, Tejun Heo wrote: > > On Wed, Aug 17, 2016 at 04:00:47PM +0200, Daniel Mack wrote: > >> @@ -78,6 +116,12 @@ int sk_filter_trim_cap(struct sock *sk, struct sk_buff > >> *skb, unsigned int cap) > >>if

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread kbuild test robot
Hi Mike, [auto build test ERROR on net/master] [also build test ERROR on v4.8-rc2 next-20160817] [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/Mike-Manning/net-ipv6-Remove-addresses

[PATCH net-next] xen-netback: create a debugfs node for hash information

2016-08-17 Thread Paul Durrant
It is useful to be able to see the hash configuration when running tests. This patch adds a debugfs node for that purpose. Signed-off-by: Paul Durrant Cc: Wei Liu --- drivers/net/xen-netback/common.h | 4 +++ drivers/net/xen-netback/hash.c | 68

[patch net v2 07/10] mlxsw: reg: Fix missing op field fill-up

2016-08-17 Thread Jiri Pirko
From: Jiri Pirko Ralue pack function needs to set op, otherwise it is 0 for add always. Fixes: d5a1c749d22 ("mlxsw: reg: Add Router Algorithmic LPM Unicast Entry Register definition") Signed-off-by: Jiri Pirko ---

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Tejun Heo
Hello, again. Just one addition. On Wed, Aug 17, 2016 at 04:35:24PM +0200, Daniel Mack wrote: > created. To bring this more in line with how cgroups usually work, I > guess we should add code to copy over the bpf programs from the ancestor > once a new cgroup is instantiated. Please don't copy

Re: [PATCH] phy, leds: add support for led triggers on phy link state change

2016-08-17 Thread kbuild test robot
Hi Josh, [auto build test ERROR on net-next/master] [also build test ERROR on v4.8-rc2 next-20160817] [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/Zach-Brown/phy-leds-add-support-for-led

Re: [RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Daniel Mack
On 08/17/2016 04:23 PM, Tejun Heo wrote: > On Wed, Aug 17, 2016 at 04:00:47PM +0200, Daniel Mack wrote: >> @@ -78,6 +116,12 @@ int sk_filter_trim_cap(struct sock *sk, struct sk_buff >> *skb, unsigned int cap) >> if (skb_pfmemalloc(skb) && !sock_flag(sk, SOCK_MEMALLOC)) >> return

[patch net v2 03/10] mlxsw: spectrum: Create PVID vPort before registering netdevice

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel After registering a netdevice it's possible for user space applications to configure an IP address on it. From the driver's perspective, this means a router interface (RIF) should be created for the PVID vPort. Therefore, we must create the PVID vPort

[patch net v2 02/10] mlxsw: spectrum: Remove redundant errors from the code

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel Currently, when device configuration fails we emit errors to the kernel log despite the fact we already get these from the EMAD transaction layer, so remove them. In addition to being unnecessary, removing these error messages will allow us to reuse

[patch net v2 10/10] mlxsw: spectrum: Allow packets to be trapped from any PG

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel When packets enter the device they are classified to a priority group (PG) buffer based on their PCP value. After their egress port and traffic class are determined they are moved to the switch's shared buffer and await transmission, if:

[patch net v2 00/10] mlxsw: IPv4 UC router fixes

2016-08-17 Thread Jiri Pirko
From: Jiri Pirko Ido says: Patches 1-3 fix a long standing problem in the driver's init sequence, which manifests itself quite often when routing daemons try to configure an IP address on registered netdevs that don't yet have an associated vPort. Patches 4-9 add missing

[patch net v2 08/10] mlxsw: spectrum: Add missing rollbacks in error path

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel While going over the code I noticed we are missing two rollbacks in the port's creation error path. Add them and adjust the place of one of them in the port's removal sequence so that both are symmetric. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial

[patch net v2 05/10] mlxsw: spectrum: Add missing packet traps

2016-08-17 Thread Jiri Pirko
From: Elad Raz Add the following traps: 1) MTU Error: Trap packets whose size is bigger than the egress RIF's MTU. If DF bit isn't set, traffic will continue to be routed in slow path. 2) TTL Error: Trap packets whose TTL expired. This allows traceroute to work properly.

[patch net v2 04/10] mlxsw: spectrum: Mark port as active before registering it

2016-08-17 Thread Jiri Pirko
From: Ido Schimmel Commit bbf2a4757b30 ("mlxsw: spectrum: Initialize ports at the end of init sequence") moved ports initialization to the end of the init sequence, which means ports are the first to be removed during fini. Since the FDB delayed work is still active when

[PATCH net-next] tcp: defer sacked assignment

2016-08-17 Thread Eric Dumazet
From: Eric Dumazet While chasing tcp_xmit_retransmit_queue() kasan issue, I found that we could avoid reading sacked field of skb that we wont send, possibly removing one cache line miss. Very minor change in slow path, but why not ? ;) Signed-off-by: Eric Dumazet

Re: [PATCH net-next] tcp: defer sacked assignment

2016-08-17 Thread Neal Cardwell
On Wed, Aug 17, 2016 at 10:48 AM, Eric Dumazet wrote: > > From: Eric Dumazet > > While chasing tcp_xmit_retransmit_queue() kasan issue, I found > that we could avoid reading sacked field of skb that we wont send, > possibly removing one cache line

Re: kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 17:31 +0300, Denys Fedoryshchenko wrote: > Hi! > > Tried to run squid on latest kernel, and hit a panic > Sometimes it just shows warning in dmesg (but doesnt work properly) > [ 75.701666] IPv4: Attempt to release TCP socket in state 10 > 88102d430780 > [ 83.866974]

Re: [PATCH v2 1/1] ppp: Fix one deadlock issue of PPP when send frame

2016-08-17 Thread Guillaume Nault
On Tue, Aug 16, 2016 at 07:33:38PM +0800, f...@ikuai8.com wrote: > From: Gao Feng > > PPP channel holds one spinlock before send frame. But the skb may > select the same PPP channel with wrong route policy. As a result, > the skb reaches the same channel path. It tries to get

[PATCH] net: ethernet: nuvoton: fix spelling mistake: "aligment" -> "alignment"

2016-08-17 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King --- drivers/net/ethernet/nuvoton/w90p910_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] atm: fore200e: Do not drop const qualifier

2016-08-17 Thread LABBE Corentin
The data member of structure firmware is const and this constness is dropped by some cast. This patch add some const for keeping the const information. Signed-off-by: LABBE Corentin --- drivers/atm/fore200e.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Tejun Heo
Hello, Daniel. On Wed, Aug 17, 2016 at 04:00:46PM +0200, Daniel Mack wrote: > The current implementation walks the tree from the passed cgroup up > to the root. If there is any program of the given type installed in > any of the ancestors, the installation is rejected. This is because > programs

Re: Server fails to boot with net-next

2016-08-17 Thread bige...@linutronix.de
On 2016-08-17 16:58:02 [+], Yuval Mintz wrote: > Are there known issues here? fixed in -rc2 by http://git.kernel.org/tip/d52c0569bab4edc32df44dc7ac28517134f6 Sebastian

Re: regression in xgene-enet in 4.8-rc series, oops from xgene_enet_probe

2016-08-17 Thread Loc Ho
Hi Riku, >> When the driver is configured as kernel module and when it gets >> unloaded and reloaded, kernel crash was observed. This patch >> addresses the software cleanup by doing the following, >> >> - Moved register_netdev call after hardware is ready >> - Since ndev is not ready, added

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 05:51:44PM +0200, Daniel Mack wrote: > On 08/17/2016 05:06 PM, Tejun Heo wrote: > > What I'd suggest is keeping two sets of pointers, one set for the > > programs explicitly attached to the cgroup and the other for programs > > which are to be executed for the cgroup. The

Re: [RFC PATCH 2/5] cgroup: add bpf_{e,in}gress pointers

2016-08-17 Thread Tejun Heo
Hello, On Wed, Aug 17, 2016 at 10:50:40AM -0700, Alexei Starovoitov wrote: > > +config CGROUP_BPF > > + bool "Enable eBPF programs in cgroups" > > + depends on BPF_SYSCALL > > + help > > + This options allows cgroups to accommodate eBPF programs that > > + can be used for network

Server fails to boot with net-next

2016-08-17 Thread Yuval Mintz
Just updated to last net-next and boot crashed in x2apic_cluster_probe(). Bisection seemed to point to: commit 6b2c28471de550308784560206c3365e5179d42f Author: Sebastian Andrzej Siewior Date: Wed Jul 13 17:17:00 2016 + x86/x2apic:

Re: kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 08:42 -0700, Eric Dumazet wrote: > On Wed, 2016-08-17 at 17:31 +0300, Denys Fedoryshchenko wrote: > > Hi! > > > > Tried to run squid on latest kernel, and hit a panic > > Sometimes it just shows warning in dmesg (but doesnt work properly) > > [ 75.701666] IPv4: Attempt to

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread Hannes Frederic Sowa
On Wed, Aug 17, 2016, at 18:08, Mike Manning wrote: > On 08/17/2016 04:40 PM, Hannes Frederic Sowa wrote: > > On 17.08.2016 12:28, Mike Manning wrote: > >> +static void dev_disable_change(struct inet6_dev *idev); > >> > >> /* > >> *Configured unicast address hash table > >> @@ -1945,6

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 16:00 +0200, Daniel Mack wrote: > + progp = is_ingress ? >bpf_ingress : >bpf_egress; > + > + rcu_read_lock(); > + old_prog = rcu_dereference(*progp); > + rcu_assign_pointer(*progp, prog); > + > + if (old_prog) > +

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Daniel Mack
On 08/17/2016 05:06 PM, Tejun Heo wrote: > What I'd suggest is keeping two sets of pointers, one set for the > programs explicitly attached to the cgroup and the other for programs > which are to be executed for the cgroup. The two pointers in the > latter set will point to the closest non-null

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

2016-08-17 Thread Mike Manning
On 08/17/2016 04:40 PM, Hannes Frederic Sowa wrote: > On 17.08.2016 12:28, Mike Manning wrote: >> +static void dev_disable_change(struct inet6_dev *idev); >> >> /* >> * Configured unicast address hash table >> @@ -1945,6 +1946,12 @@ lock_errdad: >> >> pr_info("%s: IPv6

Re: [PATCH net] tcp: fix use after free in tcp_xmit_retransmit_queue()

2016-08-17 Thread Cong Wang
On Wed, Aug 17, 2016 at 5:56 AM, Eric Dumazet wrote: > From: Eric Dumazet > > When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the > tail of the write queue using tcp_add_write_queue_tail() > > Then it attempts to copy user data into

Re: kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Denys Fedoryshchenko
On 2016-08-17 19:04, Eric Dumazet wrote: On Wed, 2016-08-17 at 08:42 -0700, Eric Dumazet wrote: On Wed, 2016-08-17 at 17:31 +0300, Denys Fedoryshchenko wrote: > Hi! > > Tried to run squid on latest kernel, and hit a panic > Sometimes it just shows warning in dmesg (but doesnt work properly) > [

Re: kernel panic TPROXY , vanilla 4.7.1

2016-08-17 Thread Eric Dumazet
On Wed, 2016-08-17 at 19:44 +0300, Denys Fedoryshchenko wrote: > Yes, everything fine after patch! > Thanks a lot Perfect, thanks for testing, I am sending the official patch.

[PATCH net] netfilter: tproxy: properly refcount tcp listeners

2016-08-17 Thread Eric Dumazet
From: Eric Dumazet inet_lookup_listener() and inet6_lookup_listener() no longer take a reference on the found listener. This minimal patch adds back the refcounting, but we might do this differently in net-next later. Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener

Re: [RFC PATCH 2/5] cgroup: add bpf_{e,in}gress pointers

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 04:00:45PM +0200, Daniel Mack wrote: > Add two pointers for eBPF programs to struct cgroup. These will be used > to store programs for ingress and egress for accounting and filtering. > > This new feature is guarded by CONFIG_CGROUP_BPF. ... > +#ifdef CONFIG_CGROUP_BPF > +

Re: [RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 04:00:47PM +0200, Daniel Mack wrote: > If CONFIG_CGROUP_BPF is enabled, and the cgroup associated with the > receiving socket has an eBPF programs installed, run them from > sk_filter_trim_cap(). > > eBPF programs used in this context are expected to either return 1 to >

Re: [RFC PATCH 3/5] bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 09:16:02AM -0700, Eric Dumazet wrote: > On Wed, 2016-08-17 at 16:00 +0200, Daniel Mack wrote: > > > + progp = is_ingress ? >bpf_ingress : >bpf_egress; > > + > > + rcu_read_lock(); > > + old_prog = rcu_dereference(*progp); > > +

Re: [RFC PATCH 4/5] net: filter: run cgroup eBPF programs

2016-08-17 Thread Alexei Starovoitov
On Wed, Aug 17, 2016 at 11:20:29AM -0700, Alexei Starovoitov wrote: > On Wed, Aug 17, 2016 at 04:00:47PM +0200, Daniel Mack wrote: > > If CONFIG_CGROUP_BPF is enabled, and the cgroup associated with the > > receiving socket has an eBPF programs installed, run them from > > sk_filter_trim_cap(). >

[PATCH net-next] tcp: refine tcp_prune_ofo_queue() to not drop all packets

2016-08-17 Thread Eric Dumazet
From: Eric Dumazet Over the years, TCP BDP has increased a lot, and is typically in the order of ~10 Mbytes with help of clever Congestion Control modules. In presence of packet losses, TCP stores incoming packets into an out of order queue, and number of skbs sitting there

Re: [PATCH] [v8] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Andrew Lunn
> Something is odd about of_mdiobus_register(). > > This function scans child nodes to look for PHYs: > > /* Loop over the child nodes and register a phy_device for each phy */ > for_each_available_child_of_node(np, child) { > addr = of_mdio_parse_addr(>dev, child); > > And in my driver,

Re: [PATCH iproute] ipila: Fixed unitialized variables

2016-08-17 Thread Stephen Hemminger
On Mon, 15 Aug 2016 16:30:22 -0700 Tom Herbert wrote: > Initialize locator and locator_match to zero and only do > addattr if they have been set. > > Signed-off-by: Tom Herbert Applied thanks

[PATCH net-next] net: bgmac: make it clear when setting interface type to RMII

2016-08-17 Thread Rafał Miłecki
From: Rafał Miłecki It doesn't really change anything as BGMAC_CHIPCTL_1_IF_TYPE_RMII is equal to 0. It make code a bit clener, so far when reading it one could think we forgot to set a proper mode. It also keeps this mode code in sync with other ones. Signed-off-by: Rafał

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-08-17 Thread Phil Sutter
On Wed, Jun 01, 2016 at 10:03:49PM +0200, Phil Sutter wrote: > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks > overly complicated. Instead rely upon parse_rtattr_nested() to assign > the relevant pointer if requested rtattr fields are present. In order to validate correctness

[PATCH net-next] dsa: mv88e6xxx: Timeout based on iterations

2016-08-17 Thread Andrew Lunn
The mv88e6xxx driver times out operations on the switch based on looping until an elapsed wall clock time is reached. However, if usleep_range() sleeps much longer than expected, it could timeout with an error without actually checking to see if the devices has completed the operation. So replace

Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

2016-08-17 Thread Timur Tabi
Florian Fainelli wrote: If it has self identification, and the MAC is capable of knowing what kind of PHY it is internally bundled with, why does it matter to represent that specific piece of information in Device Tree or ACPI? That's the thing - the MAC is not capable of knowing. From a

  1   2   >