[PATCH iproute2/net-next 0/3] Add the tc-sample action

2017-02-04 Thread Yotam Gigi
This patchset adds the tc-sample action support and the corresponding man page. More information about the action and its usage can be found in the commit message. Yotam Gigi (3): tc: Add support for the sample tc action tc: man: Add man entry for the tc-sample action tc: man: matchall:

[PATCH iproute2/net-next 3/3] tc: man: matchall: Update examples to include sample

2017-02-04 Thread Yotam Gigi
Add an example of packet sampling to the tc-matchall man page examples section. The example uses the matchall classifier and the sample action to create packet sampling on a port. Reviewed-by: Jiri Pirko Signed-off-by: Yotam Gigi ---

[PATCH iproute2/net-next 1/3] tc: Add support for the sample tc action

2017-02-04 Thread Yotam Gigi
The sample tc action allows sampling packets matching a classifier. It peeks randomly packets, and samples them using the psample netlink channel. The user can specify the psample group, which the packet will be sampled to, the sampling rate and the packet truncation (to save kernel-user traffic).

[PATCH iproute2/net-next 2/3] tc: man: Add man entry for the tc-sample action

2017-02-04 Thread Yotam Gigi
In addition to general information about the tc action, the man entry contains common usage examples and information about the tlv fields packed within each sampled packet. Reviewed-by: Jiri Pirko Signed-off-by: Yotam Gigi --- man/man8/Makefile| 2

[PATCH net] ip6_gre: fix ip6gre_err() invalid reads

2017-02-04 Thread Eric Dumazet
From: Eric Dumazet Andrey Konovalov reported out of bound accesses in ip6gre_err() If GRE flags contains GRE_KEY, the following expression *(((__be32 *)p) + (grehlen / 4) - 1) accesses data ~40 bytes after the expected point, since grehlen includes the size of IPv6

[PATCH 1/2] libceph: Remove unneeded stddef.h include

2017-02-04 Thread Stafford Horne
This was causing a build failure for openrisc when using musl and gcc 5.4.0 since the file is not available in the toolchain. It doesnt seem this is needed and removing it does not cause any build warnings for me. Signed-off-by: Stafford Horne --- net/ceph/snapshot.c | 2 --

[PATCH] Revert "net: Remove state argument from skb_find_text()"

2017-02-04 Thread Igor Pylypiv
This reverts commit 059a2440fd3cf4ec57735db2c0a90401cde84fca. Textsearch state parameter should be passed by pointer because its resulting value is needed for call to textsearch_next(). Signed-off-by: Igor Pylypiv --- include/linux/skbuff.h | 3 ++-

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Andy Lutomirski
On Sat, Feb 4, 2017 at 8:37 PM, Alexei Starovoitov wrote: > On Sat, Feb 04, 2017 at 07:54:20PM -0800, Andy Lutomirski wrote: >> >> I've repeatedly asked how you plan to make a "don't override" flag >> have sensible semantics when someone tries to add a new flag or

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 07:54:20PM -0800, Andy Lutomirski wrote: > > I've repeatedly asked how you plan to make a "don't override" flag > have sensible semantics when someone tries to add a new flag or change > the behavior to "don't override but, rather then rejecting programs > down the

Re: [PATCH v2 net] bpf: add bpf_sk_netns_id() helper

2017-02-04 Thread Andy Lutomirski
On Sat, Feb 4, 2017 at 8:05 PM, Alexei Starovoitov wrote: > On Sat, Feb 04, 2017 at 07:33:14PM -0800, Andy Lutomirski wrote: >> On Sat, Feb 4, 2017 at 7:25 PM, Alexei Starovoitov >> wrote: >> > On Sat, Feb 04, 2017 at 09:15:10AM -0800,

Re: [PATCH v2 net] bpf: add bpf_sk_netns_id() helper

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 07:33:14PM -0800, Andy Lutomirski wrote: > On Sat, Feb 4, 2017 at 7:25 PM, Alexei Starovoitov > wrote: > > On Sat, Feb 04, 2017 at 09:15:10AM -0800, Andy Lutomirski wrote: > >> On Fri, Feb 3, 2017 at 5:22 PM, Alexei Starovoitov

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Andy Lutomirski
On Sat, Feb 4, 2017 at 7:48 PM, Alexei Starovoitov wrote: > On Sat, Feb 04, 2017 at 07:27:01PM -0800, Andy Lutomirski wrote: >> On Sat, Feb 4, 2017 at 7:10 PM, Alexei Starovoitov >> wrote: >> > On Sat, Feb 04, 2017 at 09:07:19AM -0800,

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Andy Lutomirski
On Sat, Feb 4, 2017 at 7:35 PM, Alexei Starovoitov wrote: > On Sat, Feb 04, 2017 at 07:22:03PM -0800, Andy Lutomirski wrote: >> On Sat, Feb 4, 2017 at 7:18 PM, Alexei Starovoitov >> wrote: >> > On Sat, Feb 04, 2017 at 09:08:38AM -0800,

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 07:27:01PM -0800, Andy Lutomirski wrote: > On Sat, Feb 4, 2017 at 7:10 PM, Alexei Starovoitov > wrote: > > On Sat, Feb 04, 2017 at 09:07:19AM -0800, Andy Lutomirski wrote: > >> >> can see a namespaced view of the world. For this to work,

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 07:22:03PM -0800, Andy Lutomirski wrote: > On Sat, Feb 4, 2017 at 7:18 PM, Alexei Starovoitov > wrote: > > On Sat, Feb 04, 2017 at 09:08:38AM -0800, Andy Lutomirski wrote: > >> > So use-case would be that someone wants to attach the very same

Re: [PATCH v2 net] bpf: add bpf_sk_netns_id() helper

2017-02-04 Thread Andy Lutomirski
On Sat, Feb 4, 2017 at 7:25 PM, Alexei Starovoitov wrote: > On Sat, Feb 04, 2017 at 09:15:10AM -0800, Andy Lutomirski wrote: >> On Fri, Feb 3, 2017 at 5:22 PM, Alexei Starovoitov wrote: >> > Note that all bpf programs types are global. >> >> I don't

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Andy Lutomirski
On Sat, Feb 4, 2017 at 7:10 PM, Alexei Starovoitov wrote: > On Sat, Feb 04, 2017 at 09:07:19AM -0800, Andy Lutomirski wrote: >> >> can see a namespaced view of the world. For this to work, presumably >> >> we need to make sure that eBPF programs that are installed

Re: [PATCH v2 net] bpf: add bpf_sk_netns_id() helper

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 09:15:10AM -0800, Andy Lutomirski wrote: > On Fri, Feb 3, 2017 at 5:22 PM, Alexei Starovoitov wrote: > > Note that all bpf programs types are global. > > I don't think this has a clear enough meaning to work with. In Please clarify what you mean. The quoted

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Andy Lutomirski
On Sat, Feb 4, 2017 at 7:18 PM, Alexei Starovoitov wrote: > On Sat, Feb 04, 2017 at 09:08:38AM -0800, Andy Lutomirski wrote: >> > So use-case would be that someone wants to attach the very same >> > prog via tc to various netdevs sitting in different netns, and >> >

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 09:08:38AM -0800, Andy Lutomirski wrote: > > So use-case would be that someone wants to attach the very same > > prog via tc to various netdevs sitting in different netns, and > > that prog looks up a map, controlled by initns, with skb->netns_inum > > as key and the

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 09:07:19AM -0800, Andy Lutomirski wrote: > >> can see a namespaced view of the world. For this to work, presumably > >> we need to make sure that eBPF programs that are installed by programs > >> that are in a container don't see traffic that isn't in that > >> container.

Re: [PATHv3 net-next] bpf: enable verifier to add 0 to packet ptr

2017-02-04 Thread Alexei Starovoitov
On Sat, Feb 04, 2017 at 08:37:29AM -0800, William Tu wrote: > The patch fixes the case when adding a zero value to the packet > pointer. The zero value could come from src_reg equals type > BPF_K or CONST_IMM. The patch fixes both, otherwise the verifer > reports the following error: > [...] >

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add watchdog interrupt handler

2017-02-04 Thread Florian Fainelli
Le 02/04/17 à 12:38, Andrew Lunn a écrit : > The switch contains a watchdog looking for issues with the internal > gubbins of the switch. Hook the interrupt the watchdog triggers and > log the value of the control register indicating why the watchdog > fired. The watchdog can only be cleared with

Re: [PATCH net-next v4 0/5] net: ipv6: Improve user experience with multipath routes

2017-02-04 Thread David Miller
From: David Ahern Date: Thu, 2 Feb 2017 12:37:07 -0800 > This series closes a couple of gaps between IPv4 and IPv6 with respect > to multipath routes: ... Series applied, thanks David.

Re: [PATCH] xen-netfront: Improve error handling during initialization

2017-02-04 Thread David Miller
From: Ross Lagerwall Date: Wed, 1 Feb 2017 15:50:22 + > * Delay timer creation so that if initializing a queue fails, the timer > has not been setup yet. setup_timer() doesn't do anything that must be "undone" if an error occurs and we have to cleanup. It just

Re: [PATCH net] netlabel: out of bound access in cipso_v4_validate()

2017-02-04 Thread David Miller
From: Eric Dumazet Date: Fri, 03 Feb 2017 00:03:26 -0800 > From: Eric Dumazet > > syzkaller found another out of bound access in ip_options_compile(), > or more exactly in cipso_v4_validate() > > Fixes: 20e2a8648596 ("cipso: handle CIPSO options

Re: [PATH net] ipv4: keep skb->dst around in presence of IP options

2017-02-04 Thread David Miller
From: Eric Dumazet Date: Sat, 04 Feb 2017 11:16:52 -0800 > From: Eric Dumazet > > Andrey Konovalov got crashes in __ip_options_echo() when a NULL skb->dst > is accessed. > > ipv4_pktinfo_prepare() should not drop the dst if (evil) IP options > are

Re: [PATCH net-next] virtio_net: exploit napi_complete_done() return value

2017-02-04 Thread David Miller
From: Eric Dumazet Date: Sat, 04 Feb 2017 07:49:21 -0800 > From: Eric Dumazet > > Since commit 364b6055738b ("net: busy-poll: return busypolling status to > drivers"), napi_complete_done() returns a boolean that can be used > by drivers to

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-04 Thread Greg KH
On Sat, Feb 04, 2017 at 04:56:03PM +, Ben Hutchings wrote: > Allocating USB buffers on the stack is not portable, and no longer > works on x86_64 (with VMAP_STACK enabled as per default). It's never worked on other platforms, so these should go to the stable releases please. thanks, greg

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add watchdog interrupt handler

2017-02-04 Thread Andrew Lunn
On Sat, Feb 04, 2017 at 09:38:54PM +0100, Andrew Lunn wrote: > The switch contains a watchdog looking for issues with the internal > gubbins of the switch. Hook the interrupt the watchdog triggers and > log the value of the control register indicating why the watchdog > fired. The watchdog can

[PATCH v2 net-next 02/12] 8139cp: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) Eventually get rid of napi_gro_flush() in the future. Signed-off-by: Eric Dumazet ---

[PATCH v2 net-next 03/12] epic100: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet ---

[PATCH v2 net-next 12/12] net: remove __napi_complete()

2017-02-04 Thread Eric Dumazet
All __napi_complete() callers have been converted to use the more standard napi_complete_done(), we can now remove this NAPI method for good. Signed-off-by: Eric Dumazet --- include/linux/netdevice.h | 1 - net/core/dev.c| 24 +++- 2 files

[PATCH v2 net-next 10/12] ibm/emac: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() We plan to remove __napi_complete() to reduce NAPI complexity. --- drivers/net/ethernet/ibm/emac/mal.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/mal.c

[PATCH v2 net-next 09/12] qla3xxx: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/qlogic/qla3xxx.c | 31

[PATCH v2 net-next 08/12] ks8695net: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Note that rx_lock seems to be useless, NAPI logic should not need this extra care. Signed-off-by: Eric Dumazet

[PATCH v2 net-next 07/12] skge: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API and get rid of napi_gro_flush() Signed-off-by: Eric Dumazet ---

[PATCH v2 net-next 06/12] ep93xx_eth: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet ---

[PATCH v2 net-next 05/12] pcnet32: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/amd/pcnet32.c | 11 +++ 1 file

[PATCH v2 net-next 11/12] aeroflex/greth: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
We plan to remove __napi_complete() soon, this driver is the last user. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/aeroflex/greth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aeroflex/greth.c

[PATCH v2 net-next 04/12] amd8111e: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet ---

[PATCH v2 net-next 01/12] 8139too: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/realtek/8139too.c | 8 ++-- 1 file

[PATCH v2 net-next 00/12] net: get rid of __napi_complete()

2017-02-04 Thread Eric Dumazet
This patch series removes __napi_complete() calls, in an effort to make NAPI API simpler and generalize GRO and napi_complete_done() Eric Dumazet (12): 8139too: use napi_complete_done() 8139cp: use napi_complete_done() epic100: use napi_complete_done() amd8111e: add GRO support pcnet32:

[PATCH] net: intel: i40evf: use new api ethtool_{get|set}_link_ksettings

2017-02-04 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c

[PATCH] netfilter: xt_hashlimit: Fix integer divide round to zero.

2017-02-04 Thread Alban Browaeys
Diving the divider by the multiplier before applying to the input. When this would "divide by zero", divide the multiplier by the divider first then multiply the input by this value. Currently user2creds outputs zero when input value is bigger than the number of slices and lower than scale. This

Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable

2017-02-04 Thread Shannon Nelson
On 2/3/2017 2:11 PM, Eric Dumazet wrote: Transmit completion might happen on another cpu, regardless of ldom. Therefore you need smp_rmb() here ( like mellanox/mlx4/en_tx.c) , or even smp_mb() as bnx2x does. dma_rmb() is never used in this context. In that case, it looks like there are a

Re: [PATCH net-next 0/9] net: get rid of most __napi_complete() usages

2017-02-04 Thread Eric Dumazet
On Sat, 2017-02-04 at 10:20 -0800, Eric Dumazet wrote: > This patch series removes nine __napi_complete() calls, in an effort > to harmonize NAPI API and generalize GRO and napi_complete_done() > > Two are left, I was not feeling lucky enough to patch them :/ > ( aeroflex/greth.c &

Re: [PATCH net-next 7/9] skge: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
On Sat, 2017-02-04 at 13:44 -0800, Stephen Hemminger wrote: > On Sat, 4 Feb 2017 10:20:36 -0800 > Eric Dumazet wrote: > > > > > -static int skge_poll(struct napi_struct *napi, int to_do) > > +static int skge_poll(struct napi_struct *napi, int budget) > > Ok, but renaming

Re: [PATCH net-next 0/4] bridge: improve cache utilization

2017-02-04 Thread Nikolay Aleksandrov
On 04/02/17 22:46, Stephen Hemminger wrote: > On Sat, 4 Feb 2017 18:05:05 +0100 > Nikolay Aleksandrov wrote: > >> Hi all, >> This is the first set which begins to deal with the bad bridge cache >> access patterns. The first patch rearranges the bridge and port

Re: [PATCHv1] net-next: treewide use is_vlan_dev() helper function.

2017-02-04 Thread Stephen Hemminger
On Sat, 4 Feb 2017 11:00:49 -0600 Parav Pandit wrote: > This patch makes use of is_vlan_dev() function instead of flag > comparison which is exactly done by is_vlan_dev() helper function. > > Signed-off-by: Parav Pandit > Reviewed-by: Daniel Jurgens

Re: [PATCH net-next 0/4] bridge: improve cache utilization

2017-02-04 Thread Stephen Hemminger
On Sat, 4 Feb 2017 18:05:05 +0100 Nikolay Aleksandrov wrote: > Hi all, > This is the first set which begins to deal with the bad bridge cache > access patterns. The first patch rearranges the bridge and port structs > a little so the frequently (and closely)

Re: [PATCH net-next 7/9] skge: use napi_complete_done()

2017-02-04 Thread Stephen Hemminger
On Sat, 4 Feb 2017 10:20:36 -0800 Eric Dumazet wrote: > > -static int skge_poll(struct napi_struct *napi, int to_do) > +static int skge_poll(struct napi_struct *napi, int budget) Ok, but renaming parameter is not really necessary. > - if (work_done < to_do) { > +

Re: [PATCH] Documentation: devicetree: Add PHY no lane swap binding

2017-02-04 Thread Florian Fainelli
Le 02/04/17 à 09:23, Andrew Lunn a écrit : > On Sat, Feb 04, 2017 at 04:47:47PM +0100, Lukasz Majewski wrote: >> Add the documentation to avoid PHY lane swapping. This is a boolean >> entry to notify the phy device drivers that the TX/RX lanes NO need > > that the TX/RX lanes should not be

Re: [PATCH net-next] net: dsa: mv88e6xxx: Refactor remaining port setup

2017-02-04 Thread Vivien Didelot
Andrew Lunn writes: > Move the remaining port configuration code which varies per device > into port.c, using ops were necessary. This makes > mv88e6xxx_6185_family() and mv88e6xxx_6095_family() unused, so remove > them. > > Signed-off-by: Andrew Lunn

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add watchdog interrupt handler

2017-02-04 Thread Vivien Didelot
Andrew Lunn writes: > The switch contains a watchdog looking for issues with the internal > gubbins of the switch. Hook the interrupt the watchdog triggers and > log the value of the control register indicating why the watchdog > fired. The watchdog can only be cleared with a

[PATCH] net: intel: i40e: use new api ethtool_{get|set}_link_ksettings

2017-02-04 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c |

[PATCH net-next v5 1/4] net: dsa: Rename and export dev_to_net_device()

2017-02-04 Thread Florian Fainelli
In preparation for using this function in net/dsa/dsa2.c, rename the function to make its scope DSA specific, and export it. Signed-off-by: Florian Fainelli --- include/net/dsa.h | 1 + net/dsa/dsa.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff

[PATCH net-next v5 0/4] net: dsa: Support for pdata in dsa2

2017-02-04 Thread Florian Fainelli
Hi all, This is not exactly new, and was sent before, although back then, I did not have an user of the pre-declared MDIO board information, but now we do. Note that I have additional changes queued up to have b53 register platform data for MIPS bcm47xx and bcm63xx. Yes I know that we should

[PATCH net-next v5 4/4] ARM: orion: Register DSA switch as a MDIO device

2017-02-04 Thread Florian Fainelli
Utilize the ability to pass board specific MDIO bus information towards a particular MDIO device thus allowing us to provide the per-port switch layout to the Marvell 88E6XXX switch driver. Since we would end-up with conflicting registration paths, do not register the "dsa" platform device

[PATCH net-next v5 3/4] net: phy: Allow pre-declaration of MDIO devices

2017-02-04 Thread Florian Fainelli
Allow board support code to collect pre-declarations for MDIO devices by registering them with mdiobus_register_board_info(). SPI and I2C buses have a similar feature, we were missing this for MDIO devices, but this is particularly useful for e.g: MDIO-connected switches which need to provide

[PATCH net-next v5 2/4] net: dsa: Add support for platform data

2017-02-04 Thread Florian Fainelli
Allow drivers to use the new DSA API with platform data. Most of the code in net/dsa/dsa2.c does not rely so much on device_nodes and can get the same information from platform_data instead. We purposely do not support distributed configurations with platform data, so drivers should be providing

[PATCH net-next v5 0/4] net: dsa: Support for pdata in dsa2

2017-02-04 Thread Florian Fainelli
Hi all, This is not exactly new, and was sent before, although back then, I did not have an user of the pre-declared MDIO board information, but now we do. Note that I have additional changes queued up to have b53 register platform data for MIPS bcm47xx and bcm63xx. Yes I know that we should

Re: [PATCH net-next 6/9] ep93xx_eth: add GRO support

2017-02-04 Thread kbuild test robot
Hi Eric, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-get-rid-of-most-__napi_complete-usages/20170205-022748 config: arm-ep93xx_defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705

[PATCH net-next] net: dsa: mv88e6xxx: Add watchdog interrupt handler

2017-02-04 Thread Andrew Lunn
The switch contains a watchdog looking for issues with the internal gubbins of the switch. Hook the interrupt the watchdog triggers and log the value of the control register indicating why the watchdog fired. The watchdog can only be cleared with a switch reset, which will destroy the current

Re: [PATCHv2 net-next] net: dsa: mv88e6xxx: Implement Clause 45 access to SMI devices

2017-02-04 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The mv88e6390 MDIO bus controllers can support for clause 45 accesses. > The internal SERDES interfaces need this, and it is likely external > 10GHz PHYs will be clause 45. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien

[PATH net] ipv4: keep skb->dst around in presence of IP options

2017-02-04 Thread Eric Dumazet
From: Eric Dumazet Andrey Konovalov got crashes in __ip_options_echo() when a NULL skb->dst is accessed. ipv4_pktinfo_prepare() should not drop the dst if (evil) IP options are present. We could refine the test to the presence of ts_needtime or srr, but IP options are not

[PATCH net-next] net: dsa: mv88e6xxx: Refactor remaining port setup

2017-02-04 Thread Andrew Lunn
Move the remaining port configuration code which varies per device into port.c, using ops were necessary. This makes mv88e6xxx_6185_family() and mv88e6xxx_6095_family() unused, so remove them. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 51

[PATCHv2 net-next] net: dsa: mv88e6xxx: Implement Clause 45 access to SMI devices

2017-02-04 Thread Andrew Lunn
The mv88e6390 MDIO bus controllers can support for clause 45 accesses. The internal SERDES interfaces need this, and it is likely external 10GHz PHYs will be clause 45. Signed-off-by: Andrew Lunn --- v2: Reworded the commit message a bit, and rebased onto latest net-next. No

[PATCH v2 net-next 1/2] net: phy: Add 2000base-x, 2500base-x and rxaui modes

2017-02-04 Thread Andrew Lunn
The mv88e6390 ports 9 and 10 supports some additional PHY modes. Add these modes to the PHY core so they can be used in the binding. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v2: As requested by Florian, the following patch includes a

[PATCH v2 net-next 0/2] Set the CMODE for mv88e6390 ports

2017-02-04 Thread Andrew Lunn
The mv88e6390 ports 9 & 10 allow there CMODE to be set. CMODE is part of what linux defines as phy-mode. Add the needed phy-modes to linux, and add code which will act upon the phy-mode property to configure the switch port. These patches have been posted before as part of a bigger patchset which

[PATCH v2 net-next 2/2] net: dsa: mv88e6xxx: Set the CMODE for mv88e6390 ports 9 & 10

2017-02-04 Thread Andrew Lunn
Unlike most ports, ports 9 and 10 of the 6390X family have configurable PHY modes. Set the mode as part of adjust_link(). Ordering is important, because the SERDES interfaces connected to ports 9 and 10 can be split and assigned to other ports. The CMODE has to be correctly set before the SERDES

Re: [PATCH net-next 6/6] net: dsa: introduce bridge notifier

2017-02-04 Thread Andrew Lunn
> > What we don't want is a window of time during the fabric setup as a > > whole is inconsistent, and frames a leaking out ports they should not. > > There is no such window. Hi Vivien Great, that is what i wanted to hear. Thanks Andrew

Re: [PATCH net-next 6/6] net: dsa: introduce bridge notifier

2017-02-04 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> +#define DSA_NOTIFIER_BRIDGE_JOIN1 >> +#define DSA_NOTIFIER_BRIDGE_LEAVE 2 > > Is one notifier per event sufficient? Yes. What a switch chip in a fabric needs to know is what action is currently triggered on another chip,

[PATCH net-next 4/9] amd8111e: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet ---

[PATCH net-next 0/9] net: get rid of most __napi_complete() usages

2017-02-04 Thread Eric Dumazet
This patch series removes nine __napi_complete() calls, in an effort to harmonize NAPI API and generalize GRO and napi_complete_done() Two are left, I was not feeling lucky enough to patch them :/ ( aeroflex/greth.c & ibm/emac/mal.c ) Eric Dumazet (9): 8139too: use napi_complete_done()

[PATCH net-next 7/9] skge: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API and get rid of napi_gro_flush() Signed-off-by: Eric Dumazet ---

[PATCH net-next 3/9] epic100: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. Signed-off-by: Eric Dumazet ---

[PATCH net-next 1/9] 8139too: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/realtek/8139too.c | 16 +++-

[PATCH net-next 6/9] ep93xx_eth: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) get rid of baroque code and ease maintenance. In particular, this driver used napi_reschedule() in a way that

[PATCH net-next 5/9] pcnet32: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/amd/pcnet32.c | 11 +++ 1 file

[PATCH net-next 9/9] qla3xxx: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/qlogic/qla3xxx.c | 31

[PATCH net-next 8/9] ks8695net: add GRO support

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. Note that rx_lock seems to be useless, NAPI logic should not need this extra care. Signed-off-by: Eric Dumazet

[PATCH net-next 2/9] 8139cp: use napi_complete_done()

2017-02-04 Thread Eric Dumazet
Use napi_complete_done() instead of __napi_complete() to : 1) Get support of gro_flush_timeout if opt-in 2) Not rearm interrupts for busy-polling users. 3) use standard NAPI API. 4) Eventually get rid of napi_gro_flush() in the future. Signed-off-by: Eric Dumazet ---

Re: [PATCH net-next 6/6] net: dsa: introduce bridge notifier

2017-02-04 Thread Andrew Lunn
> +#define DSA_NOTIFIER_BRIDGE_JOIN 1 > +#define DSA_NOTIFIER_BRIDGE_LEAVE2 Hi Vivien Is one notifier per event sufficient? I've not looked at what actually needs to happen when a port joins a bridge, in a D in DSA setup. Do we need to both enable the flow of frames

Re: [PATCH v2 1/2] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-04 Thread Andrew Lunn
On Sat, Feb 04, 2017 at 05:02:11PM +0100, Lukasz Majewski wrote: > This patch adds support for enabling or disabling the port mirroring > (at CFG4 register) feature of the DP83867 TI's PHY device. As we discussed before, "port mirroring" is bad naming. Yes, we should use it, because that is what

Re: [PATCH] Documentation: devicetree: Add PHY no lane swap binding

2017-02-04 Thread Andrew Lunn
On Sat, Feb 04, 2017 at 04:47:47PM +0100, Lukasz Majewski wrote: > Add the documentation to avoid PHY lane swapping. This is a boolean > entry to notify the phy device drivers that the TX/RX lanes NO need that the TX/RX lanes should not be swapped. > to be swapped. > The use case for this

Re: [PATCH v2 net] bpf: add bpf_sk_netns_id() helper

2017-02-04 Thread Andy Lutomirski
On Fri, Feb 3, 2017 at 5:22 PM, Alexei Starovoitov wrote: > Note that all bpf programs types are global. I don't think this has a clear enough meaning to work with. In particular, I think that, if you have some software that installs cgroup+bpf programs and you run it in a

Re: [net-next v2 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2017-02-03

2017-02-04 Thread David Miller
From: Jeff Kirsher Date: Fri, 3 Feb 2017 18:56:31 -0800 > This series contains updates to i40e/i40evf only. Pulled, thanks Jeff.

Re: Potential issues (security and otherwise) with the current cgroup-bpf API

2017-02-04 Thread Andy Lutomirski
On Fri, Feb 3, 2017 at 3:21 PM, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 01:07:39PM -0800, Andy Lutomirski wrote: >> >> Is there any plan to address this? If not, I'll try to write that >> patch this weekend. > > yes. I'm working on 'disallow program

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Andy Lutomirski
On Fri, Feb 3, 2017 at 3:42 PM, Daniel Borkmann wrote: > On 02/04/2017 12:06 AM, Alexei Starovoitov wrote: >> >> On Fri, Feb 03, 2017 at 10:56:43PM +0100, Daniel Borkmann wrote: >>> >>> On 01/26/2017 04:27 AM, Alexei Starovoitov wrote: in cases where bpf programs

Re: [PATCH net] bpf: expose netns inode to bpf programs

2017-02-04 Thread Andy Lutomirski
On Fri, Feb 3, 2017 at 3:08 PM, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 01:00:47PM -0800, Andy Lutomirski wrote: >> >> ISTM any ability to migrate namespaces and to migrate eBPF programs >> that know about namespaces needs to have the eBPF program firmly

[PATCH net-next 2/4] bridge: move to workqueue gc

2017-02-04 Thread Nikolay Aleksandrov
Move the fdb garbage collector to a workqueue which fires at least 10 milliseconds apart and cleans chain by chain allowing for other tasks to run in the meantime. When having thousands of fdbs the system is much more responsive. Most importantly remove the need to check if the matched entry has

[PATCH net-next 1/4] bridge: modify bridge and port to have often accessed fields in one cache line

2017-02-04 Thread Nikolay Aleksandrov
Move around net_bridge so the vlan fields are in the beginning since they're checked on every packet even if vlan filtering is disabled. For the port move flags & vlan group to the beginning, so they're in the same cache line with the port's state (both flags and state are checked on each packet).

[PATCH net-next 0/4] bridge: improve cache utilization

2017-02-04 Thread Nikolay Aleksandrov
Hi all, This is the first set which begins to deal with the bad bridge cache access patterns. The first patch rearranges the bridge and port structs a little so the frequently (and closely) accessed members are in the same cache line. The second patch then moves the garbage collection to a

[PATCH net-next 3/4] bridge: move write-heavy fdb members in their own cache line

2017-02-04 Thread Nikolay Aleksandrov
Fdb's used and updated fields are written to on every packet forward and packet receive respectively. Thus if we are receiving packets from a particular fdb, they'll cause false-sharing with everyone who has looked it up (even if it didn't match, since mac/vid share cache line!). The "used" field

[PATCH net-next 4/4] bridge: fdb: write to used and updated at most once per jiffy

2017-02-04 Thread Nikolay Aleksandrov
Writing once per jiffy is enough to limit the bridge's false sharing. After this change the bridge doesn't show up in the local load HitM stats. Suggested-by: David S. Miller Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_fdb.c | 3 ++-

[PATCHv1] net-next: treewide use is_vlan_dev() helper function.

2017-02-04 Thread Parav Pandit
This patch makes use of is_vlan_dev() function instead of flag comparison which is exactly done by is_vlan_dev() helper function. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens --- drivers/infiniband/core/cma.c| 6

[PATCH net 4/4] catc: Use heap buffer for memory size test

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings --- drivers/net/usb/catc.c | 25 ++--- 1 file changed, 18

[PATCH net 3/4] catc: Combine failure cleanup code in catc_probe()

2017-02-04 Thread Ben Hutchings
Signed-off-by: Ben Hutchings --- drivers/net/usb/catc.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 3daa41bdd4ea..985909eab72c 100644 ---

[PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings --- drivers/net/usb/rtl8150.c | 34 +++--- 1 file

  1   2   >